A lot of people have complained about live rate shipping modules not taking into effect the individual product dimensions. The main reason for this is due to the NP-HARD fundamental of all the different possibilities of packaging multiple items into pre-determined box sizes.
So I've been doing some research on the matter and found a few box calculation classes. One in particular that seemed to be well written is this one: https://github.com/yetzt/boxing/blob/ma ... .class.php
This allows you to specify your available box sizes and then tries to calculate the total volume of the items to the available box sizes to quickly filter out any that are just too small. From there it calculates based on the individual dimensions and figures out how many boxes at a specific size are needed to fit all the items. This is where things get thick of course as there are virtually unlimited options to packaging, twisting, stacking, etc. But the class seems to do what it can to fit the packages in the box. It would then return the number of outer boxes and the dimensions of those boxes. That information would then be passed into UPS, USPS, Canada Post, FedEx, etc.
That would bring us as close as possible to having proper dimension based results.
Thoughts or other box classes that we should research?
So I've been doing some research on the matter and found a few box calculation classes. One in particular that seemed to be well written is this one: https://github.com/yetzt/boxing/blob/ma ... .class.php
This allows you to specify your available box sizes and then tries to calculate the total volume of the items to the available box sizes to quickly filter out any that are just too small. From there it calculates based on the individual dimensions and figures out how many boxes at a specific size are needed to fit all the items. This is where things get thick of course as there are virtually unlimited options to packaging, twisting, stacking, etc. But the class seems to do what it can to fit the packages in the box. It would then return the number of outer boxes and the dimensions of those boxes. That information would then be passed into UPS, USPS, Canada Post, FedEx, etc.
That would bring us as close as possible to having proper dimension based results.
Thoughts or other box classes that we should research?
Have played around with the class and it is very quick for a few items but slows down when there are lots of items. I have modified it so that it can even deal with satchels, again very quick for a small number of items but slows down when you add a lot of items.Qphoria wrote:A lot of people have complained about live rate shipping modules not taking into effect the individual product dimensions. The main reason for this is due to the NP-HARD fundamental of all the different possibilities of packaging multiple items into pre-determined box sizes.
So I've been doing some research on the matter and found a few box calculation classes. One in particular that seemed to be well written is this one: https://github.com/yetzt/boxing/blob/ma ... .class.php
Anyway, Qphoria mentioned that this may get added into the core, has there been any progress on that?
I will add the packing class to the shipping module I am editing/writing for our shop, but would be nice if it was in the core.
I gather there would be some sort of "packing.php" file in the system/library directory
Product Options are another issue, they currently do not have any dimensions, does anyone know if this will likely change in the core or do I need to modify myself?
Cheers
Rebdog
Extra Product Tabs
A bit late to the party here but I've been working on a simple box packing extension similar to what's been discussed here. It will be finished and available for OC v2+ in the next few days.
Regarding Options modifying dimensions, please see my extension here which has been out for some time and does just that:
http://www.opencart.com/index.php?route ... n_id=14111
Supports OCv1.5.4 - OCv2.0.3.1
Regarding Options modifying dimensions, please see my extension here which has been out for some time and does just that:
http://www.opencart.com/index.php?route ... n_id=14111
Supports OCv1.5.4 - OCv2.0.3.1
The box packing extension mentioned above is complete and can be found here:
http://www.opencart.com/index.php?route ... n_id=23465
The algorithm I've used here does not use the library discussed above, but does a fairly decent job of estimating size, quantity and weight of boxes needed and does so very quickly regardless of cart quantities.
http://www.opencart.com/index.php?route ... n_id=23465
The algorithm I've used here does not use the library discussed above, but does a fairly decent job of estimating size, quantity and weight of boxes needed and does so very quickly regardless of cart quantities.
Who is online
Users browsing this forum: No registered users and 100 guests