Jump to content

[SOLVED] Product List Short Description


Recommended Posts

Hello. In trying different layouts and content presentation I decided that I like to have more content in the Short Description as bullet points as opposed to the normal few sentences. The problem I'm having is that the Product List Short Description is also affected as you can see in the images. I would like to be able to truncate the description on the Product List page if possible. I see the code in product_list.tpl that I would have thought would do the trick but making changes didn't have any results.

 

Using version 1.4.6.2 with prestashop_new theme

 

Thanks!

 

post-306361-0-79203400-1327597329_thumb.jpgpost-306361-0-64241700-1327597328_thumb.jpg

Link to comment
Share on other sites

I also wanted the short desription in product list to be the same as product view but was unable to get an answer.

I tried the above but the product list view did not change.

I hope we are talking about the same thing.

 

Changed this

 

<p class="product_desc"><a href="{$product.link|escape:'htmlall':'UTF-8'}" title="{$product.description_short|strip_tags:'UTF-8'|truncate:360:'...'}">{$product.description_short|truncate:360:'...'|strip_tags:'UTF-8'}</a></p>

 

To this

 

<p class="product_desc"><a href="{$product.link|escape:'htmlall':'UTF-8'}" title="{$product.description_short|truncate:360:'...'}">{$product.description_short|truncate:360:'...'}</a></p>

 

 

post-310220-0-94665100-1327608512_thumb.jpg

Link to comment
Share on other sites

It is working solution (tested). And there is no need to remove strip_tags from the title attribute.

 

<p class="product_desc"><a href="{$product.link|escape:'htmlall':'UTF-8'}" title="{$product.description_short|truncate:360:'...'|strip_tags:'UTF-8'|escape:'htmlall':'UTF-8'}">{$product.description_short|truncate:360:'...'}</a></p>

  • Like 1
Link to comment
Share on other sites

  • 2 years later...

It is working solution (tested). And there is no need to remove strip_tags from the title attribute.

 

<p class="product_desc"><a href="{$product.link|escape:'htmlall':'UTF-8'}" title="{$product.description_short|truncate:360:'...'|strip_tags:'UTF-8'|escape:'htmlall':'UTF-8'}">{$product.description_short|truncate:360:'...'}</a></p>

When i to this with 1.6, the result is : " undefined" :'( 

 

anybody can help me for this??

 

http://www.arthostechnics.com/catalogue/fr/12-nos-produits

 

thank you verry much

Link to comment
Share on other sites

  • 1 year later...
  • 2 months later...
  • 8 months later...
  • 7 months later...

my product list. tpl contains:

 

<p class="product-desc" itemprop="description">
{$product.description_short|strip_tags:'UTF-8'|truncate:360:'...'}
</p>
 
but in the frontend the value appears as undefined , 
 
I'm using PS 1.6.1.0
 
anyone knows the reason? THANKS!
 
i also try
 
<div class="product-desc" itemprop="description">

{$product.description_short|truncate:360:'...'}
</div>

 

wihout <p></p> but also appears "undefined" :(

 
Link to comment
Share on other sites

  • 1 month 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...