Jump to content

How can I add short description to homefeatured on front page?


Ste Berrill

Recommended Posts

Hi all,

I have been searching for a answer on how to add/show short_desc on the homefeatured module but the only answers I find are how to remove. My problem is that I want the short description to be displayed but it is not showing. I have looked in my homefeatured.tpl to see if it is there and I can see it, maybe somebody can see a problem in the code that im missing.

I also want to add the view button in there as well so help on that would be great!

below is my homefeatured.tpl

<!-- MODULE Home Featured Products -->

{l s='Featured products' mod='homefeatured'}
   {if isset($products) AND $products}

           {assign var='liHeight' value=342}
           {assign var='nbItemsPerLine' value=5}
           {assign var='nbLi' value=$products|@count}
           {math equation="nbLi/nbItemsPerLine" nbLi=$nbLi nbItemsPerLine=$nbItemsPerLine assign=nbLines}
           {math equation="nbLines*liHeight" nbLines=$nbLines|ceil liHeight=$liHeight assign=ulHeight}

           {foreach from=$products item=product name=homeFeaturedProducts}

{$product.name|truncate:45:'...'|escape:'htmlall':'UTF-8'}
{$product.description_short|strip_tags|truncate:130:'...'}
getImageLink($product.link_rewrite, $product.id_image, 'home')}" height="{$homeSize.height}" width="{$homeSize.width}" alt="{$product.name|escape:html:'UTF-8'}" />

                       {if $product.show_price AND !isset($restricted_country_mode) AND !$PS_CATALOG_MODE}
{if !$priceDisplay}{convertPrice price=$product.price}{else}{convertPrice price=$product.price_tax_exc}{/if}{else}{/if}
{l s='View' mod='homefeatured'}
                       {if ($product.id_product_attribute == 0 OR (isset($add_prod_display) AND ($add_prod_display == 1))) AND $product.available_for_order AND !isset($restricted_country_mode) AND $product.minimal_quantity == 1 AND $product.customizable != 2 AND !$PS_CATALOG_MODE}
                           {if ($product.quantity > 0 OR $product.allow_oosp)}
getPageLink('cart.php')}?qty=1&id_product={$product.id_product}&token={$static_token}&add" title="{l s='Add to cart' mod='homefeatured'}">{l s='Add to cart' mod='homefeatured'}
                           {else}
{l s='Add to cart' mod='homefeatured'}
                           {/if}
                       {else}

                       {/if}


           {/foreach}


   {else}

{l s='No featured products' mod='homefeatured'}
   {/if}

<!-- /MODULE Home Featured Products -->

Link to comment
Share on other sites

just a references info.
make sure you are working the one that is in effect.
some time your theme will override the theme file of the homeferatured.tpl.

in that case, there should be file under following folder

YourStoreRoot/themes/YourStoreTheme/modules/homefeatureed/homefeatured.tpl

Link to comment
Share on other sites

  • 1 year later...

Hi Ste Berrill,

 

did you find a solution for adding the view button and the short description to your Homefeatured module?

I want to do the same with the Category module, and I'd like to know what is the solution?

 

So when you have time, can you reply on this please?

 

Thanks a lot

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