Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Overweight shipping item


GuntherR

Recommended Posts

The current shipping class is calculating the number of boxes to ship simply by deviding the order weight by the 'SHIPPING_MAX_WEIGHT' value. That value can be adjusted via the admin tool and affect ALL shipping modules.

I am currently writing another shipping module for a local shipping company and they have restrictions for the maximum weight per item (dictated by the unions).

The shipping module now has to know the weight of the heaviest item to either allow or refuse the shipment.

The current shipping modules would simply devide the weight of e.g. a fridge into several boxes (not very practical) as part of the shipping class:

$shipping_num_boxes = ceil($shipping_weight/SHIPPING_MAX_WEIGHT);

 

Any thought, hints ?

 

2.2MS2

Link to comment
Share on other sites

Something similar is found in the UPSXML contribution for 'ready-to-ship' items. I wouldn't try the packaging algorith there, it is not working properly, but you could use the admin section to create ready-to-ship items. You can sort them (in modules/shipping/uspxml.php is a function and code for that) and then calculate the number of boxes and weight for the remaining items in the usual osC way (take the code from includes/classes/shipping.php, function quote).

Link to comment
Share on other sites

Thanks!

Did a few changes to the shipping class, checkout_shipment and to my new shipping module and it seems to work either refusing the 'too heavy' shipment, or not even showing the shipper.

Guess the next step should be some sort of individual shipping cost assignment to the item itself or forcing a certain shipping module e.g. flat fee for the item.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...