Jump to content
Sign in to follow this  
macki

NEW! Zonesx shippi module - put items into many packages

Recommended Posts

This module will put items into packages according to their weight and defined maximum weight.

With this module:

- you can define maximum shipping weight

- it won't allow to ship an item > maximum weight

- it divides items into packages, trying to fill them if it's possible. For example if you have maximum weight 10kg

and your client ordered 3 items each 4kg, he will get two packages: #1 8kg, and #2 4kg

- it allows you to define the number of zones through admin

 

The alogrithm used for dividing is a modified version of "giving a change" recurring algorithm with notes=weights and number of each note=quantity of weights.

 

Try it out! http://www.oscommerce.com/community/contributions,1490

 

Piotr Kamiński

macki@web-tec.pl

 

ps.

If you like it, please donate: https://ssl.allpay.pl

customer id=1098

Share this post


Link to post
Share on other sites
Two files were broken. Fixed version available.

 

Piotr Kamiński

 

 

Great update!

 

Just a little bug here:

 

Weight limit for this shipping method is: 30 kg(s)

Package 1 Postage to NL : 30 kg(s) €30,00EUR

Package 2 Postage to NL : 28 kg(s) €30,00EUR

Package 3 Postage to NL : 12 kg(s) €20,00EUR

Total Postage to NL : 38.5 kg(s) €80,00EUR

 

total is 38,5??? This should be 70 kg

 

 

besides this, there is this error:

 

Warning: uksort() [function.uksort]: Invalid comparison function in /home/bajafl01/domains/bajaflightcases.nl/public_html/catalog/includes/modules/shipping/zonesx.php on line 131:

 

131		  uksort($prods_to_pack, "$this->cmpWeights"); // sort array so heavier items are at the beginning
132		 $num_packages = 1;

 

another error found when you want select your shipping method:

 

Warning: uksort() [function.uksort]: Invalid comparison function in /home/bajafl01/domains/bajaflightcases.nl/public_html/catalog/includes/modules/shipping/zonesx.php on line 131

 

Warning: Cannot modify header information - headers already sent by (output started at /home/bajafl01/domains/bajaflightcases.nl/public_html/catalog/includes/modules/shipping/zonesx.php:131) in /home/bajafl01/domains/bajaflightcases.nl/public_html/catalog/includes/functions/general.php on line 33

Edited by J.S. Coolen

Share this post


Link to post
Share on other sites

I founded the first error:

 

131		  uksort($prods_to_pack, "$this->cmpWeights"); // sort array so heavier items are at the beginning
132		  $num_packages = 1;

 

 

New version

131		 uksort($prods_to_pack, array($this, "cmpWeights")); // sort array so heavier items are at the beginning
132		  $num_packages = 1;

 

But there is still an error with de calculation from the weight. Is there someone who can help me?

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×