I'm getting an error on checkout:
Fatal error: Uncaught exception 'ErrorException' with message 'Error: 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 'order WHERE order_id = '3612'' at line 1<br />
Error No: 1064<br />SELECT total FROM order WHERE order_id = '3612'' in /home/path/shop.ourshop.com/system/database/mysqli.php:41
Stack trace: #0 /home/path/shop.ourshop.com/vqmod/vqcache/vq2-system_library_db.php(20): DBMySQLi->query('SELECT total FR...')
#1 /home/path/shop.ourshop.com/vqmod/vqcache/vq2-catalog_controller_common_header.php(225): DB->query('SELECT total FR...')
#2 /home/path/shop.ourshop.com/vqmod/vqcache/vq2-system_engine_controller.php(43): ControllerCommonHeader->index(Array)
#3 /home/path/shop.ourshop.com/vqmod/vqcache/vq2-system_engine_controller.php(74): Controller->getChild('common/header')
#4 /home/path/shop.ourshop.com/vqmod/vqcache/vq2-catalog_controller_checkout_success.php(162): Controller->render()
#5 [internal function]: in /home/path/shop.ourshop.com/system/database/mysqli.php on line 41
Searching shows others with this error, but I'm not seeing them as related to checkout. I was hoping someone could shed some light on it, to at least get me going in the right direction. Thank you!
edit: It should be noted that the last and only thing I've done recently was to change the store's email. We were using Mandrill and dropped it. Now setup with a simple sendmail using a email address us@ourserver.com. It worked fine, sending mail form the contact form, and no error on checkout. The error above then showed up today, seemingly at random.
The problem is syntax.
Your code:
Make it:
Your code:
Code: Select all
order WHERE order_id = '3612'
Code: Select all
`order` WHERE `order_id` = '3612'
Opencart Extensions | Professional opencart support | Support Ticket | support@cartbinder.com
Thanks imdevlper18
I ran a search for order "WHERE order_id exists" and found it in only one file,
\admin\model\payment\pp_payflow_iframe.php
On line 40 it reads:
$result = $this->db->query("SELECT * FROM " . DB_PREFIX . "paypal_payflow_iframe_order WHERE order_id = " . (int)$order_id);
I'm not sure if this is the right file (not sure why paypal would be involved, we aren't using it at all), or what to do with the line of code specifically.
Sorry, I'm out of my element here. If anyone wants to chime in that'd be great.
I ran a search for order "WHERE order_id exists" and found it in only one file,
\admin\model\payment\pp_payflow_iframe.php
On line 40 it reads:
$result = $this->db->query("SELECT * FROM " . DB_PREFIX . "paypal_payflow_iframe_order WHERE order_id = " . (int)$order_id);
I'm not sure if this is the right file (not sure why paypal would be involved, we aren't using it at all), or what to do with the line of code specifically.
Sorry, I'm out of my element here. If anyone wants to chime in that'd be great.
SELECT total FROM order WHERE order_id = '3612'' has too many quotes.
As it happens on the success page I suspect an extension or customization done by someone who didn't have their coffee yet
As it happens on the success page I suspect an extension or customization done by someone who didn't have their coffee yet
Attn: I no longer provide OpenCart extensions, nor future support - this includes forum posts.
Reason: OpenCart version 3+
Thanks!
Who is online
Users browsing this forum: No registered users and 49 guests