Post by dbsamkung » Fri May 17, 2024 10:18 am

Hi,
i am new in opencart, and i got trouble on installation a extension "Opencart Odoo Connector" on Opencart. For some reason, all extension i have to install it manully.
The installation process is: Uploade all files from extension to the right directory, that i will copy the install.xml codes into
/system/storage/modification/admin/controller/common/column_left.php

codes like:

Code: Select all

$aaa = array();
 if ($this->user->hasPermission('access', 'catalog/aaa')) {
                            $aaa[] = array(
                                'name'     => $this->language->get('text_aaa'),
                                'href'     => $this->url->link('catalog/aaa', 'token=' . $this->session->data['token'], true),
                                'children' => array()
                            );
                        }
==============

after i installed, i go to admin dashboard >> go to extension >> Modification and Click on the "Refresh" button for refresh cache and update the module list.
then show the error:
Undefined property: Proxy::getTotalOrders in /system/storage/modification/system/engine/action.php on line 51
Frondend is working fine. Backend can login but only show the error text message.
i have to use backup for recover.

i ask their support tema and they told me it was found that issue is coming from third party module named "Waybillui". It replaced the core Opencart file and it result show an error.

here is information i found on opencart:
i found the file named"waybillui" on directory:
admin/view/template/sale/waybillui.tpl

and found codes on
>Directory:
\system\storage\modification\admin\controller\sale\order.php
>Code in directory:

Code: Select all

public function waybillui(){
		$this->load->language('sale/order');
		$title = 'Waybill Input';
		$this->document->setTitle($title);
		$url = '';
		$data['breadcrumbs'] = array();
		$data['breadcrumbs'][] = array(
			'text' => $this->language->get('text_home'),
			'href' => $this->url->link('common/dashboard', 'token=' . $this->session->data['token'], true)
		);
		$data['breadcrumbs'][] = array(
			'text' => $title,
			'href' => $this->url->link('sale/order/waybillui', 'token=' . $this->session->data['token'] . $url, true)
		);
		$data['postto'] = array();
		$data['postto']['href'] = $this->url->link('sale/order/waybillinput', 'token=' . $this->session->data['token'], true);
		$data['orders'] = array();
		$data['heading_title'] = $title;
		$data['token'] = $this->session->data['token'];
		$data['header'] = $this->load->controller('common/header');
		$data['column_left'] = $this->load->controller('common/column_left');
		$data['footer'] = $this->load->controller('common/footer');
		$this->load->model('user/user');
		$data['user_gid'] = $this->model_user_user->getUser($this->user->getId());
		$this->response->setOutput($this->load->view('sale/waybillui', $data));
	}
	public function waybillinput(){
	    if (isset($this->request->post['txt'])) {
			$_txt = $this->request->post['txt'];
		}else{
			$_txt = false;
		}
		$data['token'] = $this->session->data['token'];

		$this->load->language('sale/order');
		$title = 'Waybill Input';
		$this->document->setTitle($title);
		$url = '';
		$data['breadcrumbs'] = array();
		$data['breadcrumbs'][] = array(
			'text' => $this->language->get('text_home'),
			'href' => $this->url->link('common/dashboard', 'token=' . $this->session->data['token'], true)
		);
		$data['breadcrumbs'][] = array(
			'text' => $title,
			'href' => $this->url->link('sale/order/waybillui', 'token=' . $this->session->data['token'] . $url, true)
		);
		$data['orders'] = array();
		if($_txt){
            $this->load->model('sale/wb');
            $data['orders'] = $this->model_sale_wb->txtinput($_txt);
		}
		$data['heading_title'] = $title;
		$data['token'] = $this->session->data['token'];
		$data['header'] = $this->load->controller('common/header');
		$data['column_left'] = $this->load->controller('common/column_left');
		$data['footer'] = $this->load->controller('common/footer');
		$this->load->model('user/user');
		$data['user_gid'] = $this->model_user_user->getUser($this->user->getId());
		$this->response->setOutput($this->load->view('sale/waybillinput', $data));
	}
	public function hktvorderui(){
		$this->load->language('sale/order');
		$title = 'HKTVshops Orders input';
		$this->document->setTitle($title);
		$url = '';
		$data['breadcrumbs'] = array();
		$data['breadcrumbs'][] = array(
			'text' => $this->language->get('text_home'),
			'href' => $this->url->link('common/dashboard', 'token=' . $this->session->data['token'], true)
		);
		$data['breadcrumbs'][] = array(
			'text' => $title,
			'href' => $this->url->link('sale/order/waybillui', 'token=' . $this->session->data['token'] . $url, true)
		);
		$data['postto'] = array();
		$data['postto']['href'] = $this->url->link('sale/order/hktvorderinput', 'token=' . $this->session->data['token'], true);
		$data['orders'] = array();
		$data['heading_title'] = $title;
		$data['token'] = $this->session->data['token'];
		$data['header'] = $this->load->controller('common/header');
		$data['column_left'] = $this->load->controller('common/column_left');
		$data['footer'] = $this->load->controller('common/footer');
		$this->load->model('user/user');
		$data['user_gid'] = $this->model_user_user->getUser($this->user->getId());
		$this->response->setOutput($this->load->view('sale/hktvorderinput', $data));
	}
<=============================================>
>directory:
\system\storage\modification\admin\controller\common\column_left.php
>code in directory:

Code: Select all

$sale[] = array(
				'name'	   => 'Waybill Input',
				'href'     => $this->url->link('sale/order/waybillui', 'token=' . $this->session->data['token'], true),
				'children' => array()		
			);
<=============================================>

>directory:
\admin\controller\common\column_left.php
Code in directory:

Code: Select all

$sale[] = array(
				'name'	   => 'Waybill Input',
				'href'     => $this->url->link('sale/order/waybillui', 'token=' . $this->session->data['token'], true),
				'children' => array()		
			);
<=============================================>
>directory:
\admin\controller\sale\order.php
>Code in directory:

Code: Select all

public function waybillui(){
		$this->load->language('sale/order');
		$title = 'Waybill Input';
		$this->document->setTitle($title);
		$url = '';
		$data['breadcrumbs'] = array();
		$data['breadcrumbs'][] = array(
			'text' => $this->language->get('text_home'),
			'href' => $this->url->link('common/dashboard', 'token=' . $this->session->data['token'], true)
		);
		$data['breadcrumbs'][] = array(
			'text' => $title,
			'href' => $this->url->link('sale/order/waybillui', 'token=' . $this->session->data['token'] . $url, true)
		);
		$data['postto'] = array();
		$data['postto']['href'] = $this->url->link('sale/order/waybillinput', 'token=' . $this->session->data['token'], true);
		$data['orders'] = array();
		$data['heading_title'] = $title;
		$data['token'] = $this->session->data['token'];
		$data['header'] = $this->load->controller('common/header');
		$data['column_left'] = $this->load->controller('common/column_left');
		$data['footer'] = $this->load->controller('common/footer');
		$this->load->model('user/user');
		$data['user_gid'] = $this->model_user_user->getUser($this->user->getId());
		$this->response->setOutput($this->load->view('sale/waybillui', $data));
	}
public function waybillinput(){
	    if (isset($this->request->post['txt'])) {
			$_txt = $this->request->post['txt'];
		}else{
			$_txt = false;
		}
		$data['token'] = $this->session->data['token'];

		$this->load->language('sale/order');
		$title = 'Waybill Input';
		$this->document->setTitle($title);
		$url = '';
		$data['breadcrumbs'] = array();
		$data['breadcrumbs'][] = array(
			'text' => $this->language->get('text_home'),
			'href' => $this->url->link('common/dashboard', 'token=' . $this->session->data['token'], true)
		);
		$data['breadcrumbs'][] = array(
			'text' => $title,
			'href' => $this->url->link('sale/order/waybillui', 'token=' . $this->session->data['token'] . $url, true)
		);
		$data['orders'] = array();
		if($_txt){
            $this->load->model('sale/wb');
            $data['orders'] = $this->model_sale_wb->txtinput($_txt);
		}
		$data['heading_title'] = $title;
		$data['token'] = $this->session->data['token'];
		$data['header'] = $this->load->controller('common/header');
		$data['column_left'] = $this->load->controller('common/column_left');
		$data['footer'] = $this->load->controller('common/footer');
		$this->load->model('user/user');
		$data['user_gid'] = $this->model_user_user->getUser($this->user->getId());
		$this->response->setOutput($this->load->view('sale/waybillinput', $data));
	}
public function hktvorderui(){
		$this->load->language('sale/order');
		$title = 'HKTVshops Orders input';
		$this->document->setTitle($title);
		$url = '';
		$data['breadcrumbs'] = array();
		$data['breadcrumbs'][] = array(
			'text' => $this->language->get('text_home'),
			'href' => $this->url->link('common/dashboard', 'token=' . $this->session->data['token'], true)
		);
		$data['breadcrumbs'][] = array(
			'text' => $title,
			'href' => $this->url->link('sale/order/waybillui', 'token=' . $this->session->data['token'] . $url, true)
		);
		$data['postto'] = array();
		$data['postto']['href'] = $this->url->link('sale/order/hktvorderinput', 'token=' . $this->session->data['token'], true);
		$data['orders'] = array();
		$data['heading_title'] = $title;
		$data['token'] = $this->session->data['token'];
		$data['header'] = $this->load->controller('common/header');
		$data['column_left'] = $this->load->controller('common/column_left');
		$data['footer'] = $this->load->controller('common/footer');
		$this->load->model('user/user');
		$data['user_gid'] = $this->model_user_user->getUser($this->user->getId());
		$this->response->setOutput($this->load->view('sale/hktvorderinput', $data));
	}
public function hktvorderinput(){
	    if (isset($this->request->post['txt'])) {
			$_txt = $this->request->post['txt'];
		}else{
			$_txt = false;
		}
		$data['token'] = $this->session->data['token'];

		$this->load->language('sale/order');
		$title = 'Waybill Input';
		$this->document->setTitle($title);
		$url = '';
		$data['breadcrumbs'] = array();
		$data['breadcrumbs'][] = array(
			'text' => $this->language->get('text_home'),
			'href' => $this->url->link('common/dashboard', 'token=' . $this->session->data['token'], true)
		);
		$data['breadcrumbs'][] = array(
			'text' => $title,
			'href' => $this->url->link('sale/order/waybillui', 'token=' . $this->session->data['token'] . $url, true)
		);
		$data['orders'] = array();
		if($_txt){
            $this->load->model('sale/wb');
            $data['orders'] = $this->model_sale_wb->txtinput($_txt);
		}
		$data['heading_title'] = $title;
		$data['token'] = $this->session->data['token'];
		$data['header'] = $this->load->controller('common/header');
		$data['column_left'] = $this->load->controller('common/column_left');
		$data['footer'] = $this->load->controller('common/footer');
		$this->load->model('user/user');
		$data['user_gid'] = $this->model_user_user->getUser($this->user->getId());
		$this->response->setOutput($this->load->view('sale/waybillinput', $data));
	}
<=============================================>

Did anyone can give me some suggestion?
thank you so much
Last edited by dbsamkung on Sun May 19, 2024 1:39 pm, edited 1 time in total.

Newbie

Posts

Joined
Fri May 17, 2024 9:51 am

Post by straightlight » Fri May 17, 2024 7:39 pm

Along with the OC version, contact the extension developer to resolve this issue.

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by dbsamkung » Sun May 19, 2024 1:35 pm

JNeuhoff wrote:
Fri May 17, 2024 5:24 pm
What is your exact OC version?
opencart 2.3.0.1

Newbie

Posts

Joined
Fri May 17, 2024 9:51 am

Post by dbsamkung » Sun May 19, 2024 1:37 pm

straightlight wrote:
Fri May 17, 2024 7:39 pm
Along with the OC version, contact the extension developer to resolve this issue.
they charge me for installation free $300USD, extension sale price only 199usd..
and they said the reason of error is our problem(conflict with waybillui which we hard code to core file)

Newbie

Posts

Joined
Fri May 17, 2024 9:51 am

Post by straightlight » Sun May 19, 2024 7:31 pm

dbsamkung wrote:
Sun May 19, 2024 1:37 pm
straightlight wrote:
Fri May 17, 2024 7:39 pm
Along with the OC version, contact the extension developer to resolve this issue.
they charge me for installation free $300USD, extension sale price only 199usd..
and they said the reason of error is our problem(conflict with waybillui which we hard code to core file)
Then, the issue has been found. Which is why we must not hardcode in the core as opposed to create extensions.

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by dbsamkung » Tue May 21, 2024 10:35 am

upon futher investiage with extension support, they told me about the error:
Notice: Undefined property: Proxy::getTotalOrders in /public_html/dummy/system/storage/modification/system/engine/action.php on line 51

the issue and found that the "getTotalOrders" method is a core OpenCart method located in the sale.php file.
/admin/model/report/sale.php

However, this method is missing from the sale.php file. <<<< i dont understand

Upon further investigation, we noticed that the class names and methods in sale.php are similar to those in wb.php.
admin/model/sale/wb.php

that the code from the wb.php file is used in the waybilli method, which exists in the modification file.

i am trying to use try catch function to get error message:
/admin/model/report/sale.php

public function getTotalOrders($data = array()) {

try {
if (!empty($data['filter_group'])) {
$group = $data['filter_group'];
} else {
$group = 'week';
}

switch($group) {
case 'day';
$sql = "SELECT COUNT(DISTINCT YEAR(date_added), MONTH(date_added), DAY(date_added)) AS total FROM `" . DB_PREFIX . "order`";
break;
default:
case 'week':
$sql = "SELECT COUNT(DISTINCT YEAR(date_added), WEEK(date_added)) AS total FROM `" . DB_PREFIX . "order`";
break;
case 'month':
$sql = "SELECT COUNT(DISTINCT YEAR(date_added), MONTH(date_added)) AS total FROM `" . DB_PREFIX . "order`";
break;
case 'year':
$sql = "SELECT COUNT(DISTINCT YEAR(date_added)) AS total FROM `" . DB_PREFIX . "order`";
break;
}

if (!empty($data['filter_order_status_id'])) {
$sql .= " WHERE order_status_id = '" . (int)$data['filter_order_status_id'] . "'";
} else {
$sql .= " WHERE order_status_id > '0'";
}

if (!empty($data['filter_date_start'])) {
$sql .= " AND DATE(date_added) >= '" . $this->db->escape($data['filter_date_start']) . "'";
}

if (!empty($data['filter_date_end'])) {
$sql .= " AND DATE(date_added) <= '" . $this->db->escape($data['filter_date_end']) . "'";
}

$query = $this->db->query($sql);

return $query->row['total'];

}
catch (Exception $e) {
echo $e->getMessage();
}

}

is it correct way to use try catch function for debug? i cant get any message and the system still cause with same error, everything i have to recover the backup to fix the ieuss.

Newbie

Posts

Joined
Fri May 17, 2024 9:51 am

Post by ADD Creative » Tue May 21, 2024 4:49 pm

If getTotalOrders is missing from admin/model/report/sale.php then it looks like your files have been modified. You may want to compare your files against a clean download of OpenCart.

You don't need to use try catch to see the exceptions. Just look in the correct error logs and make sure log errors is on. You need to look in both the OpenCart and PHP error logs.

www.add-creative.co.uk


Guru Member

Posts

Joined
Sat Jan 14, 2012 1:02 am
Location - United Kingdom

Post by straightlight » Wed May 22, 2024 3:36 am

There should also be no reason to use a try / catch in a model.

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by dbsamkung » Wed May 22, 2024 9:26 am

Hi, i get some error msg from error log on opencart and server side. Would it helpful? it seem related on vqmod?

Server Error:
[Wed May 22 04:57:45.124433 2024] [access_compat:error] [pid 3570675:tid 23134614796032] [client 207.46.13.230:40007] AH01797: client denied by server configuration: /home//public_html/dummy/index.php
index.php

Code: Select all

<?php

// Version
define('VERSION', '2.3.0.2');

// Configuration
if (is_file('config.php')) {
	require_once('config.php');
}

// Install
if (!defined('DIR_APPLICATION')) {
	header('Location: install/index.php');
	exit;
}

// VirtualQMOD
require_once('./vqmod/vqmod.php');
VQMod::bootup();

// VQMODDED Startup
require_once(VQMod::modCheck(DIR_SYSTEM . 'startup.php'));

start('catalog');

Error from opencart > public_html > error_log (it happened on every 1.5 hour):
[22-May-2024 04:57:47 Asia/Hong_Kong] PHP Warning: "continue 2" targeting switch is equivalent to "break 2". Did you mean to use "continue 3"? in /home//public_html/dummy/vqmod/vqmod.php on line 684
vqmod.php(part of error)

Code: Select all

public function applyMod($mods, &$data) {
		if($this->_skip) return;
		$tmp = $data;

		foreach($mods as $mod) {
			VQMod::$fileModding = $mod['fileToMod'] . '(' . $mod['opIndex'] . ')';
			if(!empty($mod['ignoreif'])) {
				if($mod['ignoreif']->regex == 'true') {
					if (preg_match($mod['ignoreif']->getContent(), $tmp)) {
						continue;
					}
				} else {
					if (strpos($tmp, $mod['ignoreif']->getContent()) !== false) {
						continue;
					}
				}
			}

			$indexCount = 0;

			$tmp = $this->_explodeData($tmp);
			$lineMax = count($tmp) - 1;

			// <add> tag attributes - Override <search> attributes if set
			foreach(array_keys((array)$mod['search']) as $key) {
				if ($key == "\x0VQNode\x0_content") { continue; }
				if ($key == "trim") { continue; }
				if (isset($mod['add']->$key) && $mod['add']->$key) {
					$mod['search']->$key = $mod['add']->$key;
				}
			}

			switch($mod['search']->position) {
				case 'top':
				$tmp[$mod['search']->offset] =  $mod['add']->getContent() . $tmp[$mod['search']->offset];
				break;

				case 'bottom':
				$offset = $lineMax - $mod['search']->offset;
				if($offset < 0){
					$tmp[-1] = $mod['add']->getContent();
				} else {
					$tmp[$offset] .= $mod['add']->getContent();
				}
				break;

				default:

				$changed = false;
				foreach($tmp as $lineNum => $line) {
					if(strlen($mod['search']->getContent()) == 0) {
						if($mod['error'] == 'log' || $mod['error'] == 'abort') {
							VQMod::$log->write('VQModObject::applyMod - EMPTY SEARCH CONTENT ERROR', $this);
						}
						break;
					}

					if($mod['search']->regex == 'true') {
						$pos = @preg_match($mod['search']->getContent(), $line);
						if($pos === false) {
							if($mod['error'] == 'log' || $mod['error'] == 'abort' ) {
								VQMod::$log->write('VQModObject::applyMod - INVALID REGEX ERROR - ' . $mod['search']->getContent(), $this);
							}
							continue 2;
						} elseif($pos == 0) {
							$pos = false;
						}
					} else {
						$pos = strpos($line, $mod['search']->getContent());
					}

					if($pos !== false) {
						$indexCount++;
						$changed = true;

						if(!$mod['search']->indexes() || ($mod['search']->indexes() && in_array($indexCount, $mod['search']->indexes()))) {

							switch($mod['search']->position) {
								case 'before':
								$offset = ($lineNum - $mod['search']->offset < 0) ? -1 : $lineNum - $mod['search']->offset;
								$tmp[$offset] = empty($tmp[$offset]) ? $mod['add']->getContent() : $mod['add']->getContent() . "\n" . $tmp[$offset];
								break;

								case 'after':
								$offset = ($lineNum + $mod['search']->offset > $lineMax) ? $lineMax : $lineNum + $mod['search']->offset;
								$tmp[$offset] = $tmp[$offset] . "\n" . $mod['add']->getContent();
								break;

								case 'ibefore':
								$tmp[$lineNum] = str_replace($mod['search']->getContent(), $mod['add']->getContent() . $mod['search']->getContent(), $line);
								break;

								case 'iafter':
								$tmp[$lineNum] = str_replace($mod['search']->getContent(), $mod['search']->getContent() . $mod['add']->getContent(), $line);
								break;

								default:
								if(!empty($mod['search']->offset)) {
									if($mod['search']->offset > 0) {
										for($i = 1; $i <= $mod['search']->offset; $i++) {
											if(isset($tmp[$lineNum + $i])) {
												$tmp[$lineNum + $i] = '';
											}
										}
									} elseif($mod['search']->offset < 0) {
										for($i = -1; $i >= $mod['search']->offset; $i--) {
											if(isset($tmp[$lineNum + $i])) {
												$tmp[$lineNum + $i] = '';
											}
										}
									}
								}

								if($mod['search']->regex == 'true') {
									$tmp[$lineNum] = preg_replace($mod['search']->getContent(), $mod['add']->getContent(), $line);
								} else {
									$tmp[$lineNum] = str_replace($mod['search']->getContent(), $mod['add']->getContent(), $line);
								}
								break;
							}
						}
					}
				}

				if(!$changed) {
					$skip = ($mod['error'] == 'skip' || $mod['error'] == 'log') ? ' (SKIPPED)' : ' (ABORTING MOD)';

					if($mod['error'] == 'log' || $mod['error'] == 'abort') {
						VQMod::$log->write('VQModObject::applyMod - SEARCH NOT FOUND' . $skip . ': ' . $mod['search']->getContent(), $this);
					}

					if($mod['error'] == 'abort') {
						$this->_skip = true;
						return;
					}

				}

				break;
			}
			ksort($tmp);
			$tmp = $this->_implodeData($tmp);
		}

		VQMod::$fileModding = false;

		$data = $tmp;
	}

Newbie

Posts

Joined
Fri May 17, 2024 9:51 am

Post by dbsamkung » Wed May 22, 2024 10:13 am

ADD Creative wrote:
Tue May 21, 2024 4:49 pm
If getTotalOrders is missing from admin/model/report/sale.php then it looks like your files have been modified. You may want to compare your files against a clean download of OpenCart.

You don't need to use try catch to see the exceptions. Just look in the correct error logs and make sure log errors is on. You need to look in both the OpenCart and PHP error logs.
i compared with org sale.php, and mainly different is:

Code: Select all

//***modified #implode's array on every  getTotalOrders* function such as  */

getTotalOrdersBYday()
	public function getTotalOrdersByYear() {
	    /*
		$implode = array();
		foreach ($this->config->get('config_complete_status') as $order_status_id) {
			$implode[] = "'" . (int)$order_status_id . "'";
		}*/

		$implode = array(1,2,3,5,9,11,12,14,15,17,18,19,20,25,26,27,31,32);

Code: Select all

//*new added function on the bottom*//
	public function getostatename(){

	    $sql = "SELECT `order_status_id`,`name` FROM `oc_order_status` WHERE `language_id` = 3 ORDER BY `order_status_id` ASC";

	    $query = $this->db->query($sql);

	    return $query->rows;

	}

	

	public function getorderitems($date1, $date2){

	    $sql = "SELECT 

            o.`order_id`,

            p.`product_id`,

            p.`name`,

            p.`model`,

            m.`name` as `brand`,

            p.`quantity`,

            p.`price`,

            p.`total`,

            o.`date_added`,

            o.`order_status_id`

            FROM 

            	`oc_order_product` p

            left join

            	`oc_order` o

            on

            	o.`order_id` = p.`order_id`

            left JOIN

            	`oc_product` pd

            ON

            	pd.`product_id` = p.`product_id`

            left join

            	`oc_manufacturer` m

            ON

            	m.`manufacturer_id` = pd.`manufacturer_id`

            WHERE 

            (

            	o.`order_status_id` != 0 AND

            	o.`order_status_id` != 7 AND

            	o.`order_status_id` != 8 AND

            	o.`order_status_id` != 10 AND

            	o.`order_status_id` != 12 AND

            	o.`order_status_id` != 16 AND

            	o.`order_status_id` != 21 AND

            	o.`order_status_id` != 22 AND

            	o.`order_status_id` != 24 AND

            	o.`order_status_id` != 29

            ) AND

            (

            	o.`date_added` >= '".$date1." 00:00:00' AND

            	o.`date_added` <= '".$date2." 23:59:59' 

            );";

	    $query = $this->db->query($sql);

	    return $query->rows;

	}

	

	public function getordertotals($date1, $date2){

	    $sql = "select

                    t.order_id,

                    t.code,

                    t.title,

                    t.value,

                    o.order_status_id,

                    o.date_added

                    from

                    `oc_order_total` t

                    left join

                    `oc_order` o

                    on

                    o.order_id = t.order_id

                where

                	o.`date_added` >= '".$date1." 00:00:00' AND

                	o.`date_added` <= '".$date2." 23:59:59' 

                AND

                    t.code not like '%sub_total%' AND

                (

                	o.`order_status_id` != 0 AND

                	o.`order_status_id` != 7 AND

                	o.`order_status_id` != 8 AND

                	o.`order_status_id` != 10 AND

                	o.`order_status_id` != 12 AND

                	o.`order_status_id` != 16 AND

                	o.`order_status_id` != 21 AND

                	o.`order_status_id` != 22 AND

                	o.`order_status_id` != 24 AND

                	o.`order_status_id` != 29

                );";

	    $query = $this->db->query($sql);

	    return $query->rows;

	}
thanks for you advice, i restored the orginial sales.php but still not working with same error. Did you know :$implode = array()" is stand for? Do you have any suggestion? i am trying to fix it. thanks!

Newbie

Posts

Joined
Fri May 17, 2024 9:51 am

Post by ADD Creative » Wed May 22, 2024 6:58 pm

Was getTotalOrders is missing from your admin/model/report/sale.php? Are you sure it's not admin/model/sale/order.php that is the problem?

If you do restore the original sales.php or order.php you would need to clear in from the storage/modification as well. You may also have to clear you vQmod cache.

www.add-creative.co.uk


Guru Member

Posts

Joined
Sat Jan 14, 2012 1:02 am
Location - United Kingdom

Post by Cue4cheap » Wed May 22, 2024 10:55 pm

dbsamkung wrote:
Wed May 22, 2024 9:26 am

Error from opencart > public_html > error_log (it happened on every 1.5 hour):
[22-May-2024 04:57:47 Asia/Hong_Kong] PHP Warning: "continue 2" targeting switch is equivalent to "break 2". Did you mean to use "continue 3"? in /home//public_html/dummy/vqmod/vqmod.php on line 684
vqmod.php(part of error)
I don't know if it is anything to do with the overall issue but that is fixed by an updated vqmod. Do a search on that error to see that error:
https://www.google.com/search?q=PHP+War ... break+2%22.

Mike

cue4cheap not cheap quality


Expert Member

Posts

Joined
Fri Sep 20, 2013 4:45 am
Who is online

Users browsing this forum: No registered users and 5 guests