reverbdotcom / reverb-magento

Magento 1.x plugin for syncing with Reverb
Other
7 stars 10 forks source link

Shipment tracking doesn't sync #248

Closed zztimur closed 8 years ago

zztimur commented 8 years ago

Error: "An error occurred while attempting to queue shipment tracking sync with Reverb for tracking object with id xxxx: Serialization of 'SimpleXMLElement' is not allowed"

zztimur commented 8 years ago

@dunagan5887

reverb-magento/app/code/community/Reverb/ReverbSync/Helper/Shipment/Data.php triggers the error.

dunagan5887 commented 8 years ago

I haven't seen that one before. Could you send me a sanitized version of whatever Reverb is communicating to Magento?

zztimur commented 8 years ago

@dunagan5887 I isolated the issue. It only happens when shipment is added via Shipstation. Shipstation supplies with its magento extension Auctane_Shipstation. It works via API. Whenever you create a shipment in Shipstation, it calls your website via API. Attaching the Model that handles the update of creating shipment for the order.

Could you take a look? Shipnotify.txt

dunagan5887 commented 8 years ago

It seems to me like the Auctane_Api_Model_Action_Shipnotify::process() should be converting the $xml->TrackingNumber, $xml->Carrier to strings before setting them on the $track object. Magento expects that strings are given in these fields, not SimpleXmlElement objects.

dunagan5887 commented 8 years ago

Without having any data to test with that seems to be the most likely cause of the issue

zztimur commented 8 years ago

Probably all of the values should be cast to an appropriate type before setting.

On Apr 29, 2016, at 12:46 PM, Sean Dunagan notifications@github.com wrote:

Without having any data to test with that seems to be the most likely cause of the issue

— You are receiving this because you authored the thread. Reply to this email directly or view it on GitHub https://github.com/reverbdotcom/reverb-magento/issues/248#issuecomment-215827726

dunagan5887 commented 8 years ago

I would agree