init_productcategory

Tag {init_productcategory} prints the available product categories.

Parameters

  • name - variable name where the returned data is saved. Default value is "productcategory".
  • level - defines the level of the product category in the hierarchy (the same logic as in the the tag init_section).

Example

{init_productcategory name="category"}
<select name="cat_id" style="width:250px" onChange="submit()">
 <option value="">All</option>
{foreach from=$category key=cat_id item=cat_name}
 <option value="{$cat_id}" {if $selected_category = = $cat_id}selected{/if}>{$cat_name}</option>
{/foreach}
</select>