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

basket

Summary

Fetches the current user's shopping basket.

Usage

fetch( 'shop', 'basket')

Returns

An ezbasket object.

Description

This function fetches the shopping basket that belongs to the current user. The function returns an ezbasket object.

Examples

Example 1

{def $basket=fetch( 'shop', 'basket' )}
 
{if $basket.is_empty}
 
    There are no products in the basket.
 
{else}
 
    There are {count( $basket.items )} items in the basket. <br />
    Total price (ex. VAT) :  {$basket.total_ex_vat|l10n( currency )} <br />
    Total price (inc. VAT):  {$basket.total_inc_vat|l10n( currency )}
 
{/if}

Outputs basic information about the current user's shopping basket.

Balazs Halasy (06/02/2004 12:48 pm)

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


Comments

There are no comments.