I know #406130: Free Shipping Option was marked as won't fix and I considered writing a custom module for free shipping, but decided there's no need to redo the wheel when it's simple enough with a hook into conditional actions. The attached patch adds a new conditional action to "Check if a discount has been applied to an order." This allows for a shipping quote to be given based on what discount codes a user has entered. It does this by saving the discount codes entered in a session variable. I imagine having a hook into CA will also have other uses that I haven't yet thought of.
An example of how to use this for free shipping:
1. Create a discount which gives a fixed amount off of 0.
2. Set up a conditional action which gives shipping if the above discount is applied.
3. Apply the code during checkout. Shipping quotes should automatically refresh and get your new quote.
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | uc_discounts_960572.patch | 6.67 KB | jrust |
| uc_discounts_conditional_action.patch | 6.1 KB | jrust |
Comments
Comment #1
jrust commentedUpdated patch that sets the default value in the CA.
Comment #2
peachykeen commentedPatch works great for me, thanks.
Comment #3
jrust commentedThanks, it's committed to CVS with a couple more bug fixes.