View Single Post
  #5  
Old 01-04-2005, 07:38 PM
 
ecollier2012 ecollier2012 is offline
 

Advanced Member
  
Join Date: Mar 2003
Posts: 85
 

Default Code Snippet Help

Is it possible to do the same thing based on category or subcategory id instead of product id.

I have tried just about every possible option based on the example posted earlier and can't seem to get it to work...it only works if use product ID.

Here is what I have tried thus far

Code:
{if $subcategories[cat_num].category eq "60"} <tr><td align="center" colspan="{$colspan}"> <font color="red">This only appears when cat 60 is selected</font></p></td></tr> {/if} {if $subcategories[cat_num].category eq "82"} <tr><td align="center" colspan="{$colspan}"> <font color="red">This only appears when cat 82 is selected</font></p></td></tr> {/if} {if $subcategories[cat_num].category eq "95"} <tr><td align="center" colspan="{$colspan}"> <font color="red">This only appears when cat 95 is selected</font></p></td></tr> {/if} {if $subcategories[cat_num].categoryid eq "60"} <tr><td align="center" colspan="{$colspan}"> <font color="red">This only appears when cat 60 is selected</font></p></td></tr> {/if} {if $subcategories[cat_num].categoryid eq "82"} <tr><td align="center" colspan="{$colspan}"> <font color="red">This only appears when cat 82 is selected</font></p></td></tr> {/if} {if $subcategories[cat_num].categoryid eq "95"} <tr><td align="center" colspan="{$colspan}"> <font color="red">This only appears when cat 95 is selected</font></p></td></tr> {/if} {if $categories[cat_num].categoryid eq "60"} <tr><td align="center" colspan="{$colspan}"> <font color="red">This only appears when cat2 60 is selected</font></p></td></tr> {/if} {if $categories[cat_num].categoryid eq "82"} <tr><td align="center" colspan="{$colspan}"> <font color="red">This only appears when cat2 82 is selected</font></p></td></tr> {/if} {if $categories[cat_num].categoryid eq "95"} <tr><td align="center" colspan="{$colspan}"> <font color="red">This only appears when cat2 95 is selected</font></p></td></tr> {/if} {if $categories[cat_num].category eq "60"} <tr><td align="center" colspan="{$colspan}"> <font color="red">This only appears when cat2 60 is selected</font></p></td></tr> {/if} {if $categories[cat_num].category eq "82"} <tr><td align="center" colspan="{$colspan}"> <font color="red">This only appears when cat2 82 is selected</font></p></td></tr> {/if} {if $categories[cat_num].category eq "95"} <tr><td align="center" colspan="{$colspan}"> <font color="red">This only appears when cat2 95 is selected</font></p></td></tr> {/if} {if $categories eq "60"} <tr><td align="center" colspan="{$colspan}"> <font color="red">This only appears when cat2 60 is selected</font></p></td></tr> {/if} {if $categories eq "82"} <tr><td align="center" colspan="{$colspan}"> <font color="red">This only appears when cat2 82 is selected</font></p></td></tr> {/if} {if $categories eq "95"} <tr><td align="center" colspan="{$colspan}"> <font color="red">This only appears when cat2 95 is selected</font></p></td></tr> {/if} {if $category eq "60"} <tr><td align="center" colspan="{$colspan}"> <font color="red">This only appears when cat2 60 is selected</font></p></td></tr> {/if} {if $category eq "82"} <tr><td align="center" colspan="{$colspan}"> <font color="red">This only appears when cat2 82 is selected</font></p></td></tr> {/if} {if $category eq "95"} <tr><td align="center" colspan="{$colspan}"> <font color="red">This only appears when cat2 95 is selected</font></p></td></tr> {/if} {if $categoryid eq "60"} <tr><td align="center" colspan="{$colspan}"> <font color="red">This only appears when cat2 60 is selected</font></p></td></tr> {/if} {if $categoryi eq "82"} <tr><td align="center" colspan="{$colspan}"> <font color="red">This only appears when cat2 82 is selected</font></p></td></tr> {/if} {if $categoryid eq "95"} <tr><td align="center" colspan="{$colspan}"> <font color="red">This only appears when cat2 95 is selected</font></p></td></tr> {/if}
Reply With Quote