Skip to the content
Documentation

basket

No ratings yet

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.

Contributors

Comments

Add a comment

Comments are read by a moderator before they appear.