# Product with variants

## Introduction

{% hint style="info" %}
A product with variants consists of a main product and simple products as its variants (similar to Magento configurable products).
{% endhint %}

If your product has multiple versions, such as colors, materials, or sizes, you will need a product with variants. To create one, follow the same initial steps as when creating a simple product, but when you see the ***Create Product*** popup window, choose ***Product with Variants*** from the **Product Type drop-down.**

As before, fill in all fields; the differences will appear after you have created the product and moved to edit it. A ***Variants*** tab will become available, where you can select simple products to add.

<figure><img src="https://171427267-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FM9BbYBbDPiJapb75xJ2k%2Fuploads%2FpL3mxNz4CVxEs9CGkXkV%2Fimage.png?alt=media&#x26;token=c7abd1bf-db75-4766-8c5d-da2ddcb28f2b" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
The binding attribute is a common product attribute that links products together into a product with variants. The attribute must be of the SELECT type and have a GLOBAL scope.
{% endhint %}

Click on ***Add Binding Attribute*****s** to add a new one. A new window will appear;&#x20;

<figure><img src="https://171427267-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FM9BbYBbDPiJapb75xJ2k%2Fuploads%2FkbInEV4XECsdYzjVBd6y%2Fimage.png?alt=media&#x26;token=4b407334-44be-4129-88a7-d8ca56a31920" alt=""><figcaption></figcaption></figure>

click on ***+ Add Binding Attribute*** and add one or more. If you do not have a binding attribute available, you need to [create it first](https://usermanual.ergonode.com/product-design/attributes/create-a-new-attribute).&#x20;

All added spaces for binding attributes must have an attribute selected before you can proceed.

<figure><img src="https://171427267-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FM9BbYBbDPiJapb75xJ2k%2Fuploads%2Fuc391H7zaSiLLmguxulf%2Fimage.png?alt=media&#x26;token=5ee58c23-eabb-4e18-9652-3a3ee6dc30bf" alt=""><figcaption></figcaption></figure>

Click on ***Choose attributes*** to save or ***Cancel*** to abort.

If you wish to change selected attributes, click on ***Binding attributes*** to the left of ***+ Add products***&#x20;

<figure><img src="https://171427267-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FM9BbYBbDPiJapb75xJ2k%2Fuploads%2Fsz97WV1SiO64C81baro5%2Fimage.png?alt=media&#x26;token=5c095677-eba6-47c2-991e-9e9a20d7f9f5" alt=""><figcaption></figcaption></figure>

and then ***Edit attributes***. You can delete binding attributes by clicking on the ***remove icon.***

<figure><img src="https://171427267-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FM9BbYBbDPiJapb75xJ2k%2Fuploads%2FI7vDRF2vkJnwbOOe9iKc%2Fimage.png?alt=media&#x26;token=2a65baa3-81b0-4400-85c0-267e9a4e58c2" alt=""><figcaption></figcaption></figure>

The next step is adding products, so click **+&#x20;*****Add Products.***

<figure><img src="https://171427267-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FM9BbYBbDPiJapb75xJ2k%2Fuploads%2F9YffhBaOeF9ic5zj5p55%2Fimage.png?alt=media&#x26;token=36d61c06-f293-4c2e-9cf8-faa119e581a9" alt=""><figcaption></figcaption></figure>

You can ***Select from list*** or ***Generate variants***. Below you will find both options described.

## Add from list

In the newly opened window, you will see a grid of products that have the binding attribute you selected earlier. Tick the product you wish to add and click ***Save Changes*** to confirm or close this window to cancel.

<figure><img src="https://171427267-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FM9BbYBbDPiJapb75xJ2k%2Fuploads%2FVNW9XTUSjOEQAOPEvadj%2Fimage.png?alt=media&#x26;token=855b563b-e9f5-48c1-81cc-24bbbaa58546" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
The products on the list are those that share the same binding attribute on the template assigned to them. This attribute must also have a value assigned for the product to appear on the list.
{% endhint %}

Product(s) will be added as a variant. If you wish to open this variant (product) click on the ***eye icon***.

To delete, click on the ***x icon***.

<figure><img src="https://171427267-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FM9BbYBbDPiJapb75xJ2k%2Fuploads%2FPS5PSbkoh5rlJOmoXG8n%2Fimage.png?alt=media&#x26;token=98bea103-aeb3-4207-baee-2fc0bce9e979" alt=""><figcaption></figcaption></figure>

## Generating variants

There are some options to configure variant generation beforehand.

<figure><img src="https://171427267-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FM9BbYBbDPiJapb75xJ2k%2Fuploads%2F4HgutrFbZWMTnP9bPuAo%2Fimage.png?alt=media&#x26;token=3e3c3837-2101-4cff-a895-49e5706edfdd" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
Generating SKUs for newly generated variants uses translations in the selected language if available; if not, codes are used as a fallback.
{% endhint %}

| Option name                          | Description                                                                                                                               | Additional information                                                                                                                                                                                                                             |
| ------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Binding attribute values             | Specify the values of binding attributes from which product variants will be generated.                                                   | This field is required.                                                                                                                                                                                                                            |
| SKU format of the variants           | Specify the SKU format of generated variants, it's based on the binding attribute values. SKU of variants will start with the parent SKU. | If there is more than one binding attribute, a user may change their order by dragging and dropping them, however, the parent SKU must always remain first .                                                                                       |
| Separator                            | A sign used as a separator in newly created variants' names.                                                                              | This field is required.                                                                                                                                                                                                                            |
| Language of attribute value          | The language from which values will be taken to create the product name.                                                                  | This field is required.                                                                                                                                                                                                                            |
| Use parent product template          | Automaticly assign the template used in the parent product to newly created variants.                                                     | On by default. If turned off, it's possible to choose a different template from a drop down.                                                                                                                                                       |
| Product template                     | Allows to choose a different template to use with newly generated variants.                                                               | Shown only if *Use parent product template* is set as OFF.                                                                                                                                                                                         |
| Copy parent product categories       | If ON, categories assigned to parent products are automatically assigned to newly generated variants.                                     | Default: OFF                                                                                                                                                                                                                                       |
| Category                             | Allows to pick categories to be copied.                                                                                                   | Shown only if *Copy parent product categories* is set as ON.                                                                                                                                                                                       |
| Copy parent product attribute values | If ON, values of attributes from parent products are automatically copied to the same attributes in newly generated variants.             | Default: OFF. If the user does not have sufficient attribute privileges (edit), (available with higher licenses), he may not see all available attributes. Also for an attribute to be visible, it must have a value in the main "mother" product. |
| Attribute values to be copied        | Allows to choose which attribute values will be copied to newly generated variants.                                                       | Shown only if *Copy parent product attribute values* is set as ON.                                                                                                                                                                                 |

{% hint style="info" %}
The generation of variants is done in the background. When the process is complete, users will be notified via the [***Action Center***](https://usermanual.ergonode.com/dashboard/dashboard/user-menu-and-action-center/action-center)***.***
{% endhint %}

<figure><img src="https://171427267-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FM9BbYBbDPiJapb75xJ2k%2Fuploads%2Fd5clweyx3PoikJMEGlSd%2Fimage.png?alt=media&#x26;token=72fff6f4-29ce-410d-9f2e-e6cadf9df7d1" alt=""><figcaption></figcaption></figure>

## Detach the product

To detach the product from the parent product use ***Detach products*** in the ***Action*** menu.

<figure><img src="https://171427267-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FM9BbYBbDPiJapb75xJ2k%2Fuploads%2FcHonCeX85ZCIy1XtLgBi%2Fimage.png?alt=media&#x26;token=361bcde8-5439-4484-90ff-9b0020dd52cd" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
Detached products are NOT deleted; they become single simple products. If you wish to delete the generated variant, you must first detach it and then delete it from the [Product Catalog](https://usermanual.ergonode.com/products/catalog) location.
{% endhint %}

<figure><img src="https://171427267-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FM9BbYBbDPiJapb75xJ2k%2Fuploads%2FJS7jtERn0WlvmXAzCYEK%2Fimage.png?alt=media&#x26;token=92244def-95d7-4bf3-8f03-ea65833d6f55" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
Detaching variants is done in the background. When the process is complete, users will be notified via the [Action Center](https://usermanual.ergonode.com/dashboard/dashboard/user-menu-and-action-center/action-center).
{% endhint %}
