bls673 Posted March 30, 2007 Posted March 30, 2007 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.... BLS673 Quote
enzoweb Posted April 28, 2007 Posted April 28, 2007 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. thanks. Quote
enzoweb Posted April 28, 2007 Posted April 28, 2007 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. Quote
Recommended Posts
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.