alchemisto Posted February 13, 2012 Share Posted February 13, 2012 In order history detail, instead of only product name, I want to link it (product name) into the product page, so that customer can easily review the product they've ordered by clicking on it. I've tried to edit order-history.tpl but still no luck. <!-- Classic products --> ... {$product.product_name|escape:'htmlall':'UTF-8'} into <!-- Classic products --> ... <a href="{$link->getProductLink($product.id_product, $product.link_rewrite, $product.category)|escape:'htmlall':'UTF-8'}">{$product.product_name|escape:'htmlall':'UTF-8'}</a> It will link to product with id=0 How can I do this correctly? PS. I use Prestashop 1.3.x Link to comment Share on other sites More sharing options...
Hardwell Posted March 24, 2013 Share Posted March 24, 2013 up Link to comment Share on other sites More sharing options...
notabene Posted June 26, 2013 Share Posted June 26, 2013 <a href="{$link->getProductLink($product.product_id, $product.link_rewrite, $product.category_rewrite)}">...</a> Link to comment Share on other sites More sharing options...
lordbdp Posted December 19, 2014 Share Posted December 19, 2014 Is it same modifications to do for PS 1.5.6.2 ? Link to comment Share on other sites More sharing options...
lordbdp Posted December 27, 2014 Share Posted December 27, 2014 I don't find it on history.tplI have done some modifications on order-detail.tpl change : <th class="item">{l s='Product'}</th> by : <th class="item"><a href="{$link->getProductLink($product.product_id, $product.link_rewrite, $product.category_rewrite)}">{l s='Product'}</a></th> But after I can't open the order detail Link to comment Share on other sites More sharing options...
lordbdp Posted December 31, 2014 Share Posted December 31, 2014 up Link to comment Share on other sites More sharing options...
lordbdp Posted January 7, 2015 Share Posted January 7, 2015 up Link to comment Share on other sites More sharing options...
lordbdp Posted January 18, 2015 Share Posted January 18, 2015 up Link to comment Share on other sites More sharing options...
escalepion Posted April 26, 2016 Share Posted April 26, 2016 year 2016 and i wonder same question.and there is no answer still... what s the solution? Link to comment Share on other sites More sharing options...
escalepion Posted April 26, 2016 Share Posted April 26, 2016 isn't there anybody who knows how to add link to product in order history detail page? Link to comment Share on other sites More sharing options...
escalepion Posted April 27, 2016 Share Posted April 27, 2016 still nobody have any idea about this simply question? where are presta developers? Link to comment Share on other sites More sharing options...
easymar Posted April 27, 2016 Share Posted April 27, 2016 Hi. Here it is, with image:<a href="{$link->getProductLink($product)|escape:'html'}"> <img class="history_img" src="{$link->getImageLink($product.link_rewrite, $product.image->id_image, 'small_default')}{('.jpg')}" alt="{$product.name|escape:'htmlall':'UTF-8'}" {if isset($smallSize)}width="{$smallSize.width}" height="{$smallSize.height}" {/if} />{$product.product_name|escape:'htmlall':'UTF-8'} </a> Link to comment Share on other sites More sharing options...
escalepion Posted April 27, 2016 Share Posted April 27, 2016 easymar thanks for reply...and we will copy this on order-detail.tpl file...am i right? Link to comment Share on other sites More sharing options...
easymar Posted April 27, 2016 Share Posted April 27, 2016 Yes, to order-detail.tpl, line ~ 300 (part of <!-- Classic products --> ). There will be {$product.product_name|escape:'htmlall':'UTF-8'} - just replace with my code. Link to comment Share on other sites More sharing options...
escalepion Posted April 29, 2016 Share Posted April 29, 2016 thank you very much i ll try it. Link to comment Share on other sites More sharing options...
rushaboswal.rdx Posted November 3, 2016 Share Posted November 3, 2016 Yes, to order-detail.tpl, line ~ 300 (part of <!-- Classic products --> ). There will be {$product.product_name|escape:'htmlall':'UTF-8'} - just replace with my code. Hello i did what you said still no changes can you help pleasE? Link to comment Share on other sites More sharing options...
rocky Posted November 3, 2016 Share Posted November 3, 2016 Did you go to Advanced Parameters > Performance and click the "Clear cache" button? You need to do that if you have "Never compile templates" selected. Link to comment Share on other sites More sharing options...
rushaboswal.rdx Posted November 3, 2016 Share Posted November 3, 2016 Did you go to Advanced Parameters > Performance and click the "Clear cache" button? You need to do that if you have "Never compile templates" selected. Hello now nothing happend when i click on details. Can you help me please. Link to shop www.kolhapurithusi.in And yes i cleared the cache and have never compile templates selected Link to comment Share on other sites More sharing options...
rushaboswal.rdx Posted November 3, 2016 Share Posted November 3, 2016 Did you go to Advanced Parameters > Performance and click the "Clear cache" button? You need to do that if you have "Never compile templates" selected. or could you just provide a modified Order-detail.tpl if im doing anything wrong. Link to comment Share on other sites More sharing options...
rocky Posted November 3, 2016 Share Posted November 3, 2016 I tested the code above and the product image code had errors in it, so I removed it so there's only a link. Change line 302 (in PrestaShop v1.6.1.8) of themes/default-bootstrap/order-detail.tpl from: {$product.product_name|escape:'html':'UTF-8'} to: <a href="{$link->getProductLink($product)|escape:'html'}">{$product.product_name|escape:'htmlall':'UTF-8'}</a> 1 Link to comment Share on other sites More sharing options...
rushaboswal.rdx Posted November 3, 2016 Share Posted November 3, 2016 I tested the code above and the product image code had errors in it, so I removed it so there's only a link. Change line 302 (in PrestaShop v1.6.1.8) of themes/default-bootstrap/order-detail.tpl from: {$product.product_name|escape:'html':'UTF-8'} to: <a href="{$link->getProductLink($product)|escape:'html'}">{$product.product_name|escape:'htmlall':'UTF-8'}</a> thanks for your reply. Did it cleared cache still the same.. Can you please provide a properly edited order-detail file so that i can upload it please! Link to comment Share on other sites More sharing options...
rushaboswal.rdx Posted November 3, 2016 Share Posted November 3, 2016 (edited) I tested the code above and the product image code had errors in it, so I removed it so there's only a link. Change line 302 (in PrestaShop v1.6.1.8) of themes/default-bootstrap/order-detail.tpl from: {$product.product_name|escape:'html':'UTF-8'} to: <a href="{$link->getProductLink($product)|escape:'html'}">{$product.product_name|escape:'htmlall':'UTF-8'}</a> cAN SEE THE ORDER NOW BUT PRODUCT LINKS ARENT CLICKABLE YET Edited November 3, 2016 by rushaboswal.rdx (see edit history) Link to comment Share on other sites More sharing options...
rushaboswal.rdx Posted November 3, 2016 Share Posted November 3, 2016 Or should i send you the order-detail.tpl file to check if its done correctly Link to comment Share on other sites More sharing options...
rocky Posted November 3, 2016 Share Posted November 3, 2016 Here's a zipped version of my order-detail.tpl file, but note that it's based on the one from PrestaShop v1.6.1.8, so it may not be fully compatible if you're using an older version. order-detail.zip 1 Link to comment Share on other sites More sharing options...
rushaboswal.rdx Posted November 3, 2016 Share Posted November 3, 2016 Here's a zipped version of my order-detail.tpl file, but note that it's based on the one from PrestaShop v1.6.1.8, so it may not be fully compatible if you're using an older version. Have the same version will check and get back to you Link to comment Share on other sites More sharing options...
rushaboswal.rdx Posted November 3, 2016 Share Posted November 3, 2016 Here's a zipped version of my order-detail.tpl file, but note that it's based on the one from PrestaShop v1.6.1.8, so it may not be fully compatible if you're using an older version. Hello used your .tpl file but still products arent clickable yet.. Cleared Cache too.. Sorry if im torubling you a lot Link to comment Share on other sites More sharing options...
rocky Posted November 3, 2016 Share Posted November 3, 2016 It's working fine on my PrestaShop v1.6.1.8 test site. Try going to the Advanced Parameters > Performance tab and temporarily choose "Force compile". If that doesn't work, maybe your web browser has cached the AJAX request? Try clearing your web browser cache. Link to comment Share on other sites More sharing options...
rushaboswal.rdx Posted November 3, 2016 Share Posted November 3, 2016 It's working fine on my PrestaShop v1.6.1.8 test site. Try going to the Advanced Parameters > Performance tab and temporarily choose "Force compile". If that doesn't work, maybe your web browser has cached the AJAX request? Try clearing your web browser cache. It worked now.. Thanks a lot. can i switch it back to never recompile now? Also is there a way to highlight the LINK to make it much easier. Thanks Thanks A lot you really are an legend Link to comment Share on other sites More sharing options...
rocky Posted November 3, 2016 Share Posted November 3, 2016 Yes, you can change it back if you've finished editing TPL files. If you plan to edit them some more, I suggest choosing "Recompile templates if they've been updated". You can change <a to <a style="color: blue" or another colour to make it more obvious it is clickable. 1 Link to comment Share on other sites More sharing options...
rushaboswal.rdx Posted November 3, 2016 Share Posted November 3, 2016 Yes, you can change it back if you've finished editing TPL files. If you plan to edit them some more, I suggest choosing "Recompile templates if they've been updated". You can change <a to <a style="color: blue" or another colour to make it more obvious it is clickable. <a style="color: blue" href="{$link->getProductLink($product)|escape:'html'}">{$product.product_name|escape:'htmlall':'UTF-8'}</a> So this is the right code? Correct me if im wrong.! Dont have enough words to thank you Also is it possible to add same links in the automatic generated emails? PS- I'll also make post about this to help other with your name and thanking you if you dont have a problem sir Link to comment Share on other sites More sharing options...
rocky Posted November 3, 2016 Share Posted November 3, 2016 Yes, that's right. Link to comment Share on other sites More sharing options...
linkin11 Posted June 7, 2017 Share Posted June 7, 2017 Only one word to all: THANKS 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