You shouldn't have to manually enter Super Orders payments for orders paid via Authorize.net..
Printable View
Hi - I have Zencart 1.3.9h, plus Purchase Orders 6 and Ty Package tracker as well as several other mods.
This is the error I'm getting after trying to put a comment in that has a ' in it.
This started occurring after SuperOrders 3.0 was installed...anyone know how to fix it or where to find the file that's causing the trouble. I tried to find it through the developer's toolkit but no luck. I also get a similar error when trying to run scripts through the "Install SQL Patch" toolQuote:
1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'test hi there blah blah blah')' at line 7
in:
[INSERT INTO zen_orders_status_history (orders_id, orders_status_id, date_added, customer_notified, comments) VALUES ('76', '2', now(), '-1', 'test ' test hi there blah blah blah')]
If you were entering information, press the BACK button in your browser and re-check the information you had entered to be sure you left no blank fields.
A search in this thread for a match on your error message would have turned up these threads:
http://www.zen-cart.com/forum/showpo...&postcount=481
http://www.zen-cart.com/forum/showpo...9&postcount=26
Well, it seems that in Admin/includes/functions/extra_functions/common_orders_functions.php, starting at around line 101, I found this:
and changed the comments from:Code:function update_status($oID, $new_status, $customer_notified, $comments = '') {
global $db;
$db->Execute("INSERT INTO " . TABLE_ORDERS_STATUS_HISTORY . "
(orders_id, orders_status_id, date_added, customer_notified, comments)
VALUES ('" . (int)$oID . "',
'" . $new_status . "',
now(),
'" . $customer_notified . "',
'" . $comments . "')");
$db->Execute("UPDATE " . TABLE_ORDERS . " SET
orders_status = '" . $new_status . "'
WHERE orders_id = '" . (int)$oID . "'");
}
'" . $comments . "')");
To:
'" . $comments . "");
making that look like:
That took out the: ') but it's still showing the error with the ] as being the culprit.Code:function update_status($oID, $new_status, $customer_notified, $comments = '') {
global $db;
$db->Execute("INSERT INTO " . TABLE_ORDERS_STATUS_HISTORY . "
(orders_id, orders_status_id, date_added, customer_notified, comments)
VALUES ('" . (int)$oID . "',
'" . $new_status . "',
now(),
'" . $customer_notified . "',
'" . $comments . "");
$db->Execute("UPDATE " . TABLE_ORDERS . " SET
orders_status = '" . $new_status . "'
WHERE orders_id = '" . (int)$oID . "'");
}
I know that's got to be close, as it's taking out the other unwanted characters.................I just can't find where that stupid little bracket is coming from.
Anybody else have more any ideas?
In case anyone is wondering why I don't simply post the "fix", the answer is simple.. I made a BOATLOAD of changes to fix this and a few other things with regards to comments in Super Orders.. (key among these changes is the elimination of the common_orders_functions.php file) So the answer is that the changes I made are too numerous to post here.. (Which is why I suggested the easy workaround of not using single or double quotes in comments)
Trying to free some time to finish this and submit it, but well heck you know.. Life obligations come before free modules..:smile:
Oh, I know what you mean, Diva.......sometimes life gets in the way of life.......
It's good to know that you've on top of it, as I've got a customer who needs this on like 9 different sites.
I've been working my fanny off trying to either find or help find the 'bug', but so far, the above is all I've found...................which after further investigation...............I'm not even sure is going to end up being relevant.
Anyway Diva, If there's anything I can do to help, you know where the pm buttons' at, and you've got my email addy......................
..............looking forward to seeing your........uh-hmm......OUR......headache(s) go away...........
P.S. You never know just how hard it is to write a whole paragraph in the comments section without using even one single quote, until you HAVE to do it. It can be more challenging that one might think.............
Hmm..........too slow to edit last post, so here's a couple of additional thoughts I had............
Uh-oh! Did I ignore you at some time or another? If I did, I sure didn't mean to. Also, if I did, I bet it was last month, huh?
May was a VERY hectic month for me with a hack, sick for almost a week, and of course..................the mean old Joplin tornado was 3 blocks from our home, leaving us without utilities, forcing us to go out of town with a $700 price tag that wasn't in the plans. So all-in-all............16 days downtime in May!
I'm sure proud it's over. So far, this month is been pretty good...............other than this little 'bug' that's driving us all crazy.
Anyway..............I'll be here.
Nah.. you didn't ignore me.. Just preparing you for ME taking you up on your offer.. :laugh: My nephew and I like that line from Fatal Attraction.. He's never seen the movie (he's 11.. it'll be a while before he gets to see it..) but he's seen the clip with the line I quoted.. He was amused.. I was amused by his amusement..:laugh: So we use it on each other when we think one of us isn't paying attention to the other one..:laugh:
Didn't realize you were in tornado alley.. Sounds like you fared better than others in the region.. Thank goodness for that!!!