shoppingflux / shoppingfluxexport

7 stars 7 forks source link

MarketPlace order ID not retrieved when using UpdateOrder #372

Closed ghost closed 6 years ago

ghost commented 6 years ago

Expected behaviour

When updating the order status, the MarketPlace order ID is retrieved and included in the XML tag IdOrder.

Actual behaviour

The MarketPlace order ID is sometimes not retrieved and the UpdateOrders is therefore sent with an empty tag IdOrder.

Steps to reproduce the behaviour

This is happening when a message is added to the order while being created BEFORE that the message of ShoppingFlux is added. This is the case for exemple with some carriers' modules. As ShoppingFlux module is using $order->getFirstMessage(); to retrieve the message containing the MarketPlace order ID, the message returned will in this case not be the one of ShoppingFlux but of the carrier's module. Therefore, the MarketPlace order ID is not retrieved.