Mostaq mahmud
Mostaq mahmud

Reputation: 93

How to get quote_id from sales order page of admin in magento?

Is it possible to get quote_id of an specific order in admin->sales->orders->view(select particular order) page ?

I want to show my custom table(which contain quote_id for an order) data in admin->sales->view(select particular order) gift option block.

Upvotes: 0

Views: 4849

Answers (1)

Cristiano Casciotti
Cristiano Casciotti

Reputation: 1026

Yes, the order itself has quote_id, you can retrieve it in this way:

// supposing order id is 1
$order = Mage::getModel('sales/order')->load(1);
$quoteId = $order->getQuoteId();

if you need to retrieve quote object, you can get it by:

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

Upvotes: 5

Related Questions