Site maintenance: Sun 15 Nov, from 20:00 UTC, about 4–6 hours. Details

This cutover relies on some testing that is still incomplete so may be cancelled at short notice

Forums / Upgrading from 1.3.x to 1.3.9 / upgrade 1.3.9a > h gift vouchers not working properly?

upgrade 1.3.9a > h gift vouchers not working properly?

Locked

Started by jgold723 on 2 Dec 2011, 5:22 PM · Views: 3,425

Results 1 to 12 of 12
This thread is locked. New replies are disabled.
2 Dec 2011, 5:22 PM
#1
jgold723 avatar

jgold723

Zen Follower

Join Date:
Dec 2010
Posts:
362
Plugin Contributions:
0

upgrade 1.3.9a > h gift vouchers not working properly?

The saga of the upgrade continues....

I've upgraded from 1.3.9a > h.

Now, when a customer attempts to use some of the GV balance, two problems occur:

  1. Their GV balance is actually INCREASED by the amount they attempt to apply to the order;

  2. Their order (which is successful) is placed on a "pending" status, making downloaded products unavailable.

Help.....

2 Dec 2011, 5:32 PM
#2
jgold723 avatar

jgold723

Zen Follower

Join Date:
Dec 2010
Posts:
362
Plugin Contributions:
0

Re: upgrade 1.3.9a > h gift vouchers not working properly?

Sorry, I need to correct this:

The GV balance is reduced appropriately. However, the second problem still exists:

The order is placed on a "pending" status, making downloaded products unavailable.

Configuration > GV Coupons "Default Order Status For Zero Balance Orders" is set to "Processing"
Modules > Payment Freecharger is enabled and set to processing

What else could be causing this?

John

2 Dec 2011, 8:13 PM
#3
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,511
Plugin Contributions:
176

Re: upgrade 1.3.9a > h gift vouchers not working properly?

As discussed in your other thread on similar topics, what is the payment/shipping associated with that order?

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

2 Dec 2011, 8:23 PM
#4
jgold723 avatar

jgold723

Zen Follower

Join Date:
Dec 2010
Posts:
362
Plugin Contributions:
0

Re: upgrade 1.3.9a > h gift vouchers not working properly?

The same that appeared before GV/DC free

2 Dec 2011, 8:53 PM
#5
jgold723 avatar

jgold723

Zen Follower

Join Date:
Dec 2010
Posts:
362
Plugin Contributions:
0

Re: upgrade 1.3.9a > h gift vouchers not working properly?

Just an FYI:

Under Localization > Order Status, the default status was listed as "Pending".

When I change that to "Processing" this problem goes away.

But I'm not sure if that will cause problems with other orders?

John

2 Dec 2011, 9:16 PM
#6
jgold723 avatar

jgold723

Zen Follower

Join Date:
Dec 2010
Posts:
362
Plugin Contributions:
0

Re: upgrade 1.3.9a > h gift vouchers not working properly?

Hmmm, and another FYI -- a google search brought up the information below -- I tried it and it seems to work:

========
If you have set configuration->GV Coupons->Default Order Status For Zero Balance Orders to Processing, but your download orders still stay at Pending, this may help:
In 1.3.8 and 1.3.9, orders with sales tax which are reduced to 0 through a coupon still have a tiny non-zero value in their order total, so the following check in includes/classes/order.php fails:

if ($this->info['total'] == 0) {

this is on line 568 in 1.3.9h and line 554 in 1.3.8a.

change this to

if ($this->info['total'] < 0.01) {

and it will work.

Note: This solution has also been posted to the Zen Cart forum.

The link for the complete blog posting is:

http://thecartblog.com/2011/04/04/zen-cart-100-coupon-on-download-still-creates-order-with-status-pending/

3 Dec 2011, 2:05 PM
#7
ajeh avatar

ajeh

Oba-san

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

Re: upgrade 1.3.9a > h gift vouchers not working properly?

Go to phpMyAdmin and search the configuration table for the configuration_key that reads:
DEFAULT_ZERO_BALANCE_ORDERS_STATUS_ID

and make sure that the configuration_value is set to the value for your Processing ID ...

Also make sure that you only have 1 record for that configuration_key of:
DEFAULT_ZERO_BALANCE_ORDERS_STATUS_ID

Next, check that the Order class for:
/includes/classes/order.php

is current and up to date and matches the file that comes with a clean v1.3.9h ...

Also be sure that the database table being used in the Admin is the same as what is used in the Catalog by checking the two files:
/includes/configure.php
/your_secret_admin/includes/configure.php

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!

5 Dec 2011, 2:19 PM
#8
jgold723 avatar

jgold723

Zen Follower

Join Date:
Dec 2010
Posts:
362
Plugin Contributions:
0

Re: upgrade 1.3.9a > h gift vouchers not working properly?

Hi Ajeh -- thanks so much for the tips. Here's some feedback:

Ajeh:

Go to phpMyAdmin and search the configuration table for the configuration_key that reads:
DEFAULT_ZERO_BALANCE_ORDERS_STATUS_ID

and make sure that the configuration_value is set to the value for your Processing ID ...

Yes, it is (2, Processing)

Ajeh:

Also make sure that you only have 1 record for that configuration_key of:
DEFAULT_ZERO_BALANCE_ORDERS_STATUS_ID

That is the case

Ajeh:

Next, check that the Order class for:
/includes/classes/order.php

is current and up to date and matches the file that comes with a clean v1.3.9h ...

This file has been modified by the Stock by Attributes mod. Maybe that's introducing the problem?

Ajeh:

Also be sure that the database table being used in the Admin is the same as what is used in the Catalog by checking the two files:
/includes/configure.php
/your_secret_admin/includes/configure.php

Yes, this is the case.

5 Dec 2011, 2:53 PM
#9
ajeh avatar

ajeh

Oba-san

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

Re: upgrade 1.3.9a > h gift vouchers not working properly?

The constant for the GV when the total is at 0 on the Order Status is:
DEFAULT_ZERO_BALANCE_ORDERS_STATUS_ID

this is managed in the Order Class in:
/includes/classes/order.php

You might check to see if you are using the original order.php or if that has been customized in some way that is altering how it works ...

Also, in phpMyAdmin, browse the table:
orders

and see what the content is for the field:
order_total

on these GV orders that did not work correctly ... is it 0.0 or something else?

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!

6 Dec 2011, 2:37 PM
#10
jgold723 avatar

jgold723

Zen Follower

Join Date:
Dec 2010
Posts:
362
Plugin Contributions:
0

Re: upgrade 1.3.9a > h gift vouchers not working properly?

Ajeh:

The constant for the GV when the total is at 0 on the Order Status is:
DEFAULT_ZERO_BALANCE_ORDERS_STATUS_ID

this is managed in the Order Class in:
/includes/classes/order.php

You might check to see if you are using the original order.php or if that has been customized in some way that is altering how it works ...

The order.php file has been altered by the "Stock with Attributes" addon. But as far as I can tell, those are the only changes.

Ajeh:

Also, in phpMyAdmin, browse the table:
orders

and see what the content is for the field:
order_total

on these GV orders that did not work correctly ... is it 0.0 or something else?

The amounts are 0.0

So, I'm stumped, sort of. But to return to my first fix, setting the default order status to "processing" under Localization > orders status... will that cause any problems that I'm not aware of?

6 Dec 2011, 3:04 PM
#11
ajeh avatar

ajeh

Oba-san

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

Re: upgrade 1.3.9a > h gift vouchers not working properly?

Changing the default will result in any Order Status not otherwise specified will be set to that default setting ...

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!

6 Dec 2011, 3:14 PM
#12
jgold723 avatar

jgold723

Zen Follower

Join Date:
Dec 2010
Posts:
362
Plugin Contributions:
0

Re: upgrade 1.3.9a > h gift vouchers not working properly?

Thanks -- I'll give it a try.

John