Skip to content

Instantly share code, notes, and snippets.

@ksysctl
Created September 29, 2014 22:12
Show Gist options
  • Save ksysctl/26cf8479289f91c65d6e to your computer and use it in GitHub Desktop.
Save ksysctl/26cf8479289f91c65d6e to your computer and use it in GitHub Desktop.
Get all shipping methods
$methods = Mage::getSingleton('shipping/config')->getActiveCarriers();
$options = array();
foreach($methods as $_code => $_method)
{
if (!$_title = Mage::getStoreConfig("carriers/$_code/title"))
$_title = $_code;
$options[] = array('value' => $_code, 'label' => $_title . " ($_code)");
}
var_dump($options);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment