php - Magento: modify free shipping method label with various shopping cart price rules -
i need setup free shipping in magento catalog 3 shopping cart price rules, , need label of "free shipping" different in each scenario. know how modify label instances of free shipping globally via configuration/shipping methods/free shipping editing title , method name fields, want control title , method name depending upon shopping cart price rule applies.
example:
shopping cart rule 1 returns "title 1, method name 1, $0.00"
shopping cart rule 2 returns "title 2, method name 2, $0.00"
shopping cart rule 3 returns "title 3, method name 3, $0.00"
use following custom script
$quote=mage::getsingleton('checkout/session')->getquote(); $data=$quote->getshippingaddress()->getallshippingrates(); foreach($data $_rate){ if($_rate->getcode()=='freeshipping_freeshipping'){ $_rate->setcarriertitle('new carrier name'); /* new carrier title here */ $_rate->setmethodtitle('new method title');/* new method title here */ $_rate->save(); } }
Comments
Post a Comment