> For the complete documentation index, see [llms.txt](https://nextsky.gitbook.io/purity-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/purity-theme/theme-installation/create-required-metafields/metaobjects/external-affiliate.md).

# External/Affiliate

{% hint style="success" %}
**Step Create Metaobjects**

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:

\* Name: **Button text**

\* Type: **Single line text - One value**

\- Field 2:

\* Name: **External link**

\* Type: **Single line text - One value**
{% endhint %}

<figure><img src="https://1059363070-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRcDJSoM26kdEZlVFekVW%2Fuploads%2Ft3xYw4Ghk5JZLHCSxZTS%2Fimage.png?alt=media&amp;token=0213e3ee-7ced-44bc-8a6c-d5e86478b2b0" alt=""><figcaption></figcaption></figure>

{% hint style="success" %}
**Step Create Metafields**

1. Back to **Custom data -> Metafields -> Products**
2. Add a metafield as bellow:

   \- Name: **External/Affiliate**

   \- Type: **Mixed reference**

   \- Validation: **External/Affiliate**

   \- Namespace and key: **custom.external\_affiliate**
3. Setup metafield for a product and you can see the result.
   {% endhint %}

<figure><img src="https://1059363070-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRcDJSoM26kdEZlVFekVW%2Fuploads%2FFmsCe5M9UnObSQG8F1QZ%2Fimage.png?alt=media&amp;token=a0a287de-bcf8-4d08-a6d4-276c4d35fd43" alt=""><figcaption></figcaption></figure>

**In product:**

* Add new entry:

<figure><img src="https://1059363070-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRcDJSoM26kdEZlVFekVW%2Fuploads%2FW7SEa1qNc4R4PHIiPnCQ%2Fimage.png?alt=media&amp;token=f3ff23bd-bbe7-457c-b09d-94658be5dc7a" alt=""><figcaption></figcaption></figure>

<figure><img src="https://1059363070-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRcDJSoM26kdEZlVFekVW%2Fuploads%2FMcCWoWU32B1ARZ0hypWP%2Fimage.png?alt=media&amp;token=b8397440-16ae-4617-9385-672b391fa723" alt=""><figcaption></figcaption></figure>

\
**Result:** Auto change to External/Affiliate button

<figure><img src="https://1059363070-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRcDJSoM26kdEZlVFekVW%2Fuploads%2FSpJeTRIiqaPNRcUIgqwS%2FScreenshot%202025-05-10%20160703.png?alt=media&amp;token=a02bde6f-3d09-480e-8b30-3cae426359e5" alt=""><figcaption></figcaption></figure>
