0

I want to reorder a product programmatically. For this I'd followed the answer: Magento - Programmatically reorder. But I'm getting error message

Please specify a shipping method.

Why isn't it setting the shipping method used earlier?

0

Still don't know why isn't it setting the shipping method used last time but below is the code I needed to add in order to make this work:

$reorder->getQuote()->getShippingAddress()
        ->setShippingMethod($order->getShippingMethod())
        ->setCollectShippingRates(true)
        ->collectShippingRates()
        ->collectTotals()
        ->save();
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.