Jump to content

Free shipping to UK, and charge for Ireland?


Noodleman
 Share

Recommended Posts

I currently only ship things to the UK, I use the Free shipping method as the prices of all my items include delivery.

However, I need to start taking orders from Ireland, which the post office treat as "international post" which costs a lot more when using a recorded service.

How can I make CubeCart continue to charge nothing for delivery to people registered in the UK, and add a surcharge to those outside of the UK?

Thanks in advance

Link to comment
Share on other sites

Guest EverythingWeb

I have done the same thing with Postcodes for a client.

They wanted free delivery to a certain postcode prefix and then flat rate to the rest of the UK. We then extended it further by then giving another flat rate for rest of the world.

I will dig the code out now.

Link to comment
Share on other sites

Guest EverythingWeb

Okay, here is the modules/shipping/Flat_Rate/calc.php file as used for this customer

// flat rate

$module = fetchDbConfig("Flat_Rate");

if($module['status']==1){



$our_ship = "Standard UK Shipping"; // We are setting the "Default" Shipping 'title'

$sum = $module['cost'];

$taxVal = taxRate($module['tax']);



if($taxVal>0){



	$val = ($taxVal / 100) * $sum;

	$sum = $sum + $val;

}



$checkfor = strpos($basket['delInf']['postcode'], 'AB12'); // check the postcode and return

if($checkfor !== FALSE) {

	$sum = "0.00"; // if it does contain it, then set the $sum var to 0.00

	$our_ship = "Free Shipping!"; //and the title to as shown

}



$thecountry = $basket['delInf']['country']; // get the country var

if($thecountry != "225") { if it ISNT the UK

	$sum = "5.00"; //set worldwide shipping price

	$our_ship = "Worldwide Shipping"; // and tell the customer so

}



$shippingPrice .= "<option value='".$shipKey."'";



if($shipKey ==$basket['shipKey']){

	$shippingPrice .= " selected='selected'";

	$basket = $cart->setVar($lang['misc']['flatRate'],"shipMethod");

	$basket = $cart->setVar(sprintf("%.2f",$sum),"shipCost");

}



$shippingPrice .= ">".$our_ship." (".priceFormat($sum).")</option>\r\n"; //make it now use the $our_ship var as the 'title'

$shippingAvailable = TRUE;

$shipKey++;

unset($module, $taxVal);

}



What you need to have is:




// flat rate

$module = fetchDbConfig("Flat_Rate");

if($module['status']==1){



$our_ship = "Standard UK Shipping - FREE";

$sum = $module['cost'];

$taxVal = taxRate($module['tax']);



if($taxVal>0){



	$val = ($taxVal / 100) * $sum;

	$sum = $sum + $val;

}



$thecountry = $basket['delInf']['country'];

if($thecountry = "103") {

	$sum = "10.00";

	$our_ship = "Shipping to Ireland";

}



$shippingPrice .= "<option value='".$shipKey."'";



if($shipKey ==$basket['shipKey']){

	$shippingPrice .= " selected='selected'";

	$basket = $cart->setVar($lang['misc']['flatRate'],"shipMethod");

	$basket = $cart->setVar(sprintf("%.2f",$sum),"shipCost");

}



$shippingPrice .= ">".$our_ship." (".priceFormat($sum).")</option>\r\n";

$shippingAvailable = TRUE;

$shipKey++;

unset($module, $taxVal);

}

Not tested, but should work. Let us know how you get on.

Link to comment
Share on other sites

Thanks for the info, I found a way to do it for me in the end without changing any code

Using the royal mail postal options, you can set GB to have £0 flat rate, and IE to have a flat rate of £3 etc.

This will probably only work if you do not currently calculate your postage using weights.

Link to comment
Share on other sites

  • 2 months later...
Guest hobwebs

Thanks for the info, I found a way to do it for me in the end without changing any code

Using the royal mail postal options, you can set GB to have £0 flat rate, and IE to have a flat rate of £3 etc.

This will probably only work if you do not currently calculate your postage using weights.

Noodleman; did you ever figure out how to get £0 GB shipping? I find unless I put in 0.01 I get the following on checkout: "No shipping method setup for your country. Please contact us to see if we can make an alternative arrangement."

I would like to do the same (free shipping to UK and a fixed rate to Ireland)

Regards

Julian

Link to comment
Share on other sites

Guest Captain Bags

I use a worksround for GB £0, which probably is not what you want but may be of interest to someone.

I use the "shipping by weight" module using rates for Royal Mail first Class and Second Class,

For Special Offers, rather than offering free shipping, I say "Only £0.01 p&P". Then I set up my special offer with a weight of 0.001 kilos and create the first entry in the postal rates list for up to 0.005:0.00, which raises a 0.01 shipping charge in checkout.

I reckon that "Only £0.01 p&p" is actually more powerful than Free Shipping at some subliminal level.

Link to comment
Share on other sites

  • 3 years later...

I currently only ship things to the UK, I use the Free shipping method as the prices of all my items include delivery.

However, I need to start taking orders from Ireland, which the post office treat as "international post" which costs a lot more when using a recorded service.

How can I make CubeCart continue to charge nothing for delivery to people registered in the UK, and add a surcharge to those outside of the UK?

Thanks in advance

International is for Eire (S Ireland), whilst N Ireland is UK rates.

In the Royal Mail postage section add...

UK

GB

Europe

IE

Then set the product postage rates for each section.

Ian

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...