1

TL;DR : Free shipping on order discounts don't appear as a discount (or any type of) adjuster. So how do I check if a free shipping discount has been applied?

Sorry for the long post - hopefully it explains what I'm trying to achieve!

I have a custom module that shows and hides shipping options depending on a few factors.

At the moment the client has a discount that allows Free Shipping on all orders over $200. They have set this up and ticked the "Remove all shipping costs from the order"

Discount Free shipping

This is working well and no shipping is being applied correctly at the right time. However the only thing that shows you have free shipping is that the shipping price is 0. To make it clearer to the user I'd like to display a notice to show they are getting free shipping. I can't do this using the shipping total as that may be zero simply because they haven't selected anything yet.

So my idea was that I could use the adjusters to check if the discount was being applied, but this type of discount doesn't seem to appear in the list of adjusters. Here are a couple of scenarios where I have listed all adjusters:

1.) Order with normal shipping applied: - shipping and tax adjusters applied.

normal order

2.) Order over $200 (free shipping) - only tax adjuster applied.

free shipping on order

3.) Order over $200 (free shipping) and 10% discount applied.

Free shipping and discount

So my question is how do I detect that a free shipping discount has been applied to an order? Should the discount appear as an adjuster? Is there a different way to detect what discounts have been applied?

Thanks

2

1 Answer 1

1

For anyone else viewing this question - until there is a zero value adjuster as mentioned by Luke, my solution has been to simply do the discount checks in my custom module.

A little messy but it'll do the job for now.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.