Discovered this warning filling my log after upgrading to PHP5.5 (tagged as such, might be intrduced in 5.4 too).

It has to do with the flat rate shipping rules in combination with an active shipping quotes pane in the cart and shipping rules with data comparison on order:uc-addresses-delivery-address:zone (some shipping quotes are zone dependent). Both country and zone are not set by the user when he arrives at the cart, but country does not provoke such warning. Apparently the country variable was at least set. It is the zone variable that should at least be set so that is exists.

The work around is to add an extra condition before the actual data comparison to test if data order:uc-addresses-delivery-address:zone is empty. Since the same is not necessary for the country, I call this an inconsistency bug and hereby report it.

Comments

longwave’s picture

I think I consider this "works as designed". We can make a reasonable guess at a default value for the country being the same as the store country, as most e-commerce sites target their own country. We cannot however make a reasonable guess at a default value for the zone. If we were to set the zone, what would we set it to?

Also, not sure this is related to PHP 5.4/5.5, the error message comes from Rules and should be version independent.

TR’s picture

Version: 7.x-3.6 » 8.x-4.x-dev
Component: Shipping » Shipping quotes
Priority: Normal » Minor
Issue tags: -PHP 5.5

We should test the zone variable before using it so it doesn't generate a warning ...