Jump to content
покупайте без комиссии
Search In
  • More options...
Find results that contain...
Find results in...
  • Sign Up

Ошибка в шапке на странице товара


Recommended Posts

Добрый день!

Opencart 2.3.0.2

Шаблон Corsica

 

На странице товара получаю ошибку:

Notice: Undefined offset: 5 in /мойсайт/system/storage/modification/catalog/controller/product/product.php on line 466Warning: Invalid argument supplied for foreach() in /мойсайт/system/storage/modification/catalog/controller/product/product.php on line 466Notice: Undefined offset: 6 in /мойсайт/system/storage/modification/catalog/controller/product/product.php on line 466Warning: Invalid argument supplied for foreach() in /мойсайт/system/storage/modification/catalog/controller/product/product.php on line 466Notice: Undefined offset: 7 in /мойсайт/system/storage/modification/catalog/controller/product/product.php on line 466Warning: Invalid argument supplied for foreach() in /мойсайт/system/storage/modification/catalog/controller/product/product.php on line 466Notice: Undefined offset: 8 in /мойсайт/system/storage/modification/catalog/controller/product/product.php on line 466Warning: Invalid argument supplied for foreach() in /мойсайт/system/storage/modification/catalog/controller/product/product.php on line 466Notice: Undefined offset: 9 in /мойсайт/system/storage/modification/catalog/controller/product/product.php on line 466Warning: Invalid argument supplied for foreach() in /мойсайт/system/storage/modification/catalog/controller/product/product.php on line 466Notice: Undefined offset: 10 in /мойсайт/system/storage/modification/catalog/controller/product/product.php on line 466Warning: Invalid argument supplied for foreach() in /мойсайт/system/storage/modification/catalog/controller/product/product.php on line 466Notice: Undefined offset: 11 in /мойсайт/system/storage/modification/catalog/controller/product/product.php on line 466Warning: Invalid argument supplied for foreach() in /мойсайт/system/storage/modification/catalog/controller/product/product.php on line 466Notice: Undefined offset: 4 in /мойсайт/system/storage/modification/catalog/controller/product/product.php on line 466Warning: Invalid argument supplied for foreach() in /мойсайт/system/storage/modification/catalog/controller/product/product.php on line 466Notice: Undefined offset: 3 in /мойсайт/system/storage/modification/catalog/controller/product/product.php on line 466Warning: Invalid argument supplied for foreach() in /мойсайт/system/storage/modification/catalog/controller/product/product.php on line 466Notice: Undefined offset: 1 in /мойсайт/system/storage/modification/catalog/controller/product/product.php on line 466Warning: Invalid argument supplied for foreach() in /мойсайт/system/storage/modification/catalog/controller/product/product.php on line 466Notice: Undefined offset: 2 in /мойсайт/system/storage/modification/catalog/controller/product/product.php on line 466Warning: Invalid argument supplied for foreach() in /мойсайт/system/storage/modification/catalog/controller/product/product.php on line 466

 

При добавлении в корзину во всплывающем окне получаю ошибку:

SyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data

OK

<b>Notice</b>: Undefined index: unit_id in <b>/мойсайт/system/storage/modification/catalog/controller/checkout/cart.php</b> on line <b>363</b><br />
<b>Fatal error</b>:  Uncaught exception 'Exception' with message '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 '' at line 1&lt;br /&gt;Error No: 1064&lt;br /&gt;INSERT oc_cart SET api_id = '0', customer_id = '0', session_id = 'cbb25160793841e92ae50bc302367c35', product_id = '40', recurring_id = '0', `option` = '[]', quantity = '1', date_added = NOW(), unit_id = ' in /мойсайт/system/library/db/mysqli.php:40
Stack trace:
#0 /мойсайт/system/library/db.php(16): DB\MySQLi-&gt;query('INSERT oc_cart ...', Array)
#1 /мойсайт/system/storage/modification/system/library/cart/cart.php(277): DB-&gt;query('INSERT oc_cart ...')
#2 /мойсайт/system/storage/modification/catalog/controller/checkout/cart.php(363): Cart\Cart-&gt;add('40', 1, Array, 0, NULL)
#3 [internal function]: ControllerCheckou in <b>/мойсайт/system/library/db/mysqli.php</b> on line <b>40</b><br />

Пожалуйста, помогите решить проблему!!!!

Edited by reticulus
Link to post
Share on other sites

Посмотрел код файла product.php, перед 466 строкой такой код:

			$data['tags'] = array();

			if ($product_info['tag']) {
				$tags = explode(',', $product_info['tag']);

				foreach ($tags as $tag) {
					$data['tags'][] = array(
						'tag'  => trim($tag),
						'href' => $this->url->link('product/search', 'tag=' . trim($tag))
					);
				}
			}

 

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    No registered users viewing this page.


×
×
  • Create New...

Important Information

On our site, cookies are used and personal data is processed to improve the user interface. To find out what and what personal data we are processing, please go to the link. If you click "I agree," it means that you understand and accept all the conditions specified in this Privacy Notice.