How to hard code multiple automatic discounts

Hello,
I want to achieve this discount on all orders:

20% off from 3 products

30% off from 4 products

40% off from 5 products

I tested a lot of apps to do this. I chose 1 which automatically apply discount codes on cart.

But the app is very buggy and I lost almost 20% of my BFCM turnover because the app doesn’t show the correct discount randomly for some users…

I want now to code by myself this kind of app.

Question 1: Is it possible with Shopify advanced plan?

Question 2: Do you have any general guidance so I can code it by myself?

Thanks a lot for your help,

Hello @zied_drira ,

You can get idea from this store

Check the 3, 4, 5 and 6th section.
It’s custom coded.

Thanks

Hi, Zied

No need to install 3rd app or hard coded. Just create 3 discounts in your Shopify admin ->discounts.

For each minimum quantity of 3, 4,5 etc, and apply to specific products or collections.

@Eric-HAN Thank you,
Shopify allows only 1 automatic discount but this offer requires 3 automatic discounts. Am I wrong ?

Hi,Zied

I made 2 automatic discounts. and works well .

@Eric-HAN
Oh! always thought that only one automatic discount is allowed. Even with the last update of Shopify, I thought the limitation was removed only for discount codes…
I will try this for the coming sales days.
Do you also have a workaround to stack a promo code and an automatic discount (without using a 3rd app)?

Thank you!

Hello @zied_drira ,

We would like to inform you that, recently Shopify introduced a combination feature with discounts. Also, now you can have the option to apply a discount code via code, you can check both the documentation below.

Discount combination:

https://help.shopify.com/en/manual/discounts/combining-discounts

Apply discount code through custom code:

https://wearetmbr.com/shopify-auto-fill-discount-code-on-checkout-page/

Hope it helps, let us know if you need any further help.

Regards,

CedCommerce