Post by Renecek » Fri Oct 07, 2016 11:40 pm

Hi,
I wanted to change length of description in category page so I edited /catalog/product/category.php

FROM

Code: Select all

'description' => utf8_substr(strip_tags(html_entity_decode($result['description'], ENT_QUOTES, 'UTF-8')), 0, $this->config->get($this->config->get('config_theme') . '_product_description_length')) . '..',
TO

Code: Select all

'description' => utf8_substr(strip_tags(html_entity_decode($result['description'], ENT_QUOTES, 'UTF-8')), 0, 5000),
But I still have 3 dots after description.. Any idea please? BTW in admin section I have nothing about description length.. OC 2.2.0
Thank you

Attachments

Snímka obrazovky 2016-10-07 o 17.38.19.png

Snímka obrazovky 2016-10-07 o 17.38.19.png (454.42 KiB) Viewed 1145 times


New member

Posts

Joined
Thu Dec 10, 2015 7:12 pm

Post by cyclops12 » Sat Oct 08, 2016 12:31 am

In admin of your shop goto extensions/themes and edit your theme.
There you will find List Description Limit...

Attachments

product-description-length.JPG

product-description-length.JPG (76.72 KiB) Viewed 1137 times


Expert Member

Posts

Joined
Sun Sep 27, 2015 1:10 am

Post by Renecek » Sat Oct 08, 2016 12:36 am

Ah thank you, category.php changed back to original and edited length in admin but now I have 5 dots there..

http://vino.royalweb.sk/sortiment-vin


in /catalog/controller/product/category.php have now:
$data['products'][] = array(
'product_id' => $result['product_id'],
'thumb' => $image,
'name' => $result['name'],
'description' => utf8_substr(strip_tags(html_entity_decode($result['description'], ENT_QUOTES, 'UTF-8')), 0, $this->config->get($this->config->get('config_theme') . '_product_description_length')) . '..',
'price' => $price,
'special' => $special,
'tax' => $tax,
'minimum' => $result['minimum'] > 0 ? $result['minimum'] : 1,
'rating' => $result['rating'],
'href' => $this->url->link('product/product', 'path=' . $this->request->get['path'] . '&product_id=' . $result['product_id'] . $url)
);
}

New member

Posts

Joined
Thu Dec 10, 2015 7:12 pm

Post by IP_CAM » Sat Oct 08, 2016 12:57 am

Just leave the two Quotations, but with nothing in between, if you don't like the DOT's at the end.
---

Code: Select all

'description' => utf8_substr(strip_tags(html_entity_decode($result['description'], ENT_QUOTES, 'UTF-8')), 0, $this->config->get($this->config->get('config_theme') . '_product_description_length')) . '..',
---

Code: Select all

'description' => utf8_substr(strip_tags(html_entity_decode($result['description'], ENT_QUOTES, 'UTF-8')), 0,  50) . '',
---
Ernie
---

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.


User avatar
Legendary Member

Posts

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

Post by Renecek » Sat Oct 08, 2016 1:14 am

I replaced it with
'description' => utf8_substr(strip_tags(html_entity_decode($result['description'], ENT_QUOTES, 'UTF-8')), 0) . '',
Description is full, it's fine but now there are 3 dots :)

New member

Posts

Joined
Thu Dec 10, 2015 7:12 pm

Post by IP_CAM » Sat Oct 08, 2016 1:23 am

then, you're possibly doing this in the wrong Line ! Or you forgot, that you use some Mod, trying to achieve the same...
Ernie

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.


User avatar
Legendary Member

Posts

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

Users browsing this forum: No registered users and 340 guests