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?
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();