The "shipping quote engine" concept in In-Commerce is used to represent a service (e.g. FedEx, UPS, Intershipper), that once supplied with an address and package information will returns allowed shipping types (e.g. "FedEx Ground", "UPS Same Day", etc.).
The "ShippingQuoteCollector::GetShippingQuotes" method, that performs queries to each of enabled in In-Commerce services contains following code, that doesn't query service at all, when:
- this is US or Canada address (shipping address country has states)
- state wasn't entered as part of shipping address during checkout
$params['dest_country'] in above code contains value from "
Orders.ShippingCountry" database column in ISO 3-symbol format (e.g.
USA). Then it is excessively converted with
CountryStatesHelper::getCountryIso method call, which always results in
false value, that is passed to
CountryStatesHelper::CountryHasStates method and results in wrong
$has_states value for cases, when country has states.
As result, shipping quote engines are queried ignoring the fact, that state isn't even entered. Some services have fallback code, that returns results by entered zip code, when state is missing. That fallback code will of course make user think, that everything is alright, while it isn't.
- excessive conversion must be removed
the $params['dest_country']variable must be directly passed to the