ez.no / exponential / documentation / reference / data fetching / shop / basket
fetch( 'shop', 'basket')
| Name | Type | Description | Required |
|---|
An ezbasket object
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}
Log in or create a user account to comment.
Comments