> ## Knowledge Base Index
> Fetch the complete knowledge base index at: https://help.tyslo.com/sitemap.xml
> Use this file to discover available pages before exploring further.
> Pure-Markdown content can be obtained by appending a '.md' suffix to the content URLs listed in the sitemap (without the trailing slash).

# 如何将 EasySell 与 GemPages 集成？

**EasySell 会自动将其购买按钮添加到“添加到购物车”按钮下方。使用 GemPages 时，您可以选择确切位置：只需在页面中添加一个小代码块。**

使用**弹窗表单**时，购买按钮会显示在代码所在的位置。使用**嵌入式表单**时，订单表单本身会显示在该位置。请参阅[更改表单类型：弹窗或嵌入式](https://help.tyslo.com/zh/article/change-your-form-type-popup-or-embedded-1a15yyz/)

[![视频：如何将 EasySell 与 GemPages 集成](https://img.youtube.com/vi/GI4BGI9Vv98/maxresdefault.jpg)](https://www.youtube.com/watch?v=GI4BGI9Vv98)

# 使用自定义代码元素放置 EasySell 按钮

1) 在 GemPages 中，打开您要编辑的页面
2) 点击左侧菜单中的**Elements**。搜索**Custom code**，或打开**Advanced** > **Custom Code**

![GemPages 编辑器中的“元素”菜单](https://storage.crisp.chat/users/helpdesk/website/4b154ca9ad47c000/cleanshot-2024-04-20-at-141609_1bxpnld.png)

![“高级”组中的“自定义代码”元素](https://storage.crisp.chat/users/helpdesk/website/4b154ca9ad47c000/cleanshot-2024-04-20-at-142141_1av0qqv.png)

3) 将“自定义代码”元素拖到您希望按钮显示的位置。然后点击**Edit Code**

![“自定义代码”元素的“编辑代码”按钮](https://storage.crisp.chat/users/helpdesk/website/4b154ca9ad47c000/cleanshot-2024-04-20-at-143113_12gsbqp.png)

4) 将以下代码粘贴到代码编辑器中，然后保存：

```
<span id="es-form-hook"></span>
```

![粘贴到代码编辑器中的代码](https://storage.crisp.chat/users/helpdesk/website/4b154ca9ad47c000/cleanshot-2024-04-20-at-143728_mwdgxt.png)

5) 点击**Publish**

![GemPages 中的“发布”按钮](https://storage.crisp.chat/users/helpdesk/website/4b154ca9ad47c000/cleanshot-2024-04-20-at-144053_b0qw7w.png)

6) 打开预览。EasySell 按钮会显示在代码所在的位置。

![GemPages 中的预览按钮](https://storage.crisp.chat/users/helpdesk/website/4b154ca9ad47c000/cleanshot-2024-04-20-at-144308_1qschrt.png)

![已发布 GemPages 页面上的 EasySell 按钮](https://storage.crisp.chat/users/helpdesk/website/4b154ca9ad47c000/cleanshot-2024-04-20-at-144422_1yvfaxz.png)

| 💡 在包含此代码的 GemPages 产品页面上，EasySell 只会在代码所在的位置显示按钮。“添加到购物车”按钮下方不会再出现第二个按钮。

## 通过您自己的按钮打开表单

1) 在 GemPages 中选择您的按钮
2) 将其 **CSS class**或 **ID** 设置为以下代码：

```
es-popup-button-overwrite
```

如果您的按钮只有链接字段，请改为将其链接设置为 `#es-popup-button-overwrite`。

![GemPages 按钮的 CSS 类设置为 es-popup-button-overwrite](https://storage.crisp.chat/users/helpdesk/website/-/4/b/1/5/4b154ca9ad47c000/image_lwscfb.png)

3) 发布页面。点击您的按钮即可打开订单表单。

| 💡 您自己的按钮可在产品页面上与**弹窗表单**配合使用。使用**嵌入式表单**时，或在购物车页面上，该按钮无法打开表单。

要使用图片作为按钮，请参阅[如何使用图片作为按钮打开 EasySell 订单表单？](https://help.tyslo.com/en/article/how-to-use-an-image-as-a-button-to-open-easysell-order-form-e0d52d/)

---

| ℹ️ 如果您需要帮助，请通过聊天联系我们（从应用中进入）。