# Product Bundle

**Product bundle** helps customers add additional products besides the main product. They will get a discount when adding to cart all products in the bundle. This is also a way to boost your sale.

<figure><img src="https://3432241786-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FAgyEGjimJ0Z5PS9XDyAH%2Fuploads%2FlIpda4kh4lW6RSry0VqR%2Fimage.png?alt=media&#x26;token=5db4790f-cbe3-4452-9ab7-3a160bf5f08b" alt=""><figcaption></figcaption></figure>

## 01 - Set up Product Bundle

### **Create a Metafield for Bundle:**

1. From your Shopify admin, go to **Settings** -> **Custom data**.
2. Click **Products → Add Definition.**
3. Please enter correct **Namespace and Key** as we noted below.

<figure><img src="https://3432241786-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FAgyEGjimJ0Z5PS9XDyAH%2Fuploads%2FhfjRMwALraSLmumZrhjF%2Fimage.png?alt=media&#x26;token=eeef8d3d-9557-425b-9e2e-d1b12d0b3034" alt=""><figcaption></figcaption></figure>

```
Name: Grouped Sub Product or any name.
Namespace and key: custom.grouped_sub_product
Select content type: List - Product
```

<figure><img src="https://3432241786-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FAgyEGjimJ0Z5PS9XDyAH%2Fuploads%2F5oJBibUD94YMiLudxFqq%2Fcreate-product-metafield.gif?alt=media&#x26;token=2fb59540-afa2-48d6-9dfc-64fab5487c91" alt=""><figcaption></figcaption></figure>

### How to insert content for Product Metafields? <a href="#how-to-insert-content-for-product-metafields-1" id="how-to-insert-content-for-product-metafields-1"></a>

1. From your Shopify admin, go to **Products -> All products**.
2. Find and choose the product that you want to edit.
3. In the **Metafields** area, please enter discount value which you just created for "**Bundle Discount Rate**" field.

<figure><img src="https://3432241786-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FAgyEGjimJ0Z5PS9XDyAH%2Fuploads%2FKZtzWb9nzmQPn8yTFWzQ%2Fadd-product-bundle.gif?alt=media&#x26;token=eceeee94-bcde-41ff-837b-a94338370c21" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
You can use [Bulk Editor](https://halosoft.gitbook.io/ella-7-documentation/product-page/broken-reference) to edit multiple products.
{% endhint %}

{% hint style="info" %}
To get handle of sub products, please go to Admin -> Products -> choose the product you want to add in bundle -> Scroll down at the bottom to see **Search engine listing preview** -> click **Edit website SEO** -> copy **Product handle**. [Learn more](https://shopify.dev/api/liquid/basics/handle).
{% endhint %}

## 02 - Set up Discount Rate For Product Bundle

### Create A Collection with a group of products:

1. From your Shopify admin, go to **Products -> Collections**.
2. Create a collection which ***contains all of products in the bundle you created*****.** The name of this collection will be: **BUNDLE-xxxxxxxxx** (with **x** will be ***product ID of main product in bundle***).

![Create a collection which contains all of products in the bundle you created](https://3432241786-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FAgyEGjimJ0Z5PS9XDyAH%2Fuploads%2FoE9yyBlqcxkjX8LgYYMc%2Fbundle-2.png?alt=media\&token=f459edbb-6fa1-4a26-bbc1-13c97018699d)

![Product ID of main product in bundle](https://3432241786-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FAgyEGjimJ0Z5PS9XDyAH%2Fuploads%2FFeXdN25FkbIZV6erwCyD%2Fbundle-3.png?alt=media\&token=469e7ffc-ae52-4894-b0ae-17ed56b797fa)

### Create A Discount for Bundle

1. From your Shopify admin, go to **Discounts. ->** Click **Create discount**.
2. Create a discount for the bundle collection you just created. The name of this discount will be: **FBT-BUNDLE-xxxxxxxxx** (with **x** will be ***product ID of main product in bundle***).

![](https://3432241786-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FAgyEGjimJ0Z5PS9XDyAH%2Fuploads%2FcZua0Qgy7wPJJrNM37Ua%2Fbundle-4.png?alt=media\&token=eb56046f-8f45-46f1-831c-107e0384f075)

![](https://3432241786-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FAgyEGjimJ0Z5PS9XDyAH%2Fuploads%2F2CjkULOXbKWniPXGnZDz%2Fbundle-5.png?alt=media\&token=cc85d333-a299-464f-8c53-0962871ed0dd)

### **How to add a new Metafields?**

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

<figure><img src="https://3432241786-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FAgyEGjimJ0Z5PS9XDyAH%2Fuploads%2FGL3ixqMaKTrOliGC4skk%2Fmeta-field.jpg?alt=media&#x26;token=60dd6101-5231-4367-a6c6-d25257e55c3b" alt=""><figcaption></figcaption></figure>

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

```
Name: Bundle Discount Rate or any name
Namespace and key: custom.bundle_discount_rate
Select content type: Number
```

![](https://3432241786-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FAgyEGjimJ0Z5PS9XDyAH%2Fuploads%2F0HrttI5z1ajCSwKFbxXv%2Fbundle-3.gif?alt=media\&token=94b38c9d-44ae-40c5-9c5a-96e72b0fc0f8)

### 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. In the **Metafields** area, please enter discount value which you just created for "**Bundle Discount Rate**" field.

![](https://3432241786-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FAgyEGjimJ0Z5PS9XDyAH%2Fuploads%2F2sac3WMTmm3B9wT2YIpi%2Fbundle-4.gif?alt=media\&token=d25ca400-f71d-4922-8300-579bcfec1a24)

## Customize Product Bundle

1. From your Shopify admin, go to **Online Store** -> **Themes**.
2. Find the theme that you want to edit, and then click **Customize**.
3. Choose **Products** from the dropdown window.
4. Click **Product information ->** scroll down to **Product bundle**.

<figure><img src="https://3432241786-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FAgyEGjimJ0Z5PS9XDyAH%2Fuploads%2FexAdgrWRDNyaS6En007c%2Fimage.png?alt=media&#x26;token=e29d2c0d-4523-4ca1-8f57-ff61c0f903f4" alt=""><figcaption></figcaption></figure>
