I am trying to implement this, and have been successful except in using a reset when changing countries in the side cart.
Specifically, we have a product code AU-OPT-RACE-CC that can not ship to NZ. When that product is in the cart we need to take out all shipping methods.
This comes a the end of our custom code and we have used :
FC.customFlatRates.error('Sorry, we cannot ship Opti race sails to NZ');
The error message displays fine, but the shipping methods are not removed if the customer toggles between Australia and New zealand.
(note, we also have a FC.customFlatRates.reset(); before we astray adding shipping methods)
-1- use test pagehttp://www.i-sails.us/test.html
-2- add firt product (optimist race sail)
Ship to Australia, zip code 3000 - a proper meths shows, all is good.
-3- change your mind and ship to your summer house in New Zealand, post code 3591
Note that the "no shipping to NZ message displays", but you still have a free shipping method left...
-4- Even weirder, if you change to the australia 3000 zip code, then back to the summer house in NZ 3591, you now have a Australia shipping method left- and the no shipping to NZ message, coming from FC.customFlatRates.error('Sorry, we cannot ship Opti race sails to NZ') shows. That instruction is a the bottom of the code, one line after the FC.customFlatRates.remove('all'); that does not seem to work....
Our test store is i-sailsteststore.foxycart.com