Magento Orders

Where is Magento order data stored?

Orders data are saved in database tables sales_flat_order and sales_flat_order_item

Discounts are applied in Mage_SalesRule_Model_Validator

How to get item price BEFORE and AFTER Discount

Before Discount

$orderItem->getPriceInclTax();
$orderItem->getBasePriceInclTax();
$orderItem->getRowTotalInclTax();
$orderItem->getBaseRowTotalInclTax();

After Discount

$orderItem->getPrice();
$orderItem->getBasePrice();
$orderItem->getRowTotal();
$orderItem->getBaseRowTotal();
One clap, two clap, three clap, forty?

By clapping more or less, you can signal to us which stories really stand out.