Does the fact that this mode alters ORDERS table affect any insert statements in other files/modules?
Will this change (alter table) cause any problems later on with Zen-Cart upgrades since it expects tables to have the original structure?
Printable View
Does the fact that this mode alters ORDERS table affect any insert statements in other files/modules?
Will this change (alter table) cause any problems later on with Zen-Cart upgrades since it expects tables to have the original structure?
The short version, ericny, is no, this will not affect anything in the core, whether current or upcoming.
The reason this does not affect the system is because core Zen uses a very intelligent function, zen_db_perform(), to perform inserts and updates. This function takes an array of values to insert, and the array key corresponds to the field name.
With this information, the function can build a SQL statement that explicitly defines exactly which fields have values to insert, like so...
This way Zen Cart always avoids using the looser (and more error-prone) SQL structure that lacks the field names...Code:INSERT INTO orders (orders_id, customers_id, customers_name, [...])
VALUES ([$orders_id], [$customers_id], [$customers_name], [...])
The Zen Cart core will never use SQL statements like the above, so there's never a problem with upgrades. Of course you still have to watch out for sloppy contrib code, but you won't find any of that nonsense here. :wink2:Code:INSERT INTO orders
VALUES ([$orders_id], [$customers_id], [$customers_name], [...])
I installed Super Orders 2.0 rev45 on a client's Zen Cart 1.3.7 install. Things seem to be working fine except for one thing...
Credit Card orders (Authorize.net SIM) still show a balance due and that the amount paid is $0.00. Also, I guess PayPal IPN payments aren't showing up either - I read that this isn't supported yet.
I DO have the following in the catalog order.php class file.
Any ideas what could be going wrong? I read through most of the posts and saw a few people having this problem, but didn't see if they fixed it.PHP Code:
$insert_id = $db->Insert_ID();
// BEGIN Super Orders edit
// add CC data as a line item to SO payment system
if (zen_not_null($this->info['cc_type']) || zen_not_null($this->info['cc_owner']) || zen_not_null($this->info['cc_number'])) {
require(DIR_WS_CLASSES . 'super_order.php');
$so = new super_order($insert_id);
$so->cc_line_item();
}
// END Super Orders edit
Thanks!
Regarding my previous post...
Also, it seems that there are no entries in the so_payments table.
I think I have it installed properly... hmmm....
Is your client's CC module actually inserting values into the fields listed in that code you quoted?
- cc_type
- cc_owner
- cc_number
If not it's obviously not going to do anything...
I guess the "Authorize.net SIM" module doesn't store any cc info locally in Zen Cart - yikes, IMHO. It doesn't reference the order at all in before_process()
The Authorize.net AIM module has the following code. Do you think I can use something like that in the SIM module before_process() to populate the fields? I'm new to Zen Cart, so I'm learning...
Anyone know what the difference is in the SIM versus AIM modules anyway? Sorry if this is common knowledge, but I haven't used Authorize.net in a long time - the client had it already setup.
Thanks!
PHP Code:
// how many CC digits do we remember?
if (MODULE_PAYMENT_AUTHORIZENET_AIM_STORE_NUMBER == 'True') {
$order->info['cc_number'] = $_POST['cc_number'];
} else {
$order->info['cc_number'] = str_pad(substr($_POST['cc_number'], -4), strlen($_POST['cc_number']), "X", STR_PAD_LEFT);
}
$order->info['cc_expires'] = $_POST['cc_expires'];
$order->info['cc_type'] = $_POST['cc_type'];
$order->info['cc_owner'] = $_POST['cc_owner'];
$order->info['cc_cvv'] = $_POST['cc_cvv'];
I've never heard it referred to as the "SIM" module, is it the one listed as "authorizenet" in Admin > Modules > Payment?.
If so, your client should probably switch to the AIM module, as that is more secure and up-to-date.
Is there a description/features of what this Super Order 2.0 do?
Super orders is a massive overhaul to order management, hence the phrase "order management on steroids." Between it and the Sales Report (my other primary contrib), you have pretty much everything your accountant, bookkeeper, and stock manager would need to run things.
You really need to download it and read the README file to see everything it can do, just too much to list in the download description.
Hello, thanks and congratulations for this great mod!.
I have 1.3.7 with Super Orders 2.0rev45, all works ok , but i have a little problem when i notify the customer for an update in his order.
For example, i change the status order from pending to processing , add some comments , check "Notify Customer?" box, and update.
Status History change, but when the customer receive the mail, he receive these:
"Your order has been updated to the following status:
New status: Pending"
with no comments and wrong status.
thanks for the help,
Nicolas