Product Title Truncation

In the Category page, in Grid view some of my product title get truncated.

eg, Instead of showing "Best blue bubble widget on this site" it would show "Best blue bubble widget on…"

I just made that example to explain.

What file is the code in that is cutting off (truncating) the product title in the category pages, with the ‘dot dot dot’ (…) ?

2 answers

Profile photo of Seoki Lee 1510.00 $tone May 20, 2014

In this file \app\design\frontend\default\jm_megamalltemplate\ catalog\product\list.phtml

At line 172, you can see this code:


<h5 class="product-name">
	<a title="<?php echo $this->htmlEscape($_product->getName()) ?>" href="<?php echo $_product->getProductUrl() ?>">
		if (strlen($_product->getName()) > 35) :
			echo strip_tags(substr($_product->getName(), 0, 25)).'...';
		else : 
			echo $_product->getName();

This question is now closed

Written By