Module Description
This module provides an add-to-cart form for individual Commerce Product Variation entities. The form is added to the Product Variation "manage display" tab as a field, and uses the standard Commerce add-to-cart form functionality.

Form elements may be configured via a form display mode, "Variation Cart Form", on the Commerce Order Item Type "manage form display" tab - similar to configuration for the standard Commerce Product add-to-cart form.

Typical use cases
* The standard Commerce Product add-to-cart form needs to be replaced with the individual Product Variations as rendered entities, each with their own add-to-cart functionality
* An individual Product Variation entity needs to be displayed standalone with its own add-to-cart functionality (including Views).
* The add-to-cart form needs to be displayed among the Product Variation fields.

Requirements Drupal Commerce modules:


* Commerce Product
* Commerce Order
* Commerce Cart

Configuration
* Configure Order Item Types in Administration >> Commerce >> Configuration >> OrderItem Types For each Order Item Type:
* Select Operations >> Manage form display.
* Select the "Variation Cart Form" form view mode.
* Show or hide and configure form fields as desired. Typically you will will either want only the "Quantity" field displayed, or no fields displayed (to show an "add to cart" button with default quantity 1).
* Click "Save" to save your changes.


* Configure Product Variation Types in Administration >> Commerce >> Configuration >> Product Variation Types For each Product Variation:
* Select Operations >> Manage display.
* Select the appropriate view mode.
* Set the "Add to cart form" field to "visible".
* Check the "Combine order items containing the same product variation" checkbox if you want the added Product Variation to be combined with the same item if it already exists in the user's cart.
* Click "Save" to save your changes.


* Configure Product Types in Administration >> Commerce >> Configuration >> Product Types For each Product Type:
* Select Operations >> Manage display.
* Select the appropriate display mode.
* For the "Variations" field, select "Rendered Entity" instead of "Add to cart form".
* Click the settings icon and select the view mode that you configured in the previous step.
* Click "Update" to update the settings, then click "Save" to save your changes.
* Click the product type "Edit" tab.
* Uncheck "Inject product variation fields into the rendered product." This prevents the default variation cart form being duplicated into the product fields.



Similar modules Commerce Variation Add To Cart provides a field formatter for the Product's variation reference field that displays each Product Variation separately with configurable attributes.

Project Usage
1619
Creation Date
Changed Date
Security Covered
Covered By Security Advisory
Version Available
Production
Module Summary
This module aims to provide an add-to-cart form for individual Commerce Product Variation entities, allowing for customization and standalone display of each variation's add-to-cart functionality.
Data Name
commerce_variation_cart_form

OPENAI CHATBOT

OPENAI CHATBOT

12:23:15
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.