I too was confronted by this very same issue, so put my coding hat on and heres what i came up with. My example applies to Australia but seems to work for any country it will make products marked free shipping only available to the country the store is in and use any of the other shipping mods if being shipped out of the country of origin.
Step 1
if you haven't already created a zone for you country do it now
eg create zone australia with all states included.
Step 2
in admin goto modules>shipping>freeshipper and set the zone to the zone you have just created.
now if you place an order to an overseas address with all freeshipping items in cart you should get a message that you are current not shipping to this region and locally freeshipping should show (this is good this shows you have zones set correctly.
Step 3
the file editing
edit /includes/classes/shopping_cart.php
find on around line 591
Code:
function calculate() {
global $db;
add $order to the globals eg
Code:
function calculate() {
global $db, $order;
around line 619 find
Code:
// adjusted count for free shipping
if ($product->fields['product_is_always_free_shipping'] != 1 and $product->fields['products_virtual'] != 1) {
$products_weight = $product->fields['products_weight'];
}else{
$product_weight=0;
}
directly after this add
Code:
if ($product->fields['product_is_always_free_shipping'] = 1 && $order->delivery['country']['id']!= STORE_COUNTRY) {
$products_weight = $product->fields['products_weight'];
}
around line 658 find
Code:
// shipping adjustments
if (($product->fields['product_is_always_free_shipping'] == 1) or ($product->fields['products_virtual'] == 1) or (ereg('^GIFT', addslashes($product->fields['products_model'])))) {
replace it with
Code:
if (($product->fields['product_is_always_free_shipping'] == 1 && $order->delivery['country']['id']== STORE_COUNTRY) or ($product->fields['products_virtual'] == 1) or (ereg('^GIFT', addslashes($product->fields['products_model'])))) {
on line 1031 find
Code:
if ($product->fields['product_is_always_free_shipping'] != 1) {
$new_attributes_weight = $attribute_weight_info->fields['products_attributes_weight'];
} else {
$new_attributes_weight = 0;
}
directly after it add
Code:
if ($product->fields['product_is_always_free_shipping'] = 1 && $order->delivery['country']['id']!= STORE_COUNTRY) {
$new_attributes_weight = $attribute_weight_info->fields['products_attributes_weight'];
}
save file
now edit /includes/functions/functions_general.php
find around line 1203
Code:
// Always free shipping only true - disable everyone
case (($check_cart_free == $check_cart_cnt) and $shipping_module != 'freeshipper'):
return false;
break;
replace it with
Code:
// Always free shipping only true - disable everyone
case (($check_cart_free == $check_cart_cnt && $order->delivery['country']['id']== STORE_COUNTRY) and $shipping_module != 'freeshipper'):
return false;
break;
save file and it sould work.
the last but not least thing to change is the free shipping icon
/includes/templates/template_default/images/always-free-shipping.gif make a new one to reflect where you are offering free shipping eg free shipping australia only.
As always no guarantees test test test then retest in your own enviroment. if anyone has anything to add or finds bugs in the system please let me know