How can I display the list of my shipping methods according to the order numbers that I have set in their input fields of Sort Order?
I have set each shipping method's Sort Order in my backoffice, but they are not displayed accordingly.
For instance, in my backoffice, I have these shipping methods,
Method Name: bestway Sort Order: 1 Method Name: Free Sort Order: 2 Method Name: Chronopost Sort Order: 3
But they are not displayed in this order in
<?php $methods = Mage::getSingleton('shipping/config')->getActiveCarriers(); $shipping = array(); foreach($methods as $_ccode => $_carrier): if($_methods = $_carrier->getAllowedMethods()): if(!$_title = Mage::getStoreConfig("carriers/$_ccode/title")) $_title = $_ccode; foreach($_methods as $_mcode => $_method): $_code = $_ccode . '_' . $_mcode; $shipping[$_code] = array('title' => $_method,'carrier' => $_title); ?> <li><input type="radio" name="estimate_method" value="<?php echo $_code;?>" id="s_method_<?php echo $_code ?>"<?php if($_code === $this->getAddressShippingMethod()) echo ' checked="checked"' ?>> <span class="item-text-shipping-method"><?php echo $_title;?></span></li> <?php endforeach;?> <?php endif;?> <?php endforeach;?>
Method Name: Free Method Name: bestway Method Name: Chronopost
Method Name: bestway should be on the top in the list, but it is always dropped to the second. Why? Any idea how I can fix it?