John_John Posted January 26, 2013 Share Posted January 26, 2013 (edited) Hello, I am using Prestashop 1.5.3.1 at the moment and am quite 'happy' so far in that things are still working. Have downloaded and installed the QR code found at : http://prestanesia.c...roduct-qr-code/ Even though it is only compatible up to 1.4.x , i could install it without problems. The real problem is that the dynamic link seems to be wrong. The QR code currently generates the URL based on this line: {$link->getProductLink($product->id, $product->link_rewrite, $product->category)} But i have a feeling that this is not correct with version 1.5.3.1. Who knows how i can fix this URL so that it works? Thanks in advance Edited January 29, 2013 by John_John (see edit history) Link to comment Share on other sites More sharing options...
PotionsFactory Posted January 26, 2013 Share Posted January 26, 2013 With PrestaShop 1.5, you could just use {$product_link} That would change blockqrcode.tpl from <img src="https://chart.googleapis.com/chart?cht=qr&chs=128x128&chld=L|0&chl={$link->getProductLink($product->id, $product->link_rewrite, $product->category)}" alt="{$product->name}" style="float:right;" /> To <img src="https://chart.googleapis.com/chart?cht=qr&chs=128x128&chld=L|0&chl={$product_link}" alt="{$product->name}" style="float:right;" /> Link to comment Share on other sites More sharing options...
John_John Posted January 27, 2013 Author Share Posted January 27, 2013 (edited) Thanks for the reply PotionsFactory Have tried it but didn't seem to work Have tried the following as well without success {$link->getProductLink($product)} Edited January 27, 2013 by John_John (see edit history) Link to comment Share on other sites More sharing options...
PotionsFactory Posted January 28, 2013 Share Posted January 28, 2013 Weird, I've got it working here with just {$product_link} Would you be able to provide us with a link to your test site? Link to comment Share on other sites More sharing options...
John_John Posted January 28, 2013 Author Share Posted January 28, 2013 That is very strange. I am unable to give the link as i am workin on it locally. Would that be the problem? When looking in the source code, the "{$product_link}" doesnt return any value at all Link to comment Share on other sites More sharing options...
PotionsFactory Posted January 28, 2013 Share Posted January 28, 2013 (edited) Working locally shouldn't be an issue. Could you add this line to blockqrcode.tpl {debug} That should give you a popup with a quite a few Smarty Variables and their respective outputs. Could you copy that entire output (it's a bit large) and paste it here? It'll list out what variables your system is parsing. Are you using Friendly URL's? P.S. If you don't get a popup with the Smarty Variables, double check that your Popup Blocker is disabled for your test site. Edited January 28, 2013 by PotionsFactory (see edit history) 1 Link to comment Share on other sites More sharing options...
John_John Posted January 29, 2013 Author Share Posted January 29, 2013 Thanks for following up Potions. Have tested this a bit further with Friendly URL's and without. Also with enabling debug mode. Interestingly, all the {$product} variations don't work But i found it to return the normal URL when i use {$come_from} And for the alt i just used {$name} At the moment i don't see anything wrong with using the above code so its fixed !? Link to comment Share on other sites More sharing options...
PotionsFactory Posted January 29, 2013 Share Posted January 29, 2013 Weird. I was under the impression that $come_from was used to target an internal referral URL, but it works for me too. I'd keep an eye on it with future releases, but it does seem to work fine for now. Hopefully that will get your QR codes back to normal. Link to comment Share on other sites More sharing options...
John_John Posted January 29, 2013 Author Share Posted January 29, 2013 yes, i think it is (highly) strange as well, but it does work and returns the proper URL So for now, it works thanks again for the help ! Link to comment Share on other sites More sharing options...
Roger_bps Posted February 13, 2013 Share Posted February 13, 2013 Hi, Just wanted to report that even though a QR code is generated by the {$come_from} it will not generate the complete URL for me. But the {$product_link} does generate a correct URL in the QR code! Seems to be a problem with the "&" parameters that is turned into "&" when using {$come_from} . I am using PS 1.5.1.0 Link to comment Share on other sites More sharing options...
sdfsdfgwe Posted April 10, 2013 Share Posted April 10, 2013 To create QR Code barcode for URL, try to see this ASP.NET barcode generator library. It provides detailed guide for create barcode in ASP.NET. Link to comment Share on other sites More sharing options...
Ginno Posted June 4, 2013 Share Posted June 4, 2013 (edited) With PrestaShop 1.5, you could just use {$product_link} That would change blockqrcode.tpl from <img src="https://chart.googleapis.com/chart?cht=qr&chs=128x128&chld=L|0&chl={$link->getProductLink($product->id, $product->link_rewrite, $product->category)}" alt="{$product->name}" style="float:right;" /> To <img src="https://chart.googleapis.com/chart?cht=qr&chs=128x128&chld=L|0&chl={$product_link}" alt="{$product->name}" style="float:right;" /> it's work well the only change is in blockqrcode.php need to change return (parent::install() AND $this->registerHook('productActions')); and public function hookProductActions($params) to return (parent::install() AND $this->registerHook('extraLeft')); and public function hookExtraLeft($params) (to appear in the left side of the product page, otherwise is hiding under the "add to cart" and you can not scan the code) Edited June 4, 2013 by Ginno (see edit history) Link to comment Share on other sites More sharing options...
archproject Posted June 7, 2013 Share Posted June 7, 2013 Great .. {$product_link} it worked for me and I am using PS 1.5.4.1 Link to comment Share on other sites More sharing options...
archproject Posted October 29, 2013 Share Posted October 29, 2013 Now I am running PS 1.5.6 and different way to implement my google qr code. I am adding the qr code via the CMS> edit HTML source . and it does not work with both the below codes. Can someone tell me how to use it via the CMS (Edit HTML source) ? Both the below code cannot get the product page URL at all. <img src="https://chart.googleapis.com/chart?cht=qr&chs=128x128&chld=L|0&chl={$link->getProductLink($product->id, $product->link_rewrite, $product->category)}" alt="{$product->name}" style="float:right;" /> and <img src="https://chart.googleapis.com/chart?cht=qr&chs=128x128&chld=L|0&chl={$product_link}" alt="{$product->name}" style="float:right;" /> Appreciate the help guys... Thanks Link to comment Share on other sites More sharing options...
vekia Posted October 29, 2013 Share Posted October 29, 2013 hello smarty code + php code will not work in html editors like tinymce in cms editor page (and other pages too) Link to comment Share on other sites More sharing options...
archproject Posted October 30, 2013 Share Posted October 30, 2013 OK I got it to work on PS 1.5.6. The Module installed into 1.5.6 nicely and it uses the below for the qr code (blockqrcode.tpl) <img src="https://chart.googleapis.com/chart?cht=qr&chs=128x128&chld=L|0&chl={$link->getProductLink($product->id, $product->link_rewrite, $product->category)}" alt="{$product->name}" /> Vekia, I ditch the use of CMS (edit HTML editor) hheheheh and tried the module and it worked Thanks anyway Link to comment Share on other sites More sharing options...
Brucetrainer Posted May 27, 2014 Share Posted May 27, 2014 qr code reading sample code in asp.net Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now