Impossible to return multiple discounts from the same function #194
Replies: 63 comments 81 replies
|
+1 |
|
Hello Shopify, I hope you are looking here, is there any ETA for this? This is the main blocker for many developers. Thank you so much. |
|
Another +1 |
|
We have the same problem |
|
+1 here too |
|
We need this also. Has Shopify support responded? |
|
I have same issue looking for solution |
|
Also looking for a solution to this. Our use case:
If the target was a cart line id instead of a product variant id and iterated through the cart lines, we would be able to run discounts like so: cart line 1 (product variant 1 - width 1 length 2) -> function -> discount result 1 |
|
+1... We might have a single volume discount setup for 2 products, say A and B. |
|
Any update/ETA here? |
You decided to remove Shopify script from the store, which remained a possibility to solve this type of discounting. |
|
+1 I join this waiting list :) PLEASE, at least make us a statement ?
I think it's a basic feature which need to be implement asap. |
|
I have the same issue with multi-tier discounts, looking for solution. |
|
+1 |
|
+1 many of our clients need/want this to work |
Will this update allow us to select cart items by line item/key instead of variant id so we can target items properly for discounts? Or is this only going to allow a single function to return multiple discounts? |
|
You can have the same variant in different line items with different
discounts in the context of upsells, bundles, etc.
…On Fri, 13 Oct 2023 at 09:27, Jasper van Loenen ***@***.***> wrote:
Isn't it? Even though the target selector uses variant IDs, aren't those
functionally the same as line items, as the script runs in a single cart at
a time?
—
Reply to this email directly, view it on GitHub
<#194 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAAQY54BOZKWAG5NN5JJXTLX7E6ULANCNFSM6AAAAAAWMOVTK4>
.
You are receiving this because you are subscribed to this thread.Message
ID: <Shopify/function-examples/repo-discussions/194/comments/7273942@
github.com>
|
I think they are pretty much the same issue. Both items need to be solved for functions to take over script discounts. |
|
support for line item properties is very important IMHO |
|
All, this issue is specifically tracking the inability to return multiple discounts from the same function. Another thread is tracking the inability to target line items. |
|
Right now Discount Extension Function is very limited in terms of it's capabilities and flexiblity, it only allows assigning a discount to single cart item (by variantID, which is confusing cuz it does not give control over specific line item I wish to discount). When can we expect those issues to be resolved? Thank you! |
|
Thank you for responding on this thread. Will application of discounts go with a single function? or should we create multiple functions? Also this might not be related to this discussion, however discounts have limitation for amount of functions to be created per store.
Probably, shopify has limitation for automatic discount PER SHOP. So the shop can bear 5 automatic discounts. Devs might be confused when developing a feature. Can you include this limitation in your documentation, please? I cannot find any documentation regarding this. cc: https://community.shopify.com/c/shopify-functions/app-automatic-discount-limitation/td-p/1921328 |
|
May I know if |
|
All, the |
|
Seems like |
|
Gražutė
…On Thu, 7 Dec 2023 at 02:17, pbtripletree ***@***.***> wrote:
Seems like DiscountStrategy.First is used when a variant is targeted by
two separate discounts. My expectation was that the discounts would stack,
or at the very least DiscountStrategy.Max would be used in the event of
overlap. We chalking this up as a feature or bug?
Screenshot.2023-12-06.at.5.07.18.PM.png (view on web)
<https://github.com/Shopify/function-examples/assets/29215222/c5d9233f-3bff-4437-8472-1057b17e0a38>
Screenshot.2023-12-06.at.5.07.00.PM.png (view on web)
<https://github.com/Shopify/function-examples/assets/29215222/920ef289-26f6-426b-8b7a-8cceca0fa938>
—
Reply to this email directly, view it on GitHub
<#194 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AA2JKN3LGAKPXYI5Z6TZEGLYIEDLPAVCNFSM6AAAAAAWMOVTK6VHI2DSMVQWIX3LMV43SRDJONRXK43TNFXW4Q3PNVWWK3TUHM3TOOBSGUYDA>
.
You are receiving this because you commented.Message ID:
***@***.***
com>
|
|
Closing as this feature is complete and released. |
|
Will If not, then for anyone reading this, a workaround is to combine multiple discounts, into 1, where each eligible product variant is a target. The limitation here is that every product will receive the same discount. |













Uh oh!
There was an error while loading. Please reload this page.
There's a huge limitation on functions (discounts) which makes this unusable in real life cases: even though a function can return a list of multiple discounts (say, one for each cart line item), Shopify will apply only one of it. We need all the discounts to be applied.
For example: Volume discounts have different tiers for different quantities. A cart line could have quantity 2 and qualify for 1st tier (10% discount), another cart line could have quantity 6 and qualify for 2nd tier (20% discount). This is impossible to handle now, as even though the function returns 2 different discounts to apply, Shopify applies only one.
Need DiscountApplicationStrategy: ALL, not just one: https://shopify.dev/api/functions/reference/product-discounts/graphql/common-objects/discountapplicationstrategy
There are forum posts about this, but nobody at Shopify didn't even reply:
https://community.shopify.com/c/shopify-functions/shopify-functions-product-discount-api-multiple-discounts/td-p/1693369
https://community.shopify.com/c/shopify-functions/need-discountapplicationstrategy-all/td-p/1865853
All reactions