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.

wish_list_count

Summary

Fetches a wishlist and returns the number of items in it.

Usage

fetch( 'shop', 'wish_list_count', hash( 'production_id', production_id ) )

Parameters

NameTypeDescriptionRequired
production_id integer The ID number of the target wishlist. Yes.

Returns

The number of items that make up the wishlist (as an integer).

Description

This function fetches the products that belong to a certain wishlist and returns an integer. The integer reveals the number of items that make up the wishlist. The system stores wishlists using the same solution that is used to store the contents of shopping baskets, the "product collection" schema. The desired wishlist must be specified using the ID number of the product collection that contains the target wishlist.

Examples

Example 1

{def $sum=fetch( 'shop', 'wish_list_count',  hash( 'productcollection_id', 13 ) )}
There are {$sum} items in wishlist number 13.

Outputs the number of items that make up wishlist number 13.

Balazs Halasy (03/04/2005 9:18 am)

Balazs Halasy (29/04/2005 9:21 am)


Comments

There are no comments.