Post by r4nd0m » Mon Apr 07, 2014 4:21 am

I did an upgrade from 1.5.5.1 to 1.5.6 but now I get errors in the log of, I know it seems theme related however I wound think the variable is actually correct? Can anyone spot what may be wrong here or even better how to resolve it?

014-04-06 13:13:37 - PHP Notice: Undefined index: description in /home/dom.co.uk/catalog/view/theme/otp790_orange/template/module/latest.tpl on line 12
2014-04-06 13:13:37 - PHP Notice: Undefined index: description in /home/dom.co.uk/catalog/view/theme/otp790_orange/template/module/latest.tpl on line 49
2014-04-06 13:13:37 - PHP Notice: Undefined index: description in /home/dom.co.uk/catalog/view/theme/otp790_orange/template/module/featured.tpl on line 12
2014-04-06 13:13:37 - PHP Notice: Undefined index: description in /home/dom.co.uk/catalog/view/theme/otp790_orange/template/module/featured.tpl on line 49

latest.tpl
line 12 <?php echo "<p>".mb_substr(strip_tags(html_entity_decode($product['description'])), 0, 90)."...</p>"; ?>
line 49 <?php echo "<p>".mb_substr(strip_tags(html_entity_decode($product['description'])), 0, 90)."...</p>"; ?>

features.tpl
line 12 <?php echo "<p>".mb_substr(strip_tags(html_entity_decode($product['description'])), 0, 90)."...</p>"; ?>
line 49 <?php echo "<p>".mb_substr(strip_tags(html_entity_decode($product['description'])), 0, 90)."...</p>"; ?>

cheers
r4nd0m

New member

Posts

Joined
Wed Oct 16, 2013 11:35 pm

Post by straightlight » Mon Apr 07, 2014 4:35 am

I have already reported this issue in the bug reports of the forum. The issue is the way the description with one or many database tables are not quoted during queries.

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 r4nd0m » Mon Apr 07, 2014 4:38 am

straightlight wrote:I have already reported this issue in the bug reports of the forum. The issue is the way the description with one or many database tables are not quoted during queries.
cheers for clarifying this - any eta for a fix - or could I fix it temporarily myself assuming this applies to all 1.5.6* versions?

New member

Posts

Joined
Wed Oct 16, 2013 11:35 pm

Post by straightlight » Mon Apr 07, 2014 6:22 am

A temporary fix will be posted shortly.

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 r4nd0m » Sat Apr 12, 2014 8:14 am

upgraded to 1.5.6.2 error no longer exists ... but description isn't shown as previously ...

the call for the description is:

<?php echo "<p>".mb_substr(strip_tags(html_entity_decode($product['description'])), 0, 90)."...</p>"; ?>

but only "..." is shown ... but it worked on a previous version just fine ...

New member

Posts

Joined
Wed Oct 16, 2013 11:35 pm

Post by xmediasoftware » Sat Feb 28, 2015 4:39 pm

I have the same problem, and I found the solution, is easy. find /catalog/controller/module/featured.php and add

description' => $product_info['description'],

in the data['products'][] array as I show you below

$this->data['products'][] = array(
'product_id' => $product_info['product_id'],
'thumb' => $image,
'name' => $product_info['name'],
'description' => $product_info['description'],
'price' => $price,
'special' => $special,
'rating' => $rating,
'reviews' => sprintf($this->language->get('text_reviews'), (int)$product_info['reviews']),
'href' => $this->url->link('product/product', 'product_id=' . $product_info['product_id'])
);

in my case this works in the 50% because now I see that php tag_strips it is not working in featured.tpl

<?php echo utf8_substr( strip_tags(strip_tags($product['description'])),0,85);?>

the result is next:

<p>This sleeveless top will help you stay cool and classy on those hotter days ...

I'will fix this problem as fast as I can


Posts

Joined
Sat Feb 28, 2015 4:29 pm

Post by xmediasoftware » Sat Feb 28, 2015 4:53 pm

I have the same problem, and I found the solution, is easy. find /catalog/controller/module/featured.php and add

description' => $product_info['description'],

in the data['products'][] array as I show you below

$this->data['products'][] = array(
'product_id' => $product_info['product_id'],
'thumb' => $image,
'name' => $product_info['name'],
'description' => $product_info['description'],
'price' => $price,
'special' => $special,
'rating' => $rating,
'reviews' => sprintf($this->language->get('text_reviews'), (int)$product_info['reviews']),
'href' => $this->url->link('product/product', 'product_id=' . $product_info['product_id'])
);

in my case this works in the 50% because now I see that php tag_strips it is not working in featured.tpl

<?php echo utf8_substr( strip_tags(strip_tags($product['description'])),0,85);?>

the result is next:

<p>This sleeveless top will help you stay cool and classy on those hotter days ...

Finally I change featured.tpl in your theme in the description location

<p><?php echo mb_substr( strip_tags(html_entity_decode($product['description'])),0,85);?>...</p>


Posts

Joined
Sat Feb 28, 2015 4:29 pm
Who is online

Users browsing this forum: No registered users and 112 guests