微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

Shopify Plus Scripts 使用分层折扣对 3、5 或 7 种产品中的任何一种产品进行 % 折扣

如何解决Shopify Plus Scripts 使用分层折扣对 3、5 或 7 种产品中的任何一种产品进行 % 折扣

我正在尝试更改可用的 Shopify Plus 脚本或找到一个新脚本,以允许一个系列中的多个产品按标签打折。我已经测试了名为“按数量分层产品折扣”的脚本。这对于我的每一层都很好,但是……仅适用于 3 个以上带有标签的相同产品。

理想情况下,我们希望任何带有“特价”标签的产品都被计算在内,否则我们将制作多个标签,基本上允许集合中的任何产品都计算在内。

  • 3 x 任何带有标签“specials10”的产品来自特价系列 = 10% 的折扣
  • 5 x 特价系列中带有“specials15”标签的任何产品 = 15% 的折扣
  • 来自特价系列的 7 x 和带有“specials20”标签的产品 = 20% 的折扣

我正要摆弄下面一些建议的可编辑参数。谁能建议一个可能的方向?

Shopify 脚本可编辑部分。

  {
    product_selector_match_type: :include,product_selector_type: :tag,product_selectors: ["your_tag"],tiers: [
      {
        quantity: 3,discount_type: :percent,discount_amount: 10,discount_message: 'buy any 3 for 10% off RRP',},{
        quantity: 5,discount_amount: 15,discount_message: 'buy any 5 for 15% off RRP',{
        quantity: 7,discount_amount: 20,discount_message: 'buy any 7 for 20% off RRP',],]

### - 'product_selector_match_type' determines whether we look for
#     products that do or don't match the entered selectors. Can
#     be:
#       - ':include' to check if the product does match
#       - ':exclude' to make sure the product doesn't match
#   - 'product_selector_type' determines how eligible products
#     will be identified. Can be either:
#       - ':tag' to find products by tag
#       - ':type' to find products by type
#       - ':vendor' to find products by vendor
#       - ':product_id' to find products by ID
#       - ':variant_id' to find products by variant ID
#       - ':subscription' to find subscription products
#       - ':all' for all products

https://help.shopify.com/en/manual/checkout-settings/script-editor/examples/line-item-scripts#tiered-product-discount-by-quantity

干杯。

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。