Caution: This documentation is for eZ Publish legacy, from version 3.x to 5.x.
For 5.x documentation covering Platform see eZ Documentation Center, for difference between legacy and Platform see 5.x Architecture overview.

product_category

Summary

Fetches a product category.

Usage

fetch( 'shop', 'product_category',
         hash( 'category_id', category_id ) )

Parameters

NameTypeDescriptionRequired
category_id integer The identifier of the target product category. Yes.

Returns

An ezproductcategory object or FALSE.

Description

This function fetches the product category specified by the "category_id" parameter and returns it as an ezproductcategory object. The function will return FALSE if the specified product category is unavailable.

Examples

Example 1

{def $category = fetch( 'shop', 'product_category',
                        hash( 'category_id', 3 ) )}
 
{if $category}
     The product category called "{$category.name}" has id=3. <br />
{/if}

Outputs the name of the product category with the specified identifier.

Svitlana Shatokhina (10/05/2006 12:43 pm)

Svitlana Shatokhina (10/05/2006 2:18 pm)


Comments

There are no comments.