Dropdown Attributes

Categories

Component ID

1162770

Component name

Dropdown Attributes

Component type

module

Maintenance status

Development status

Component security advisory coverage

covered

Downloads

10025

Component created

Component changed

Component body

Ubercart uses attributes for specifying variations for a product. Attributes can specify color or size of a article of clothing or they can specify different sizes of a product, each with their own price and SKU.

Often the possible selection of choices for one attribute may depend on the choice of another attribute. For example, the available color of a shirt may depend on the size selected. The uc_dropdown_attributes module allows an attribute to be displayed depending upon the choice selected for another attribute. So the medium colors attribute will be displayed when the medium size is chosen. If the small size is chosen then the small colors attribute will be displayed. Each colors attribute contains only the colors that are available in that size.

The uc_dropdown_attributes module presents an administrative interface for defining the relationships between attributes. Attributes can be defined to be displayed only when specific values are selected for another attribute.

Attribute dependencies can be defined for product classes or for individual products. Definitions of dependencies for individual products takes precedence over those defined for a product class.

Select boxes, radio buttons and checkboxes are supported. Text fields are also partially supported as dependent attributes.

Demo websites

Drupal 7
Drupal 8

Drupal 8

Attributes for product classes are fully supported including updating and deleting attributes. Ubercart only supports product classes as a template for creating product attributes for new products. Dropdown Attributes changes this behavior so that any product belonging to a product class can use the attributes defined on the product class. If attributes are defined for a product the attributes will override the attributes defined for the product class. Even if attribute dependencies are not needed, getting full functionality of attributes for product classes will be added when using Dropdown Attributes. This is necessary because it is not possible to edit dependencies (and attributes and options) for hundreds of products.