Liquid、JavaScript、主题、销售渠道。
1. 手动在后台管理页面添加完一个automatic的discount,用price rule的api获取不到这个discount的信息
await instance.rest.PriceRule.find({ session: this.getSession(), id: priceRuleId })2. 如何创建一个price rule,设置这个discount是automatic的呢
const instance = this.getInstance(); const priceRule = new instance.rest.PriceRule({ session: this.getSession() }); if (data.id) { priceRule.id = data.id; } else { priceRule.value_type = "percentage"; priceRule.value = "-100.0"; priceRule.customer_selection = "all"; priceRule.target_type = "line_item"; priceRule.target_selection = "entitled"; priceRule.allocation_method = "each"; priceRule.starts_at = "2023-07-21T00:00:00-00:00"; } priceRule.title = data.title; priceRule.prerequisite_product_ids = [data.buyProductId]; priceRule.entitled_product_ids = [data.getProductId]; priceRule.prerequisite_to_entitlement_quantity_ratio = { "prerequisite_quantity": data.buyNumber, "entitled_quantity": data.getNumber, }; await priceRule.save({ update: true, });
线上购物正在变得越来越流行,它也是支持小型企业的好方法。在线购物从来没有像今天这样重要,但作为消费者,如何确认你购买的产品或服务来自合法商家呢?
By gina826 Nov 12, 2023Google & YouTube 是中国商家在 Shopify 后台安装率最高的销售渠道之一。但是,在 Google & YouTube 销售渠道的使用中,商家经常可以看到 Goo...
By gina826 Oct 29, 2023