I need to create an order programmatically where both the payment method and shipping method will not be coming from the list provided for in Magento. Is this actually possible?


    $shippingAddress = $quote->getShippingAddress();

                    ->setShippingMethod('freeshipping_freeshipping'); //shipping method

    $quote->getPayment()->importData(['method' => 'checkmo']);


I am tasked with having to create a plugin that "imports" the orders from a non Magento website (just like eBay) and then saving them as Magento orders. Since the non magento website have their own payment method and the fact that the orders has already been paid for in the other site, I just need to reflect on the Magento order the payment of the details and how much the shippment amount is, instead of recomputing them. Is this actually possible?

1 Answer 1


Ok I finally fixed this issue by manually inserting order data into the following tables:


Seems to work.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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