No problem!
Maybe i`m not that good in coding, but for me its not working.
In functions.php i pasted this, just before the last ?> :
if function free_shipping_checks($shipfree,$total) {
global $wpdb;
$country_code=$_POST['ship_country'];
$country_table=$wpdb->prefix.'eshop_countries';
$ship_zone = $wpdb->get_var("SELECT zone FROM $country_table WHERE code='$country_code' limit 1");
// Netherlands is zone 1.
if (($ship_zone == 1) && ($total >= 75)) {
return true;
}
// UK/Europe is zone 2.
/*if (($ship_zone == 2) && ($total >= 100)) {
return true;
}*/
return $shipfree;
}
In cart-functions.php i pasted this:
// Check shipping country for free shipping - 60 for Ireland (zone 1) and 100 for UK/Europe (zone 2).
add_filter('eshop_is_shipfree', free_shipping_checks, 10, 2);
if (!function_exists('is_shipfree')) {
function is_shipfree($total){
global $blog_id,$eshopoptions;
$shipfree = false;
$amt=$eshopoptions['discount_shipping'];
if(isset($_SESSION['eshop_discount'.$blog_id]) && eshop_discount_codes_check()){
$chkcode=valid_eshop_discount_code($_SESSION['eshop_discount'.$blog_id]);
if($chkcode && apply_eshop_discount_code('shipping'))
$shipfree = true;
}
if($amt!='' && $amt <= $total)
$shipfree = true;
return apply_filters('eshop_is_shipfree',$shipfree, $total);
}
}
Am i doing well?