Variations and Attributes generator for ProcessWire

Nomenclature

Before you can start to use Variations, it is important to first know the naming conventions used in the module. These are explained below.

Attributes

A property or characteristic that describes an aspect of something (such as a product). Some common examples include Size, Colour, Material, Gender, Screen Type, etc.

Attribute Options

The individual/specific constituents of an attribute. For instance, these terms in parentheses are attribute options of the named attributes: Small (Size), Blue (Colour), Cotton (Material), Female (Gender), Touch Screen (Screen Type).

Variation

The combination of two or more attributes options that together make up a distinct form of something. For instance, a pair of small blue cotton female trousers is one variation of a pair of trousers. Other similar pairs of trousers could vary by colour and/or size.

Variations Configuration

This refers to the grouping of attributes that together form the basis for auto-generating individual variations. In other words, the settings that define specific variations. An example is the grouping of the attributes Size, Colour and Sleeve-length to generate variations for a product such as a shirt.

The following terms are mainly used in relation to a FieldtypeVariations field's settings as entered in the field's Details Tab when editing the field. They are covered in more detail in the next topic.

Custom Column

Technically, a custom column is synonymous with a subfield for a FieldtypeVariations field. They are the inputs that will be editable within a variation. This is opposite to the aspects of a variation that are pre-defined. As an example, consider a product variation described as Red, Large with a Round Neck. Those three attributes options do not change for this variation; they are constants. On the other hand, this product variation's Price, Quantity, SKU and Notes about it can change. In this case, Price, Quantity, SKU and Notes will need to be edited when editing a page with this specific variation. Essentially, custom columns are custom attributes for the variation and the input they get when edited are their custom attributes options.

Column Name

This refers to the name given to a custom column. It must be all lowercase and in the format a-z0-9

Column Label

This is a user-friendly text that will be used to identify each defined custom column when editing a page with a Variations field. In other words, it is the header for the custom attribute. It is quite likely that the column label will mirror the column name. However, this is not a requirement.

Data Type

Each custom column/attribute created must be of a certain data type. Currently, Variations supports 3 types of custom attributes; Integer, Float and Text. Custom attributes of data type integer are for numerical properties such as quantity/stock, etc. Floats are for properties such as price. Text data type can have multiple uses including notes, SKUs, etc.

Options

These are for fine-tuning the data type of a custom column. In the case of Integer and Float data types, you have the choice of allowing negative values or not. In the case of Text data type, you have the option to display them as a text input or textearea. The latter is useful if you will need a lot of text.