[%# $Id$ %]
[% USE hcart  = Handel.Cart %]
<body>
    [% IF (cart = hcart.create({
		description	=> 'My New Shopping Cart',
		id			=> 'E516A609-1905-4C7B-AC82-C33D50DE7AB9',
		name    	=> 'New Cart',
        shopper 	=> '162B8421-4A16-4C13-AB95-968CB2BB5569',
		type		=> hcart.CART_TYPE_TEMP
	})) %]
		[% CALL cart.add({
			description => 'Description 1',
			id			=> '251371DD-B19C-4D03-B0E7-6A828E5CA149',
			price		=> 1.11,
			quantity	=> 1,
			sku			=> 'SKU1'
		}) %]
		[% CALL cart.add({
			description => 'Description 2',
			id			=> '2330BAA8-288B-4102-988E-BA1ABA0A5BE9',
			price		=> 2.22,
			quantity	=> 2,
			sku			=> 'SKU2'
		}) %]
	[% END %]

	[% IF (cart = hcart.search({
		type => hcart.CART_TYPE_TEMP,
		id 	 => 'E516A609-1905-4C7B-AC82-C33D50DE7AB9'
	}).first) %]
		<cart>
			<count>[% cart.count %]</count>
			<description>[% cart.description %]</description>
			<id>[% cart.id %]</id>
			<name>[% cart.name %]</name>
			<shopper>[% cart.shopper %]</shopper>
			<subtotal>[% cart.subtotal.value %]</subtotal>
			<type>[% cart.type %]</type>
			[% IF (items = cart.items) %]
				[% WHILE (item = items.next) %]
					<item>
						<description>[% item.description %]</description>
						<id>[% item.id %]</id>
						<price>[% item.price.value %]</price>
						<quantity>[% item.quantity %]</quantity>
						<sku>[% item.sku %]</sku>
						<total>[% item.total.value %]</total>
					</item>
				[% END %]
			[% END %]
		</cart>
	[% ELSE %]
		<message>Could not find cart</message>
	[% END %]
</body>