If this is your first visit, check our documentation. To post, register or login.

Gift Queue Displays Wrong Order Number

Locked

Started by iceproducts on 5 Sep 2006, 4:24 AM · Views: 2,716

Results 1 to 5 of 5
This thread is locked. New replies are disabled.
5 Sep 2006, 4:24 AM
#1
iceproducts avatar

iceproducts

New Zenner

Join Date:
Jan 2005
Posts:
16
Plugin Contributions:
0

Post #1 by iceproducts

Hello All,

I have been "dealing" with an issue for quite some time since updating ZenCart from 1.2 to 1.3.

We have free catalogs for our customers but charge $3.00 with a full refund towards their next order to cover our shipping if they do not order from us. This is done via a Gift Certificate.

But when the customer orders the catalog/gift certificate and the gift certificate gets placed in the Gift Queue it does not have the correct Order Number. This happens 90% of the time but 10% of the time it does have the correct Order Number.

I have search quite a bit and haven't found anything that references this but if it is already address please disregard but please point me in the right direction.

I am using ZenCart 1.3.0.2 and was reading the new 1.3.5 version fixes and didn't see this anywhere in the list.

Thanks in advance,
IceProducts

PS - You can view our store at http://www.YourRegalRep.com

5 Sep 2006, 3:26 PM
#2
Kim avatar

Kim

Obaa-san

Join Date:
Jun 2003
Location:
West Coast, North America
Posts:
26,758
Plugin Contributions:
0

Post #2 by Kim

Have you modified the code to send the Gift Certificate automatically or are you emailing them manually?

Please do not PM for support issues: a private solution doesn't benefit the community.

Be careful with unsolicited advice via email or PM - Make sure the person you are talking to is a reliable source.

16 Sep 2006, 1:36 AM
#3
iceproducts avatar

iceproducts

New Zenner

Join Date:
Jan 2005
Posts:
16
Plugin Contributions:
0

Post #3 by iceproducts

Hello,

Sorry for the delay. Nothing is modified from the original code. They are being added automatically when customer purchases a Gift Certificate.

But I do have to go into the Gift Queue and release each one manually but the order # is always incorrect when the customer pays with PayPal which is 99% of the orders.

Thanks,
IceProducts

23 Oct 2006, 2:11 AM
#4
iceproducts avatar

iceproducts

New Zenner

Join Date:
Jan 2005
Posts:
16
Plugin Contributions:
0

Post #4 by iceproducts

As an update I have not seen any fix for this as of yet.

There is another post with the same problem I am having:

http://www.zen-cart.com/forum/showthread.php?t=46833

But this post didn't have a solution either.

Again after many more orders being placed this error is only occuring when they are being paid via PayPal. We accept 2 payment methods, PayPal and Money Order and Money Order always had the correct order # in the Gift Queue.

Since 99% of our order are via PayPal and many customers buy a Gift Certificate I am in PHPMyAdmin way too much.

Hope someone can help,
IceProducts

25 Oct 2006, 1:37 AM
#5
ajeh avatar

ajeh

Oba-san

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

Post #5 by ajeh

Here is a temporary solution ...

Edit the file:
/includes/classes/orders.php

Around line 616 you will see:

    $insert_id = $db->Insert_ID();

Change to read:

    $insert_id = $db->Insert_ID();
    $_SESSION['order_number_order_totals'] = $insert_id;

Now edit the file:
/includes/modules/order_total/ot_gv.php

Comment line 122 and add a new line so it reads:

//        $db->Execute("insert into " . TABLE_COUPON_GV_QUEUE . " (customer_id, order_id, amount, date_created, ipaddr) values ('" . (int)$_SESSION['customer_id'] . "', '" . (int)$insert_id . "', '" . $gv_order_amount . "', NOW(), '" . $_SERVER['REMOTE_ADDR'] . "')");
        $db->Execute("insert into " . TABLE_COUPON_GV_QUEUE . " (customer_id, order_id, amount, date_created, ipaddr) values ('" . (int)$_SESSION['customer_id'] . "', '" . (int)$_SESSION['order_number_order_totals'] . "', '" . $gv_order_amount . "', NOW(), '" . $_SERVER['REMOTE_ADDR'] . "')");

See if this solves all PayPal with GV Orders so that the gv queue is set right on the orders_id ...

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!