Jump to content

Product Name shortend


Rajastones

Recommended Posts

Hello.

 

{$product.name|truncate:30:'...'|escape:'htmlall':'UTF-8'}

 

This line means that the products name will be truncated after 30 characters(or maybe less,i forgot).

 

Also "..." will be concatenated to it.

 

Find your tpl file and find the line that displays the products name and remove the truncate part.

 

Hope this helps.

 

Edit : the .tpl file is product-list.tpl.

  • Like 1
Link to comment
Share on other sites

Hello,

 

Thanks for the advice.

 

I have looked at this:

 

{$product.name|truncate:30:'...'|escape:'htmlall':'UTF-8'}

 

But I could not find it. All I could find was:

 

<p class="product_desc">

<a href="<?php echo ((is_array($_tmp=$this->_tpl_vars['accessoryLink'])) ? $this->_run_mod_handler('escape', true, $_tmp, 'htmlall', 'UTF-8') : smarty_modifier_escape($_tmp, 'htmlall', 'UTF-8')); ?>

" title="<?php echo ((is_array($_tmp=$this->_tpl_vars['accessory']['legend'])) ? $this->_run_mod_handler('escape', true, $_tmp, 'htmlall', 'UTF-8') : smarty_modifier_escape($_tmp, 'htmlall', 'UTF-8')); ?>

" class="product_image"><img src="<?php echo $this->_tpl_vars['link']->getImageLink($this->_tpl_vars['accessory']['link_rewrite'],$this->_tpl_vars['accessory']['id_image'],'medium'); ?>

" alt="<?php echo ((is_array($_tmp=$this->_tpl_vars['accessory']['legend'])) ? $this->_run_mod_handler('escape', true, $_tmp, 'htmlall', 'UTF-8') : smarty_modifier_escape($_tmp, 'htmlall', 'UTF-8')); ?>

" /></a>

<a href="<?php echo ((is_array($_tmp=$this->_tpl_vars['accessoryLink'])) ? $this->_run_mod_handler('escape', true, $_tmp, 'htmlall', 'UTF-8') : smarty_modifier_escape($_tmp, 'htmlall', 'UTF-8')); ?>

" title="<?php echo smartyTranslate(array('s' => 'More'), $this);?>

" class="product_description"><?php echo ((is_array($_tmp=((is_array($_tmp=$this->_tpl_vars['accessory']['description_short'])) ? $this->_run_mod_handler('strip_tags', true, $_tmp) : smarty_modifier_strip_tags($_tmp)))) ? $this->_run_mod_handler('truncate', true, $_tmp, 100, '...') : smarty_modifier_truncate($_tmp, 100, '...')); ?>

</a>

 

 

 

In short I do not know what I am to change, as the example above is different from what I have put here. I do not understand "tmp, 100", it is not something that I can see that I should change in the example above.

 

Any advice would be appreciate.

 

Thanks

 

Raja Stones

Link to comment
Share on other sites

  • 2 weeks later...

Thank you for your help tdr170. I have increased the number to 200 and 250, but it has worked on some pages but not on others. I have a full title on the Pergolas, but not on the Planters.

 

In response to Martin, I have looked at the product-list.tpl file but not follow your advice, hence the copy of code in the post.

 

If I do find it what do I remove exactly in the code.

 

Thanks Martyn.

 

Your help is appreciated tdr170 & Martyn.

Link to comment
Share on other sites

  • 5 months later...
  • 2 years later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...