[%# $Id$ %]
[% USE horder = Handel.Order %]
[% IF (order = horder.create({
id => '0CA692A7-0387-48AF-89B0-35F67BD3CF4E',
shopper => '2C98B811-B6EE-45A2-8ABD-DFBB5C308E4D',
type => horder.ORDER_TYPE_TEMP,
billtofirstname => 'Christopher',
billtolastname => 'Laco',
billtoaddress1 => 'BillToAddress1',
billtoaddress2 => 'BillToAddress2',
billtoaddress3 => 'BillToAddress3',
billtocity => 'BillToCity',
billtostate => 'BillToState',
billtozip => 'BillToZip',
billtocountry => 'BillToCountry',
billtodayphone => '1-111-111-1111',
billtonightphone => '2-222-222-2222',
billtofax => '3-333-333-3333',
billtoemail => 'mendlefarg@gmail.com',
comments => 'Comments',
created => '2005-07-15 20:12:34',
handling => 8.95,
number => 'O123456789',
shipmethod => 'UPS Ground',
shipping => 23.95,
shiptosameasbillto => 0,
shiptofirstname => 'Christopher',
shiptolastname => 'Laco',
shiptoaddress1 => 'ShipToAddress1',
shiptoaddress2 => 'ShipToAddress2',
shiptoaddress3 => 'ShipToAddress3',
shiptocity => 'ShipToCity',
shiptostate => 'ShipToState',
shiptozip => 'ShipToZip',
shiptocountry => 'ShipToCountry',
shiptodayphone => '4-444-444-4444',
shiptonightphone => '5-555-555-5555',
shiptofax => '6-666-666-6666',
shiptoemail => 'chrislaco@hotmail.com',
subtotal => 37.95,
total => 37.95,
tax => 6.66,
updated => '2005-07-16 20:12:34'
})) %]
[% IF (addeditem = order.add({
description => 'My New Item',
id => 'FF370272-BF75-4082-9E04-9FA5D302F3B4',
price => 1.23,
quantity => 2,
sku => 'NEWSKU123',
total => 2.46
})) %]
-
[% addeditem.description %]
[% addeditem.id %]
[% addeditem.price.value %]
[% addeditem.quantity %]
[% addeditem.sku %]
[% addeditem.total.value %]
[% ELSE %]
Error adding order item
[% END %]
[% order.count %]
[% order.id %]
[% order.shopper %]
[% order.type %]
[% order.billtofirstname %]
[% order.billtolastname %]
[% order.billtoaddress1 %]
[% order.billtoaddress2 %]
[% order.billtoaddress3 %]
[% order.billtocity %]
[% order.billtostate %]
[% order.billtozip %]
[% order.billtocountry %]
[% order.billtodayphone %]
[% order.billtonightphone %]
[% order.billtofax %]
[% order.billtoemail %]
[% order.comments %]
[% order.created %]
[% order.handling.value %]
[% order.number %]
[% order.shipmethod %]
[% order.shipping.value %]
[% order.shiptosameasbillto %]
[% order.shiptofirstname %]
[% order.shiptolastname %]
[% order.shiptoaddress1 %]
[% order.shiptoaddress2 %]
[% order.shiptoaddress3 %]
[% order.shiptocity %]
[% order.shiptostate %]
[% order.shiptozip %]
[% order.shiptocountry %]
[% order.shiptodayphone %]
[% order.shiptonightphone %]
[% order.shiptofax %]
[% order.shiptoemail %]
[% order.subtotal.value %]
[% order.total.value %]
[% order.tax.value %]
[% order.updated %]
[% ELSE %]
Error creating order
[% END %]