joeyshi Posted July 29, 2012 Share Posted July 29, 2012 Hello Presta expert, I 've just started using prestashop for my online store. Can any expert help me on the way to get my Add to cart buttons redirect the user to external urls? How can I do it in an elegant way? Thanks. Joey Link to comment Share on other sites More sharing options...
tomerg3 Posted July 29, 2012 Share Posted July 29, 2012 What do you consider an "Elegant way"? Do you want to redirect all of add to cart buttons to the same URL? 1 Link to comment Share on other sites More sharing options...
joeyshi Posted July 29, 2012 Author Share Posted July 29, 2012 Hello tomerg3, My meaning of elegant way in term of implementation is actually achieving it with minimum of code change. No, I would want different product Add to cart button redirect to different url. Thanks for pointing the right way to do it in advance. Link to comment Share on other sites More sharing options...
tomerg3 Posted July 29, 2012 Share Posted July 29, 2012 There is no quick way of doing it. We built a module for that for a certain client, it lets you set a URL for each product, you will need to edit each tpl file where you want to replace it (IE product-list , product.tpl). The other option would be to use one of the existing Prestashop fields (IE location) for entering a link (this would mean you have to edit each product rather than do them in bulk), and you will still need to edit the tpl files and replace the add to cart button with the value from $product->location 1 Link to comment Share on other sites More sharing options...
joeyshi Posted July 29, 2012 Author Share Posted July 29, 2012 Appreciate if you could share the portion of the .tpl that need to change in order to achieve the redirection. If not I would want someone to help me to built this module. I will pay for this gig. Thanks Joe. Link to comment Share on other sites More sharing options...
joeyshi Posted July 29, 2012 Author Share Posted July 29, 2012 Do you know of anyone that can help to build this module? Or can we add the code on our own? Link to comment Share on other sites More sharing options...
tomerg3 Posted July 29, 2012 Share Posted July 29, 2012 You can send me a PM for more info about the module we created, and about customizing your tpl files to use it. Link to comment Share on other sites More sharing options...
PrestaCoder.com Posted March 16, 2013 Share Posted March 16, 2013 Hi joeyshi, I don't know if is too late, but we have a similar module here: http://prestacoder.com/prestashop-modules Link to comment Share on other sites More sharing options...
Recommended Posts