ez.no / exponential / documentation / building an exponential shop / setting up a simple shop / modifying the default behavior / 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> </td><td><input class="button" type="submit" name="StoreChangesButton" value="{'Change'|i18n('design/standard/shop')}" /></td> <td> </td><td> </td> </tr> <tr> <td> </td> <td> </td> <td> </td> <td><hr/></td> </tr> <tr> <td> </td> <td> </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