Add a mobile QR code link to the product
阿文
阿文 2018-10-11 14:39:54
0
0
929

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***.


阿文
阿文

reply all(0)
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!