Increase Magento product title length

Web Development Hits: 88

To increase Magento 1.x product title character limit

Navigate to: \app\design\frontend\default\theme692\template\catalog\product

Open list.phtml

Find the line code segment: ~line 235

 

  <?php $small_getName = strip_tags($this->htmlEscape($_product->getName()));

    if (strlen($small_getName) < 100) echo($small_getName);

    else { echo mb_substr($small_getName, 0, 100,'UTF-8').'...';} ?>

 

Change the number 100 to 500 (or whatever number of character you want the title to increase to.

 

Depending on the theme you may need to change the below line

 

<?php echo $_helper->productAttribute($_product, $_product->getName() , 'name'); ?>

to

<?php echo substr($_helper->productAttribute($_product, $_product->getName() , 'name'),0,500) ; ?>

 

Click here for more info.

Print

Related Articles