Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

shipping


Whatsfly

Recommended Posts

Hi guys , I have a shipping problem , I hope you guys know a good module or solution :

 

 

"De Post" is the company that ships my orders and I really got a big problem with the price calculation.

Everything between 0-4 kg is 4 euro .

But It cant be bigger then 30X30 cm .

So if someone orders 2 order it could get problems!

 

Example : 2 items , total weight : 3,4 kg = 4 euro shipping .

WRONG !

Because sometimes (depends what you order) the box will be biggr then 30X30 and thats also more expensive ! so it would be 6 euro's or something. Do you know what I mean ?

Is there any solution for this ? or a good module ?

Sorry for my bad english , I don't know how to explain it better !

 

Thanks for your help and time to read this !

Link to comment
Share on other sites

Hi guys , I have a shipping problem , I hope you guys know a good module or solution :

"De Post" is the company that ships my orders and I really got a big problem with the price calculation.

Everything between 0-4 kg is 4 euro .

But It cant be bigger then 30X30 cm .

So if someone orders 2 order it could get problems!

 

Example : 2 items , total weight : 3,4 kg = 4 euro shipping .

WRONG !

Because sometimes (depends what you order) the box will be biggr then 30X30 and thats also more expensive ! so it would be 6 euro's or something. Do you know what I mean ?

Is there any solution for this ? or a good module ?

Sorry for my bad english , I don't know how to explain it better !

 

Thanks for your help and time to read this !

 

I had similar problems with our shipping rates (currently 13 tables dependant on destination, weight, and overall length of package). Basically, our mail (apart from local) has to go via UK so we are bound by their max. 610mm length for items going letter post.

 

My solution was to add a field to the 'product' table called 'products_long_item' (which is true/false [1 or 0]) and added an input field to the product input page in admin/categories.php

 

You then need to add code to conditionally use whichever rate applies.

 

This is part of the code I used to select the various shipping options so that the customer is only presented with the relevant options for his order (rather than being presented with all 13 options and probably choosing the wrong one):

 

switch ($del_country_code){  // switch_1
case "JE":
	if ($shipping_weight > 30.000){
		$too_heavy = "<font color=#FF0000><B><BR />Sorry, your package is too heavy. Please split your order into smaller orders. <P />Maximum weight is 30Kgs.</B></font><P />";
		$shipping_method[] = array('class' => $too_heavy, 'file' => "");
	}else{
	  if (($tot_ord_val > 500.00) and ($tot_ord_val < 1000.00) and ($long_item_total == FALSE) and ($shipping_weight < 10.000)){
  			 $shipping_method[] = array('class' => "sd2", 'file' => "sd2.php");
	 }
 		if (($tot_ord_val < 500.00) and ($long_item_total == FALSE) and ($shipping_weight < 10.000)){
 			 $shipping_method[] = array('class' => "sd1", 'file' => "sd1.php");
 		}
 		if (($tot_ord_val < 250.00) and ($long_item_total == FALSE) and ($shipping_weight < 10.000)){
 			 $shipping_method[] = array('class' => "locl", 'file' => "locl.php");
 		}
 		$shipping_method[] = array('class' => "locp", 'file' => "locp.php");
	}
	break;
case "GG":
case "GB":
case "IM":
	if ($shipping_weight > 30.000){
		$too_heavy = "<font color=#FF0000><B><BR />Sorry, your package is too heavy. Please split your order into smaller orders. <P />Maximum weight is 30Kgs.</B></font><P />";
		$shipping_method[] = array('class' => $too_heavy, 'file' => "");
	}else{
	  if (($tot_ord_val > 500.00) and ($tot_ord_val < 1000.00) and ($long_item_total == FALSE) and ($shipping_weight < 10.000)){
			 $shipping_method[] = array('class' => "sd2", 'file' => "sd2.php");
	 }
 		if (($tot_ord_val < 500.00) and ($long_item_total == FALSE) and ($shipping_weight < 10.000)){
 			 $shipping_method[] = array('class' => "sd1", 'file' => "sd1.php");
 		}
 		if (($tot_ord_val < 250.00) and ($long_item_total == FALSE) and ($shipping_weight < 10.000)){
 			 $shipping_method[] = array('class' => "domlet", 'file' => "domlet.php");
 		}
		  $shipping_method[] = array('class' => "dompar", 'file' => "dompar.php");
	}
	break;	
case 'AT':
case 'HR':
case 'CZ':
case 'DK':
case 'FR':
case 'DE':
case 'IE':
case 'IT':	// EU zone A
case 'LU':
case 'NL':
case 'MK':
case 'SK':
case 'SI':
case 'ES':
case 'CH':
	if ($shipping_weight > 20.000){
// ToDo - put into osC standard language files
		$too_heavy = "<font color=#FF0000><B><BR />Sorry, your package is too heavy. Please split your order into smaller orders. <P />Maximum weight is 20Kgs.</B></font><P />";
		$shipping_method[] = array('class' => $too_heavy, 'file' => "");
	}else{
  		if (($long_item_total == FALSE) and ($shipping_weight < 2.000)){
  			 $shipping_method[] = array('class' => "intletzeu", 'file' => "intletzeu.php");
  		}
		$shipping_method[] = array('class' => "intparza", 'file' => "intparza.php");
	}
	break;		
case 'BE':
case 'BA':
case 'BG':
case 'GI':
case 'HU':
case 'LV':	 //  EU zone B
case 'LI':
case 'LT':
case 'NO':
case 'PL':
case 'SE':
	if ($shipping_weight > 20.000){
		$too_heavy = "<font color=#FF0000><B><BR />Sorry, your package is too heavy. Please split your order into smaller orders. <P />Maximum weight is 20Kgs.</B></font><P />";
		$shipping_method[] = array('class' => $too_heavy, 'file' => "");
	}else{
  		if (($long_item_total == FALSE) and ($shipping_weight < 2.000)){
  			 $shipping_method[] = array('class' => "intletzeu", 'file' => "intletzeu.php");
  		}
		$shipping_method[] = array('class' => "intparzb", 'file' => "intparzb.php");
	}
	break;
case('BY'):	 
  case('CY'):	 
  case('FI'):	 
  case('GR'):	 
  case('GL'):	 
  case('IS'):	 // Zone C - EU  (NEW ZONE 5)
  case('MT'):	 
  case('MC'):	 
  case('PT'):	 
  case('RO'):	 
  case('CS'):	 
  case('TR'):	 
  case('UA'):
	if ($shipping_weight > 20.000){
		$too_heavy = "<font color=#FF0000><B><BR />Sorry, your package is too heavy. Please split your order into smaller orders. <p />Maximum weight is 20Kgs.</B></font><P />";
		$shipping_method[] = array('class' => $too_heavy, 'file' => "");
	}else{
  		if (($long_item_total == FALSE) and ($shipping_weight < 2.000)){
  			 $shipping_method[] = array('class' => "intletzeu", 'file' => "intletzeu.php");
  		}
		$shipping_method[] = array('class' => "intparzc", 'file' => "intparzc.php");
	}
	break;
 case('CA'):
 case('ZA'):	   // Zone E - ROW  (NEW ZONE 7)
 case('TH'):
 case('US'):
	if ($shipping_weight > 20.000){
		$too_heavy = "<font color=#FF0000><B><BR />Sorry, your package is too heavy. Please split your order into smaller orders. <P />Maximum weight is 20Kgs.</B></font><P />";
		$shipping_method[] = array('class' => $too_heavy, 'file' => "");
	}else{
  		if (($long_item_total == FALSE) and ($shipping_weight < 2.000)){
  			 $shipping_method[] = array('class' => "intletz1", 'file' => "intletz1.php");
  		}
  		$shipping_method[] = array('class' => "intparze", 'file' => "intparze.php");
	}
	break;  
 case('JP'):				// (NEW ZONE 8)
	if ($shipping_weight > 20.000){
		$too_heavy = "<font color=#FF0000><B><BR />Sorry, your package is too heavy. Please split your order into smaller orders. <P />Maximum weight is 20Kgs.</B></font><P />";
		$shipping_method[] = array('class' => $too_heavy, 'file' => "");
	}else{
  		if (($long_item_total == FALSE) and ($shipping_weight < 2.000)){
  			 $shipping_method[] = array('class' => "intletz2", 'file' => "intletz2.php");
  		}
  		$shipping_method[] = array('class' => "intparze", 'file' => "intparze.php");
	}
	break;						  
 case('RU'):				// (NEW ZONE 6)
	if ($shipping_weight > 20.000){
		$too_heavy = "<font color=#FF0000><B><BR />Sorry, your package is too heavy. Please split your order into smaller orders. <P />Maximum weight is 20Kgs.</B></font><P />";
		$shipping_method[] = array('class' => $too_heavy, 'file' => "");
	}else{
  		if (($long_item_total == FALSE) and ($shipping_weight < 2.000)){
  			 $shipping_method[] = array('class' => "intletzeu", 'file' => "intletzeu.php");
  		}
  		$shipping_method[] = array('class' => "intparze", 'file' => "intparze.php");
	}
	break;
default:
	$invalid_country = "<font color=#FF0000><B><BR />Sorry, We are currently unable to process orders for delivery to your country via this website.</B></font><P />";
	$shipping_method[] = array('class' => $invalid_country, 'file' => "");
	break;

}  // end_switch_1

 

Hope that gives you some ideas (the above code is in a seperate file called from checkout_shipping.php). Obviously you would need to modify it to suit your exact requirements. There are also other modifications required in other files and the database to get it all to work - but this should give you a starting point.

 

Steve

* * * * * * * * * * * * * * * * * * * * *

Porpoises are most happy when wet!

\ _ \ _ \ _ \ _ \ _ \ _ \ _ \ _ \ _ \ _ \ _ \ _

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...