Active Shipping methods
$activeCarriers = Mage::getSingleton('shipping/config')->getActiveCarriers();
// $allCarriers = array();
foreach ($activeCarriers as $carrierCode => $carrierModel) {
$allCarriers[$carrierCode] = array('value' => Mage::getStoreConfig('carriers/' . $carrierCode . '/title'), 'label' => Mage::getStoreConfig('carriers/' . $carrierCode . '/title'));
Or
($allCarriers[$carrierCode] = array('value' => $carrierCode, 'label' => Mage::getStoreConfig('carriers/' . $carrierCode . '/title'));
}
return $allCarriers;
Active Payment methods
$payments = Mage::getSingleton('payment/config')->getActiveMethods();
$payMethods = array();
foreach ($payments as $paymentCode => $paymentModel) {
$payMethods[$paymentCode] = array('value' => $paymentCode, 'label' => Mage::getStoreConfig('payment/' . $paymentCode . '/title'));
}
return $payMethods;
$activeCarriers = Mage::getSingleton('shipping/config')->getActiveCarriers();
// $allCarriers = array();
foreach ($activeCarriers as $carrierCode => $carrierModel) {
$allCarriers[$carrierCode] = array('value' => Mage::getStoreConfig('carriers/' . $carrierCode . '/title'), 'label' => Mage::getStoreConfig('carriers/' . $carrierCode . '/title'));
Or
($allCarriers[$carrierCode] = array('value' => $carrierCode, 'label' => Mage::getStoreConfig('carriers/' . $carrierCode . '/title'));
}
return $allCarriers;
Active Payment methods
$payments = Mage::getSingleton('payment/config')->getActiveMethods();
$payMethods = array();
foreach ($payments as $paymentCode => $paymentModel) {
$payMethods[$paymentCode] = array('value' => $paymentCode, 'label' => Mage::getStoreConfig('payment/' . $paymentCode . '/title'));
}
return $payMethods;
Comments
Post a Comment