Basket

Create a new override for the "/shop/basket.tpl" and name it: "shop_basket". The code for this basket is as follows:

<form method="post" action={"/shop/basket"|ezurl}>

 

<div class=basketlink>

   <a class=tobasket href={"shop" | ezurl}>continue shopping</a>

</div>

 

<div class="maincontentheader">

   <h1>Basket</h1>

</div>

<br/>

 

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

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

   <table class=product_table>

      <tr><th width=200px>Product</th><th width=70px>Number</th><th width=70px>Price</th><th width=70px>Total</th></tr>

 

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

      <input type="hidden" name="ProductItemIDList[]" value="{$item.id}" />

      <tr>

      <td>{$item.object_name}</td>

      <td><input type="text" name="ProductItemCountList[]" value="{$item.item_count}" size="3" /></td>

      <td>{$item.price_inc_vat | l10n(currency)}</td><td>{$item.item_count | mul($item.price_inc_vat) | l10n(currency)}</td>

      <td></td>

      </tr>

   {/section}

 

      <tr>

      <td>&nbsp</td><td><input class="button" type="submit" name="StoreChangesButton" value="{'Change'|i18n('design/standard/shop')}" /></td>

      <td>&nbsp</td><td>&nbsp</td>

      </tr>

 

      <tr>

      <td>&nbsp</td>

      <td>&nbsp</td>

      <td>&nbsp</td>

      <td><hr/></td>

      </tr>

 

      <tr>

      <td>&nbsp</td>

      <td>&nbsp</td>

      <td><b>Total:</td>

      <td><b>{$basket.total_inc_vat|l10n(currency)}</b></td>

      </tr>

   </table>

 

<input type="submit" class="defaultbutton" name="CheckoutButton" value="{"Check out"|i18n("design/base")}" />

</form>

 

{section-else}

   You have no products in your basket.

{/section}

{/let}

This template will change the layout of the basket. To remove products from this basket you have to set the quantity to zero.

Comments

Contents

Building an Exponential shop

Setting up the TSCM layout
Setting up a simple shop
    Adding a simple shop
    Modifying the default behavior
       Modifying the product list
       Basket
Extending the shop with a Paypal paym...


Created

13/12/2004
2:43:32 pm
by Raymond Bosman

Last updated

13/12/2004
2:43:32 pm
by Raymond Bosman

Authors

Raymond Bosman



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.