Forums / General Questions / Error on Order Total

Error on Order Total

Results 1 to 7 of 7
08 Apr 2011, 19:39
#1
annettes avatar

annettes

New Zenner

Join Date:
Jan 2011
Posts:
68
Plugin Contributions:
0

Error on Order Total

Hello,

Can someone please help me figure out how to fix this error? I'm receiving this erros:
Warning: Division by zero in /home/annettes/public_html/includes/modules/order_total/ot_group_pricing.php on line 79

On this webpage:
https://myinetserver.com/~annettes/index.php?main_page=login&zenid=ece84933e82c68a8d1bbceba1e282fb0

Your help is appreciated!
Thanks,
Annette
www.annetteslingerie.com
08 Apr 2011, 21:45
#2
annettes avatar

annettes

New Zenner

Join Date:
Jan 2011
Posts:
68
Plugin Contributions:
0

Re: Error on Order Total

Here is what I found in code regarding the division by zero. I'm not sure what to change it to. Can anyone help?

'customer_id'] . "'");

if ($group_query->fields['customers_group_pricing'] != '0') {

$group_discount = $db->Execute("select group_name, group_percentage from " . TABLE_GROUP_PRICING . "

where group_id = '" . (int)$group_query->fields['customers_group_pricing'] . "'");

$gift_vouchers = $_SESSION['cart']->gv_only();

$discount = ($order_total - $gift_vouchers) * $group_discount->fields['group_percentage'] / 100;

$od_amount['total'] = round($discount, 2);

$ratio = $od_amount['total']/$order_total;

/**

* when calculating the ratio add some insignificant values to stop divide by zero errors

*/
09 Apr 2011, 12:22
#4
annettes avatar

annettes

New Zenner

Join Date:
Jan 2011
Posts:
68
Plugin Contributions:
0

Re: Error on Order Total

Thank you!
09 Apr 2011, 13:47
#5
haredo avatar

haredo

Totally Zenned

Join Date:
Apr 2006
Posts:
6,171
Plugin Contributions:
0

Re: Error on Order Total

Your welcome but did this thread resolve your issue?
13 Apr 2011, 23:11
#6
annettes avatar

annettes

New Zenner

Join Date:
Jan 2011
Posts:
68
Plugin Contributions:
0

Re: Error on Order Total

Hello,
I finally had time to make this change. The above instructions did resolve that issue. The problem now is I'm receiving these parse errors when I make changes. When I open the .php files, make the change, and upload, the formatting messes up and the .php essentially becomes a continuous word wrap document with no hard returns. ? I'm receiving this error now:

Parse error: syntax error, unexpected T_CLASS in /home/annettes/public_html/includes/modules/order_total/ot_group_pricing.php on line 8

1) how do I correct this error? and 2) how do I correct the formatting problem when uploading the new .php?
13 Apr 2011, 23:36
#7
annettes avatar

annettes

New Zenner

Join Date:
Jan 2011
Posts:
68
Plugin Contributions:
0

Re: Error on Order Total

With this latest error, we are unable to checkout orders. Help needed asap! Thanks!