Jump to content
  • Checkout
  • Login
  • Get in touch


The e-commerce.

Error i shipping module - Please Help


Recommended Posts

Hi, Im in trouble...I cannot get my shipping module to work, if i for example use the table method (its the same with the others), i get these error messages in my pay-module on my website:


I step 1: Warning: Division by zero /hsphere/local/home/jesperbr/produktspecialisten.dk/oscommerce_st/catalog/includes/classes/shipping.php on line 61


if i go further i get this message:

Warning: Division by zero in /hsphere/local/home/jesperbr/produktspecialisten.dk/oscommerce_st/catalog/includes/classes/shipping.php on line 61 Warning: Cannot modify header information - headers already sent by (output started at /hsphere/local/home/jesperbr/produktspecialisten.dk/oscommerce_st/catalog/includes/classes/shipping.php:61) in /hsphere/local/home/jesperbr/produktspecialisten.dk/oscommerce_st/catalog/includes/functions/general.php on line 29


Can any one help me....



Link to comment
Share on other sites

  • 4 weeks later...

I have the same problem. I've done some searches and the suggestions are to ensure the weight of the item is > 0, which I have done but still get the problem.


Please can someone help with this? It's quite urgent because it's stopping me from going live with the shop.



Link to comment
Share on other sites

OK, I've solved this but it's a cheat. It appears that the code concerned determines if the shipment should be split up into multiple boxes depending on the weight. This is not an issue with my store, so I just deleted the code block and it worked:


Backup the shop using the backup tool in the admin screen

navigate to the "/var/www/catalog/includes/classes" directory

backup the shipping.php file (you can never have too many backups)


Remove (or better still, comment out) the following lines:


if ($shipping_weight > SHIPPING_MAX_WEIGHT) { // Split into many boxes

$shipping_num_boxes = ceil($shipping_weight/SHIPPING_MAX_WEIGHT);

$shipping_weight = $shipping_weight/$shipping_num_boxes;



Test this and if all is OK make another backup using the backup tool.


Someone who knows PHP or some basic programming should be able to suggest a better solution, this is a hack.

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.

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...