dovilelin Posted October 25, 2013 Share Posted October 25, 2013 Hi I very need help. How to add new button on product page with link to other site. very thanks for help Link to comment Share on other sites More sharing options...
vekia Posted October 25, 2013 Share Posted October 25, 2013 you want to add this button for certain products, or just the same button for each product in your store? 1 Link to comment Share on other sites More sharing options...
fint87 Posted October 27, 2013 Share Posted October 27, 2013 I want to add the button to all products Link to comment Share on other sites More sharing options...
vekia Posted October 27, 2013 Share Posted October 27, 2013 so in this case you can just open: themes/YOUR_THEME/product.tpl add there code like: <a href="http://somewesbite.com">{l s='Some website'}</a> place this code there, where you want to show button to another page 1 Link to comment Share on other sites More sharing options...
fint87 Posted October 27, 2013 Share Posted October 27, 2013 Thank you, it works. But how to add a link to the created CMS, because the way you change the language, there is another url. Link to comment Share on other sites More sharing options...
vekia Posted October 27, 2013 Share Posted October 27, 2013 if you want to create url to CMS page just use this code: <a href="{$link->getPageLink(5)|escape:'html'}">{l s='Some website'}</a> where 5 is a CMS page ID 1 Link to comment Share on other sites More sharing options...
[email protected] Posted October 31, 2013 Share Posted October 31, 2013 I desperately need to do this as well, but I need the links to be different for each product. Any chance that's possible? Link to comment Share on other sites More sharing options...
vekia Posted October 31, 2013 Share Posted October 31, 2013 it will be hard to achieve without additional module / customization of classes/controllers of prestashop. here are several possibilities 1) template modification, add several many if conditions but it's not useful solution {if tools::getValue('id_product')==1} button 1 {/if} {if tools::getValue('id_product')==2} button 2 {/if} etc... 2) customization of controllers (a bit complicated, you will need to add new field to database, exten product object in product.php class + back office theme modification) + product.tpl modification3) some custom module to display contents for product page, i've got one but it's not free 1 Link to comment Share on other sites More sharing options...
[email protected] Posted October 31, 2013 Share Posted October 31, 2013 Thank you for the advices Link to comment Share on other sites More sharing options...
[email protected] Posted October 31, 2013 Share Posted October 31, 2013 Where can I buy your module?I'm having trouble finding it on your website. Link to comment Share on other sites More sharing options...
vekia Posted October 31, 2013 Share Posted October 31, 2013 you can do it with html box pro module, you can define there block for certain products only - based on product ID value 1 Link to comment Share on other sites More sharing options...
dovilelin Posted October 31, 2013 Author Share Posted October 31, 2013 Hi I want to have the same button like add to cart but with link to other my web site on all my product list maybe where are the module? Link to comment Share on other sites More sharing options...
vekia Posted October 31, 2013 Share Posted October 31, 2013 Hi I want to have the same button like add to cart but with link to other my web site on all my product list maybe where are the module? you can find it here: html box for prestashop 1 Link to comment Share on other sites More sharing options...
J.Sahu Posted January 16, 2014 Share Posted January 16, 2014 Can I create a module which will link to the product details page ? if yes then how can I place that in specific position ? Can you give some idea ? I want to create a radio button and select shipping option there in the product details page. Is there any module available by which I can achieve the task ? may be paid or free module ? Link to comment Share on other sites More sharing options...
vekia Posted January 16, 2014 Share Posted January 16, 2014 well you can use product page hooks like: productActions productFooter displayProductLeft displayProductRight ProductTabContents ProducTab but i have no idea how to create there delivery options field which will be used in cart. i think it will be a bit hard to achieve (with modifications of controllers) 1 Link to comment Share on other sites More sharing options...
J.Sahu Posted January 16, 2014 Share Posted January 16, 2014 Thank You Milos. Let me try with this. I also think its bit hard job. Link to comment Share on other sites More sharing options...
vekia Posted January 16, 2014 Share Posted January 16, 2014 it will be hard due to the fact, that you have to pass somehow these settings to order process, i have no idea how 1 Link to comment Share on other sites More sharing options...
somits1 Posted March 5, 2014 Share Posted March 5, 2014 how to add button for single product?? Link to comment Share on other sites More sharing options...
vekia Posted March 5, 2014 Share Posted March 5, 2014 you have to create restriction, for example with if conditions {if $smarty.get.id_product=="1"} do something here if product id = 1{/if} Link to comment Share on other sites More sharing options...
somits1 Posted March 5, 2014 Share Posted March 5, 2014 but i have to change for only one product. in product.tpl?? Link to comment Share on other sites More sharing options...
somits1 Posted March 5, 2014 Share Posted March 5, 2014 I have to add buy now button of any other site link in one product. so please tell me about this? also tell me location because i do not know coding.. Link to comment Share on other sites More sharing options...
vekia Posted March 5, 2014 Share Posted March 5, 2014 I have to add buy now button of any other site link how you can "buy now" for example cms page? please describe what you exactly expect. in addition, i pasted if condition before for product page Link to comment Share on other sites More sharing options...
somits1 Posted March 7, 2014 Share Posted March 7, 2014 Sorry for late reply.. I want to add like this , on each product page there is option to "add to cart". But i have disabled that on my site. I have enabled only "Online Only" option. But in some Product i want to add one or two button like "Buy now from xyz.com" or Buy now From xy.com" above product description. where xyz and xy example of anyother site. and "buy now from xyz.com" is text of Button. My site (http://www.slmobileprice.com ) or check image. Link to comment Share on other sites More sharing options...
somits1 Posted March 13, 2014 Share Posted March 13, 2014 waiting for reply?? Link to comment Share on other sites More sharing options...
vekia Posted March 13, 2014 Share Posted March 13, 2014 im confused a little due to the fact that you attached image which shows product lists (i think listing of products associated with viewed category page) so, if you want to add this button on list - it will be hard to achieve, but it's possible. The simplest solution: add several if conditions to check product id, and depending on ID - display wanted button. {if $product.id==10} <a href="http://google.com">Visit google.com</a> {/if} if you want to display it on product pages (not products listings) you can achieve it with module like product page content blocks. It's much easier in use than modification of .tpl files with if conditions Link to comment Share on other sites More sharing options...
somits1 Posted March 14, 2014 Share Posted March 14, 2014 Ok thanks for your suggestion, i will try if any issue i will get back to you. Link to comment Share on other sites More sharing options...
somits1 Posted March 14, 2014 Share Posted March 14, 2014 image not showing product list.. only one product...price is different because ..everysite selling that product in different prize.. as Sony Xperia neo V price in http://x.com is 17000 Rs, and in y.com is 16000 Rs., so i want to add these site link below product. Ok let me check with this solution, then i will get back to you. Link to comment Share on other sites More sharing options...
vekia Posted March 14, 2014 Share Posted March 14, 2014 image not showing product list.. only one product... i only see a little part of whole page, so it's hard to say what part of store it shows. i see there several prices with several buttons to external pages, so it looks like product-list.tpl file. Link to comment Share on other sites More sharing options...
somits1 Posted March 14, 2014 Share Posted March 14, 2014 ok i will try. Link to comment Share on other sites More sharing options...
pawelr34 Posted June 14, 2014 Share Posted June 14, 2014 Hello,I want to add button link to product page and I did it thanks to Vekia <a href="http://somewesbite.com">{l s='Some website'}</a> but how to do that if i Want to display this link only on available products page? Link to comment Share on other sites More sharing options...
pawelr34 Posted June 15, 2014 Share Posted June 15, 2014 Anyone? Link to comment Share on other sites More sharing options...
vekia Posted June 15, 2014 Share Posted June 15, 2014 what prestashop version you use? Link to comment Share on other sites More sharing options...
pawelr34 Posted June 15, 2014 Share Posted June 15, 2014 1.6and I have another question...I want to optin(under newsletter) required during registration, how to do that? Link to comment Share on other sites More sharing options...
life2enjoi Posted February 3, 2015 Share Posted February 3, 2015 good day presta legend, I want to add a button for certain products how can i do it? can i add it in catalog/products and there is a disable enable button for each product so it will show the new button? Thanks Link to comment Share on other sites More sharing options...
Pys P Posted November 26, 2018 Share Posted November 26, 2018 can you please help me to add 'add to cart' button on each product 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