Monday, 19 August 2013

how to find shipping amount| How to display shipping and handing separately


Add This lines to any where in template file.

This is for getting the full array shipping:

<?php $carriers = Mage::getStoreConfig('carriers', Mage::app()->getStore()->getId());
foreach ($carriers as $carrierCode => $carrierConfig) {

print_R($carrierConfig);

}
?>


This is for getting the flat rate shipping and handling:


  <?php $carriers = Mage::getStoreConfig('carriers', Mage::app()->getStore()->getId());
foreach ($carriers as $carrierCode => $carrierConfig) {
if($carrierConfig[model]=='shipping/carrier_flatrate') {
print_R($carrierConfig[price]);
echo "<br/>";
print_R($carrierConfig[handling_fee]);
}
}
?>

No comments:

Post a Comment