A way to disable AJAX add to cart in Magento 2

Magento 2 AJAX Add to Cart from Amasty helps the shopper make purchases without page reloading after bringing the product to the cart. However, sometimes you need to motivate them to complete the checkout. This way, there is a need for a redirect to the shopping cart. To enable this, 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:

  1. Yes to enable the Magento redirect to cart page immediately after a product is added to the cart. (thus, AJAX is disabled)
  2. 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 Magento AJAX Add to Cart 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 Magento AJAX Checkout page
  • use a Magento Add to Cart AJAX Popup for viewing product information quickly

If you encounter Magento AJAX Add to Cart not working issues, troubleshooting and configurations might be required to ensure smooth functionality.
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?

Disabling Magento 2 AJAX Add to Cart can speed up the ordering process. This is beneficial when you need to redirect customers directly to the checkout page, thus encouraging quicker purchases and saving time.

Why do you need to enable Magento 2 ajax add to cart?

By enabling Magento 2 AJAX Add to Cart, you can enhance the user experience, allowing customers to order products quickly and seamlessly without being redirected. You can also add Magento 2 AJAX Add to Cart programmatically to let customers see product information in a popup, select product attributes, and add a product to their cart directly from that popup.

By using the ajax add to cart Magento 2 feature, you can streamline the shopping experience, allowing customers to add items efficiently without leaving the current page. This enhances their overall interaction with your store.

Loading

Didn’t you find the answer to your question? We are always happy to help you out.

Loading