# 如何使用 checkoutpage.co 覆盖层

**URL:** <https://meta.discourse.org/t/how-to-use-checkoutpage-co-overlay/136268>\
**Category:** Product Support\
**Created:** [2019 年12 月 17 日 01:38 UTC](https://meta.discourse.org/t/how-to-use-checkoutpage-co-overlay/136268 "2019-12-17T01:38:51Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

作者： ![Johani](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/johani/32/176920_2.png) [@Johani](https://meta.discourse.org/u/Johani)\
发布日期： [2019 年12 月 18 日 09:03 UTC](https://meta.discourse.org/t/how-to-use-checkoutpage-co-overlay/136268/3 "2019-12-18T09:03:04Z")

</div>

我稍微摆弄了一下，并为它制作了一个主题组件，因为我看到了很大的潜力。

> **[GitHub - hnb-ku/discourse-checkout](https://github.com/hnb-ku/discourse-checkout)**
>
> Contribute to hnb-ku/discourse-checkout development by creating an account on GitHub.

安装后，你就可以在帖子中使用类似下面的代码，它会自动转换为按钮。

`[wrap=checkout data-seller=5aaa701149321a00145c99b9 data-checkout=ux-animation-tool-license]按钮文本[/wrap]`

点击该按钮后，它会根据你添加的信息（如卖家 ID 和结账数据）显示弹窗。

我在主题创建器上为它制作了一个演示：

[https://theme-creator.discourse.org/theme/Johani/discourse-checkout](https://theme-creator.discourse.org/theme/Johani/discourse-checkout)

我们这边一切看起来都正常，但我自己还没实际购买过任何东西，因为我之前没用过 checkout-page。@FrancoisD，你能试着实际使用一下（购买/出售商品）并反馈结果吗？

一旦我们确认一切正常，我会把它移到主题分类中。

我还在代码中留下了一些注释，以解释它是如何构建的。

---

_[View the full topic](https://meta.discourse.org/t/how-to-use-checkoutpage-co-overlay/136268)._
