Override USPS carrier and implement free shipping based minimum grand total amount instead of subtotal
Override using below code (into config.xml)
<usa>
<rewrite>
<shipping_carrier_usps>Packagename_Modulename_Model_Usa_Shipping_Carrier_Usps</shipping_carrier_usps>
</rewrite>
</usa>
Then create model file
/public_html/app/code/local/Packagename/Modulename/Model/Usa/Shipping/Carrier/Usps.php
and override only below method
public function getMethodPrice($cost, $method = '')
{
return $method == $this->getConfigData($this->_freeMethod)
&& $this->getConfigFlag('free_shipping_enable')
&& $this->getConfigData('free_shipping_subtotal') <= $this->_rawRequest->getPackageValueWithDiscount()
? '0.00'
: $this->getFinalPriceWithHandlingFee($cost);
}
//getPackageValueWithDiscount this is changed function
It's Done ~~
<usa>
<rewrite>
<shipping_carrier_usps>Packagename_Modulename_Model_Usa_Shipping_Carrier_Usps</shipping_carrier_usps>
</rewrite>
</usa>
Then create model file
/public_html/app/code/local/Packagename/Modulename/Model/Usa/Shipping/Carrier/Usps.php
and override only below method
public function getMethodPrice($cost, $method = '')
{
return $method == $this->getConfigData($this->_freeMethod)
&& $this->getConfigFlag('free_shipping_enable')
&& $this->getConfigData('free_shipping_subtotal') <= $this->_rawRequest->getPackageValueWithDiscount()
? '0.00'
: $this->getFinalPriceWithHandlingFee($cost);
}
//getPackageValueWithDiscount this is changed function
It's Done ~~
Comments
Post a Comment
Feel Free To Ask...