Shopping cart

The shopping cart page can be used to display (to the customer) which products he or she has ordered and the total price / vat of those products. It can also be used to select an shipping method, in which case a separate shipping page is unnecessary. The customer can be offered to change the content of his shopping cart by adjusting quantities of products or removing products entirely. The customer might also fill in an discount code if such an action exists. All these possible features are controlled by the myShop extensions and are available in the custom layout for the shopping cart.


One of the most important parts of the shopping cart is the basket. The myShop extension for it is myshop-repeat:basket, and it works much like a productlist, but with a few differences. The extensions which can be used within the basket are fixed, and do not include displaying any of the product information directly from the spreadsheet (which is usual for any normal productlist). The fixed information for each product which can be displayed is limited to:

Controlling quantity and contents

The following inputs / actions can be used for each line of the basket contents, to control the products in it and the quantity of those products.

Changing quantity

For changing the quantity, there are three methods available:

Removing products

The action myshop-action:remove-product removes all quantities of the product on that line.


The shopping basket can also display the vat-totals and total price for all products in the basket. The information which can be displayed is:


The navigational actions available within the shopping basket are:

  • myshop-action:continue-shopping
    This action takes the customer back to where he came from in the shop.
  • myshop-action:help-basket
    This action pops up a window with some information for the customer on how to use the shopping cart.
  • myshop-action:next-page
    This action takes the users to the next page of the ordering procedure.

Special discounts

All actions (or discounts) which are defined in the editor can be shown with the myshop-repeat:action-list extension. This extension will loop over all actions and allow you to display these actions. The extensions which can be used within this loop are:

An action can require coupon codes, so the user needs a way to add these codes to the action list. The extension myshop-control:coupon-code can be used to display a input box which the customer can use. When this box contains a valid coupon code (set in the editor) the action for that code will be added to the shopping cart when the next-page action is executed.

Related products

It is also possible to show a list of related products in the shopping basket. This is done by using the myshop-repeat:related-products extension. See the related-products page for more information.


<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">
<html xmlns="">
                <title>Example of a simple shopping basket</title>
                <table style="myshop-has:products" cellspacing="0" cellpadding="0" width="100%" border="0">
                                <td align="center">
                                        <table width="98%" cellpadding="0" cellspacing="0" bgcolor="#ffffff" border="0">
                                                        <td colspan="7">&nbsp;</td>
                                                <!-- Basket header -->
                                                        <td style="font-weight:bold">Artikel</td>
                                                        <td style="font-weight:bold">Omschrijving</td>
                                                        <td style="font-weight:bold">Aantal</td>
                                                        <td align="right" style="font-weight:bold">Prijs</td>
                                                        <td align="right" style="font-weight:bold">Totaal</td>
                                                <!-- Product list -->
                                                <tr style="myshop-repeat:basket">
                                                        <td style="myshop-value:product-id">product number</td>
                                                        <td style="myshop-value:description">description</td>
                                                        <td style="myshop-value:quantity">quantity</td>
                                                        <td align="right" style="myshop-value:price-formatted">price</td>
                                                        <td align="right" style="myshop-value:price-line-total-formatted">price</td>
                                                        <td align="right"><a style="myshop-action:change-product">wijzigen</a></td>
                                                        <td align="right"><a style="myshop-action:remove-product">verwijder</a></td>
                                                        <td colspan="7">&nbsp;</td>
                                                <!-- Shipping selection -->
                                                <tr style="myshop-has:shipping-selection">
                                                        <td colspan="3">&nbsp;</td>
                                                        <td style="font-weight:bold;myshop-action:shipping-selection" align="right">&nbsp;</td>
                                                        <td align="right" style="font-weight:bold;myshop-value:price-shipping-formatted">0,00</td>
                                                        <td colspan="2">&nbsp;</td>
                                                <!-- VAT list -->
                                                <tr style="myshop-repeat:vat-list">
                                                        <td colspan="3">&nbsp;</td>
                                                        <td><span style="myshop-value:vat-percentage"/> BTW van <span style="myshop-value:vat-from-price-formatted"/></td>
                                                        <td align="right" style="myshop-value:price-vat-formatted">vat</td>
                                                        <td colspan="2">&nbsp;</td>
                                                <!-- Total price including vat -->
                                                        <td colspan="3">&nbsp;</td>
                                                        <td style="font-weight:bold">Totaal</td>
                                                        <td align="right" style="font-weight:bold;myshop-value:price-total-formatted">0,00</td>
                                                        <td colspan="2">&nbsp;</td>
                                <td align="center">
                                        <span style="myshop-has:continue-shopping">
                                                <a style="myshop-action:continue-shopping">Continue shopping</a>
                                        <a style="myshop-action:help-basket">Help</a>
                                        <a style="myshop-action:next-page">Next</a>
                                <td><span style="myshop-value:remarks"/></td>
                        <tr style="myshop-has:terms-conditions">
                                        <a style=myshop-action:terms-conditions">Terms and conditions</a>

Overview applicable extensions


Was this helpful?

Yes No
You indicated this topic was not helpful to you ...
Could you please leave a comment telling us why? Thank you!
Thanks for your feedback.

Post your comment on this topic.

Post Comment