Jump to content

Modify/Replace Add to cart button via my module


GT ITECH

Recommended Posts

Hello, i want to know how i can modify/replace the add to cart button via the module i will create ?

 

I already know how to place link, text or wathever below the add to cart button with the productActions hook , but now i want to remove the add to cart button directly from my module (when he is installed by the user) not via manual css or tpl modification.

 

Thank in advance for your help :)

P.S : I mean the add to cart button in the product page (see the attached images)

post-695459-0-14471200-1418032040_thumb.png

post-695459-0-58469600-1418032050_thumb.png

post-695459-0-89938600-1418032061_thumb.png

Link to comment
Share on other sites

it's not possible to do it without some hacks.

you can do it in two ways:

- replace button with jquery script

- hide defaut button with css and display own button in hook productActions or extraRight (as far as i remember) (it will appear below the add to cart)

  • Like 1
Link to comment
Share on other sites

Thank you, i don't remember it's possible with jquery -_-

 

Anyway the css solution is more attractive for me :D , but how i am supposed to do that ? :blink:

 

I really can alter the prestashop "base" css without jquery in my module ??? :o

 

Thank you very much for your very great help ^_^

Link to comment
Share on other sites

  • 5 years later...
On 12/8/2014 at 12:45 PM, vekia said:

it's not possible to do it without some hacks.

you can do it in two ways:

- replace button with jquery script

- hide defaut button with css and display own button in hook productActions or extraRight (as far as i remember) (it will appear below the add to cart)

Is that still relevant in 2020? if yes, does anyone know why they decided to do this?

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...