Remove featured products price,view and add to cart button

Remove featured products price, “view” and “add to cart” button from homepage of prestashop. By this way you will only show product name, product description and product image.

To do this, we have to edit “homefeatured.tpl” under “/modules/homefeatured/ homefeatured.tpl”.

To remove price, go to line 18 and 19, find this code:

  1. {if ($product.quantity > 0 OR $product.allow_oosp) AND $product.customizable != 2}
    <a rel="ajax_id_product_{$product.id_product}" href="{$base_dir}cart.php?qty=1&amp;id_product={$product.id_product}&amp;token={$static_token}&amp;add" title="{l s='Add to cart' mod='homefeatured'}">{l s='Add to cart' mod='homefeatured'}</a>
    {else}
    <span>{l s='Add to cart' mod='homefeatured'}</span>
    {/if}

By deleting this code, price will not be shown in homepage.

To remove “view” button from  homepage, go to line 20, there will be code:

<a title="{l s='View' mod='homefeatured'}" href="{$product.link}">
{l s='View' mod='homefeatured'}</a>

By deleting this, “view” button will not be shown in homepage.

To remove “add to cart” button, go to the line 21, find this:

{if ($product.quantity > 0 OR $product.allow_oosp) AND $product.customizable != 2}
<a rel="ajax_id_product_{$product.id_product}" href="{$base_dir}cart.php?qty=1&amp;id_product={$product.id_product}&amp;token={$static_token}&amp;add" title="{l s='Add to cart' mod='homefeatured'}">{l s='Add to cart' mod='homefeatured'}</a>
{else}
<span>{l s='Add to cart' mod='homefeatured'}</span>
{/if}

Delete this code, to remove “add to cart” button.

After deleting all these codes we will get a result as shown in image:

There will be an empty place because of we just delete price and buttons. To not left like that, go to the line 6 in “homefeatured.tpl”, and find:

<div class="block_content">
{assign var='liHeight' value=360}

Decrease the value of  “360″ to what you want, but ideal value for default theme is “273″. By decreasing this value you will get this;

That is all. I hope this post will be helpful to you.

Releated Post

Leave a Reply

Your email address will not be published. Required fields are marked *