A way to disable AJAX add to cart in Magento 2
Magento 2 AJAX from Amasty add to cart helps the shopper to make purchases without page reloading after bringing the product to the cart. But sometimes, you need to motivate them to complete the checkout. This way, there is a need for a redirect to the shopping cart. In order to enable it, you need to follow several steps.
How to enable or disable Magento 2 AJAX add to cart programmatically?
Step 1. On the admin sidebar, go to Stores > Settings > Configuration.
Step 2. In the left panel, expand Sales and choose Checkout.
Step 3. Expand the Shopping Cart section.
Step 4. If the setting is for a specific store view, choose the store view where the configuration applies. When prompted, click OK to continue.
Step 5. In the After Adding a Product Redirect to Shopping Cart section, choose:
- Yes to enable the Magento redirect to cart page immediately after a product is added to the cart. (thus, AJAX is disabled)
- No to disable redirection to the shopping cart right after a product is added to the cart. (thus, AJAX is enabled)
Step 6. Save configurations.
The AJAX Shopping Cart extension implements many configurable options to enhance your store, improve the quality of customer service, and make it more visually attractive. With its help, the buyer will be able to:
- add things to the cart easily
- see and change the number of goods added to the cart
- modify the version of the product that they like (for example, change the color)
- view product mini-page with all the main information
- decide whether to continue shopping in the online store or go to the checkout page.
If you want to make your store even better and improve the shopping experience for users, you can install Color Swatches Pro, Infinite Scroll, and One Step Checkout, which are perfectly compatible with this extension.
Why do you need to disable ajax add to cart in Magento 2?
Magento 2 disable ajax add to cart feature is used to speed up the ordering process. You need to disable it on the product page and redirect customers in directly to the checkout page. This can help push your customers to make a purchase and save customers time to complete an order.
Why do you need to enable Magento 2 ajax add to cart?
You can add Magento 2 ajax add to cart feature programmaticallyto help customers order products quickly and seamlessly without being redirected to another page. Customers will be able to see product information in a popup, select product attributes, and add a product to their cart right from that popup.
Login and Registration Form