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.

Comments

jrust’s picture

StatusFileSize
new6.67 KB

Updated patch that sets the default value in the CA.

peachykeen’s picture

Assigned: jrust » Unassigned
Status: Closed (fixed) » Needs review

Patch works great for me, thanks.

jrust’s picture

Assigned: Unassigned » jrust
Status: Needs review » Fixed

Thanks, it's committed to CVS with a couple more bug fixes.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

Status: Needs review » Closed (fixed)