# 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.

![](https://584379246-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F8AcakjwUSIs90OK0GJi2%2Fuploads%2FC3RJIz4rzL48LuwAHn9B%2Fbundle.png?alt=media\&token=fc74fc6d-561f-49a4-9d1a-e10108a200b2)

## Setup Product Bundle

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

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

```
Name: Grouped Sub Product or any name.
Namespace and key: c_f.grouped_sub_product
Select content type: Text
```

![](https://584379246-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F8AcakjwUSIs90OK0GJi2%2Fuploads%2FZ59Gz0IRqgmVRcVbqfuG%2Fbundle-1.gif?alt=media\&token=353945b9-0b21-45f2-8c43-63eba8d85a66)

### 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**, please enter the handle of sub products for "**Grouped Sub Product**" field.

![](https://584379246-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F8AcakjwUSIs90OK0GJi2%2Fuploads%2FYm6F6bEQLhd6qdBxIVlN%2Fbundle-2.gif?alt=media\&token=09af5e62-18c1-4fc6-8826-2680c4fe6db2)

{% 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 %}

{% hint style="info" %}
You can use [Bulk Editor](https://halosoft.gitbook.io/halo-docs/page/bulk-editor-page) to edit multiple products.
{% endhint %}

## Setup Discount Rate For Product Bundle

### Create A Collection

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://584379246-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F8AcakjwUSIs90OK0GJi2%2Fuploads%2F6cOQRo2rvAiCco6mnTdQ%2Fbundle-2.png?alt=media\&token=ab4ab76f-bdd0-4316-baf3-1cce89969c19)

![Product ID of main product in bundle](https://584379246-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F8AcakjwUSIs90OK0GJi2%2Fuploads%2F7rjr1QFBsoYaxrrMme9V%2Fbundle-3.png?alt=media\&token=9369df9e-d4a2-4e46-9e78-2db350d24b4a)

### Create A Discount

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://584379246-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F8AcakjwUSIs90OK0GJi2%2Fuploads%2FhI7rTGWtAYFxJzNjlsOM%2Fbundle-4.png?alt=media\&token=fd57b9e6-7c05-4697-9ced-a2da9dbdbbf0)

![](https://584379246-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F8AcakjwUSIs90OK0GJi2%2Fuploads%2FD5rSl5wqt6WJVlOTYe2u%2Fbundle-5.png?alt=media\&token=ad7dd0f8-5214-4b81-8260-415645935b6b)

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

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

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

![](https://584379246-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F8AcakjwUSIs90OK0GJi2%2Fuploads%2FZ5hfobYcQjCuZ3GipzAE%2Fbundle-3.gif?alt=media\&token=edbf3a77-aac1-49c7-a5c4-a17ad2988e27)

### 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://584379246-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F8AcakjwUSIs90OK0GJi2%2Fuploads%2FoWr5qBLracBXA9TPENrY%2Fbundle-4.gif?alt=media\&token=cd7a7811-8b2e-4ecd-89f3-25b7c8ec0f1e)

{% hint style="info" %}
You can use [Bulk Editor](https://halosoft.gitbook.io/halo-docs/page/bulk-editor-page) to edit multiple products.
{% endhint %}

## 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 Bundle.**

![](https://584379246-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F8AcakjwUSIs90OK0GJi2%2Fuploads%2FzHRWqYSKzfgd9QhsfzNg%2Fbundle-5.gif?alt=media\&token=7634a72e-ef99-46ab-bb84-d0349174e05d)
