I am getting 2 errors from the same page PHP Notice: Undefined index: route in .../vqmod/vqcache/vq2-catalog_controller_common_header.php on line 19
and
PHP Notice: Undefined index: route in .../vqmod/vqcache/vq2-catalog_controller_common_header.php on line 23
These are referencing this code:
// start body_class code
$current_path = $this->request->get;
19> if (empty($current_path) || $current_path['route'] == 'common/home') {
$body_class = 'home';
}
else {
23> $body_class = explode('/', str_replace('product/', '', $current_path['route']));
unset($current_path['route']);
if (isset($current_path['_route_'])) {
$body_class = array_merge($body_class, explode('/', str_replace('-', '_', $current_path['_route_'])));
unset($current_path['_route_']);
}
foreach ($current_path as $key => $value) {
$body_class[] = $key . "_" . $value;
}
$body_class = 'page_' . implode(" page_", array_unique($body_class));
}
$body_class .= ' lang_' . $this->language->get('code');
$this->data['body_class'] = $body_class;
// end body_class code
to be sure it wasn't what I seen on another post I have checked my /template/common/header.tpl for this code:
<body class="<?php echo $body_class; ?>">
can someone please help. I just want to clear my error log
TIA
Well, then just remove the VqMod, containing this line, since it is not part of the
default catalog/controller/common/header.php file in OC v.1.5.6.4:
Ernie
default catalog/controller/common/header.php file in OC v.1.5.6.4:
Code: Select all
if (empty($current_path) || $current_path['route'] == 'common/home') {
My Github OC Site: https://github.com/IP-CAM
5'200 + FREE OC Extensions, on the World's largest private Github OC Repository Archive Site.
Replace:
with:
Then, replace:
with:
Code: Select all
if (empty($current_path) || $current_path['route'] == 'common/home') {
Code: Select all
if ((empty($current_path)) || (!empty($current_path['route']) && $current_path['route'] == 'common/home')) {
Code: Select all
$body_class = explode('/', str_replace('product/', '', $current_path['route']));
unset($current_path['route']);
Code: Select all
if (!empty($current_path['route'])) {
$body_class = explode('/', str_replace('product/', '', $current_path['route']));
unset($current_path['route']);
}
Dedication and passion goes to those who are able to push and merge a project.
Regards,
Straightlight
Programmer / Opencart Tester
Who is online
Users browsing this forum: No registered users and 75 guests