-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
How to customize your email confirmations
First things to know, Solidus platform has a Mailer preview that can be accessed here when running your local environment.
http://localhost:3000/rails/mailers/
Here you have the "Spree Mailer Preview" for Reimbursement, Order Cancel, Confirmation email, and Inventory Cancellation as well as Shipped email confirmation template.
If you click on Confirm you will see an unstyled version of the email that gets sent to the client by default. The direct URL should be:
http://localhost:3000/rails/mailers/spree/mailer_previews/order/confirm
To edit the page you will first have to create a version of the file by overriding the default core template that can be found in this path of the Solidus Core Github code:
https://github.com/solidusio/solidus/blob/master/core/app/views/spree/order_mailer/confirm_email.html.erb
You can do this by running this on the root of your app via your terminal:
> touch app/views/spree/order_mailer/confirm_email.html.erb
and copy the confirm_email.html.erb code to edit the template.
To preview your changes you can go here:
http://localhost:3000/rails/mailers/spree/mailer_previews/order/confirm
That's it!
The other locations of the files to override for the Shipping confirmation can be found in:
app/views/spree/carton_mailer/shipped_email.html.erb
The Header and Footer of the email confirmations can be found here:
app/views/layouts/spree/base_mailer.html.erb