如何在Magento订单保存中保存tablerate\u bestway装运方法?

如何在Magento订单保存中保存tablerate\u bestway装运方法?,magento,Magento,在以编程方式保存订单时,我传递了表(tablerate_bestway),但它给出了错误 'Please specify a shipping method.' 我的代码,以保存运输方法 $shippingAddress->setCollectShippingRates(true) ->setShouldIgnoreValidation(true) ->setShippingMethod("tab

在以编程方式保存订单时,我传递了表(tablerate_bestway),但它给出了错误

'Please specify a shipping method.'
我的代码,以保存运输方法

$shippingAddress->setCollectShippingRates(true)
                    ->setShouldIgnoreValidation(true)
                    ->setShippingMethod("tablerate_bestway")
                    ->collectShippingRates();
但是,如果我通过了flatrate_flatrate,它就会工作。如何以最佳方式保存tablerate_

在管理中同时启用“平面速率”和“表格速率”最佳方式。

解决方案示例为:

$shippingAddress->removeAllShippingRates()
            ->setCollectShippingRates(true)
            ->setShippingMethod('tablerate_bestway')
            ->setShippingDescription('Table Rate - Best Way');
添加装运说明,不收取装运费