How to get rid of '…' in Product description ?

ThemeBurn SupportForumsOpenCart ThemesPavilion OpenCart ThemeHow to get rid of '…' in Product description ?

This topic has been marked as not resolved.

Hello,

My product description is not text but an image. I see a ‘…’ in each product in product listing / Featured Products.

I think this is because there is an assumption that product description is text,

$product['description'] = utf8_substr(strip_tags($product['description']), 0, $settings['description_limit']) . ‘…’;
./tb_themes/pavilion/catalog/plugin/ProductPlugin.php

Even setting description limit to 0 does not help as its just an empty string. The ‘…’ is still there. How could I get rid of it ?

Thanks,
waif

 waif
May 28, 2015 at 2:36 am #41158

Can you please try to replace the following fragment:

            if (isset($product['description'])) {
                $product['description'] = tb_trim($product['description'], '.');
                if ($product['description']) {
                    $product['description'] = html_entity_decode($product['description'], ENT_QUOTES, 'UTF-8');
                    $product['description'] = utf8_substr(strip_tags($product['description']), 0, $settings['description_limit']) . '...';
                }
            }

with this one:

            if (!empty($product['description']) && $settings['description_limit'] > 0) {
                $product['description'] = tb_trim($product['description'], '.');
                $product['description'] = strip_tags(html_entity_decode($product['description'], ENT_QUOTES, 'UTF-8'));
                if ($product['description']) {
                    $product['description'] = utf8_substr(strip_tags($product['description']), 0, $settings['description_limit']) . '...';
                }
            }

Does this help you ?

June 8, 2015 at 10:39 am #41345
Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.