Variations and Attributes generator for ProcessWire

InputfieldVariations: An Introduction

Unlike many other ProcessWire Inputfields, variations (with pre-defined attribute values) are generated at a page level rather than at a field level. This uniqueness makes this module quite flexible. In this section, we show you the basics of using your Variations field. Going forward, we assume you have created a Variations field, added at least one custom column and added the field to an existing template. To follow along with the lessons in this section, add three custom columns to your field with the following settings: sku (text, show input as text); price (float, no negative values); quantity (integer, allow negative values).

Now, edit a page that uses that field. If you added a Variations field that you did not finish setting up, for instance, one lacking a custom column, InputfieldVariations on the page will through an error. You will need to fix the error before you can continue.

The first time you edit a page with a Variations field, you will see a message on the Inputfield that the page does not yet have a variations configuration linked to it. Since it will be the first time using the field, you will first need to create attributes and variations configurations. Click on the link to Define/Fetch Variations. That will open a modal window where you will be able to create and edit attributes and variations configurations. The text of this link is what was saved in the modal link label setting for this field.

In the next lesson, we create attributes and their values, the foundation for creating variations configurations.