Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

show and hide Shipping moduls


flora toskana

Recommended Posts

Posted

Please please help me!

 

for 1 year I have problems with shipping cost.

 

Situation:

All products under 30 kg are shipped by DPD - a parces service similar to UPS with shipping modul dpdstandard

All products with a single weight more than 30 kg are shipped forwarding agency with shipping modul zones.

The total weight of the order ist not important: if somebody is ordering 4 products á 25 kg we will send 4 packages with parcel service and there should be counted the amount for shipment dpdstandard.

 

My solution:

checkout_shipping.php:

$varWeightTest = 0;

$arrWeightTest = Array();

$arrWeightTest = $order->products;

foreach ($arrWeightTest as $weightTestArticle) {

$varWeightTest += $weightTestArticle['weight'];

}

 

dpdstandard.php:

if ($varWeightTest > 30) $this->enabled = false;

 

zones.php:

if ($varWeightTest < 30) $this->enabled = false;

 

Problem:

you order 10 product below 30 kg, total weight e.g. 100 kg, then sometimes - not everytime!! - all product weights are counted together and checkout_shipping is choosing shipment modul zones instead of shipment modul dpdstandard.

 

Maybe somebody can tell me how to change the weight-test named above to decide only because of the single weight of every product what shipping modul will be used.

 

Who wants to see the shop: http://www.flora-toskana.com

 

 

Thanks for every help! :-))

Archived

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

×
×
  • Create New...