I need to export order form magento with remote scripts.

When I work in local I use:



// Set an Admin Session

Mage::getSingleton('core/session', array('name' => 'adminhtml'));

$userModel = Mage::getModel('admin/user');
$session = Mage::getSingleton('admin/session');

$connection = Mage::getSingleton('core/resource')->getConnection('core_write');

// extract order

$collection = Mage::getModel('sales/order')

foreach($collection as $order)
$billingStreet = $billingAddress->getStreet();

But if I want to connect from remote server?

I cannot find an example.


Instead of using some custom scripts like this, especially if you want to do it from remote server, I suggest you use the Magento SOAP API (or REST or XMLRpc depending on your needs).

Here's the API documentation for the Sales Order : http://devdocs.magento.com/guides/m1x/api/soap/sales/salesOrder/salesOrder.html

And here's the introduction to the API: http://devdocs.magento.com/guides/m1x/api/soap/introduction.html

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.