英文:
Shopify Functions Query Input
问题
我遇到了关于我的Shopify功能的问题,我想在客户选择自取时为产品提供折扣。是否有一种方法可以知道客户是否选择了"自取"作为送货选项?我尝试查看此选项这里,但无论我选择运输选项还是自取选项,Shopify的响应都为空。以下是我的输入查询:
query Input {
cart {
lines {
quantity
merchandise {
__typename
...on ProductVariant {
id
}
}
}
deliveryGroups {
selectedDeliveryOption {
deliveryMethodType
}
}
}
discountNode {
metafield(namespace: "this", key: "that") {
value
}
}
}
我是否做错了什么?有什么想法我可以尝试吗?
英文:
Im having trouble with my Shopify Function where I want to give a discount on the products if the client chooses pickup. Is there a way to get if the client picked PICK_UP as the delivery option ? I tried looking into this option HERE, but the response from shopify comes back empty does not matter if I choose shipping option or a pickup option. Here is my input query:
query Input {
cart {
lines {
quantity
merchandise {
__typename
...on ProductVariant {
id
}
}
}
deliveryGroups {
selectedDeliveryOption {
deliveryMethodType
}
}
}
discountNode {
metafield(namespace: "this", key: "that") {
value
}
}
}
Am I doing anything wrong? Any ideas what I could try?
答案1
得分: 1
对于那些正在研究这个问题的少数人。显然这是一个错误,Shopify的开发人员已经意识到了并正在努力修复它。直到今天为止,它还没有被修复。一旦Shopify修复了这个错误,我会在这里进行更新。
英文:
For those few of you who were looking into this. Apparently it IS a bug and the Shopify Devs are aware of it and are working to fix it. Until today it has not been fixed yet. Ill update here once the bug is fixed by shopify.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论