Discussing Shopify Functions development, deployment, and usage in Shopify apps.
I currently use Shopify Scripts to implement all of my store's discounts. Some of the discounts don't apply if a discount_code is in the cart. I do this by checking input.cart.discount_code.
Do I have access to discount codes in Shopify Functions?
This is possible, but only via a diversion. You can save metafields at the discount codes and then query them in the input GraphQL. If you write the discount code in there, it is available in functions.
@Nick_Wesselman Could you kindly shed some light on this, please?
I have also similar requirement in which, I am trying to provide different % discount based on Vendor name for same Discount Code.
It is possible in Script Editor. I did not found documentation about it for Shopify Functions.
Is there plan to allow multiple discounts ? See below screenshot,
Below does not returns any error, But.. only applied first object discount.
Technically, discounts is array, it means we could submit multiple objects.
Possible use case like my previous comment,
Vendor wise different % discount for SAME discount-code.
Do you think, I might have missed any configuration in above ?
Hi Sanket_Patel,
we've tried exactly the same thing, and we've got the same result: With Shopify Functions you cannot apply different discount percentages with one discount code.
Since this is an important standard case for us, we asked our Merchant Success Manager, who reached out to the developer team at Shopify.
Result: It is currently not possible in the setup, but is considered a possible future feature. She is still trying to find out if there is any more concrete information and will let us know.
My humble opinion: Currently, Shopify Functions cannot keep up with Shopify Scripts in terms of functionality. What is also missing from my point of view:
And something like the Launchpad is completely missing.
One can only hope that Shopify will still improve this.