Jump to content

category id - how to configure in code


Recommended Posts

Hi experts,

 

 

I want to add some code for particular category like " category id= 4 "  or " category name = iphone".

 

I have added one line condition  code in category.tpl in default theme.

 

requirement : I want include seperate product-list.tpl for different category 

 added code below  , one condition coloured in red.

 

But its not working ,   how can I add a condition here?

......

 

{if $products}
<div class="content_sortPagiBar">
{include file="$tpl_dir./pagination.tpl"}
<div class="sortPagiBar clearfix">
{include file="./product-sort.tpl"}
{include file="./product-compare.tpl"}
{include file="./nbr-product-page.tpl"}
</div>
</div>
 
{if $category->id = 4}
{include file="./product-list.tpl" products=$products}
{/if}
 
<div class="content_sortPagiBar">
<div class="sortPagiBar clearfix">
{include file="./product-sort.tpl" paginationId='bottom'}
{include file="./product-compare.tpl" paginationId='bottom'}
{include file="./nbr-product-page.tpl" paginationId='bottom'}
</div>
{include file="./pagination.tpl" paginationId='bottom'}
</div>
 
But its not working ,   how can I add a condition here?
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...