Jump to content

Recommended Posts

в index.tpl перед </head> ( файл в архиве jquery.qrcode.min.zip в папку design/дизайн/js/ )

<script type="text/javascript" src="design/{$settings->theme}/js/jquery.qrcode.min.js"></script>


в ваш дизайн/product.tpl вставим в удобном месте

<div id="smallCode" class="qrcode"></div>
 <script type="text/javascript">
 $('#smallCode').qrcode({width: 100,height: 100,text: "{/literal}{$config->root_url}/products/{$product->url}{literal}"});


в css:

.qrcode {
    width: 100px;
    height: 100px;
    margin: auto;



Edited by trainracing
Link to post
Share on other sites

Для тех, кому все это лень, и готовы доверить все стороннему сервису, вставить в product.tpl в удобное место только этот код:

 <img src="http://qrcoder.ru/code/?{$config->root_url}%2Fproducts%2F{$product->url|escape}&4&0" width="100" height="100" border="0">

и все будет работать

Edited by trainracing
Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...