Welcome to MyPresta.eu – Your reliable partner in the e-commerce world. Find innovative modules that will take your business to a new level.
If you're looking for a way to disable ajax cart confirmation popup (modal window that shows you add to cart process confirmation) and if you want to redirect customer to cart automatically - this guide is exactly what you're looking for. This guide is dedicated for new PrestaShop 1.7 releases because all new versions of 1.7.x do not have feature to "Redirect after adding product to cart" anymore.
Modification of shopping cart module
Modification requires really minor changes in the javascript file of this module. But before we will apply it - please make sure that option "ajax cart" is enabled on shopping cart module configuration page. I reffer to addon ps_shoppingcart that is available in PrestaShop by default - as a part of original 'classic' theme modules. Screenshot of option below (So, if option is disabled - please enable it and save changes. Then go to the next step of this guide.)

Modification of module's javascript file
Please open module directory. You can find there a files, one of them is ps_shoppingcart.js. This is a file that handles add to cart process and we can find there a code that displays modal popup window with confirmation. We just have to replace it with code that redirects customer to shopping cart. Somewhere near line 48 you can find code like this:
if (resp.modal) {
showModal(resp.modal);
}
I highlighted line that is responsible for modal popup. To disable popup window with 'add to cart' confirmation - just remove this line or comment it out. Instead of it add there a code like i higlighted below:
if (resp.modal) {
window.location.replace(prestashop.urls.pages.cart);
}
And that's all! After save process of this modified file it might be required to clear your browser cache (there is a chance that it will remember old ps_shoppingcart.js file contents, so in effect you will not see the changes.
Artykuł napisany przez Milosza Myszczuka, eksperta PrestaShop i oficjalnego moderatora społeczności PrestaShop. CEO i założyciel agencji interaktywnej VEKIA. Dowiedz się więcej.
If you like this article, support our work!

Integrate your store with the Central Bank of the Republic of Turkey (TCMB) using this module. It au...
19.99 €

Automatic National Bank of Ukraine (NBU) currency rates integrator. The module guarantees precise pr...
19.99 €

Automatic Bank of Spain (Banco de España - BdE) currency rates integrator. The module guarant...
19.99 €

The Currency Exchange Module offers unparalleled flexibility in managing international sales. Regard...
19.99 €