希望有人能帮上忙。
我们店里有两种产品,一种是直销产品,一种是高档产品。
在结账页面上,我们损失了大量的销售额,因为客户正在尝试为已经被大幅折扣的商品输入折扣代码。
是否可以创建一个Shopify Plus脚本。
。
似乎很简单,但我在任何地方都找不到好的答案。
谢谢!
发布于 2020-09-20 21:45:26
使用checkout.liquid
布局根据购物车中的当前项删除该输入。
{%- liquid
assign hideDiscountBox = false
assign productIdsToHideDiscountBox = "123456789012345,543210987654321,..."
for item in checkout.line_items
if productIdsToHideDiscountBox contains item.product_id
assign hideDiscountBox = true
break
endif
endfor
if hideDiscountBox
echo "<style>.order-summary__section--discount { display: none; }</style>"
endif
-%}
https://stackoverflow.com/questions/63976678
复制