Showing results for 
Search instead for 
Did you mean: 

Create Order with tablerates

Create Order with tablerates

I'm trying to place an order programmatically with tablerates. Here is my code

/** @var \Magento\Quote\Model\Quote\Address $shippingAddress */
$shippingAddress= $quote->getShippingAddress();
->setShippingMethod('tablerate_bestway') //shipping method
->setShippingDescription('Table Rate - Best Way');


$orderId = $this->cartManagement->placeOrder($quote->getId());
$order = $this->orderResource->load($this->order, $orderId);


I'm constantly getting *** Please specify a shipping method***. In QuoteValidator it trie€ to get the rate $rate = $quote->getShippingAddress()->getShippingRateByCode($method); which always returns false. tablerates is setup as I can use this when placing an Order with the Rest api

how can I place this order with tablerates prgrammatically?

Re: Create Order with tablerates

Hi @pcamper,


Maybe you could check this post:

If you've found one of my answers useful, please give "Kudos" or "Accept as Solution"