What's your biggest current challenge? Have your say in Community Polls along the right column.

Need to create a simple maximum items in cart discount.

Need to create a simple maximum items in cart discount.

RonhillNZ
Visitor
3 0 2

Hi everyone,

I am trying to do something super simple, but it seems that it's impossible in Shopify without an expensive app.

I want to offer a 50% discount on one item, one time from one collection. This requires a maximum amount of products it applies to in the cart - ie apply, 50% off a maximum of 1 pair of socks per customer, per cart.

However, Shopify only does the minimum, so it means people can get the 50% off everything in the cart if I use that process. But leaves it open to abuse.

The only app that does it the way I want it to is Discount Ninja, but it's expensive to solve this small problem and I find it very buggy for some of our other deals.

Does anyone know of a process or app that will do this one simple thing?

Cheers

Replies 16 (16)

gr_trading
Shopify Partner
1973 146 205

Hi @RonhillNZ 

 

custom script which will restrict the user to have more than 1 items for discounted product.

 

 

will this work?

For any custom development WhatsApp or connect at Email ID: gr.trading15@gmail.com for quick consultation. | Shopify Free codes
To support Buy Me a Coffee
RonhillNZ
Visitor
3 0 2

Sounds like an options but how to implement?

gr_trading
Shopify Partner
1973 146 205

Hi @RonhillNZ 

 

Sorry, for late reply.

 

Here is the solution you can create automatic product discount using discount in admin.

 

Now since you want to restrict the discount for 1 quantity.

 

Put a script which will use cart.js API to check for item exists in cart or not.

 

If item exists you can disable the add to cart CTA on product page.

 

For cart Ajax API please refer to the below URL.

 

https://shopify.dev/docs/api/ajax/reference/cart

 

Now user will able to add only one product at a moment and automatic discount will reduce its price.

 

 

Hope this will help...

For any custom development WhatsApp or connect at Email ID: gr.trading15@gmail.com for quick consultation. | Shopify Free codes
To support Buy Me a Coffee

tobebuilds
Shopify Partner
482 34 129

Are you looking to give your customers a discount code with a maximum quantity, or an automatic discount?

Founder, Regios Discounts app (4.9 stars, 72 reviews, Built for Shopify)
- Custom discounts made simple
- "Just about any discount you'll ever need"
- Built by an ex-Google software engineer
antonelabk
Tourist
11 0 2

Hi!! I’d like to know if there is any app that can apply the discount code to all the items of a cart but setting up a max quantity(like 3 for example).

 

thanks!

Hirano_00
Shopify Partner
86 10 13

Hi @RonhillNZ 

 

I have experience in developing discount applications and I'm interested in the issues you're facing. I believe I can offer a more cost-effective solution than Discount Ninja. Could you please provide more details about your requirements?

 

Is it correct that you want to apply a 50% discount to the least expensive item from the collection of discounted items added to the cart?

 

●example

Discounted Collection A:

  • Item 1 in Collection A: $40 (2 items) → 50% discount → $40 * 0.5 + $40 = $60
  • Item 2 in Collection A: $60 (1 item) → No discount → $60
    Total price $120

 

kgonz
Visitor
1 0 0

I'm having the same issue. Would love to hire you if you are willing. Please let me know

Hirano_00
Shopify Partner
86 10 13

I am working on this issue and will be adding this feature soon to the apps I have already released.

 

https://apps.shopify.com/steppun-discount

 
 
Hirano_00
Shopify Partner
86 10 13

I have released an app to solve this issue.

You can ◯% off with a maximum purchase limit of ◯ items.

 

You can install it from here.

https://apps.shopify.com/steppun-discountスクリーンショット 2023-10-15 15.19.15.png

AngyPaws
Visitor
1 0 0

Hi Satoshi, 
I have tried your app to fix this issue and it appears to limit it to one discount for an individual product, but when different products from the collection are added, they too are discounted.  So it's still not limiting the discount to 1 total use.

AngyPaws_1-1699866653128.png

 

Hirano_00
Shopify Partner
86 10 13
 
Thank you for your reply.
I have Changed functions. One item from the collection will be discounted at random (or more precisely, the first item you put in your cart).

Hirano_00
Shopify Partner
86 10 13

I have released an app to solve this issue.

https://apps.shopify.com/steppun-discount

 
United_Apparel_
Excursionist
13 0 7

This is a great solution that solves something Shopify should already have built in. Thank you for creating it! I just downloaded it so we could run a promo that is 15% off any one item and it works! I also love that it is right in the Shopify Discounts section and not a separate complicated app page. My only complaint is that the discount applies to the first item the customer adds to the cart and it would be better to apply to the most expensive item in the cart.

Hirano_00
Shopify Partner
86 10 13

Hi @United_Apparel_,

 

I can't thank you enough for your advice. 

I have changed my app. I changed it to discount items with the highest unit price.

 

United_Apparel_
Excursionist
13 0 7

How amazing! I just tested and it works perfectly. Thank you!!

antonelabk
Tourist
11 0 2

Thanks Hirano! Also, it works only on 3 items max as requested, if we add more than 3 items, only 3 of them have discount. Thanks!