ibexa

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

wish_list

Summary

Fetches the products of a given wishlist.

Usage

fetch( 'shop', 'wish_list',
       hash( 'production_id', production_id,
           [ 'offset', offset, ]
           [ 'limit',  limit   ] ) )

Parameters

NameTypeDescriptionRequired
production_id integer The ID of the target wishlist. Yes.
offset integer The offset to start at. No.
limit integer The number of products that should be fetched. No.

Returns

An array of arrays containing information about the items in the wishlist (see below) or FALSE.

Description

This function fetches the products that belong to a certain 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 wishlist. The optional "offset" and "limit" parameters can be used to control the resulting set. The function returns an array of arrays containing information about each item in the wishlist. The following table shows the structure that is used for each element of the array.

Attribute

Type

Description

id

string

The ID number of the item in the basket.

vat_value

string

32

item_count

string

The quantity.

node_id

string

The ID number of the node that represents the item.

object_name

string

The name of the object that represents the item.

price_ex_vat

double

The price of the item excluding the VAT.

price_inc_vat

string

The price of the item including the VAT.

discount_percent

string

The discount percentage (if any).

total_price_ex_vat

double

The total price excluding the VAT.

total_price_inc_vat

double

The total price including the VAT.

item_object

object

The item itself (as an ezproductcollectionitem object).

If the system is unable to find any products, an empty wishlist / FALSE will be returned.

Examples

Example 1

{def $wishlist=fetch( 'shop', 'wish_list',  hash( 'production_id', 13 ) )}
 
{foreach $wishlist as $wish}
    {$wish.object_name|wash} <br />
{/foreach}

Outputs the names of the objects that make up wishlist number 13.

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

Julia Shymova (22/10/2007 11:20 am)

Balazs Halasy, Julia Shymova


Comments

There are no comments.