• Resolved kh93

    (@kh93)


    I have created a coupon that has the following settings:

    • Discount type: Percentage
    • Coupon amount: 50
    • Individual use only
    • Product category set
    • Usage limit per coupon: 50
    • Limit usage to X items: 1
    • Usage limit per user: 1

    The coupon works fine and only applies itself to one item. However, when two items from the set product category are in the cart, it’s automatically applying itself to the more expensive item. Is there a way to set it to apply to the cheapest one?

    Another strange thing: when I have two items: one that is 75$ and one that is 35$ in the cart, it applies 37.5$ (so the coupon is used on the expensive item)

    But when I have one item: 75$ and two 35$ items (which comes to 70$), it applies itself to the cheaper item and subtracts 17.5$ (so the cheaper item).

    What am I missing here? Any pointers would be welcome. Thanks!

Viewing 5 replies - 1 through 5 (of 5 total)
  • Stef

    (@serafinnyc)

    Hello @kh93 can you please add a systems reports? Feel free to omit the url if need be. Go to WooCommerce > Status > Get Systems Report and then paste that here using a Code Block

    Plugin Support omarfpg a11n

    (@omarfpg)

    Hi @kh93,

    By default there’s no option to define which item (the cheapest or most expensive) would get the discount if you use the limit usage to X items. This could be a great feature to have.

    We appreciate your suggestions and are always looking for ways to improve our products and services, and input from users like you is invaluable.

    We have a website where you can submit feature requests and upvote the ones other people submitted and you like. You can check that out?here.

    In the meantime, I’ve found a custom code snippet that may help you: https://stackoverflow.com/questions/61480164/apply-a-100-coupon-discount-on-the-cheapest-cart-item-in-woocommerce, you can tweak it to work for your case. Please keep in mind this is third-party code and we cannot provide support for it, so take a backup before trying it just in case!

    Please let us know if there’s anything else we can do to help or if you have further questions.

    Have a wonderful day!
    -OP

    Thread Starter kh93

    (@kh93)

    @omarfpg Thank you for the reply, and for the confirmation. So just to clarify, if the coupon is set to “limit usage to X items”, it’s applied randomly to an item.

    Thank you for the stackoverflow link as well, I’ll look into it. I know you can’t give support for third-party plugins, but I am using the Advanced Coupons for WooCommerce plugin as well, so I’ll look into those settings as well.

    Hey, @kh93!

    The Limit usage to X items option only works if specific products are added to the?products?field in “Usage Restrictions”.

    You can find more about this in this guide.

    I hope this was clarifying.

    I know you can’t give support for third-party plugins, but I am using the?Advanced Coupons for WooCommerce?plugin as well, so I’ll look into those settings as well.

    Yeah, we can’t help with third-party plugins, but I’m sure their support will be happy to help you with the set up ??

    Please let us know if there’s anything else we can do to help or if you have any questions.

    Have a wonderful day!

    Plugin Support omarfpg a11n

    (@omarfpg)

    Hi there ?? ,

    We haven’t heard from you in a while, so I’m going to mark this as resolved. Feel free to start a new thread if you have any more questions.

    All the best,
    Omar

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Applying coupon to cheapest item in the cart’ is closed to new replies.