0

If I apply a discount on a product in Magento and make an order...

 example: SKU 9999999 Regular $100, Special this week: $95

If I do a query on files sales_flat_order_item and sales_flat_order, where would I find the regular price?

Brian Tompsett - 汤莱恩
  • 5,753
  • 72
  • 57
  • 129
george
  • 4,119
  • 3
  • 17
  • 18
  • why you need that man?? Regular price isn't there. You need recover this information using just SQL??? – Guerra Oct 18 '12 at 20:08

1 Answers1

-1

I don't see why you'd need to do this in SQL, but you could look up the product id/sku in the flat products table (I forget its name off the top of my head), and then find the regular price in there.

HughieW
  • 139
  • 1
  • 4
  • 15
  • looks like flat file only has selling price? Flat product is not good because prices may change over time. – george Oct 18 '12 at 20:37
  • Then you should find the entity_id of the product (which is in the flat table), and then look that up in the eav values table. What is the reason you're doing this in SQL and not using Magento's own Models? $product->getPrice(); would give you the figure you want – HughieW Oct 25 '12 at 10:34