Combined use of jquery.qrcode.min.js to generate mobile QR codes for iwebshop product details First, you go online and download the jquery.qrcode.min.js JQ plug-in and place it in the views/javascript folder
1. Call the following code in the head of products.html
<script type="text/javascript" src="{theme:javascript/jquery.qrcode.min.js}"> ;</script>
2. Add the following code where you need to place the QR code
<div id="code"></div> ;
3. Add the following code at the bottom of the page to use it
<script type="text/javascript">
$ (function(){
//Product QR code generation
var str = toUtf8("{echo:$siteConfig->url}{url:/site/products/id/ $id}");
$("#code").empty();
$("#code").qrcode({
render: " table",
width:88,height:88,text:str
});
});
</script>
After adding the above code, you still need to have a mobile version of your website, otherwise it will be useless if you add scanning.
If you need the mobile version, you can consult this site*** or iwebshop official technical staff***.