Skip to main content

Increase the number of characters for the product title shown in the category view

There is a default of 30 characters set for the product title in the category view.

To increase this copy the file 'product.tpl' at themes/yourtheme/templates/catalog/_partials/miniatures to your child theme.

Around line 69 edit the 'truncate' function to say '60' - any more than that and you need to do some more serious adjustments to the theme view.

      <div class="product-description">
        {block name='product_name'}
          {if $page.page_name == 'index'}
            <h3 class="h3 product-title"><a href="/{$product.url}" content="{$product.url}">{$product.name|truncate:60:'...'}</a></h3>
          {else}
            <h2 class="h3 product-title"><a href="/{$product.url}" content="{$product.url}">{$product.name|truncate:60:'...'}</a></h2>
          {/if}
        {/block}

 

  • Hits: 5