feat: add launch readiness features for OMS
- Implement VAT tax calculation on order creation based on EU country rates - Add post-order hooks: customer stats update, cart clear, email confirmation - Create shop order history page with pagination and status badges - Create shop order detail page with order items and addresses - Add order_confirmation email templates in 4 languages (en, fr, de, lb) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -366,6 +366,293 @@ Fir unzefänken:
|
||||
|
||||
Mat beschte Gréiss,
|
||||
D'Wizamart Team
|
||||
""",
|
||||
},
|
||||
# -------------------------------------------------------------------------
|
||||
# ORDER CONFIRMATION
|
||||
# -------------------------------------------------------------------------
|
||||
{
|
||||
"code": "order_confirmation",
|
||||
"language": "en",
|
||||
"name": "Order Confirmation",
|
||||
"description": "Sent to customers after placing an order",
|
||||
"category": EmailCategory.ORDERS.value,
|
||||
"variables": json.dumps([
|
||||
"customer_name", "order_number", "order_total",
|
||||
"order_items_count", "order_date", "shipping_address"
|
||||
]),
|
||||
"subject": "Order Confirmation - {{ order_number }}",
|
||||
"body_html": """<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
</head>
|
||||
<body style="font-family: Arial, sans-serif; line-height: 1.6; color: #333; max-width: 600px; margin: 0 auto; padding: 20px;">
|
||||
<div style="background: linear-gradient(135deg, #10b981 0%, #059669 100%); padding: 30px; border-radius: 10px 10px 0 0;">
|
||||
<h1 style="color: white; margin: 0; font-size: 28px;">Order Confirmed!</h1>
|
||||
</div>
|
||||
|
||||
<div style="background: #f9fafb; padding: 30px; border-radius: 0 0 10px 10px;">
|
||||
<p style="font-size: 16px;">Hi {{ customer_name }},</p>
|
||||
|
||||
<p>Thank you for your order! We've received your order and it's being processed.</p>
|
||||
|
||||
<div style="background: white; border-radius: 8px; padding: 20px; margin: 20px 0; border-left: 4px solid #10b981;">
|
||||
<h3 style="margin-top: 0; color: #10b981;">Order Details</h3>
|
||||
<p style="margin: 5px 0;"><strong>Order Number:</strong> {{ order_number }}</p>
|
||||
<p style="margin: 5px 0;"><strong>Date:</strong> {{ order_date }}</p>
|
||||
<p style="margin: 5px 0;"><strong>Items:</strong> {{ order_items_count }}</p>
|
||||
<p style="margin: 5px 0;"><strong>Total:</strong> {{ order_total }}</p>
|
||||
</div>
|
||||
|
||||
<div style="background: white; border-radius: 8px; padding: 20px; margin: 20px 0;">
|
||||
<h3 style="margin-top: 0; color: #374151;">Shipping Address</h3>
|
||||
<p style="margin: 5px 0;">{{ shipping_address }}</p>
|
||||
</div>
|
||||
|
||||
<p>You will receive another email when your order ships.</p>
|
||||
|
||||
<p style="color: #6b7280; font-size: 14px; margin-top: 30px;">
|
||||
If you have any questions about your order, please contact us.
|
||||
</p>
|
||||
|
||||
<p>Thank you for shopping with us!<br><strong>The Team</strong></p>
|
||||
</div>
|
||||
|
||||
<div style="text-align: center; padding: 20px; color: #9ca3af; font-size: 12px;">
|
||||
<p>This is an automated email. Please do not reply directly.</p>
|
||||
</div>
|
||||
</body>
|
||||
</html>""",
|
||||
"body_text": """Order Confirmed!
|
||||
|
||||
Hi {{ customer_name }},
|
||||
|
||||
Thank you for your order! We've received your order and it's being processed.
|
||||
|
||||
Order Details:
|
||||
- Order Number: {{ order_number }}
|
||||
- Date: {{ order_date }}
|
||||
- Items: {{ order_items_count }}
|
||||
- Total: {{ order_total }}
|
||||
|
||||
Shipping Address:
|
||||
{{ shipping_address }}
|
||||
|
||||
You will receive another email when your order ships.
|
||||
|
||||
Thank you for shopping with us!
|
||||
""",
|
||||
},
|
||||
{
|
||||
"code": "order_confirmation",
|
||||
"language": "fr",
|
||||
"name": "Confirmation de commande",
|
||||
"description": "Envoyé aux clients après avoir passé une commande",
|
||||
"category": EmailCategory.ORDERS.value,
|
||||
"variables": json.dumps([
|
||||
"customer_name", "order_number", "order_total",
|
||||
"order_items_count", "order_date", "shipping_address"
|
||||
]),
|
||||
"subject": "Confirmation de commande - {{ order_number }}",
|
||||
"body_html": """<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
</head>
|
||||
<body style="font-family: Arial, sans-serif; line-height: 1.6; color: #333; max-width: 600px; margin: 0 auto; padding: 20px;">
|
||||
<div style="background: linear-gradient(135deg, #10b981 0%, #059669 100%); padding: 30px; border-radius: 10px 10px 0 0;">
|
||||
<h1 style="color: white; margin: 0; font-size: 28px;">Commande confirmée !</h1>
|
||||
</div>
|
||||
|
||||
<div style="background: #f9fafb; padding: 30px; border-radius: 0 0 10px 10px;">
|
||||
<p style="font-size: 16px;">Bonjour {{ customer_name }},</p>
|
||||
|
||||
<p>Merci pour votre commande ! Nous l'avons bien reçue et elle est en cours de traitement.</p>
|
||||
|
||||
<div style="background: white; border-radius: 8px; padding: 20px; margin: 20px 0; border-left: 4px solid #10b981;">
|
||||
<h3 style="margin-top: 0; color: #10b981;">Détails de la commande</h3>
|
||||
<p style="margin: 5px 0;"><strong>Numéro de commande :</strong> {{ order_number }}</p>
|
||||
<p style="margin: 5px 0;"><strong>Date :</strong> {{ order_date }}</p>
|
||||
<p style="margin: 5px 0;"><strong>Articles :</strong> {{ order_items_count }}</p>
|
||||
<p style="margin: 5px 0;"><strong>Total :</strong> {{ order_total }}</p>
|
||||
</div>
|
||||
|
||||
<div style="background: white; border-radius: 8px; padding: 20px; margin: 20px 0;">
|
||||
<h3 style="margin-top: 0; color: #374151;">Adresse de livraison</h3>
|
||||
<p style="margin: 5px 0;">{{ shipping_address }}</p>
|
||||
</div>
|
||||
|
||||
<p>Vous recevrez un autre email lors de l'expédition de votre commande.</p>
|
||||
|
||||
<p style="color: #6b7280; font-size: 14px; margin-top: 30px;">
|
||||
Si vous avez des questions concernant votre commande, n'hésitez pas à nous contacter.
|
||||
</p>
|
||||
|
||||
<p>Merci pour votre achat !<br><strong>L'équipe</strong></p>
|
||||
</div>
|
||||
</body>
|
||||
</html>""",
|
||||
"body_text": """Commande confirmée !
|
||||
|
||||
Bonjour {{ customer_name }},
|
||||
|
||||
Merci pour votre commande ! Nous l'avons bien reçue et elle est en cours de traitement.
|
||||
|
||||
Détails de la commande :
|
||||
- Numéro de commande : {{ order_number }}
|
||||
- Date : {{ order_date }}
|
||||
- Articles : {{ order_items_count }}
|
||||
- Total : {{ order_total }}
|
||||
|
||||
Adresse de livraison :
|
||||
{{ shipping_address }}
|
||||
|
||||
Vous recevrez un autre email lors de l'expédition de votre commande.
|
||||
|
||||
Merci pour votre achat !
|
||||
""",
|
||||
},
|
||||
{
|
||||
"code": "order_confirmation",
|
||||
"language": "de",
|
||||
"name": "Bestellbestätigung",
|
||||
"description": "An Kunden nach einer Bestellung gesendet",
|
||||
"category": EmailCategory.ORDERS.value,
|
||||
"variables": json.dumps([
|
||||
"customer_name", "order_number", "order_total",
|
||||
"order_items_count", "order_date", "shipping_address"
|
||||
]),
|
||||
"subject": "Bestellbestätigung - {{ order_number }}",
|
||||
"body_html": """<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
</head>
|
||||
<body style="font-family: Arial, sans-serif; line-height: 1.6; color: #333; max-width: 600px; margin: 0 auto; padding: 20px;">
|
||||
<div style="background: linear-gradient(135deg, #10b981 0%, #059669 100%); padding: 30px; border-radius: 10px 10px 0 0;">
|
||||
<h1 style="color: white; margin: 0; font-size: 28px;">Bestellung bestätigt!</h1>
|
||||
</div>
|
||||
|
||||
<div style="background: #f9fafb; padding: 30px; border-radius: 0 0 10px 10px;">
|
||||
<p style="font-size: 16px;">Hallo {{ customer_name }},</p>
|
||||
|
||||
<p>Vielen Dank für Ihre Bestellung! Wir haben Ihre Bestellung erhalten und sie wird bearbeitet.</p>
|
||||
|
||||
<div style="background: white; border-radius: 8px; padding: 20px; margin: 20px 0; border-left: 4px solid #10b981;">
|
||||
<h3 style="margin-top: 0; color: #10b981;">Bestelldetails</h3>
|
||||
<p style="margin: 5px 0;"><strong>Bestellnummer:</strong> {{ order_number }}</p>
|
||||
<p style="margin: 5px 0;"><strong>Datum:</strong> {{ order_date }}</p>
|
||||
<p style="margin: 5px 0;"><strong>Artikel:</strong> {{ order_items_count }}</p>
|
||||
<p style="margin: 5px 0;"><strong>Summe:</strong> {{ order_total }}</p>
|
||||
</div>
|
||||
|
||||
<div style="background: white; border-radius: 8px; padding: 20px; margin: 20px 0;">
|
||||
<h3 style="margin-top: 0; color: #374151;">Lieferadresse</h3>
|
||||
<p style="margin: 5px 0;">{{ shipping_address }}</p>
|
||||
</div>
|
||||
|
||||
<p>Sie erhalten eine weitere E-Mail, sobald Ihre Bestellung versandt wird.</p>
|
||||
|
||||
<p style="color: #6b7280; font-size: 14px; margin-top: 30px;">
|
||||
Bei Fragen zu Ihrer Bestellung kontaktieren Sie uns bitte.
|
||||
</p>
|
||||
|
||||
<p>Vielen Dank für Ihren Einkauf!<br><strong>Das Team</strong></p>
|
||||
</div>
|
||||
</body>
|
||||
</html>""",
|
||||
"body_text": """Bestellung bestätigt!
|
||||
|
||||
Hallo {{ customer_name }},
|
||||
|
||||
Vielen Dank für Ihre Bestellung! Wir haben Ihre Bestellung erhalten und sie wird bearbeitet.
|
||||
|
||||
Bestelldetails:
|
||||
- Bestellnummer: {{ order_number }}
|
||||
- Datum: {{ order_date }}
|
||||
- Artikel: {{ order_items_count }}
|
||||
- Summe: {{ order_total }}
|
||||
|
||||
Lieferadresse:
|
||||
{{ shipping_address }}
|
||||
|
||||
Sie erhalten eine weitere E-Mail, sobald Ihre Bestellung versandt wird.
|
||||
|
||||
Vielen Dank für Ihren Einkauf!
|
||||
""",
|
||||
},
|
||||
{
|
||||
"code": "order_confirmation",
|
||||
"language": "lb",
|
||||
"name": "Bestellung Konfirmatioun",
|
||||
"description": "Un Clienten no enger Bestellung geschéckt",
|
||||
"category": EmailCategory.ORDERS.value,
|
||||
"variables": json.dumps([
|
||||
"customer_name", "order_number", "order_total",
|
||||
"order_items_count", "order_date", "shipping_address"
|
||||
]),
|
||||
"subject": "Bestellung Konfirmatioun - {{ order_number }}",
|
||||
"body_html": """<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
</head>
|
||||
<body style="font-family: Arial, sans-serif; line-height: 1.6; color: #333; max-width: 600px; margin: 0 auto; padding: 20px;">
|
||||
<div style="background: linear-gradient(135deg, #10b981 0%, #059669 100%); padding: 30px; border-radius: 10px 10px 0 0;">
|
||||
<h1 style="color: white; margin: 0; font-size: 28px;">Bestellung confirméiert!</h1>
|
||||
</div>
|
||||
|
||||
<div style="background: #f9fafb; padding: 30px; border-radius: 0 0 10px 10px;">
|
||||
<p style="font-size: 16px;">Moien {{ customer_name }},</p>
|
||||
|
||||
<p>Merci fir Är Bestellung! Mir hunn Är Bestellung kritt an si gëtt beaarbecht.</p>
|
||||
|
||||
<div style="background: white; border-radius: 8px; padding: 20px; margin: 20px 0; border-left: 4px solid #10b981;">
|
||||
<h3 style="margin-top: 0; color: #10b981;">Bestelldetailer</h3>
|
||||
<p style="margin: 5px 0;"><strong>Bestellnummer:</strong> {{ order_number }}</p>
|
||||
<p style="margin: 5px 0;"><strong>Datum:</strong> {{ order_date }}</p>
|
||||
<p style="margin: 5px 0;"><strong>Artikelen:</strong> {{ order_items_count }}</p>
|
||||
<p style="margin: 5px 0;"><strong>Total:</strong> {{ order_total }}</p>
|
||||
</div>
|
||||
|
||||
<div style="background: white; border-radius: 8px; padding: 20px; margin: 20px 0;">
|
||||
<h3 style="margin-top: 0; color: #374151;">Liwweradress</h3>
|
||||
<p style="margin: 5px 0;">{{ shipping_address }}</p>
|
||||
</div>
|
||||
|
||||
<p>Dir kritt eng weider E-Mail wann Är Bestellung verschéckt gëtt.</p>
|
||||
|
||||
<p style="color: #6b7280; font-size: 14px; margin-top: 30px;">
|
||||
Wann Dir Froen iwwer Är Bestellung hutt, kontaktéiert eis w.e.g.
|
||||
</p>
|
||||
|
||||
<p>Merci fir Ären Akaf!<br><strong>D'Team</strong></p>
|
||||
</div>
|
||||
</body>
|
||||
</html>""",
|
||||
"body_text": """Bestellung confirméiert!
|
||||
|
||||
Moien {{ customer_name }},
|
||||
|
||||
Merci fir Är Bestellung! Mir hunn Är Bestellung kritt an si gëtt beaarbecht.
|
||||
|
||||
Bestelldetailer:
|
||||
- Bestellnummer: {{ order_number }}
|
||||
- Datum: {{ order_date }}
|
||||
- Artikelen: {{ order_items_count }}
|
||||
- Total: {{ order_total }}
|
||||
|
||||
Liwweradress:
|
||||
{{ shipping_address }}
|
||||
|
||||
Dir kritt eng weider E-Mail wann Är Bestellung verschéckt gëtt.
|
||||
|
||||
Merci fir Ären Akaf!
|
||||
""",
|
||||
},
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user