Jump to content

Making name and description on 2 lines

Recommended Posts

Hello, everyone!
I need to make the name and description in the product miniatures on 2 lines. So what I did was, I changed product.tpl like so:

        {block name='product_name'}
          <h3 itemprop="name"><a href="{$product.url}" class="product_name">{$product.name|truncate:45:'...'}</a></h3>
		  <div class="miniature-description" id="miniature-description">{$product.description_short|truncate:45:''|escape:'html':'UTF-8' nofilter}</div>
		  {if $product.description_short == ' '}
		  <div class="miniature-description-2">{$product.description|truncate:45:''|escape:'html':'UTF-8' nofilter}</div>


So now the problem is that I do not know how long the description is and it is not always fully shown on the miniature.

If someone can tell me what I can do to make it take the first 2 lines of the description always, I would be really grateful.

Share this post

Link to post
Share on other sites

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...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More