Discounts automatic with combo products as a bundle

Solved

Discounts automatic with combo products as a bundle

niko-ngo
Shopify Partner
7 1 1

Good afternoon,

 

I need help please.

 

I have plan to create a automatic discount for a combo products as a bundle if and only if all the products in the combo are added to the cart.


Example:
I create a discount for 4 products: A, B, C, D. If the customer adds to the cart all products A, B, C, D, the discount will be applied. On the contrary, the customer adds products A and B, no discount is applied.

I have try to use Discount function in Dashboard and select 4 products A, B, C, D and set Minimum quantity of items is 4, but when customer adds product A with quantity is 4, discount will be applied. I don't want this.

Is there any way using shopify functions to do this?

Accepted Solutions (2)

tobebuilds
Shopify Partner
324 19 88

This is an accepted solution.

Hi Niko-Ngo,

 

Are you trying to build a custom app with Shopify Functions, or are you looking for an existing app that uses Shopify Functions?

 

If you're building a custom app, then it should be straightforward to hard-code the logic

  1. Declare 4 int variables, one per each product in the bundle, default to 0
  2. Loop through all lines in the cart, increment the variables when you find products A, B, C, or D in the cart
  3. Check if all the int variables are greater than 0. If so, then add discounts to your FunctionRunResult for product variants of A, B, C, and D

 

Or, if you're looking for an existing app, just reply, and I'll be happy to explain how to set this up in my app, Regios Automatic Discounts (Built for Shopify, 4.9 stars).

 

Best,

Tobe

View solution in original post

Replies 5 (5)

tobebuilds
Shopify Partner
324 19 88

This is an accepted solution.

Hi Niko-Ngo,

 

Are you trying to build a custom app with Shopify Functions, or are you looking for an existing app that uses Shopify Functions?

 

If you're building a custom app, then it should be straightforward to hard-code the logic

  1. Declare 4 int variables, one per each product in the bundle, default to 0
  2. Loop through all lines in the cart, increment the variables when you find products A, B, C, or D in the cart
  3. Check if all the int variables are greater than 0. If so, then add discounts to your FunctionRunResult for product variants of A, B, C, and D

 

Or, if you're looking for an existing app, just reply, and I'll be happy to explain how to set this up in my app, Regios Automatic Discounts (Built for Shopify, 4.9 stars).

 

Best,

Tobe

niko-ngo
Shopify Partner
7 1 1

Hi Tobebuilds,

 

I can't find documentation related to your solution for building a custom app. Can you share it with me?
Thank you.

niko-ngo
Shopify Partner
7 1 1

Hi @tobebuilds,

 

Thank you for your help.

SealSubs-Max
Shopify Partner
10 0 0

Hello.

 

I am Max - Support representative at Seal Subscriptions.

 

You can use the Bundler - Product Bundles app to achieve this.

 

The process is quite simple, you'd only need to create a classic bundle and add all A, B, C and D products into it, this way the discount will ONLY apply if ALL of these items are in cart.

 

You can also hide the widget that automatically gets created by the app, if you only want the discount functionality.

 

This can be done on the FREE plan, so you don't have to worry about the pricing. 🙂

 

 

SealSubsMax_0-1719497816818.png

 

Seal Subscriptions App, a subscription app for Shopify, with glowing user testimonials.