shoppingflux / shoppingfluxexport

7 stars 7 forks source link

Multitoken - Do not stop orders import if one of the token isn't valid #424

Open ghost opened 5 years ago

ghost commented 5 years ago

Expected behaviour

When multitoken is enabled, the module is looping over each single (in the order given from getAllTokensOfShop()).

If a token isn't valid, an error is returned from the webservice (<Message>Token inconnu</Message>).

The script should then continue the order import with the other token.

Actual behaviour

When an error is triggered from the webservice, the orders import process is stopped.

Steps to reproduce the behaviour

ghost commented 5 years ago

Modification to be done here:

if (count($ordersXML->Response->Orders) == 0) {
    return;
}