I install quick start pavothemes pal flower themes (OC 2.3).
In the Mozilla Firefox and IE:
Code: Select all
Notice: Undefined index: product_id in /.../public_html/front/system/pavothemes/widget/product_deal.php on line 177
Fatal error: Uncaught Exception: Error: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'AND o.order_status_id=5' at line 2<br />Error No: 1064<br />SELECT sum(quantity) as total FROM `oc_order_product` op LEFT JOIN `oc_order` AS o ON op.order_id = o.order_id WHERE op.product_id = AND o.order_status_id=5 in /.../public_html/front/system/library/db/mysqli.php:40 Stack trace: #0
/.../public_html/front/system/library/db.php(16): DB\MySQLi->query('SELECT sum(quan...', Array) #1 /.../public_html/front/catalog/model/pavdeals/product.php(126): DB->query('SELECT sum(quan...') #2 /.../public_html/front/system/engine/loader.php(178): ModelPavdealsproduct->getTotalBought(NULL, 5) #3 /.../public_html/front/system/engine/proxy.php(25): Loader->{closure}(Array, Array) #4 /home/phgs/domai in /.../public_html/front/system/library/db/mysqli.php on line 40
Code: Select all
public function getItemDeal($product = null, $setting = array()){
if(is_numeric($product)){
$product = $this->model_catalog_product->getProduct((int)$product);
}
$deal = $this->model_pavdeals_product->getDeal($product);
if(!$deal)
return false;
$order_status_id = isset($setting['order_status_id'])?(int)$setting['order_status_id']:5;
$bought = $this->model_pavdeals_product->getTotalBought($deal['product_id'], $order_status_id );
$bought = empty($bought)?0:$bought;
$save_price = (float)$deal['price'] - (float)$deal['special'];
$discount = round(($save_price/$deal['price'])*100);
$save_price = $this->currency->format($this->tax->calculate($save_price, $deal['tax_class_id'], $this->config->get('config_tax')), $this->session->data['currency']);
BR,
Paul.