> For the complete documentation index, see [llms.txt](https://templatescoder.gitbook.io/belliza-documentation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://templatescoder.gitbook.io/belliza-documentation/collection-and-product/product-page/product-variant.md).

# Product Variant

You add variants to a product that comes in more than one option, such as size or color. Each combination of option values for a product can be a variant for that product. For more information, see [<mark style="color:orange;">Variants</mark>](https://help.shopify.com/en/manual/products/variants).

<figure><img src="https://3751104066-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FJKlAwzeCbxVGW0a9OXJm%2Fuploads%2F6o4NXacY6PpoI7VRXAc2%2FUntitled-1.jpg?alt=media&amp;token=5ee8b892-a753-419e-bd58-fca624241813" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
Belliza offers 2 type for Product Variant: Dropdown and Square / Rectangle / Swatch.
{% endhint %}

{% hint style="success" %}
**Steps:**

1. Go to **Customize** -> Choose **Default product** template in the dropdown of editor window to open theme editor of product page.
2. Click **Add block** from **Product Information** -> Choose **Variant Picker**
   {% endhint %}

<figure><img src="https://3751104066-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FJKlAwzeCbxVGW0a9OXJm%2Fuploads%2FuNypc0LOWyEsoU4tn1Wi%2FUntitled-1.jpg?alt=media&amp;token=f9315ce8-67a0-4f8f-9b2b-dfd8eed94b17" alt=""><figcaption></figcaption></figure>

### Setup Color Variant

{% hint style="info" %}
Belliza offers 2 type for Color Variant: Basic Color, Advance
{% endhint %}

<figure><img src="https://3751104066-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FJKlAwzeCbxVGW0a9OXJm%2Fuploads%2FcPFYo8tildODQQpWqVBF%2FUntitled-1.jpg?alt=media&amp;token=081a6ac8-41f3-49c0-9b86-7339f5c0b37f" alt=""><figcaption></figcaption></figure>

### 1. Basic Color

1. From your Shopify admin, go to **Online Store** -> **Themes**.
2. Find the theme that you want to edit, and then click **Customize**.
3. Click **Theme settings ->** **General.**
4. Scroll to **Swatch** and choose **Type** as **Default**

{% hint style="info" %}
For more information, see [<mark style="color:orange;">Adding images to product variants</mark>](https://help.shopify.com/en/manual/products/product-media/add-images-variants).
{% endhint %}

<figure><img src="https://3751104066-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FJKlAwzeCbxVGW0a9OXJm%2Fuploads%2FNojd5kkHuKFma3qPqITz%2Fvariant-3.gif?alt=media&amp;token=b79307c0-e8b9-4283-b07c-bf6508ad727d" alt=""><figcaption></figcaption></figure>

### 2. Advanced Color

{% hint style="info" %}
'Advanced Color' use color name or image with PNG format. use image with PNG format from metafields.
{% endhint %}

1. From your Shopify admin, go to **Online Store** -> **Themes**.
2. Find the theme that you want to edit, and then click **Customize**.
3. Click **Theme settings ->** **General.**
4. Scroll to **Swatch** and choose **Type** as **Advanced Color**

<figure><img src="https://3751104066-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FJKlAwzeCbxVGW0a9OXJm%2Fuploads%2F84GAGuznIYpJCV3zFYJJ%2FUntitled-1.png?alt=media&amp;token=e6c19179-50e1-4241-a0db-6897acde0176" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
After that, please upload an image with the same name as the color name (Go to Settings → Files -> Upload Files).

**Naming convention**: Lower cap and use a hyphen "-" to replace white space if your color image name has the white space. For example: your special color will have this name: "Holo Rainbow", you will upload the png image is holo-rainbow\.png
{% endhint %}

<figure><img src="https://3751104066-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FJKlAwzeCbxVGW0a9OXJm%2Fuploads%2FTw5DWvpbk7Tf7ww703YD%2Fimage.jpg?alt=media&amp;token=9b1e11b7-c76a-4448-b7f6-7c76f649b5e7" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
You need to make sure your color name match with the color name at:

[<mark style="color:orange;">http://www.w3schools.com/tags/ref\_colornames.asp</mark>](http://www.w3schools.com/tags/ref_colornames.asp). If the color name doesn't exist on the w3schools website, it will not display on your site.
{% endhint %}

### H**ow to add a new Metafields?**

* From your Shopify admin, go to **Settings** **->** **Custom data**.
* Click **Variants → Add Definition.**

<figure><img src="https://3751104066-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FJKlAwzeCbxVGW0a9OXJm%2Fuploads%2Fwh8JDPe2AjFva2QncHDx%2Fimage-(1).jpg?alt=media&amp;token=fa4a5a08-181b-4656-830c-63bd146f0a84" alt=""><figcaption></figcaption></figure>

Please enter the correct **Namespace and Key** as we noted below.

{% hint style="info" %}

```
Name: Variant Color
Namespace and key: custom.variant_color
Select content type: Text
```

{% endhint %}

### How to insert content for Product Metafields?

1. From your Shopify admin, go to **Products -> All products**.
2. Find and choose the product that you want to edit.
3. Find and choose the variant that you want to edit.
4. In the **Metafields,** you need to insert "**Color codes**" or "**Image with PNG format**" for "**Variant Color**".

* **Image with PNG format**

{% hint style="info" %}
After that, please upload an image with the same name as the color name (Go to Settings → Files -> Upload Files).

**Naming convention**: Lower cap and use a hyphen "-" to replace white space if your color image name has the white space. For example: your special color will have this name: "Dark Gray Custom", you will upload the png image is dark-gray-custom.png
{% endhint %}

<figure><img src="https://3751104066-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FJKlAwzeCbxVGW0a9OXJm%2Fuploads%2Fv5PUUgRjQxBrKjyzuvkQ%2FUntitled-1.jpg?alt=media&amp;token=4b3decb6-86bb-4f76-8ffb-470d1807b55f" alt=""><figcaption></figcaption></figure>

<figure><img src="https://3751104066-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FJKlAwzeCbxVGW0a9OXJm%2Fuploads%2FLDMTA0xM9yR4o6Aw5Pda%2FUntitled-1.jpg?alt=media&amp;token=e16448eb-e8df-4fb6-aa08-5e914c6204a2" alt=""><figcaption></figcaption></figure>

<figure><img src="https://3751104066-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FJKlAwzeCbxVGW0a9OXJm%2Fuploads%2FxvD7aKwhPAA1sSSw3bEc%2FUntitled-1.jpg?alt=media&amp;token=c02e1f73-49e7-45ea-bf58-e2979ec6aca4" alt=""><figcaption></figcaption></figure>
