Email đơn hàng

Order Email

Order Email manages the templates used for automated notifications in the order lifecycle.

What the source handles

  • load templates for the order group
  • match templates against enabled order email settings
  • create and edit templates in a modal
  • manage variables
  • manage sample_data
  • render preview content with placeholder replacement

Known notification keys in source

  • order.order.admin_on_new_order
  • order.order.user_on_status_change
  • order.order.user_on_new_order
  • order.order.admin_on_status_change
  • order.order.admin_on_new_refund_request

Important form fields

  • name
  • blade_layout
  • group
  • key_name
  • content
  • language_id
  • variables
  • sample_data
  • description

Safe editing flow

  1. Open the template tied to the correct business event.
  2. Review variables before changing content.
  3. Update sample data so preview remains meaningful.
  4. Save only after verifying placeholders and expected output.

Common risk

Renaming or removing variables without updating the template content and sample data can create drift between preview behavior and runtime output.