Add delivery date & accessorials to emails on Magento
Integrate delivery details and accessorials into Magento order emails for enhanced customer communication
Overview
ShipperHQ lets you include detailed information about chosen shipping methods in your order emails. This guide will walk you through the steps to configure this functionality 😊
Table of Contents- Overview
- Adding Information to Your Transactional Email Template
- Adding Conditional Statements to Email Template
- Enhanced Checkout
Adding Information to Your Transactional Email Template
Ensure you have version 20.27.0 or later (updating to the latest is recommended).
- Navigate to Marketing > Email Templates within your Magento admin panel.
- Edit your current template for new order emails, or create a new one using the Add New Template button.
- Your current template might display the shipping method information using
{{var order.shipping_description}}. - Shipping methods using the date option will show up in the shipping description variable. For calendars, the date is stored separately and can be added like this:
Delivery Date: {{var deliveryDate}}. - Click "Save Template".
You can also add these variables:
{{var liftgateRequired}}{{var notifyRequired}}{{var insideDelivery}}{{var limitedDelivery}}{{var customerCarrier}}{{var customerCarrierAccount}}{{var customerCarrierPh}}
Adding Conditional Statements to Email Template
Requirements:
- module-shipper 20.54
- Magento 2.4.6 (may work on older versions)
To add bespoke text to your email template based on a customer's selection of accessorials at checkout, use this functionality:
{{if liftgateRequired}}
<p>Liftgate Required</p>
{{/if}}
{{if notifyRequired}}
<p>Notify Before Delivery Requested</p>
{{/if}}
{{if insideDelivery}}
<p>Inside Delivery Requested</p>
{{/if}}
{{if limitedDelivery}}
<p>Limited Access Delivery</p>
{{/if}}
Enhanced Checkout
With Enhanced Checkout for Magento 2, use the following variables in your email template:
{{var deliveryDate}}{{var timeSlot}}{{var pickupAddress}}
For all three variables formatted together, use:
{{var shq_expanded_shipping_description}}