[%# $Id$ %]
[% USE horder = Handel.Order %]
<body>
[% IF (order = horder.create({
id => 'B05779D0-6D40-4F0A-B6A3-1CC2193571C6',
shopper => 'D3D7C81D-3BA7-41E6-A8B8-34550CD6C793',
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'
})) %]
[% UNLESS order.add({
description => 'My New Item',
id => '2505E956-D5A6-47B0-AEB5-D19429FCA5FD',
price => 1.23,
quantity => 2,
sku => 'NEWSKU123',
total => 2.46
}) %]
<message>Error adding order item</message>
[% END %]
[% UNLESS order.add({
description => 'My New Item',
id => '0D2F5773-5347-4930-B93F-EF61A0A49EF0',
price => 1.01,
quantity => 1,
sku => 'NEWSKU345',
total => 1.01
}) %]
<message>Error adding order item</message>
[% END %]
<order>
<count>[% order.count %]</count>
<id>[% order.id %]</id>
<shopper>[% order.shopper %]</shopper>
<type>[% order.type %]</type>
<billtofirstname>[% order.billtofirstname %]</billtofirstname>
<billtolastname>[% order.billtolastname %]</billtolastname>
<billtoaddress1>[% order.billtoaddress1 %]</billtoaddress1>
<billtoaddress2>[% order.billtoaddress2 %]</billtoaddress2>
<billtoaddress3>[% order.billtoaddress3 %]</billtoaddress3>
<billtocity>[% order.billtocity %]</billtocity>
<billtostate>[% order.billtostate %]</billtostate>
<billtozip>[% order.billtozip %]</billtozip>
<billtocountry>[% order.billtocountry %]</billtocountry>
<billtodayphone>[% order.billtodayphone %]</billtodayphone>
<billtonightphone>[% order.billtonightphone %]</billtonightphone>
<billtofax>[% order.billtofax %]</billtofax>
<billtoemail>[% order.billtoemail %]</billtoemail>
<comments>[% order.comments %]</comments>
<created>[% order.created %]</created>
<handling>[% order.handling.value %]</handling>
<number>[% order.number %]</number>
<shipmethod>[% order.shipmethod %]</shipmethod>
<shipping>[% order.shipping.value %]</shipping>
<shiptosameasbillto>[% order.shiptosameasbillto %]</shiptosameasbillto>
<shiptofirstname>[% order.shiptofirstname %]</shiptofirstname>
<shiptolastname>[% order.shiptolastname %]</shiptolastname>
<shiptoaddress1>[% order.shiptoaddress1 %]</shiptoaddress1>
<shiptoaddress2>[% order.shiptoaddress2 %]</shiptoaddress2>
<shiptoaddress3>[% order.shiptoaddress3 %]</shiptoaddress3>
<shiptocity>[% order.shiptocity %]</shiptocity>
<shiptostate>[% order.shiptostate %]</shiptostate>
<shiptozip>[% order.shiptozip %]</shiptozip>
<shiptocountry>[% order.shiptocountry %]</shiptocountry>
<shiptodayphone>[% order.shiptodayphone %]</shiptodayphone>
<shiptonightphone>[% order.shiptonightphone %]</shiptonightphone>
<shiptofax>[% order.shiptofax %]</shiptofax>
<shiptoemail>[% order.shiptoemail %]</shiptoemail>
<subtotal>[% order.subtotal.value %]</subtotal>
<total>[% order.total.value %]</total>
<tax>[% order.tax.value %]</tax>
<updated>[% order.updated %]</updated>
</order>
[% ELSE %]
<message>Error creating order</message>
[% END %]
[% IF (order = horder.search({
type => horder.ORDER_TYPE_TEMP,
id => 'B05779D0-6D40-4F0A-B6A3-1CC2193571C6'
}).first) %]
<order>
<count>[% order.count %]</count>
<id>[% order.id %]</id>
<shopper>[% order.shopper %]</shopper>
<type>[% order.type %]</type>
<billtofirstname>[% order.billtofirstname %]</billtofirstname>
<billtolastname>[% order.billtolastname %]</billtolastname>
<billtoaddress1>[% order.billtoaddress1 %]</billtoaddress1>
<billtoaddress2>[% order.billtoaddress2 %]</billtoaddress2>
<billtoaddress3>[% order.billtoaddress3 %]</billtoaddress3>
<billtocity>[% order.billtocity %]</billtocity>
<billtostate>[% order.billtostate %]</billtostate>
<billtozip>[% order.billtozip %]</billtozip>
<billtocountry>[% order.billtocountry %]</billtocountry>
<billtodayphone>[% order.billtodayphone %]</billtodayphone>
<billtonightphone>[% order.billtonightphone %]</billtonightphone>
<billtofax>[% order.billtofax %]</billtofax>
<billtoemail>[% order.billtoemail %]</billtoemail>
<comments>[% order.comments %]</comments>
<created>[% order.created %]</created>
<handling>[% order.handling.value %]</handling>
<number>[% order.number %]</number>
<shipmethod>[% order.shipmethod %]</shipmethod>
<shipping>[% order.shipping.value %]</shipping>
<shiptosameasbillto>[% order.shiptosameasbillto %]</shiptosameasbillto>
<shiptofirstname>[% order.shiptofirstname %]</shiptofirstname>
<shiptolastname>[% order.shiptolastname %]</shiptolastname>
<shiptoaddress1>[% order.shiptoaddress1 %]</shiptoaddress1>
<shiptoaddress2>[% order.shiptoaddress2 %]</shiptoaddress2>
<shiptoaddress3>[% order.shiptoaddress3 %]</shiptoaddress3>
<shiptocity>[% order.shiptocity %]</shiptocity>
<shiptostate>[% order.shiptostate %]</shiptostate>
<shiptozip>[% order.shiptozip %]</shiptozip>
<shiptocountry>[% order.shiptocountry %]</shiptocountry>
<shiptodayphone>[% order.shiptodayphone %]</shiptodayphone>
<shiptonightphone>[% order.shiptonightphone %]</shiptonightphone>
<shiptofax>[% order.shiptofax %]</shiptofax>
<shiptoemail>[% order.shiptoemail %]</shiptoemail>
<subtotal>[% order.subtotal.value %]</subtotal>
<total>[% order.total.value %]</total>
<tax>[% order.tax.value %]</tax>
<updated>[% order.updated %]</updated>
[% CALL order.delete({id => '2505E956-D5A6-47B0-AEB5-D19429FCA5FD'}) %]
<count>[% order.count %]</count>
</order>
[% ELSE %]
<message>Could not find order</message>
[% END %]
</body>