diff --git a/smartylint/checkout.tpl b/smartylint/checkout.tpl new file mode 100644 index 0000000..ee010e9 --- /dev/null +++ b/smartylint/checkout.tpl @@ -0,0 +1,58 @@ +{include file="header.tpl" page_title="Checkout"} + + + Review your order + + {if $cart.items} + + + ItemQtyPrice + + + {foreach $cart.items as $line} + + {$line.name} + {$line.quantity} + {$line.subtotal|string_format:"%.2f"} + + {/foreach} + + + + + + Shipping + Full name + Address + City + + + Method + + Standard + Express + + + + {if $shipping_method == "express"} + Express delivery adds {$express_fee|string_format:"%.2f"}. + + {if $promo_code == "WELCOME10"} + Promo applied: 10% off. + {/if} + + + + Payment + Card number + Coupon + + + Place order + + {else} + Your cart is empty. Browse products. + {/if} + + +{include file="footer.tpl"} diff --git a/smartylint/email_order.tpl b/smartylint/email_order.tpl new file mode 100644 index 0000000..2d9a531 --- /dev/null +++ b/smartylint/email_order.tpl @@ -0,0 +1,34 @@ +{* order confirmation email — plain text + html sections *} + +Subject: Your Demoapp order #{$order.id} is confirmed + +Hi {$buyer.name}, + +Thanks for your order! Here's a summary: + +Order #{$order.id} +Placed: {$order.placed_at} +Total: {$order.total|string_format:"%.2f"} + +Items: +{foreach $order.items as $line} +- {$line.name} x {$line.quantity} = {$line.subtotal|string_format:"%.2f"} +{/foreach} + +Shipping to: +{$buyer.address} +{$buyer.city}, {$buyer.region} {$buyer.postal_code} + +{php} + $tracking = isset($order['tracking_number']) ? $order['tracking_number'] : 'pending'; + echo "Tracking: " . $tracking . "\n"; +{/php} + +Track your order: +https://demoapp.example.com/orders/{$order.id}/track + +Questions? Reply to this email or visit https://demoapp.example.com/help. + +— The Demoapp team + +{* *} diff --git a/smartylint/footer.tpl b/smartylint/footer.tpl new file mode 100644 index 0000000..54b8ee8 --- /dev/null +++ b/smartylint/footer.tpl @@ -0,0 +1,35 @@ + + + + + {include file=tracking.tpl} + {include file="scripts.tpl"} +
Express delivery adds {$express_fee|string_format:"%.2f"}.
Promo applied: 10% off.
Your cart is empty. Browse products.