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 637 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 629 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
---

Attachments

limit_characters_in_category_description.jpg

limit_characters_in_category_description.jpg (83.71 KiB) Viewed 619 times


I don't use the Forum Mailer, to reach me, contact: jti@jacob.ch
-
Demoversions:
OpenCart LIGHT v.1.5.6.5 http://www.bigmax.ch/
OpenCart V-PRO v.1.5.6.5 http://www.ebikes.li/shop/
-
1'700+ FREE OC Extensions - from OC v.1.5.x up,
on the world's largest OC-related Github Site: https://github.com/IP-CAM
-
Image


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

I don't use the Forum Mailer, to reach me, contact: jti@jacob.ch
-
Demoversions:
OpenCart LIGHT v.1.5.6.5 http://www.bigmax.ch/
OpenCart V-PRO v.1.5.6.5 http://www.ebikes.li/shop/
-
1'700+ FREE OC Extensions - from OC v.1.5.x up,
on the world's largest OC-related Github Site: https://github.com/IP-CAM
-
Image


User avatar
Legendary Member

Posts

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

Users browsing this forum: Maxidays and 14 guests