Zen Cart Logo
Forums / Discounts/Coupons, Gift Certificates, Newsletters, Ads / Apply GC INCREASES order total? - HELP please!

Apply GC INCREASES order total? - HELP please!

Locked

Views: 6,393

Results 1 to 11 of 11
This thread is locked. New replies are disabled.
30 Jan 2008, 11:24 PM
#1
mcqueeneycoins avatar

mcqueeneycoins

Zen Follower

Join Date:
Jan 2008
Posts:
156
Plugin Contributions:
0

Apply GC INCREASES order total? - HELP please!

Hi, using a personal test account, I have a $10 GC balance. When trying to purchase some products using the GC, the amount available appears correctly. I apply all 10 (or part of the 10) in the Apply Amount box and continue to the next screen. When I look at the order total, it shows the $10 has been subtracted (below tax and shipping lines), yet the order total is actually much, much higher than it should be. For example, products totaling $125 are added to $5 shipping and $10.31 in tax for a subtotal of 140.31. The $10 is applied and the new total comes out to be $260.31...what am I doing wrong--please help!

31 Jan 2008, 2:12 AM
#2
mcqueeneycoins avatar

mcqueeneycoins

Zen Follower

Join Date:
Jan 2008
Posts:
156
Plugin Contributions:
0

Re: Apply GC INCREASES order total? - HELP please!

In my original post I stated the order total actually would increase after applying a gift certificate amount. That's not entirely true. If the order is less than the gift certificate amount you apply, the total zeros out and there are not charges. If the total is more than what you have a GC for, the order total increases by the base amount. Example: If the sub-total is 10, plus 5 shipping for a grand total of 15 and you apply a 10 GC, the new total will be listed as 20 (it will take 5 off of shipping, but add another 10 from the sub-total).

When I go to admin->modules->order totals, I get this message: Fatal error: Call to a member function on a non-object in /home/www/mcqueeneycoins/catalog/includes/modules/order_total/ot_gv.php on line 49

I've overwritten the file using a fresh copy from the original zen cart but still no luck--what's wrong? Please please please help if you can!

31 Jan 2008, 4:50 AM
#3
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Apply GC INCREASES order total? - HELP please!

What version Zen Cart?

Clean install or an upgrade?

How did you install? How did you upgrade?

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

31 Jan 2008, 11:04 PM
#4
mcqueeneycoins avatar

mcqueeneycoins

Zen Follower

Join Date:
Jan 2008
Posts:
156
Plugin Contributions:
0

Re: Apply GC INCREASES order total? - HELP please!

Using 1.3.8...was a fresh install about a month ago. I've installed a few mods since, without any problems. Just noticed this issue the other day. Tried to go back to previous database backups without any luck...still does the same thing. I should note that the GC feature DID work several weeks ago. This is the first time I've tried since. So my guess is something got messed up in a mod update or SQL addition, I just can't figure out which one.

Here's my line 49 that it says is coming back with the error:
$this->checkbox = $this->user_prompt . '<input type="text" size="6" onkeyup="submitFunction()" name="cot_gv" value="' . number_format($_SESSION['cot_gv'], 2) . '" onfocus="if (this.value == \'' . number_format($_SESSION['cot_gv'], 2) . '\') this.value = \'\';" />' . ($this->user_has_gv_account($_SESSION['customer_id']) > 0 ? '<br />' . MODULE_ORDER_TOTAL_GV_USER_BALANCE . $currencies->format($this->user_has_gv_account($_SESSION['customer_id'])) : '');

11 Mar 2008, 9:06 PM
#5
finchjam avatar

finchjam

New Zenner

Join Date:
Mar 2008
Location:
Utah
Posts:
8
Plugin Contributions:
0

Re: Apply GC INCREASES order total? - HELP please!

I am also having the problem of redeeming GC increasing the total on the order. Mine is a new install, just a week ago, of 1.3.8a. I was testing the order process and if the GC doesn't cover the total, then it adds to the total. I'm not even sure how it is adding because on the same order I told it to use $50 and $100 of the $100 available and the grand total was $492.26 vs $255.52 for the $50 and $392.26 vs $205.52 for the $100 redemption.

I have the PayPal and Check/MO modules for payment. It is free shipping on the product I'm testing.

LMK if you need any other of my settings. I would really like to offer GC to my customers, but if it is going to operate this way, I won't be able to. :no:

12 Mar 2008, 7:58 PM
#6
finchjam avatar

finchjam

New Zenner

Join Date:
Mar 2008
Location:
Utah
Posts:
8
Plugin Contributions:
0

Re: Apply GC INCREASES order total? - HELP please!

After trying a myriad of things, it appears to be working now that I have the Re-calculate Tax option in the GC module set to Credit Note.

31 May 2009, 9:37 PM
#7
crafterscafe avatar

crafterscafe

New Zenner

Join Date:
May 2009
Posts:
38
Plugin Contributions:
0

Re: Apply GC INCREASES order total? - HELP please!

I am on same version 1.3.8a and get the same error.

Fatal error: Call to a member function on a non-object in //includes/modules/order_total/ot_gv.php on line 49

can not find the setting prior person referred to. I have not made any changes to zen for a long time and to my knowledge g/c have been working until now.

31 May 2009, 10:07 PM
#8
crafterscafe avatar

crafterscafe

New Zenner

Join Date:
May 2009
Posts:
38
Plugin Contributions:
0

Re: Apply GC INCREASES order total? - HELP please!

I just discovered something. the orders total module is not giving me access to change settings. I closed everything out, logged my test customer out, went back in and tried to get in... wa la, there it was, I made the correction as noted above and it didn't work. now I can't get into the mod again no matter what I try. HELP I just set out a bunch of g/c this is not good

25 Jun 2009, 3:29 PM
#9
garby avatar

garby

New Zenner

Join Date:
May 2009
Posts:
48
Plugin Contributions:
0

Re: Apply GC INCREASES order total? - HELP please!

Same problem here. (1.3.8a)

Fatal error: Call to a member function format() on a non-object in //includes/modules/order_total/ot_gv.php on line 49

Logged out, and tried as above but the error still shows in the Order Total Module

21 Jul 2009, 7:02 PM
#10
mitch_h avatar

mitch_h

New Zenner

Join Date:
Jan 2009
Posts:
22
Plugin Contributions:
0

Re: Apply GC INCREASES order total? - HELP please!

I think I have found the problem code section, but I don't know how to fix it, because I'm not certain how it's supposed to function.

First, let me explain how it's affecting my store. I have a customer complaint because they see the following for their order:

Sub-Total: $94.95
FedEx Ground: $24.46
CA Tax 8.25%: 7.84
Gift Certificates: -$100.00
Total: $46.65

The Total should be $27.24.

If you take the original total before Gift Certificate, you have $127.24. Before tax, you have $119.41, which is the $94.95 + $24.46. Subtract the $100 Gift Certificate, you have $19.41. This is the additional amount that has been added to the Total!

The code that is affecting this is in module ot_gv.php of version 1.3.8a, in function calculate_deductions, switch($this->calculate_tax) case 'None':

$order->info['total'] = 127.24
$od_amount['total'] = 100
$remainder calculates to 27.24
tax_deduct calculates to -19.41 temporarily so that ratio_tax calculates to -2.4789.... which is illogical
$tax_deduct then gets set to 0

Then, the statement "if ($this->include_tax)" which is set to false actually gets executed! Hmmmm, I don't know why. PHP quirk?

We end up leaving the function with $od_amount['tax'] = -19.41, which is the overage of what the Total should be.

If anyone has a correction for this code, I'd love to have it.

  • Mitch
21 Jul 2009, 10:10 PM
#11
mitch_h avatar

mitch_h

New Zenner

Join Date:
Jan 2009
Posts:
22
Plugin Contributions:
0

Re: Apply GC INCREASES order total? - HELP please!

Well, I commented out the following code in ot_gv.php function calculate_deductions($order_total) and everything seems to be working.

case 'None':
...
/* commented out section ...
if ($this->include_tax) {
reset($order->info['tax_groups']);
foreach ($order->info['tax_groups'] as $key=>$value) {
$od_amount['tax_groups'][$key] = $order->info['tax_groups'][$key] * $ratio_tax;
$tax_deduct += $od_amount['tax_groups'][$key];
}
}
... end of commented out section */

Hope this doesn't bite me later ohmy: