One moment, we're cooking some code examples

Header image

Shopping cart

The shopping cart is completely customizable. You can choose for a multipage checkout or keep things on page.

Cart

Set-up

This page documents the usage of the cart template. To configure the individual cart settings see the configuration page.

In the example below we will generate the HTML for the default cart that we've configured previously.

First we call the GenerateCart function from the TypeStack core, and then we get the HTML and also the total products.

After that we check if we need to show the checkout form. If there are no products in our cart, we don't want to show the checkout form.

Cart

HTML

Next up is the cart HTML.

  1. Cart slide
  2. Cart notification
  3. Default cart HTML
  4. Cart details
  5. Cart payment

Output Cart HTML

$sDefaultCartHMTL

Output Cart Details

Include and document

Output Cart Payment

Include and document (payment providers too)