Pregunta

By $result = Mage::getModel('shipping/rate_result'); method I can create a new shipping rate. but How I can restrict other shipping methods in this acction?

¿Fue útil?

Solución

Grab All active shipping methods, loop through each one, and see if it matches your desired one

$activeCarriers = Mage::getModel('shipping/config')->getActiveCarriers();
foreach($activeCarriers as $code => $method) {
    if($code == 'yourcode') {
         $result = Mage::getModel('shipping/rate_result');
    }

}   
Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top