0

I found an extension for Magento from roshanlal here: http://www.magentocommerce.com/boards/viewthr...%20erection%20problems[/url/viewthread/28679/P135/

Download Link: http://www.magentocommerce.com/forum/?ACT=25&fid=85&aid=35543_FhuQMJcvHa6Ep3jVugtE&board_id=1

This is what I would exactly what I need, but I tried installing it on Magento 1.7.0.2 and I'm getting the following errors:

a:5:{i:0;s:125:"SQLSTATE[42S02]: Base table or view not found: 1146 Table 'db1183792-demo.enterprise_customer_sales_flat_order' doesn't exist";i:1;s:2431:"#0 /is/htdocs/XYZ/www/demo/lib/Varien/Db/Statement/Pdo/Mysql.php(110): Zend_Db_Statement_Pdo->_execute(Array)
#1 /is/htdocs/XYZ/www/demo/lib/Zend/Db/Statement.php(300): Varien_Db_Statement_Pdo_Mysql->_execute(Array)
#2 /is/htdocs/XYZ/www/demo/lib/Zend/Db/Adapter/Abstract.php(479): Zend_Db_Statement->execute(Array)
#3 /is/htdocs/XYZ/www/demo/lib/Zend/Db/Adapter/Pdo/Abstract.php(238): Zend_Db_Adapter_Abstract->query('SELECT customer...', Array)
#4 /is/htdocs/XYZ/www/demo/lib/Varien/Db/Adapter/Pdo/Mysql.php(419): Zend_Db_Adapter_Pdo_Abstract->query('SELECT customer...', Array)
#5 /is/htdocs/XYZ/www/demo/lib/Zend/Db/Adapter/Abstract.php(825): Varien_Db_Adapter_Pdo_Mysql->query('SELECT customer...', Array)
#6 /is/htdocs/XYZ/www/demo/app/code/local/Rsoft/Ordercsv/Model/Export/Abstract.php(174): Zend_Db_Adapter_Abstract->fetchOne('SELECT customer...')
#7 /is/htdocs/XYZ/www/demo/app/code/local/Rsoft/Ordercsv/Model/Export/Xml.php(72): Rsoft_Ordercsv_Model_Export_Abstract->getCivilId(Object(Magestore_Simisalestrackingapi_Model_Bestsellers_Order))
#8 /is/htdocs/XYZ/www/demo/app/code/local/Rsoft/Ordercsv/Model/Export/Xml.php(17): Rsoft_Ordercsv_Model_Export_Xml->getCommonOrderValues(Object(Magestore_Simisalestrackingapi_Model_Bestsellers_Order))
#9 /is/htdocs/XYZ/www/demo/app/code/local/Rsoft/Ordercsv/controllers/Export/OrderController.php(21): Rsoft_Ordercsv_Model_Export_Xml->exportOrders(Array)
#10 /is/htdocs/XYZ/www/demo/app/code/core/Mage/Core/Controller/Varien/Action.php(419): Rsoft_Ordercsv_Export_OrderController->xmlexportAction()
#11 /is/htdocs/XYZ/www/demo/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(250): Mage_Core_Controller_Varien_Action->dispatch('xmlexport')
#12 /is/htdocs/XYZ/www/demo/app/code/core/Mage/Core/Controller/Varien/Front.php(176): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
#13 /is/htdocs/XYZ/www/demo/app/code/core/Mage/Core/Model/App.php(354): Mage_Core_Controller_Varien_Front->dispatch()
#14 /is/htdocs/XYZ/www/demo/app/Mage.php(683): Mage_Core_Model_App->run(Array)
#15 /is/htdocs/XYZ/www/demo/index.php(87): Mage::run('', 'store')
#16 {main}";s:3:"url";s:43:"/index.php/ordercsv/export_order/xmlexport/";s:11:"script_name";s:10:"/index.php";s:4:"skin";s:5:"admin";}

Would be great if someone could help me on this as I really need this extension working as this is exactly the way I would like an order xml export to work. Thanks.

0

In the file Model/Export/Abstract.php there is a query that uses the 'enterprise_customer_sales_flat_order' table, this is a table that is used by Magento Enterprise so thats why it doesn't work in CE 1.7.

In my EE (1.13) installation there is a table with that name, but only the column entity_id is in it, the customer_civil_id is not there so even in EE this would generate an exception.

Not sure what this Civil ID column is meant for, but to get is to work with CE 1.7 you could comment out the line in Model/Export/Csv.php (and Xml.php):

protected function getHeadRowValues() 
{
    return array(
        'Payment Gateway',
     //   'CivilId', (Not available, commented)
        'Order #',
        'Purchased From (Store)',
        'Purchased On',
        'Bill to Name',
        'G.T. (Purchased)',
        'Status'
    );
}

and

protected function getCommonOrderValues($order) { $shippingAddress = !$order->getIsVirtual() ? $order->getShippingAddress() : null; $billingAddress = $order->getBillingAddress();

    return array(
        $this->getPaymentMethod($order),
    //  $this->getCivilId($order), (Not available, commented)
        $order->getRealOrderId(), 
        $this->getStoreName($order),           
        Mage::helper('core')->formatDate($order->getCreatedAt(), 'medium', true),
        $order->getCustomerName(),
        $this->formatPrice($order->getData('grand_total'), $order),
        $order->getStatus()           
    );
}

I have not tested the rest of the extension, but this should solve the error you pointed in your question.

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.