For the complete documentation index, see llms.txt. This page is also available as Markdown.

使用事件(Events)进行自定义

注意:

  • 如果您使用以下事件进行自定义,请务必使用 CSS 隐藏 BOGOS 的默认组件。

  • 所有自定义都应在 snippet/freegifts-snippet.liquid 文件内实现

type GiftVariant {
  id: number,
  title: string,
  price: number,
  original_price: number,
  thumbnail: string,
  discount_type: "percentage" | "fixed_amount",
  discount_value: number
}

type GiftProduct {
  id: number,
  title: string,
  handle: string,
  thumbnail: string,
  belongs_to_offer?: string | string[],
  variants: GiftVariant[]
}

type TodayOffer {
  id: string,
  title: string,
  gifts: GiftProduct[]
}

type CartMessage {
  value: string,
  offer_root: string, // offer id
}

1. 用于自定义赠品滑动栏的事件

注意:请务必使用以下 CSS 隐藏 BOGOS 赠品滑动栏的默认组件

2. 用于自定义商品页面上赠品图标和赠品缩略图的事件

注意:请务必使用以下 CSS 隐藏 BOGOS 赠品图标和赠品缩略图的默认组件

3. 用于自定义今日优惠的事件

注意:请务必使用以下 CSS 隐藏 BOGOS 今日优惠的默认组件


4. 用于自定义购物车提示信息的事件

注意:请务必使用以下 CSS 隐藏 BOGOS 购物车提示信息的默认组件

最后更新于

这有帮助吗?