basket

Summary

Fetches the shopping basket for the current user

Usage

fetch( 'shop', 'basket')

Parameters

NameTypeDescriptionRequired

Returns

An ezbasket object

Description

Examples

Fetch the users basket and print the contents, if not empty.

{let basket=fetch( 'shop', 'basket')}

  {section show=$basket.is_empty|not()}

      {section var=item loop=$basket.items}

          {$item.item_count}x {$item.object_name} {$item.vat_value}% VAT

          {$item.price_ex_vat|l10n(currency)} {$item.price_inc_vat|l10n(currency)}

          (discount {$item.discount_percent}%)

          <br />

      {/section}

   Total ex VAT:{$basket.total_ex_vat|l10n(currency)}<br />

   Total inc VAT:{$basket.total_inc_vat|l10n(currency)}

 

  {section-else}

    You have no products in your basket.

  {/section}

{/let}

Comments

Log in or create a user account to comment.

Contents

Reference

Database diagram
Template operators
Template functions
Data fetching
    Class
    Content
    Collaboration
    Layout
    Notification
    Package
    Section
    Shop
       basket
       best_sell_list
       related_purchase
    URL
    User
Modules
XML tags


Created

06/02/2004
1:48:44 pm
by Balazs Halasy

Last updated

11/02/2004
11:11:16 am
by B�rd Farstad

Authors

Balazs Halasy
B�rd Farstad



This page is part of the Exponential documentation. The documentation is available under the GNU Free Documentation License. All contributions will be released under the terms of this license.