Page 1 of 1

unable to export Jiwa sales orders

PostPosted: Fri Dec 16, 2016 12:53 am
by jak
Hi,

when we were trying to export jiwa sales order to magento, it shows this message in logs,
"Found 0 items in queue 'Jiwa Sales Order"

there are sales order in jiwa, but it doesn't export them to magento store, can you please tell me steps to resolve this.

Thank you,

Re: unable to export Jiwa sales orders  Topic is solved

PostPosted: Sat Dec 17, 2016 12:28 pm
by Mike.Sheen
Hi jak,

the "Export Jiwa Sales Orders" action is used to only send to Magento orders in Jiwa which have shipped.

If you search the plugin code for the method "CreateMagentoShipments" you can see the criteria it uses:

Code: Select all
string SQL = @"SELECT SO_Main.InvoiceNo
            FROM SO_Main
            LEFT JOIN SO_CustomSettingValues order_id_value ON order_id_value.InvoiceID = SO_Main.InvoiceID
            LEFT JOIN SO_CustomSetting order_id ON order_id.SettingID = order_id_value.SettingID
            LEFT JOIN SO_CustomSettingValues shipment_id_value ON shipment_id_value.InvoiceID = SO_Main.InvoiceID
            LEFT JOIN SO_CustomSetting shipment_id ON shipment_id.SettingID = shipment_id_value.SettingID
            JOIN SO_History ON SO_History.InvoiceID = SO_Main.InvoiceID AND SO_History.HistoryNo = SO_Main.CurrentHistoryNo
            WHERE SO_Main.LastSavedDateTime > @JiwaSalesOrdersLastSyncDateTime
            AND order_id.SettingName = @magento_increment_id_SettingName
            AND order_id_value.Contents IS NOT NULL
            AND LTRIM(RTRIM(order_id_value.Contents)) <> ''
            AND shipment_id.SettingName = @magento_shipment_id_SettingName
            AND (shipment_id_value.Contents IS NULL OR LTRIM(RTRIM(order_id_value.Contents)) = '')
            AND SO_History.Status = 5 -- 5 = Delivery
            ORDER BY SO_Main.LastSavedDateTime, SO_Main.InvoiceNo";



The custom field on the sales order "magento_increment_id" must be NOT blank or NULL, and the custom field "magento_shipment_id" must be blank or NULL (that means no shipment created in Magento yet).
The sales order history status must also be set to Delivery (value 5).