Jump to content

Replace "Add to Cart" button from everywhere in my store in prestashop 1.6


Recommended Posts

hello

 

I want to change or replace "Add to Cart" button from my store (prestashop 1.6) , I can change it on product page vary easily by overriding product controller but how can I change from homepage thare is two different module used named "popular" & "best salers", these both are use "add to cart" button so I cant edit their php file,

Link to comment
Share on other sites

hello

button of these features is defined in product-list.tpl file

 

what you exactly want to alter?

thanks for the replay,

In my module replace 'add to cart" button with "get A Quote" , what actually module works it will change "add to cart" button and when click on "get A Quote" button it will display ajax form that takes some information lik name ,contact info,and some descripion ,

 

as you said in theme folder product-list.tpl file I can change but how can I integrate that file in my modules package?

  • Like 1
Link to comment
Share on other sites

thank you vekia.

I understand I cant alter feature products and best sellers module right..!,

but I can override or alter "product-list.tpl" file in theme folder...?

if I do so then how can I attech or place these file with my modules package so that I can place to prestashop addons. for example any overrided controller file I can place in modules override folder,

 

So is there any other way to do this....if prestashop 1.6 does not allow such kind of features then how can I develop font office features module ?

Edited by NishantVadgama (see edit history)
Link to comment
Share on other sites

 

 

but I can override or alter "product-list.tpl" file in theme folder...?

 

with module -  you can't override theme files - it's a case of theme modification, not a case of module.

just imagine what will happen if someone will use different theme than default one, and your module will override product-list.tpl theme file - it can affect entire theme!

 

to display module contents in front office you have to use hooks

  • Like 1
Link to comment
Share on other sites

×
×
  • Create New...