tags:

views:

93

answers:

2

Will appreciate any ideas on this error in Magento 1.4.1.1. I wonder why this happens but Magento 1.4.0 and Magento 1.3.2.4 works fine.

The error is caused by accessing Magento Sales Shipment List API with "order_created_at filter. This filter worked in previous versions but with this version it fails.

I wonder why this could happen.

Also see Magento Issue for reference: http://www.magentocommerce.com/bug-tracking/issue/?issue=9556 there are some details of request sent to Magento webservice.

Here is the actual request:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"&gt;
<soapenv:Body>
<ns1:salesOrderShipmentList soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns1="urn:Magento">
<sessionId xsi:type="xsd:string">bbb778755d046129c1c5df1cf4f0b119</sessionId>
<filters href="#id0"/>
</ns1:salesOrderShipmentList>
<multiRef id="id0" soapenc:root="0" soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xsi:type="ns2:filters" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns2="urn:Magento">
<filter xsi:type="ns2:associativeEntity" xsi:nil="true"/>
<complex_filter soapenc:arrayType="ns2:complexFilter[1]" xsi:type="soapenc:Array">
<complex_filter href="#id1"/>
</complex_filter>
</multiRef>
<multiRef id="id1" soapenc:root="0" soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xsi:type="ns3:complexFilter" xmlns:ns3="urn:Magento" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"&gt;
<key xsi:type="xsd:string">order_created_at</key>
<value href="#id2"/>
</multiRef>
<multiRef id="id2" soapenc:root="0" soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xsi:type="ns4:associativeEntity" xmlns:ns4="urn:Magento" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"&gt;
<key xsi:type="xsd:string">gt</key>
<value xsi:type="xsd:string">2010-07-08</value>
</multiRef>
</soapenv:Body>
</soapenv:Envelope>

Here is the response: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'order_created_at' in 'where clause'

A: 

The column name is created_at not order_created_at. (At least in my DB :) )

silvo
@silvo Sorry I was talking about shipment list not the order list. So the shipments actually have an order_created_at joined attribute and it works in 1.4.0 and 1.3.2.4. I've updated the question
Vladimir
@Vladimir: I see. Well it seems that magento developers are not doing their job properly as of late... The 1.4.1.0 was full of nasty bugs and the next minor version was supposed to fix them, but it seems they introduced new problems along with those fixes :(
silvo
@silvo Yes. I am also read forum threads about recent updates and fixes. I even installed PHP IDE to try to resolve bugs myself, although it needs some learning curve - so we have workaround now - see my answer below - and I can pause struggling with. We were thinking to ask our customer to downgrade magento version to working one, but it's hard in some cases especially with enterprise version 1.8.0 - for which I've found even less information even customer pay 12000$/yr :-)
Vladimir
A: 

The truth is that "order_created_at" filter for shipments is broken (at least using SOAP API) in the latest 1.4.1.1 SE and 1.8.0 Enterprise versions, while it worked in previous versions.

The workaround is to use "created_at" filter for shipments this will give some more extra shipments than expected for the the same period, but as the shipment creation time always goes after it's order creation time - it's safe that you will get all shipments of orders created after specified creation time.

If someone needs more precise shipments list related to all orders created after given time then the shipments downloaded with "created_at" filter can be further filtered, although this will assume downloading orders list as well. Shortly, shipments can be further filtered on client side.

Vladimir