Some marketplaces return the ShippingMethod name in uppercase, some other in lower case or camelcase style.
This should not create problem when matching the carrier from $actual_configuration (unserialize(Configuration::get('SHOPPING_FLUX_SHIPPING_MATCHING'))).
To do that we could force all carriers in lower case during matching to avoid mismatches.
Actual behaviour
If in the module configuration the carrier name is in lowercase and the one receive in the order in in uppercase then the matching will fail and the default carrier will be selected.
Steps to reproduce the behaviour
1 - In the carrier list, find an carrier in camel case, such as Mondial Relay
2 - Receive an order containing in ShippingMethod the carrier with another format (eg: MONDIAL RELAY)
3 - Once the order is created, check the carrier selected for the order. The carrier selected will not match. (The default carrier will be selected instead).
Expected behaviour
Some marketplaces return the ShippingMethod name in uppercase, some other in lower case or camelcase style.
This should not create problem when matching the carrier from
$actual_configuration
(unserialize(Configuration::get('SHOPPING_FLUX_SHIPPING_MATCHING'))
).To do that we could force all carriers in lower case during matching to avoid mismatches.
Actual behaviour
If in the module configuration the carrier name is in lowercase and the one receive in the order in in uppercase then the matching will fail and the default carrier will be selected.
Steps to reproduce the behaviour
1 - In the carrier list, find an carrier in camel case, such as
Mondial Relay
2 - Receive an order containing inShippingMethod
the carrier with another format (eg:MONDIAL RELAY
) 3 - Once the order is created, check the carrier selected for the order. The carrier selected will not match. (The default carrier will be selected instead).