Magento

eCommerce Software for Online Growth

Magento Forum

From setting up your store to managing your products, pages and promotions to generating detailed reports, the Magento User Guide empowers the user to utilize the platform for all of its vast capacity.
Available in eBook and Print formats – Download Now!!!
   
retrieve order details from dataase
 
kevinmoj
Jr. Member
 
Total Posts:  5
Joined:  2008-01-29
 

I need to retrieve the order details from database ,when i searched the database i get confused. where are my orders ? but it is listed in admin portion, How the information is retrieved and from which table ?

 
Magento Community Magento Community
Magento Community
Magento Community
 
jsperri
Sr. Member
 
Total Posts:  126
Joined:  2007-08-31
Fistufle
 

First, you should have a look at the Entity-Attribute-Value model concept.
See for example:  http://en.wikipedia.org/wiki/Entity-Attribute-Value_model

Then have a look at sales_order_entity table that gives you the order entities relations (see entity_id, parent_id columns). Then lookup references to the other sales_order_entity_* tables which give you the values for the entities on the different attributes. You should check eav_attribute for the definition of these attributes.

Well, this requires a small effort to understand, but in the end, it’s quite straightforward.

Still, it’s not recommended to interact directly with the database, as it can change between Magento versions.
Would be wiser to build on the code objets, or future webservices that may be available…

 
Magento Community Magento Community
Magento Community
Magento Community
 
Anjanesh
Sr. Member
 
Avatar
Total Posts:  128
Joined:  2008-03-15
Mumbai, India
 

or future webservices that may be available…

Currently, is there no API to get this kind of data ?

 Signature 

Get Paid To Be A Friend : Rent A Friend

 
Magento Community Magento Community
Magento Community
Magento Community
 
Moshe
Magento Team
 
Avatar
Total Posts:  1771
Joined:  2007-08-07
Los Angeles
 

Here’s how to get an order by publicly available id:

$order Mage::getModel('sales/order')->loadByIncrementId('100000001');
echo 
$order->getGrandTotal();

 Signature 

- I would love to change the world, but they won’t give me the source code -

 
Magento Community Magento Community
Magento Community
Magento Community
 
All About Doors and Windows
Member
 
Avatar
Total Posts:  42
Joined:  2008-10-13
Kansas City, MO USA
 

Moshe, you rock. After a day of trying to figure out how to export orders, this gave me the answer about an hour later. I have to do it this way because my order feed keeps telling me my credentials are wrong.

 Signature 

Stephan Miller

 
Magento Community Magento Community
Magento Community
Magento Community
 
bolasevich
Sr. Member
 
Total Posts:  124
Joined:  2008-03-04
CT USA
 

my module will do this no problem http://www.magentocommerce.com/extension/2063

 
Magento Community Magento Community
Magento Community
Magento Community
 
johnlouis
Member
 
Avatar
Total Posts:  49
Joined:  2008-08-27
 

Is there a way of getting all orders and its details done on a particular date ?????????

 Signature 

Getting onto the core of zend framework together with magento

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
    Back to top
 
© Copyright 2010 Varien. Magento, eCommerce software, is a trademark of Irubin Consulting Inc. DBA Varien
Privacy Policy|Terms of Service
Magento Community Count
177727 users|1057 users currently online|277236 forum posts