Can I have two or more Shopify functions/extensions in an app for stackable discounts

Issue:

I have working Shopify function and app installed on my development store for testing. During testing I find that the app works as intended, BUT …

It will not “stack” discounts in particular BOGO discounts. So I have created in the Shopify Web Admin UI a BOGO discount:

And it only “works” when I add two or more of the product that is NOT being discounted by the Shopify Function.

Is there a way to add another function that will also add “free” products if the quantity of products in a collection is 2 ?

In other words, if I add the “bogo” functionality to another Shopify function but share the same app name, will things just “work” ?

The desired behavior is that the one product gets the membership discount and if the cart has that and any other product in the same product collection a free product is added of the second product. This is now possible and in production with Shopify Scripts and an automatic discount in my live store. But I want a Shopify Functions solution.

And yes, the function has:

discountApplicationStrategy: DiscountApplicationStrategy.All,

api_version = “2024-01”

Please Advise.

Thanks.

Functions follow the same stacking/combination rules as other discounts. Have you reviewed allowed combination rules?
https://help.shopify.com/en/manual/discounts/combining-discounts/discount-combinations

If your combination is not possible out of the box, you might look at the Discounts Allocator API:
https://shopify.dev/docs/apps/selling-strategies/discounts/discount-function-examples/discounts-allocator

1 Like

Nick – don’t see Discounts Allocator working, for the following reasons:

  1. Only available on a Developer Preview store and thus not able to be installed on my live store for production.

  2. Sets the max discounts, I want to have a BOGO function combine with the product discount for members only.

Looking to see if I can create an order/cart based discount to determine X number of items tagged or belonging to collection in cart, add zero dollar extra of lowest cost item as is possible with Script Editor today.