From 485263903fa2cb83d45f9b237672de897a6f82fc Mon Sep 17 00:00:00 2001 From: dwindown Date: Sat, 3 Jan 2026 08:53:31 +0700 Subject: [PATCH] Add order_created email template with QR code section MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This migration updates the order_created email template to include: - QR code image display for payment - Order summary section with all details - Payment link button - QR expiry time display - Professional layout and styling The template uses these shortcodes: - {qr_code_image} - Base64 QR code image generated by send-notification - {qr_expiry_time} - QR code expiration timestamp - {nama}, {email}, {order_id}, {tanggal_pesanan} - {total}, {metode_pembayaran}, {produk} - {payment_link}, {thank_you_page}, {platform_name} 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 --- ..._update_order_created_template_with_qr.sql | 86 +++++++++++++++++++ 1 file changed, 86 insertions(+) create mode 100644 supabase/migrations/20250103000001_update_order_created_template_with_qr.sql diff --git a/supabase/migrations/20250103000001_update_order_created_template_with_qr.sql b/supabase/migrations/20250103000001_update_order_created_template_with_qr.sql new file mode 100644 index 0000000..6b8a8fe --- /dev/null +++ b/supabase/migrations/20250103000001_update_order_created_template_with_qr.sql @@ -0,0 +1,86 @@ +-- Update order_created email template to include QR code +-- This migration adds the QR code section to the order confirmation email + +UPDATE notification_templates +SET + body_html = ' +
+

Konfirmasi Pesanan

+ +

Halo {nama},

+ +

Terima kasih telah melakukan pemesanan! Berikut adalah detail pesanan Anda:

+ + +
+

Scan QR untuk Pembayaran

+ + + QRIS Payment QR Code + +

+ Scan dengan aplikasi e-wallet atau mobile banking Anda +

+ +

+ Berlaku hingga: {qr_expiry_time} +

+ +
+ + Bayar Sekarang + +
+
+ + +
+

Detail Pesanan

+ +

+ Order ID: {order_id} +

+ +

+ Tanggal: {tanggal_pesanan} +

+ +

+ Produk: {produk} +

+ +

+ Metode Pembayaran: {metode_pembayaran} +

+ +

+ Total: {total} +

+
+ +

+ Silakan selesaikan pembayaran Anda sebelum waktu habis. Setelah pembayaran berhasil, akses ke produk akan segera aktif. +

+ +

+ Jika Anda memiliki pertanyaan, jangan ragu untuk menghubungi kami. +

+ +

+ Terima kasih,
+ Tim {platform_name} +

+
+', + updated_at = NOW() +WHERE key = 'order_created'; + +-- Verify the update +SELECT + key, + subject, + is_active, + LEFT(body_html, 100) as body_preview, + updated_at +FROM notification_templates +WHERE key = 'order_created';