Magento - 确定购物车页面上的优惠券代码是否适用于“免费送货”

Does any one know how to determine that the coupon code applied on shopping cart page is for Free Shipping through code?

I have a Shopping Cart rule created for FREE SHIPPING which works fine. But if a customer hasn't yet chosen his shipping delivery options then its confusing for them coz the coupon code does nothing for them atleast on the cart page.

They see FREE SHIPPING option on the checkout/onepage.

Hence I would need this information so that I can display the customer a valid message that the 'Coupon is applied and FREE SHIPPING option would be available to them in the next stage of Checkout'

Any ideas which file to look for and what piece of code can help me determine that my coupon code in question is for FREE SHIPPING ?

You should have a look in Mage_SalesRule_Model_Validator and than the method public function processFreeShipping(Mage_Sales_Model_Quote_Item_Abstract $item). That's where the free shipping is calculated.

You can modify/extend this to save something in session and use that to detect on frontend when the cart has free shipping or not.