<%python scope="global"> import shoppingmodel, shoppingcontroller <%args> invoice ck_state <& checkout.myt:breadcrumb, ck_state = ck_state &> % if ck_state == shoppingcontroller.CHECKOUT_DONE: Order Complete - Thanks for your order ! % <&| forms.myc:form, name="checkout", action="checkout/" &>
Invoice <& staticitems, invoice = invoice &>
Billing Address <& staticaddress, address = invoice.billingaddress &>
Shipping Address <& staticaddress, address = invoice.shippingaddress &>
Payment Info <& staticcc, cc = invoice.creditcard &>
% if ck_state == shoppingcontroller.CHECKOUT_CONFIRM: <& checkout.myt:go &> % <%def staticaddress> <%args>address
Name:<% address.firstname %> <%address.lastname %>
Street:<% address.street1 %>
<% address.street2 %>
City:<% address.city %>
State:<% address.state %>
Zip:<% address.zipcode %>
Country:<% address.country %>
<%def staticcc> <%args>cc
Name:<% cc.ccname %>
Number:<% cc.hiddencc %>
Type:<% cc.cctype %>
Exp:<% cc.ccexp%>
<%def staticitems> <%args> invoice % for item in invoice.items: %
Item Style Price Quantity Total
<% item.item.name %> % for variant in item.variants.values(): <% variant.categoryname %>: <% variant.name %> % <& common.myc:price, price = item.get_item_price() &> <% item.quantity %> <& common.myc:price, price = item.get_total_price() &>
Total: <& common.myc:price, price = invoice.get_total() &>