Module Description
The Commerce Ajax ATC (Add to cart) module provides a flexible way to add ajax functionality to the Drupal Commerce add to cart form. It provides a variety of ways to render the pop-up messages that can be configured through the UI.

The Commerce Ajax ATC (Add to cart) module differs from the other ajax add to cart modules in the following ways:
* The Commerce Ajax ATC (Add to cart) module targets add to cart forms specifically by their ID, so there is complete control over which add to cart forms use ajax.
* You enable ajax on the add to cart form through third party settings the same way the Combine order items containing the same product variation. setting is used. This means you can use ajax on one view mode display, and not use it on another display.
* We also swap all of the default commerce add to cart messages that implement ajax as described in this article, and as is done in the Commerce Ajax Cart Message module. This allows us to build and control our own custom messages.
* The messages that the Commerce Ajax ATC (Add to cart) module provides are configurable through the UI.
* Commerce Ajax ATC (Add to cart) module offers 3 types of add to cart confirmation messages.

* A configurable non-modal message above the add to cart form.
* A configurable modal message pop up.
* A configurable colorbox message pop up (requires Colorbox Load module).

* You can render the pop-up messages through a twig template, and render the product variation in a view mode.

To set up the module
* Install the module then go to /admin/commerce/config/product-types/MY_PRODUCT/edit/display, and check Enable Ajax in the format settings for the Add to cart form that you want to have ajax on. Click update, and save.
* Visit /admin/commerce/config/ajax-settings and configure it to your liking.
* To enable the custom view mode to render the variation go to /admin/commerce/config/product-variation-types/MY_PRODUCT_VARIATION/edit/display and enable Ajax Add to Cart Popup under Custom display settings.

Developers notes:
* You can theme the non-modal messages with css by using the .add-to-cart-message class before the .messages and .messages--status classes. For example: .add-to-cart-message .messages and .add-to-cart-message .messages--status.
* The module ships with a setting to support the Commerce Variation Cart Form module. There are plans to add support for other add to cart forms in the near future.

Project Usage
157
Creation Date
Changed Date
Security Covered
Covered By Security Advisory
Version Available
Production
Module Summary
The Commerce Ajax ATC module aims to provide a flexible way to add ajax functionality to Drupal Commerce add to cart forms, with configurable pop-up messages and control over which forms use ajax.
Data Name
commerce_ajax_atc

OPENAI CHATBOT

OPENAI CHATBOT

12:27:21
Generic Chatbot
Hi, I'm a Drupal module expert powered by OpenAI, answering your questions about the Drupal module ecosystem. How can I be helpful today? Please note that we will log your question.