Forums / Setting Up Categories, Products, Attributes / Count doesn't match value

Count doesn't match value

Locked

Views: 8,804

Results 21 to 26 of 26
This thread is locked. New replies are disabled.
13 Jul 2008, 6:57 PM
#21
drbyte avatar

drbyte

Sensei

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

Count doesn't match value

There's an updated AIM module for 1.3.7.x, which includes some improvements and some of the newer features of the 1.3.8 version. The beta version for 1.3.7.x is here: http://www.zen-cart.com/forum/showthread.php?p=441023#post441023

For the full improvements for 1.3.8, you'll need to upgrade to 1.3.8

.
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.

31 Jul 2008, 10:51 PM
#22
gfogleman avatar

gfogleman

New Zenner

Join Date:
Oct 2007
Posts:
22
Plugin Contributions:
0

Re: Count doesn't match value

First of all, I truly apologize for not thanking you sooner, but have not had the opportunity to get back to the issue until now. BUT, I do appreciate your response and help.

I downloaded and installed the patch, but still receive the same error. Could it be related to the additional "po_number" field?

The orders are clearing Authorize.net just fine and are posting to the dbase fine (I can see them in pending orders).

So, even though everything seems to actually be processing as it should, I don't want the customer to see an error, especially if they think that means their order wasn't processed.

Gary

31 Jul 2008, 11:30 PM
#23
drbyte avatar

drbyte

Sensei

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

Re: Count doesn't match value

I didn't catch that the first time you posted the issue.

Yes, it does appear to be related to the po_number field which you've added to the code.

If you're going to add po_number to the code, you need to not only specify the field name but also a value for said field.

Why are you storing a po_number value via the authorize.net payment module? Authnet is used for CC processing, not PO numbers ... :O (granted, I guess it's acceptable to note a PO number even if the purchase is being paid-for immediately)

.
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.

31 Jul 2008, 11:54 PM
#24
gfogleman avatar

gfogleman

New Zenner

Join Date:
Oct 2007
Posts:
22
Plugin Contributions:
0

Re: Count doesn't match value

Thanks for the quick reply... you rock!

Sometimes the client has a PO# and sometimes not... COMBINED with sometimes paying w/ a cc and sometimes not.

The site I am using ZC on is a distributor. If the client has credit issues w/ them, they can still order but must use a CC; but the customer may or may not use a PO# for their own reference as well as my client's.

I have read enough throughout the forums to know that PO#'s have been a sticky issue. BUT, to make ZC a truly viable option for MANY designers/developers/users, then PO #'s MUST be incorporated soon, or at least a sticky on the proper implementation of a PO# option for customers.

Sorry to beat the proverbial dead horse.

Any way, how then can I populate the PO# field automatically if the customer doesn't use one?

1 Aug 2008, 1:27 AM
#25
drbyte avatar

drbyte

Sensei

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

Re: Count doesn't match value

You already had the po_number field in the list of fields.
But you didn't have the "value" specified in the list of values.

So, add the value, using the concept shown below. I've quoted your earlier code snippet, and shown both your own change as well as the additional required change. I've assumed that the variable containing the value of the PO Number entered by your customer is called $po_number. If it's not, you'll need to change it to suit.
Granted, this all assumes that storing the PO Number in the same record as the CC confirmation is the correct approach ... something I'm not convinced of myself. The code I've shown below only contains an edit to make the list of fields match the list of values. That's all. As I said, I'm not convinced that this is the best solution to your root problem. It will simply resolve the specific error message you mentioned.

If you want specific help on writing new functionality for your store, you may need to start a new topic for that and/or hire someone to do the coding for you.

gfogleman:

My code in catalog/includes/modules/payment/authorizenet_aim.php is:

function after_process() {
global $insert_id, $db;
$db->Execute("insert into " . TABLE_ORDERS_STATUS_HISTORY . " (comments, po_number, orders_id, orders_status_id, date_added) values ('Credit Card payment. AUTH: " . $this->auth_code . ". TransID: " . $this->transaction_id . ".' ,** '" . $po_number . "', **'". (int)$insert_id . "','" . $this->order_status . "', now() )");
return false;
}

.
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.

1 Aug 2008, 11:36 AM
#26
gfogleman avatar

gfogleman

New Zenner

Join Date:
Oct 2007
Posts:
22
Plugin Contributions:
0

Re: Count doesn't match value

Actually, I started thinking about that very same thing after my last reply. Somehow when I installed the PO module, I got it in my head that the variable needed to be added ANYWHERE that data was being posted to the order history table. Thus, into the Authorize.net module it went.

Sure enough, as soon as I removed the po_number references in the mod, all was well w/ the world again.

Thanks again for guiding the way to a poor lost Zen soul.