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';