Enzo Savoi Posted September 20, 2021 Share Posted September 20, 2021 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 More sharing options...
danielsaar Posted September 20, 2021 Share Posted September 20, 2021 Hi Enzo Savoi, yes, a good question. yours Daniel Link to comment Share on other sites More sharing options...
Enzo Savoi Posted September 23, 2021 Author Share Posted September 23, 2021 Problem Solved. I used core.js and added a function which was the exact copy of add-to-cart, then I redirected this new function to the cart's url just after it added the product to the cart, which happens before the modal pop up. Link to comment Share on other sites More sharing options...
joseantgv Posted September 23, 2021 Share Posted September 23, 2021 Check if this is what you need: Link to comment Share on other sites More sharing options...
Enzo Savoi Posted September 23, 2021 Author Share Posted September 23, 2021 Just now, joseantgv said: Check if this is what you need: 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 ^^ 1 Link to comment Share on other sites More sharing options...
joseantgv Posted September 23, 2021 Share Posted September 23, 2021 And how have you solved it? Link to comment Share on other sites More sharing options...
danielsaar Posted October 6, 2021 Share Posted October 6, 2021 @Enzo Savoi Yes, how did you solve it? Link to comment Share on other sites More sharing options...
Knowband Plugins Posted October 7, 2021 Share Posted October 7, 2021 You can use a module for the feature you are looking for. Please check the below link to see the modules:https://addons.prestashop.com/en/search?search_query=one click checkout 1 Link to comment Share on other sites More sharing options...
danielsaar Posted October 8, 2021 Share Posted October 8, 2021 Thanks Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now