Jump to content

How to override "Add to Cart" button funcationlity


Recommended Posts

Hi All,

I want to override"Add to Cart" button functionality. When a user click "Add to Cart" button it will check weather a user sign in or not, if user sign in it will show a Form which will emailed only, if a user is not sign in it will show sign in and registration form, so a user sign in or register.

I read we can override prestashop core classes, what is the best method to do this? should i override core cart classes for this?

Any help highly appreciated.

Thanks

 

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

okay so in this case you have to modify ajax-cart.js file a little

you can put there some js script to check if customer is logged, or not 

then if it is - just pass the add function to the ajax query, if not, just break up function with return

Link to comment
Share on other sites

×
×
  • Create New...