Foxy Forum Status

We're no longer responding to questions via our forum, but we will keep it up for historical reasons. If you can't find the answer you're looking for, please visit our knowledge base or contact us. If there's enough interest in the future, we may bring the forum back.

Tiered Flatrate Weight Shipping with Multiple Countries Weights

BamSockPowBamSockPow Member
in General edited April 2014
Hey Guys,

This might come in helpful for someone trying to sort out shipping with both tiered flat rate weights/amounts and a need for different rates for other countries

follow the instructions here https://wiki.foxycart.com/snippets/shipping/tiered_flat_rate_shipping
You can substitute total_weight for any of the other json fields found here http://wiki.foxycart.com/static/redirect/jsonp


var total_weight = fc_json.total_weight;
var country_code = (jQuery("#use_different_addresses").is(":checked") ? $("#shipping_country").val() : $("#customer_country").val());
 

 switch (country_code) {
	 case "AU": //For Domestic Australia
if (total_weight <= 3) {
  shippingCost += 0; // Free Shipping  less than 3 kilos/pounds
} else if (total_weight<= 6) {
  shippingCost += 10; // $10 per shipment  less than 6 kilos/pounds
} else {
  shippingCost = 40; // Else $40 per shipment
}
break;
	default:
if (total_weight <= 1) {
  shippingCost += 10; // $10 per shipment less than a kilo/pound
} else if (total_weight <= 3) {
  shippingCost += 30; // $30 per shipment less than 3 kilos/pounds
} else {
  shippingCost += 70; // Else $70 per shipment
} 
}

Comments
Sign In or Register to comment.