Post by amdziak » Wed Sep 06, 2017 7:32 pm

Hi,

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
Linie 177 in product_deal.php is

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']);
			
Can anyone of you have an idea how to fix this? Or did any of you have such a problem? I just add that the Safari is all ok ...

BR,
Paul.

Newbie

Posts

Joined
Wed Jun 08, 2016 7:11 pm

Post by IP_CAM » Thu Sep 07, 2017 6:35 am

this would be the best way, to find out, I assume...
Ernie
http://www.pavothemes.com/support.html

Ernie's OpenCart v.1.5.6.5 LIGHT + OpenShop Admin v.1.75 Test Sites
http://www.ebikes.li - http://www.evelo.li - http://www.openshop.li
Image


User avatar
Guru Member

Posts

Joined
Tue Mar 04, 2014 1:37 am
Location - Switzerland
Who is online

Users browsing this forum: No registered users and 19 guests