Guest Posted November 19, 2013 Share Posted November 19, 2013 (edited) I have this code:(this code/script what i must put into product description have shows button for affiliate) <script type="text/javascript" src="http://www.affiliatecompanywebsite.com/wishButton.php?ean=123456789&firm_id=hereismyidnumberwhatprovidemyaffiliatecompany"> </script> and i must this code put on product description on product page. But when i open product and write this into description via HTML button (in administration backend) so after save and when i look on frontend on product so in descritption isnt it. Please help how put this javascript code on product escription on product page? Prestashop version 1.3.4.0, Tinymce shows version 3.3.9 (2010-09-08) Very thanks for all answers. Edited November 19, 2013 by MPart (see edit history) Link to comment Share on other sites More sharing options...
NemoPS Posted November 19, 2013 Share Posted November 19, 2013 I think javascript gets escaped. Try adding it directly to product.tpl, in the more info block. I can't tell you exactly where at the moment as I don't have a 1.3 version here right now Link to comment Share on other sites More sharing options...
vekia Posted November 19, 2013 Share Posted November 19, 2013 you can use modules like html box or content box. you can select there "header" hook, then just paste your code and hit save fast & easy Link to comment Share on other sites More sharing options...
Guest Posted November 19, 2013 Share Posted November 19, 2013 (edited) thanks for both replies. but i will have in each product others code. because in script is "product ean number" and it is different for each product. so i mean that i manual add into all products into product description and write manual ean code. <script type="text/javascript"src="http://www.affiliatecompanywebsite.com/wishButton.php?ean=123456789&firm_id=hereismyidnumberwhatprovidemyaffiliatecompany"></script> because iam not coder etc. so i mean that i write code into product description and every i change ean code, but when i put this code/javascript into "tpl" or "html box" i dont know how set for each product different ean. so for me i mean is lightest add code manual into description and manual change ean. so exist for me any solution with this problem please? Edited November 19, 2013 by MPart (see edit history) Link to comment Share on other sites More sharing options...
vekia Posted November 19, 2013 Share Posted November 19, 2013 yes, you've got right. so follow Nemo's suggestion and insert this code manually to theme file: product.tpl Link to comment Share on other sites More sharing options...
Guest Posted November 19, 2013 Share Posted November 19, 2013 (edited) yes, you've got right. so follow Nemo's suggestion and insert this code manually to theme file: product.tpl hi vekia, ok but when i add code manual into tpl how made for every/each product in code different ean code? iam not coder so i dont know how you mean this? fo example i have in my prestashop 10 products, 1. product have ean 001, 2. product have ean 002, etc so in my javascript i need example in product description in product 1 this: <script type="text/javascript" src="http://www.affiliate...wishButton.php?ean=001&firm_id=hereismyidnumberwhatprovidemyaffiliatecompany"> </script> in product description in product 2 this: <script type="text/javascript" src="http://www.affiliate...wishButton.php?ean=002&firm_id=hereismyidnumberwhatprovidemyaffiliatecompany"> </script> so exist some code what i write into my javascript what add ean code product? because when i write code manualy on hard into tpl how made that in product 1 will be in ean number ean for product one and example on product description in product two will be ean number for product 2. know you what i mean now? (sory for my english my english isnt good) Edited November 19, 2013 by MPart (see edit history) Link to comment Share on other sites More sharing options...
vekia Posted November 19, 2013 Share Posted November 19, 2013 you can use {$product->ean13} variable to display ean value Link to comment Share on other sites More sharing options...
Guest Posted November 19, 2013 Share Posted November 19, 2013 you can use {$product->ean13} variable to display ean value realy? vekia you are genius. so i must add/write into product.tpl this: write i good? <script type="text/javascript" src="http://www.affiliate...wishButton.php?ean={$product->ean13}&firm_id=hereismyidnumberwhatprovidemyaffiliatecompany"> </script> Link to comment Share on other sites More sharing options...
vekia Posted November 20, 2013 Share Posted November 20, 2013 realy? vekia you are genius. so i must add/write into product.tpl this: write i good? <script type="text/javascript" src="http://www.affiliate...wishButton.php?ean={$product->ean13}&firm_id=hereismyidnumberwhatprovidemyaffiliatecompany"> </script> that's correct Link to comment Share on other sites More sharing options...
Guest Posted November 25, 2013 Share Posted November 25, 2013 (edited) that's correct hi vekia, ok i try add and write feedback Edited November 25, 2013 by MPart (see edit history) Link to comment Share on other sites More sharing options...
Guest Posted November 25, 2013 Share Posted November 25, 2013 (edited) so before +-5 minutes i add this code on website and yes button show on web. i have only question is code what you write me on 100% good?because i have small problem button show only in products what havent ean number and in products with ean number isnt shows this button why? :,( Edited November 25, 2013 by MPart (see edit history) Link to comment Share on other sites More sharing options...
Guest Posted November 25, 2013 Share Posted November 25, 2013 now i write this javascript betwen {literal}here is{/literal}and now this button not shows in produst without ean and not shows in products with eanso my question is: mus i write this code/javascript betwen {literal}{/literal} in tpl or not? and why when i write javascript without literal so shows only in products whats havent ean number? because i need other situation (shows in products with ean) or in all products Link to comment Share on other sites More sharing options...
vekia Posted November 25, 2013 Share Posted November 25, 2013 can you share url to page where this problem occurs? Link to comment Share on other sites More sharing options...
Guest Posted November 26, 2013 Share Posted November 26, 2013 (edited) can you share url to page where this problem occurs? Hi vekia, sory you has all time true. I big apologize. Your help and code for ean was good. Yesterday affiliate company wrote me that they have small problem with EAN numbers and that I must use "Item ID" but why code is for item id please? for ean is this: {$product->ean13} but what is for item id? Edited November 26, 2013 by MPart (see edit history) Link to comment Share on other sites More sharing options...
vekia Posted November 26, 2013 Share Posted November 26, 2013 Hi vekia, sory you has all time true. I big apologize. Your help and code for ean was good. Yesterday affiliate company wrote me that they have small problem with EAN numbers and that I must use "Item ID" but why code is for item id please? for ean is this: {$product->ean13} but what is for item id? but what is item ID ? product id in your store? if so, you can use {$product->id} variable Link to comment Share on other sites More sharing options...
Guest Posted November 26, 2013 Share Posted November 26, 2013 (edited) but what is item ID ? product id in your store? if so, you can use {$product->id} variable Yes, maybe my affiliate company mean this. Ok today night I test it and write here feedback. Hi vekia, yes wrong was on affil company. Now is all okay when I use code for id. Very thanks for help. Edited December 4, 2013 by MPart (see edit history) Link to comment Share on other sites More sharing options...
shinnokdrako Posted January 16, 2014 Share Posted January 16, 2014 Hi all, i see here something that i'd like to insert in my shop. If it's possible, i need i guess some code to insert the order number in the description of a product. What can i do to show it? I have to modify the file "product.tpl" too? In the final part of the order, it has to be in first position like: Name: XXXXX Description: Order #00000233 (and this is the part i need there, with a code probably) I need to get from the database the number of the order that i've just made and it has to appear on the description of an item. How can i do it? Thanks Link to comment Share on other sites More sharing options...
Recommended Posts