jgodson / shopify-script-creator

React app to create Shopify Scripts
https://jgodson.github.io/shopify-script-creator/
GNU General Public License v3.0
163 stars 40 forks source link

Minimum Cart Subtotal Threshold even if Free Gift is in Cart #107

Closed psm9640 closed 1 month ago

psm9640 commented 7 months ago

Hello -

This is most likely due to operator error but I can't seem to figure out a solution and welcome any/all input:

We are using a "Buy X Get X Discounted" script to give someone an item for free if their cart is $99 or more. The free gift is normally $30. The problem is that if the person already has this item in their cart and say the entire value of the cart goes to $105, the discount applied to that free gift knocks the overall cart subtotal to $75. Is a BXGX Discount the wrong application here?

Thank you very much in advance -- script generator has been a life saver thus far!

jgodson commented 7 months ago

Hey there! Buy X Get X would probably also work fine as long as you add a cart qualifier of "Discounted Cart Subtotal (applied by scripts)". That will ensure that the subtotal is still $99 or more, even after the discount gets applied. That said, I think a Conditional discount would also work just as well. I have attached screenshots of how you could set that up.

Screenshot 2024-04-24 at 3 55 35 PM Screenshot 2024-04-24 at 3 55 44 PM
psm9640 commented 7 months ago

Awesome -- that was it!

Now, question: if we wanted the price to be both $99 with script discount OR $99 with discount code (basically never less than $99 subtotal), would the recommended approach be Multi-Select any condition with the following parameters?

image

Thank you again!

jgodson commented 7 months ago

Yep, that should work as long as the discount codes are not for specific products only. There are limitations (or at least there were, not sure if it has changed) on scripts that only allow checking the discount for codes that apply to the entire cart.

psm9640 commented 7 months ago

Thank you Jason!

jgodson commented 7 months ago

Sorry, I re-read your message and I think you should do the multi select with All. Any will mean that if it's over $99 after scripts OR over $99 after discounts, but you want it to be both.

psm9640 commented 7 months ago

10-4. I'll give it a shot. Thank you!

psm9640 commented 5 months ago

Hi Jason -

Seeing this issue again despite the change of the conditions to "Meets All". When I test the script in the Shopify script editor and apply a discount code, it's still qualifying the free item even if the subtotal is below $99. Thank you for your insight in advance!

0614-discount-script

jgodson commented 5 months ago

@psm9640, curious about the discount code set up. Is it a general % off the cart, or limited in any way? There are some limitations to what sort of discount codes Shopify Scripts can "see".

psm9640 commented 5 months ago

Hey Jason... This is the setup:

image

There is a rule running simultaneously that makes shipping free if this code is used, but since that's a shipping script I'm not sure that's creating any problems.

jgodson commented 5 months ago

That does look like it should be ok. I will see if I can find some time to look into this more closely. Thanks for providing the extra information!

psm9640 commented 5 months ago

Thank you Jason -- I really appreciate it!

jgodson commented 5 months ago

Hey Peter, I looked into this a bit more and I see what the issue is. The discount code one doesn't check the script discount and the script one doesn't check the script discount combined with the discount code discount, so they both see the total as being higher than the requirement and the discount applies. I may have to look at adding another option for Discounted Cart Subtotal (applied by scripts & discount code) 😄.

jgodson commented 5 months ago

Hey @psm9640 , I just added what I mentioned above. Let me know if it works!

psm9640 commented 5 months ago

Thank you, Jason - gonna take it for a spin here in a little bit!

psm9640 commented 4 months ago

Hey Jason - I'm not sure if it's a combination of the sales we were doing but everything seemed great for a while with the new additional options but now we're seeing the product tier qualify at lower cart total amounts. Example, current sale is for $89 and above to qualify someone for EAA+, however with the built-in 25% discount (done as a shopify automatic discount), we're getting the following:

image

And here's our rule:

image

I might be missing something but it seems like this should be okay unless we need an additional check for automatic discounts?

Thank you, Jason!

jgodson commented 4 months ago

@psm9640 Yes, automatic discounts would need another check as they do not show up as discount codes. If I remember correctly, they are applied to the line itself. That said, similar to discount codes that apply to specific items, I'm not sure that the discounts applied by automatic discounts are actually available to be checked in scripts unfortunately. I will try and find some time to verify that though.

psm9640 commented 3 months ago

Sorry for the delay in response. Makes sense! Thank you, Jason!

jgodson commented 1 month ago

Hey Peter, sorry I never got to checking that, though I am fairly certain that is the case. In any case, with the deprecation of Scripts next August, I'm not planning any new features at this point.

psm9640 commented 2 weeks ago

Hey Jason - Totally understand.

On a semi-related note, I messaged you on LinkedIn. Thank you!