Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

Insert Orders into External Database
 
marianojponce
Jr. Member
 
Total Posts:  2
Joined:  2009-07-07
 

Hi everyone, I’m a little bit lost while trying to insert a new order into an external database.
I’d be grateful if someone can pinpoint where does magento inserts the new order.
I think its under: app/code/core/Mage/Checkout/Model/Type/Onepage.php
where its the function saveOrder()
Is this ok ?
or maybe there is a better way to it ?

Thanks.

 
Magento Community Magento Community
Magento Community
Magento Community
 
brendanb
Mentor
 
Total Posts:  1093
Joined:  2008-07-16
London, United Kingdom
 

hi,

why not look at using the API. in particular http://www.magentocommerce.com/wiki/doc/webservices-api/api/sales_order#sales_order.info

brendan

 
Magento Community Magento Community
Magento Community
Magento Community
 
marianojponce
Jr. Member
 
Total Posts:  2
Joined:  2009-07-07
 

Thanks for your help.
in case that someone ever need to do the same. I’ve came up with this solution:

go to
/public_html/app/code/core/Mage/Checkout/Model/Type
Onepage.php
on the end of saveShipping() , assign $data to a session variable

And the final touch....
with a for each save all information from the session variable we have created before.
and execute curl to send information to the external database.

Ave Magento

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top