Email templates in your theme: complete overview
Overview of all email templates in Shoporama themes. Learn what each template does, when it is sent, and which variables you can use to customize your emails.
Shoporama themes include a set of email templates that control the automatic emails your store sends. All templates are located in the templates/mails/ folder of your theme and use Smarty as the template language.
Shoporama's standard Smarty 4 themes (Delaware, DelawareDK, Alaska2, California, Montana, Washington) come with email templates, but not every theme includes every template. If a template is missing from your theme, you can copy it from one of the other standard themes.

Tip
You can set the subject of the order confirmation and of the shipping confirmation email under Webshop → Emails and Text Messages in the Order emails to the customer card, without editing the templates. In the Delaware and DelawareDK themes, you can also change the subject and text of each email under Design → Theme settings.
Preview the theme's emails
Before you edit your template, or to see how an email looks after your changes, you can view the theme's email directly in admin under Design → Emails.
- Click the email, for example Order confirmation (invoice.html) or Abandoned cart (basket_mail.html), and expand the Theme mail card. It shows the template with test data from the store, with the Subject and the recipient at the top
- Reload the page to get new data, such as a different random order, so you can check that the layout holds up regardless of the content. If you want to see a specific order, you can select it as the Test order in the email editor
- The theme's email cannot be sent as a test email. Test emails are sent from the email editor and show a setup. If you want the theme's email in your own inbox, place a test order in the store with your own email address
- If the theme is missing the template, the email says The theme is missing this email in the overview, and the Theme mail card is not shown
Read more in Preview and test your automated emails.
If you want to translate or change the built-in texts in the email, you will find them under Design → Texts. Search the Mail section to find the strings the template uses via <{t section="Mail"}>.
Order emails
| Template | When is it sent? | Key variables |
|---|---|---|
| invoice.html | Order confirmation. Sent immediately after the customer completes an order | $order, $webshop, $webshop->getCompany() |
| order_sent.html | When the order status changes to "Shipped", including track & trace | $order, $order->getTrackingUrl() |
| order_ready_for_pickup.html | When the order is ready for pickup | $order, $pickup_name, $pickup_address |
| order_picked_up.html | When the order has been picked up | $order, $webshop->getCompany() |
| order_credit.html | When a credit note is created | $order, $order->getPublicUrl() |
| payment_mail.html | Payment link. Sent when the order is awaiting payment | $order, $payment_url |
| return_label.html | When a return label is generated (PDF attached) | $order |
| return_received.html | When returned items have been received | $order, $order_return |
| invoice_dropshipping.html | Sent to the supplier for a dropshipping order | $order, $webshop |
Marketing emails
| Template | When is it sent? | Key variables |
|---|---|---|
| basket_mail.html | Abandoned cart email. Sent automatically X hours after the customer leaves the cart | $basket, $basket_url |
| after_purchase.html | Follow-up email with product recommendations. Sent X hours after purchase if the order has been paid and shipped by then | $order, $webshop->getAfterPurchase($products) |
| product_review_mail.html | Product review request. Sent X hours after the order is set to Shipped | $order, $order->getPublicUrl('product_review') |
Stock emails
| Template | When is it sent? | Key variables |
|---|---|---|
| in_stock_mail.html | When a sold-out product is back in stock (the customer has signed up) | $product, $variant_name |
| out_of_stock_mail.html | When a product sells out (sent to the store owner) | $product |
Customer account emails
| Template | When is it sent? | Key variables |
|---|---|---|
| user-welcome-mail.html | When a new customer account is created | $customer, $customer->getTokenUrl() |
| user-reset-password-mail.html | When the customer requests a new password | $customer, $customer->getTokenUrl() |
| user-points-expires-mail.html | When the customer's loyalty points are about to expire | $customer, $points_to_expire, $points_expire_date |
Shared include files
The templates use shared includes for the layout and reusable blocks:
- email.wrapper.start.html / email.wrapper.end.html: HTML frame with logo and footer
- email.order.details.html: Billing and shipping address
- email.order.products.html: Product list with images, SKU, and prices
- email.order.recommendations.html: Product recommendations
- email.basket.products.html: Cart products for the abandoned cart email
- email.order.terms.html: Terms and conditions and privacy policy
The email editor and the theme's templates
The store can also build its emails from blocks under Design → Emails without code. If an email has a published and active setup there, it is sent instead of the theme's template. Without a setup, the theme's template is used as before. If the setup fails when the email is about to be sent, the customer gets the theme's email, and the store gets a message under Messages. An active setup is also sent if the theme has no template for the email at all. The dropshipping email (invoice_dropshipping.html) is not part of the editor.
As a theme developer, you can provide your own versions of the editor's blocks, so emails from the editor follow the theme's design:
- templates/mails/blocks/<type>.html: overrides the core block of that type, for example header.html, button.html, or order_products.html
- templates/mails/blocks/layout.html: overrides the frame around the blocks, meaning the document, the <head>, the background, and the footer. The layout gets the finished blocks in $mail_content and outputs them where the content should go
The blocks and the layout get the same variables as the theme's email, for example $order, $webshop, and $customer, plus $block with the block's settings and $design with the colors and sizes from the Shared mail design. The store's own code on a block in the editor takes priority over the theme's file, and if the store has written code for the whole email, neither the theme's blocks nor its layout is used. The preview under Design → Emails uses the theme's blocks, so you can see the result right away. The block types and all variables are listed in the documentation for theme developers, and the editor itself is described in the article about the email editor.
Customize without editing templates
Some things you can customize directly in admin:
- Texts, logo, colors, and content in the customer emails: Design → Emails. A published setup is used instead of the theme's template.
- Subject of the order confirmation/invoice and of the shipping confirmation email: Webshop → Emails and Text Messages, the Order emails to the customer card. If the email has an active setup under Design → Emails, the setup's subject is used.
- When the emails are sent, for example the after-purchase email and the review email: Webshop → Emails and Text Messages, the Automatic emails to the customer card.
- Subject and text for each email (Delaware and DelawareDK only): Design → Theme settings, the E-mails section (Emails in Delaware). These fields are used by the theme's emails, not by setups under Design → Emails.
- Logo: Delaware and DelawareDK use the Logo URL field under Design → Theme settings. The other built-in themes use the logo from Design → Logo & terms.
Global variables
You can use these variables in all email templates:
$webshop->getName() Store name
$webshop->getUrl() Store URL
$webshop->getLogo() Logo from Design → Logo & terms
$webshop->getCompany()->getName() Company name (also getAddress(), getZipcode(),
getCity(), getPhone(), and getEmail())
In Delaware and DelawareDK, the templates get company information, currency, separators, and logo from the theme settings. In the other themes, these variables are empty:
$settings.company.name Company name $settings.company.phone Phone number $settings.company.email Email $settings.company.address Address $settings.company.zipcode Postal code $settings.company.city City $settings.company.vat CVR number (Danish company registration number) $settings.currency.display Currency symbol (e.g. "kr.") $settings.general.thousand Thousands separator $settings.general.decimal Decimal separator $settings.theme.logo_url URL of the company logo
Customization tips
- Use UTM codes on the links in your emails so you can measure their effect in Google Analytics
- You can use Smarty logic for dynamic content, for example writing "Have a nice weekend" on Fridays with <{if $smarty.now|date_format:'%u' == 5}>
- Always copy templates from a standard theme as your starting point. They already contain responsive HTML and all the necessary variables
- Check your emails mainly in the Theme mail card under Design → Emails, where you see the template with test data from the store. If you want the email in your inbox, or want to test the full interaction with the payment gateway and shipping carrier, place a real test order and complete the flow
Frequently asked questions
How do I see what an email looks like without placing a real order?
Go to Design → Emails, click the email, and expand the Theme mail card. This shows the theme's email with test data from the store. If you want to see it in a real email client, place a test order with your own email address. Setups from the email editor can be sent as a test email directly from the editor.
Can I translate the texts in the emails without editing the template?
Yes. The built-in texts are wrapped in <{t section="Mail"}> and can be translated under Design → Texts in the Mail section. This is the recommended way to change the wording.
What test data is used when I preview an email?
Shoporama uses real data from your store. Order emails are shown with the test order you have selected in the email editor, or otherwise with a random order, and customer emails, for example, with the newest customer. When you reload the page without a selected test order, you get a new random order. This lets you check that the layout holds up no matter how many products there are, how long the product names are, and so on.
Why aren't my customers receiving a specific email?
The email is only sent if the template exists in your theme, or if the email has a published and active setup under Design → Emails. If the template is missing, the email says The theme is missing this email in the overview. You can create a setup for the email there, or copy the template from another standard theme and place it in templates/mails/ in your own theme. Some emails also need to be enabled under Webshop → Emails and Text Messages: the time-based ones in the Automatic emails to the customer card and the cancellation email in the Order emails to the customer card.
Do I still need to place a test order when I can see the email under Design → Emails?
For everyday checks, the Theme mail card is the fastest. If you want the theme's email in your own inbox, or want to test the full flow with the payment gateway, shipping setup, and status changes, place a real test order. The two methods complement each other.
Can I send a test email to a colleague or a customer?
To a colleague, if they are set up as a user with access to the store. Test emails from the email editor can only be sent to users with access to the store, so they cannot be sent to customers. There is also a limit of three test emails per minute and twenty per hour per user.
Need help customizing your email templates? Contact us at support@shoporama.dk.
Related articles
Customize the content of your automatic emails
How to customize the automatic emails your Shoporama store sends: without code under Design > Emails, with subject lines and texts in the store...
Email templates in Shoporama: which template sends which email
A complete overview of all email templates in Shoporama, from order confirmations and abandoned cart emails to return labels, subscriptions, and...
Implement Theme Builder in your theme
A guide to implementing Shoporama's Theme Builder in your theme, so the store owner can build pages visually.