Jump to content

Edit History

jamshidpour

jamshidpour

Hi mates

I am using prestashop 1.6.1.24 and trying to remove add to cart button for specific category (category ID 3) from both "Category page" and "Product page". In other word i wand to disable purchasing products of category ID 3.

I used the code below in product-list.tpl and it worked fine and add to cart buttons removed in category page of ID 3

{if $smarty.get.id_category != 3}
...
{/if}

Now i want to remove add to cart button in product pages of category ID 3.

I have edited product.tpl and inserted the below code just before <div class="box-cart-bottom"> but it doesn't work:

{if $product->id_category != 3}
...
{/if}

 What is the problem? Am i doing something wrong?

Your help is highly appreciated.

 

 

jamshidpour

jamshidpour

Hi mates

I am using prestashop 1.6.1.24 and trying to remove add to cart button for specific category (category ID 3) from both "Category page" and "Product page". In other word i wand to disable purchasing products of category ID 3.

I used the code below in product-list.tpl and it worked fine and add to cart buttons removed in category page of ID 3

{if $smarty.get.id_category != 3}
...
{/if}

Now i want to remove add to cart button in product pages of category ID 3.

I have edited product.tpl and inserted the below code just before <div class="box-cart-bottom"> but it doesn't work:

{if $product->id_category != 3}
...
{/if}

 What is the problem? Am i doing something wrong?

Your help is highly appreciated.

 

 

×
×
  • Create New...