I got this error when I went for checkout :
unknown: Unknown column 'discount' in 'field list'
Error No: 1054
INSERT INTO order_product SET order_id = '18', product_id = '54', name = 'King Bonehead', model = 'King Bonehead', price = '12', discount = '0', total = '12', tax = '0', quantity = '1'
how do I fix this from happening? It was fine when I first tested my cart.
unknown: Unknown column 'discount' in 'field list'
Error No: 1054
INSERT INTO order_product SET order_id = '18', product_id = '54', name = 'King Bonehead', model = 'King Bonehead', price = '12', discount = '0', total = '12', tax = '0', quantity = '1'
how do I fix this from happening? It was fine when I first tested my cart.
intreasting.
which version are you using?
there is no discount filed in the lasest version.
did you try an upgrade then reverted back?
i'm assuming this is the line of code causing the trouble.
which version are you using?
there is no discount filed in the lasest version.
did you try an upgrade then reverted back?
i'm assuming this is the line of code causing the trouble.
Code: Select all
$this->db->query("INSERT INTO " . DB_PREFIX . "order_product SET order_id = '" . (int)$order_id . "', product_id = '" . (int)$product['product_id'] . "', name = '" . $this->db->escape($product['name']) . "', model = '" . $this->db->escape($product['model']) . "', price = '" . (float)$product['price'] . "', total = '" . (float)$product['total'] . "', tax = '" . (float)$product['tax'] . "', quantity = '" . (int)$product['quantity'] . "'");
OpenCart®
Project Owner & Developer.
Yes, that is the code, when I checked my error log it said line 26 and this is what it showed:
$this->db->query("INSERT INTO " . DB_PREFIX . "order_product SET order_id = '" . (int)$order_id . "', product_id = '" . (int)$product['product_id'] . "', name = '" . $this->db->escape($product['name']) . "', model = '" . $this->db->escape($product['model']) . "', price = '" . (float)$product['price'] . "', discount = '" . (float)$product['discount'] . "', total = '" . (float)$product['total'] . "', tax = '" . (float)$product['tax'] . "', quantity = '" . (int)$product['quantity'] . "'");
Discount kept showing up more than it did in the line you just showed
$this->db->query("INSERT INTO " . DB_PREFIX . "order_product SET order_id = '" . (int)$order_id . "', product_id = '" . (int)$product['product_id'] . "', name = '" . $this->db->escape($product['name']) . "', model = '" . $this->db->escape($product['model']) . "', price = '" . (float)$product['price'] . "', discount = '" . (float)$product['discount'] . "', total = '" . (float)$product['total'] . "', tax = '" . (float)$product['tax'] . "', quantity = '" . (int)$product['quantity'] . "'");
Discount kept showing up more than it did in the line you just showed
What happened here was the EnhancedOrderEmail_OCv132.3 mod was installed and the original catalog/model/checkout/order.php was not overwritten with the new file once the new order.php was uploaded everything worked again. no more error 1054
The most terrifying words in the English language are: I'm from the government and I'm here to help.
Ronald Reagan
Digital Chaos | Graphic Design Studio http://www.digitalchaos.biz
Digital Chaos Prints | Custom Art Prints http://www.digitalchaosprints.biz
Who is online
Users browsing this forum: Majestic-12 [Bot] and 21 guests