# 礼物（赠品）

添加礼品赠品能够清晰展示促销信息，提升用户体验，增加购买转化率，同时支持灵活的促销策略和精准的库存管理，助力品牌形象提升。

礼物赠品效果预览：

{% embed url="<https://ascent-vortex.myshopify.com/products/mechanical-keyboard-rainbow-backlit>" %}

<figure><img src="/files/ghUSJ6AGtC0E4P1jErjb" alt=""><figcaption><p>产品页面添加礼物赠品</p></figcaption></figure>

### **第一步：创建礼物元对象**

<figure><img src="/files/iWIU390p54kjaG2rR6C4" alt=""><figcaption></figcaption></figure>

进入元字段（Metafields）配置页面。

1. 添加新的元对象，命名为 **gift**（名字可以自定义）。
2. 确保该元对象包含以下三个字段：

   * **image**（选择文件类型，选择图片）：用于上传礼物的图片。

   <div align="left"><figure><img src="/files/JDjbZ3xNPhxpcwcbAJwi" alt=""><figcaption></figcaption></figure></div>

   * **title**（单行文本类型）：用于输入礼物的名称。

   <div align="left"><figure><img src="/files/u6MLAc6Wfm8kfT33OaYB" alt=""><figcaption></figcaption></figure></div>

   * **price**（金额类型）：用于设置礼物的原价格。

   <div align="left"><figure><img src="/files/ZxpUf5Kaad5PUNCFX6Hx" alt=""><figcaption></figcaption></figure></div>

### **第二步：添加礼物条目**

<figure><img src="/files/yeZNlBCeWZF9bEVjL9lr" alt=""><figcaption></figcaption></figure>

1. 在元对象 **gift** 中，添加多个条目，每个条目代表一个独立的礼物。
2. 每个条目需要上传**图片（image）**、填写礼物的**标题（title）**&#x548C;**价格（price）**。

### **第三步：给产品或产品变体添加礼物**

**1. 给产品添加礼物**

{% hint style="success" %}
如果为**产品**添加礼品，则该礼品将适用于该产品的所有变体。
{% endhint %}

<figure><img src="/files/Bd0g6Dp8bl3LyRAHByqM" alt=""><figcaption></figcaption></figure>

* 打开元字段配置页面，添加一个新的**产品元字段**，命名为 `product-gift`，并确保命名空间和 key 为 `custom.product_gift`。
* 将元字段类型设置为“元对象”，并引用之前创建的 `gift` 元对象，选择**列表类型**。
* 在产品编辑页面，找到“产品元字段”区域，定位到新创建的 `product-gift` 元字段，然后选择需要添加的礼物条目。

<figure><img src="/files/Xg6sMt8u8fDfQulnEfNt" alt=""><figcaption></figcaption></figure>

2. **给指定的产品变体添加礼物：**
   * 打开元字段配置页面，添加一个新的**产品多属性元字段**，命名为 `variant-gift`，并确保命名空间和 key 为 `custom.variant_gift`。
   * 将元字段类型设置为“元对象”，并引用之前创建的 `gift` 元对象， 选择**列表类型**。
   * 在产品编辑页面，进入“多属性”区域，选择需要添加礼物的具体变体并进入变体编辑页面。
   * 在变体编辑页面中，找到“元字段”区域，定位到 `variant-gift` 元字段，然后选择所需的礼物条目。

### **第四步：产品页面模板中添加礼物块**

{% hint style="success" %}
你可以将它**礼物块**放置在任何你想要放置的位置，如果该产品没有添加任何礼物，**礼物块**将不显示。
{% endhint %}

<figure><img src="/files/SRAqOEojFRk3zrVY0RNF" alt=""><figcaption></figcaption></figure>

### **注意事项**

* 每个产品或变体最多可添加 **6** 个礼物。
* 确保元字段配置正确，方便后续操作时能顺利选择和添加礼物。


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://ascent.webvista.studio/webvista-studio-docs/main-pages/main-product/li-wu-zeng-pin.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
