Experimental project
This is a sandbox project, which contains experimental code for developer use only.
This project is related to this issue : #1180016: Attributes (colors e.g.) as images in product display ?
Overview
This module allows to replace the default display of Commerce Product's attributes in the Add to Cart form.
It only concerns the fields with the following settings :
- Taxonomy reference field.
- The field *must* function as an attribute field on Add to Cart forms.
- The displayed add to cart widget *must* be "radios" type
You can select what field of your taxonomy should be displayed instead of the default term title.
The display formatter of the field follows the display setting of the field instance in his own vocabulary.
Common use case
- The most common use case is when you need to display an image thumbnail instead of a text, typically for product colors (clothes, shoes...)
- It can also be used if you want to display a different text from the taxonomy title
Quick installation
- Create a taxonomy vocabulary "Color"
- Add an image field to your vocabulary
- Create a taxonomy reference term field for your commerce product, referring to your newly created vocabulary
- In "Attribute Field Settings", check "Enable this field to function as an attribute field on Add to Cart forms. "
- In "Attribute selection widget", select "Radio buttons"
- In "Replace radio options displayed by taxonomy fields value", select the taxonomy field you want to display (select the newly created field in your taxonomy term).
You're done, check at your product display !
If you need to modify the taxonomy field to be display, while you originally selected the wrong vocabulary, go to the "Field Settings" tabs to select your new vocabulary, save, then select your new taxonomy field.
Project information
Seeking co-maintainer(s)
Maintainers are looking for help reviewing issues.- Project categories: E-commerce
- Created by liupascal on , updated
