> For the complete documentation index, see [llms.txt](https://nextsky.gitbook.io/glozin-theme/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://nextsky.gitbook.io/glozin-theme/product-page-settings/setup-external-affiliate-product.md).

# Setup External/Affiliate product

External / Affiliate products are not as commonly used as other types of products in Shopify. However, the **Glozin** theme supports this special type of product. You may want to redirect customers to other sites that sell the products, and you will need to create external / affiliate products for this purpose. To set up External/Affiliate products, please follow these steps:

{% hint style="success" %}
**Step 1:** Create metafields

1. Login to your Shopify store, click to **Settings**
2. Click to **Custom data ->** **Metaobjects** and Click **Add definition**
3. Add metaobject definition with 2 fields as bellow:
   * Name: **External/Affiliate**
   * Field 1:
     * Type: **URL**
     * Name: **External Link**
   * Field 2:
     * Type: **Single line text**
     * Name: **Button Text**
4. Click **Save**
   {% endhint %}

<figure><img src="https://2952946279-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FJbMIFqRrJiqVKdsbTyW4%2Fuploads%2Fgit-blob-61e7d11bf002b7bb9cf7b1b4a253a128c3a2d5e6%2FScreenshot%202024-06-13%20150924.png?alt=media" alt=""><figcaption></figcaption></figure>

<figure><img src="https://2952946279-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FJbMIFqRrJiqVKdsbTyW4%2Fuploads%2Fgit-blob-8712236a67fefd3577ece4af2ae455448bd0003b%2FScreenshot%202024-06-13%20150957.png?alt=media" alt=""><figcaption></figcaption></figure>

<figure><img src="https://2952946279-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FJbMIFqRrJiqVKdsbTyW4%2Fuploads%2Fgit-blob-85e924f6cbf7580b7dcf33a7413643cf61c02c25%2FScreenshot%202024-06-13%20151055.png?alt=media" alt=""><figcaption></figcaption></figure>

<figure><img src="https://2952946279-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FJbMIFqRrJiqVKdsbTyW4%2Fuploads%2Fgit-blob-793150f2cd65ba01bcaefa7332c278f7b0690bb2%2FScreenshot%202024-06-13%20151124.png?alt=media" alt=""><figcaption></figcaption></figure>

{% hint style="success" %}
5\. Back to **Custom data -> Metafields -> Products**
6\. Add a metafield as bellow:

* Name: **External/Affiliate**
* Type: **Mixed reference**
* Validation: **External/Affiliate**
  {% endhint %}

<figure><img src="https://2952946279-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FJbMIFqRrJiqVKdsbTyW4%2Fuploads%2Fgit-blob-9d0e5a89a788c8367f019bb96d0f7dfcbe22503c%2FScreenshot%202024-06-13%20152314.png?alt=media" alt=""><figcaption></figcaption></figure>

{% hint style="success" %}
7\. Close Setting and setup metafield for a product.
{% endhint %}

{% hint style="success" %}
**Step 2:** Setup product

1. From your admin, go to **Products** and select the products to setup
2. Scroll down to **Metafields** and click to External/Affiliate
3. Click to **Select entry** and **Create new entry**
   {% endhint %}

<figure><img src="https://2952946279-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FJbMIFqRrJiqVKdsbTyW4%2Fuploads%2Fgit-blob-9d0e5a89a788c8367f019bb96d0f7dfcbe22503c%2FScreenshot%202024-06-13%20152314%20(1).png?alt=media" alt=""><figcaption></figcaption></figure>

{% hint style="success" %}
4\. Add link of product to **External Link** and Add the text of the button in **Button Text**
5\. Click **Save,** **Preview** this product and you can see the result
{% endhint %}

<figure><img src="https://2952946279-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FJbMIFqRrJiqVKdsbTyW4%2Fuploads%2Fgit-blob-db601edef26228a341e0eb2c7f6fd9cc39827bb5%2FScreenshot%202024-06-13%20151628.png?alt=media" alt=""><figcaption></figcaption></figure>

<figure><img src="https://2952946279-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FJbMIFqRrJiqVKdsbTyW4%2Fuploads%2Fgit-blob-ee833e06e951351118ee778b37b90cb4d10693fe%2FScreenshot%202024-06-13%20151728%20(1).png?alt=media" alt=""><figcaption></figcaption></figure>
