Access DiscountNode in cart checkout validation #445
Replies: 3 comments 2 replies
-
Maybe you can copy the list of excluded products into the cart and checkout validation function configuration metafield. |
Beta Was this translation helpful? Give feedback.
-
Reference for the cart and checkout input can be found here: I think what you are really asking for is to have information on the applied discounts in the input, along with their metafields? Another option would be to use shop metafields, which both functions have access to. |
Beta Was this translation helpful? Give feedback.
-
Our use case if very similar. It's possible to create multiple function powered discounts but there is no way to find out what actually ended up applying across all of them. So when a merchant wants to set a discount limit across ALL discounts they can't. I think Discounts Allocator would be able to do this but that is not an option for public apps. |
Beta Was this translation helpful? Give feedback.
-
I am developing an app that created the Product Discounts' function
And due to the requirements, I need to exclude some products from the discount settings to be checkout from the cart, so I am created on the Cart and Checkout Validation Function for this purpose
Usually if in the Product Discounts' I can in the query the discountNode by the following
discountNode { metafield(namespace: "NAME", key: "discount-config") { value } }
So I wanted to get the same thing in the Cart and Checkout Validation Function, but I received the error below
Is the Cart and Checkout Validation Function can't access the discountNode from other discount function?
We prefer if we can access the info like this
Or is there any alternative way I can do this? is the Cart and Checkout Validation Function allowed custom inputs from customer? (eg: product_Ids)
Beta Was this translation helpful? Give feedback.
All reactions