Jump to content

How to show description of products (in grid mode) in category and homefutured?


x3n0m0rph

Recommended Posts

  • 3 months later...

in /themes/default-bootstrap/product-list.tpl there is a code like:

					<h5 itemprop="name">
						{if isset($product.pack_quantity) && $product.pack_quantity}{$product.pack_quantity|intval|cat:' x '}{/if}
						<a class="product-name" href="{$product.link|escape:'html':'UTF-8'}" title="{$product.name|escape:'html':'UTF-8'}" itemprop="url" >
							{$product.name|truncate:45:'...'|escape:'html':'UTF-8'}
						</a>
					</h5>

change it to:

					<h5 itemprop="name">
						{if isset($product.pack_quantity) && $product.pack_quantity}{$product.pack_quantity|intval|cat:' x '}{/if}
						<a class="product-name" href="{$product.link|escape:'html':'UTF-8'}" title="{$product.name|escape:'html':'UTF-8'}" itemprop="url" >
							{$product.name|truncate:45:'...'|escape:'html':'UTF-8'}
                            {$product.description_short|strip_tags:'UTF-8'|truncate:360:'...'}
						</a>
					</h5>
Link to comment
Share on other sites

  • 2 years later...

Hi.

 

This works fine thanks.

 

How can can i make the product name bold and how can i make the the discription smaler.

 

I attache a picture showing what i mean.

 

I use PS 1.6.1.10

 

Regards

 

Plutten22

 

 

product name

in file http://www.cykelstaden.se/cykelstaden2013/themes/default-bootstrap/css/product_list.css

change code:

ul.product_list .product-name 
{
  display: inline-block;
  width: 100%;
  overflow: hidden; 
} 

to:

ul.product_list .product-name 
{
  display: inline-block;
  width: 100%;  
  overflow: hidden; 
  font-weight:bold;
}

(i added font-weight:bold;)

 

 

the case of description is a little complicated, because somehow - you put it to product_name element

in this case its necessary to remove it from product_name element,

 

then it will be possible to make it work properly then

Link to comment
Share on other sites

Hi Vekia.

 

I solved the problem. :)

I put the  {$product.description_short|strip_tags:'UTF-8'|truncate:360:'...'}  under the   </a>

You can see below.

 

Thank you Vekia. You are the best !!!!

                                            <h5 itemprop="name">						{if isset($product.pack_quantity) && $product.pack_quantity}{$product.pack_quantity|intval|cat:' x '}{/if}						<a class="product-name" href="{$product.link|escape:'html':'UTF-8'}" title="{$product.name|escape:'html':'UTF-8'}" itemprop="url" >							{$product.name|truncate:45:'...'|escape:'html':'UTF-8'}						</a>                                         {$product.description_short|strip_tags:'UTF-8'|truncate:360:'...'}					</h5>
Link to comment
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...