Jump to content

A button that add a product to the cart and open the cart page without the modal pop-up ? (prestashop 1.7)


Enzo Savoi

Recommended Posts

Hello everyone! I'm new here and a newbie in using prestashop.

I'm blocked on a problem and I couldn't found any forum post to help me with it.

Here's my problem : I want to create a button that will add a product to the cart and then open the cart. My big problem is that I can't really use add-to-cart as it forcefully open the pop-up modal, which is something I absolutely don't want to activate with my button, my main plain was to create a copy of the add-to-cart function in which I'll skip the pop-up modal activation. However it seems I cannot find where the function is located at all ? I thought the "display the pop-modal if add-to-cart is used" was located in --modules/creativeelements/views/js/frontend.js -- however it doesn't seem to be the case ?

 

I'm honestly really lost, could anyone lend me a hand ?

Link to comment
Share on other sites

  • razaro changed the title to A button that add a product to the cart and open the cart page without the modal pop-up ? (prestashop 1.7)
Just now, joseantgv said:

Check if this is what you need:

image.png.8d7852f80af16716c77dccab0f2bcf06.png

Hey, Thanks but the problem is already solved ^^also it won't really work as I don't want to deactivate the modal completely, just on the case of the button pressed, the usual add to cart buttons still making the modal pop out, but still thanks ^^

  • Like 1
Link to comment
Share on other sites

  • 2 weeks later...

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...