Magento: convert quote to order

What will be the steps involved in converting the quotation object to magento in order.

Say I have the following:

$quote = Mage::getModel('sales/quote')->load(100); 

There is no order yet, and this quote object is still active.

How do I go from here to complete this quote and make an order from her.

I tried:

 $service = Mage::getModel('sales/service_quote', $quote); $service->submitAll(); 

This creates order, but does not complete the quote. In addition, the order is pending and not processed, that is, it has not been billed.

+6
source share
1 answer

Have you tried the toOrder method?

EDIT

$convertQuote = Mage::getSingleton('sales/convert_quote'); $order = $convertQuote->toOrder($quote);

+7
source

Source: https://habr.com/ru/post/924041/


All Articles