Magento 1.9 – How to Get Product Original Price from Order Object

magento-1.9price

I've a Product with special price set to 8.00 with original price set to 12.00

I'm trying to retrieve product's (item's) original price from order object like this:

$order = (new Mage_Sales_Model_Order)->loadByIncrementId($orderId);
foreach($order->getAllItems() as $item) {
    $price = $item->getPrice();
}

but, all these public methods:

getPrice()
getBasePrice()
getPriceInclTax()

seem to only return special price, i.e. 8.00. How do I get original price, i.e. 12.00 ??

Best Answer

Okay, I think I got it. I was trying to get Product price from an Item object. An Item is a part of an Order and doesn't contain original price.

So, we have to first getProduct from this Item

$product = $item->getProduct()

and then,

$price = $product->getPrice()
Related Topic