> For the complete documentation index, see [llms.txt](https://help.sesami.co/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.sesami.co/zh-cn/apps-integrations/shopify/online-store/cart-verification-script.md).

# 购物车验证脚本

购物车验证脚本通过在客户前往结账之前检查购物车中的预约可用性和数量，帮助防止无效预订。

添加到购物车中的预约在客户浏览或完成结账时可能会变得不可用。另一位客户可能会先预订同一时段， [预留期限](https://help.sesami.co/zh-cn/yu-ding/availability/reservation-period.md) 可能会过期，或者所选数量可能不再可用。

### 购物车验证脚本会检查什么？

该脚本会验证购物车中的预约，以确保：

* 所选预约时段仍然可用。
* 所选数量有效且可用。
* 该 [临时预留](https://help.sesami.co/zh-cn/yu-ding/availability/reservation-period.md) 用于该预约的已未过期。

如果某个预约不再可用，或者所选数量无效，Sesami 会阻止客户继续结账，直到问题得到解决。

### 客户会看到什么？

当 Sesami 检测到购物车中存在无效预约或数量时，页面底部会显示一条通知。

<figure><img src="https://1798155128-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FnDgiM1CWSLWRIbhORANO%2Fuploads%2Fw6CHoTiWlzzKMqmfxJNA%2FScreenshot%202026-11-06%20at%2010.51.15.png?alt=media&amp;token=89bd92b5-b3ab-4cfb-8b91-9b531739297f" alt=""><figcaption></figcaption></figure>

## 启用/管理

{% tabs %}
{% tab title="Online Store 2.0 主题" %}
购物车验证脚本通过 Sesami Theme App Extension 启用。请确保所需的 Sesami 应用块已添加并在您的主题中启用。

<figure><img src="https://1798155128-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FnDgiM1CWSLWRIbhORANO%2Fuploads%2FD0ovG3dlB5XXCv5wzdHO%2FScreenshot%202026-11-06%20at%2011.02.18.png?alt=media&amp;token=5d0e4642-16e0-402d-8ce6-0f57f7d89b73" alt=""><figcaption></figcaption></figure>
{% endtab %}

{% tab title="传统主题" %}
不支持应用扩展的主题需要手动店面集成。

购物车验证脚本包含于 [Sesami 手动集成](https://help.sesami.co/zh-cn/apps-integrations/shopify/online-store/manual-install.md)
{% endtab %}
{% endtabs %}

## 样式

购物车验证通知支持自定义其颜色、字体和其他样式选项。不过，通知文本无法修改。

参见：“[如何自定义购物车验证脚本的样式](https://help.sesami.co/zh-cn/apps-integrations/shopify/online-store/customize-cart-verification-script-styles.md)”。


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://help.sesami.co/zh-cn/apps-integrations/shopify/online-store/cart-verification-script.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
