Pages

Mahento 1.9 : Check Available Shipping Methods with website filter

Check Available Shipping Methods with website filter



<?php
require_once('app/Mage.php');
umask(0);
Mage::app();

### Start website filter ###
$website_id = Mage::app()->getWebsite(2)->getDefaultGroup()->getDefaultStoreId();
Mage::app()->setCurrentStore($website_id);
### End website filter ###

$methods = Mage::getSingleton('shipping/config')->getActiveCarriers();
$shipMethods = array();
foreach ($methods as $shippigCode=>$shippingModel)
{
$shippingTitle = Mage::getStoreConfig('carriers/'.$shippigCode.'/title');
$shipMethods[$shippigCode] = $shippingTitle;
}
Mage::log($shipMethods, null, 'logfile.log');
?>

No comments:

Post a Comment