-
Notifications
You must be signed in to change notification settings - Fork 15
Doesn't obey the Allow Countries setting #2
Comments
Hi @bluec. Thanks for this. One way around this would be to use the shipping country requirements into the rules which is what we've done before. |
Hi @bobbyshaw thanks for the response. Yes that's a workaround but it feels cumbersome especially if you have many rules that all need to exclude the same set of countries. I am wondering about two potential solutions:
The first would suit my needs while the latter might give more flexibility. That said, it seems difficult to think of a situation where you'd want to limit some rules and not others. |
I think the first is more aligned with how shipping extensions are expected to work so I think that ones fair. I don't think this is that large of a change but I'll be upfront in saying I don't think we're going to rush to spend time on this. We find that this extension is mostly used for new builds of which there shouldn't be many more of on M1! We'd happily review if you happened to work on this though. |
That's cool I am happy to have a go at the implementation; it shouldn't be too hard. Thanks for the discussion about it, I think I agree the former method is more appropriate. I'll make a PR if I come up with anything. |
I've added a PR for this. Only the admin settings are required to make this work as the logic is handled automatically in the checkAvailableShipCountries method of Mage_Shipping_Model_Carrier_Abstract. Doing this has uncovered what I think is a bug (or maybe a design?!) of Magento 1: if a shipping method has "Ship to Applicable Countries" set to "All Allowed Countries" then the shipping country is never actually validated against the list of globally allowed countries as defined in general/country/allow. This means that if a customer is shipping to a saved address with a country that is no longer available in the globally allowed countries list then any shipping method set to "All Allowed Countries" will still be available. Presumably it also means that when the allowed countries are globally restricted and not available in the drop-down you can manipulate the form POST data and actually ship to a country that is not allowed. Would be interested whether anyone can validate my findings here. I was testing on 1.9.3.2. It seems a pretty big bug to have gone unnoticed? |
Currently this extension doesn't obey the list of countries defined in General -> General -> Allow Countries.
In other words, if a country is not in the allowed list it will still be considered as a valid country when processing the shipping rules. Ultimately this means it's possible for customers to choose delivery addresses outside of the Allowed Countries.
The text was updated successfully, but these errors were encountered: