2013-05-20 128 views
3

同时节约顺序编程,我传递表(tablerate_bestway),但它给错误如何在Magento订单保存中保存tablerate_bestway送货方式?

'Please specify a shipping method.' 

我的代码,以节省运输方法

$shippingAddress->setCollectShippingRates(true) 
        ->setShouldIgnoreValidation(true) 
        ->setShippingMethod("tablerate_bestway") 
        ->collectShippingRates(); 

然而,如果我通过flatrate_flatrate,它的工作原理。如何保存tablerate_bestway?

在管理中启用了flat_rate和tablerate_bestway。

回答

4

溶液样品是:

$shippingAddress->removeAllShippingRates() 
      ->setCollectShippingRates(true) 
      ->setShippingMethod('tablerate_bestway') 
      ->setShippingDescription('Table Rate - Best Way'); 

添加运费说明,不收运费。

相关问题