1
我想以編程方式重新排序產品。爲此我回答了:Magento - Programmatically reorder。但我收到錯誤信息重新排序未設置上次使用的送貨方式
請指定一種送貨方式。
爲什麼不設置之前使用的運輸方式?
我想以編程方式重新排序產品。爲此我回答了:Magento - Programmatically reorder。但我收到錯誤信息重新排序未設置上次使用的送貨方式
請指定一種送貨方式。
爲什麼不設置之前使用的運輸方式?
仍然不知道爲什麼,是不是設置上一次使用,但低於送貨方式是我需要的順序添加,使這項工作代碼:
$reorder->getQuote()->getShippingAddress()
->setShippingMethod($order->getShippingMethod())
->setCollectShippingRates(true)
->collectShippingRates()
->collectTotals()
->save();