ibexa

Path

ez publish / technical manual / 3.8 / reference / modules / shop / fetch functions / product_category


Caution: This documentation is for eZ Publish legacy, from version 3.x to 5.x.

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.