News:

You may pay someone to create your store, or you visit our seminar and become a professional yourself with the silver certification

Main Menu

Template for order emails!

Started by melina, May 14, 2012, 14:10:07 PM

Previous topic - Next topic

melina

After a lot of time of wanting to give something instead of asking, I finally found something I can give to you!

Many of you, just like me, must be wondering how and where to change the templates for the emails sent to the users when after ordering our roducts.

After A LOT of work, research and trying out things with no results, I found it!

Let me tell you, it is amazing to have something like Joomla and Virtuemart and I love what they do. But was that hard to explain this kind of changes somewhere? I could find it anywhere... little explanation... nothing.

Ok, when you want to change the emails, the first thing you have to know is that iit is nothing like the old VM. This time you have your emails put together with different files. Header, footer, content... all separarted. That means you have to find and edit all of the files.

As usual, the text on emails are taken from the language files, so you can look for that there and change it as you wish.

Regarding the rest, I cant help with everything but at least I can tell you what I found out to help. You have to go to components/com_virtuemart/views/invoice/tmpl
Over there you will find:
mail_html.php for the genral rules of the email (background color, for example)
mail_html_header.php
mail_html_footer.php
mail_html_shopper.php (this is the one for the order number, etc)
mail_html_shopperaddresses.php (this is the one for the block with the 2 addresses information)
mail_html_vendor.php (for the vendor email, the one you get)
mail_html_invoice_items.php (this is the one for the table with all the items, sku, prices, etc)

Hope to help in some way to someone!!
=)

Stannite

Thanks for the info, it saves me some time to figure it out myself.

melina

Your are welocme! That was my idea, to save some time to others...  :D

celticwebs

Thanks for the tip,  I've been trying to find what tells the system the order to print out the address.  I'd like it to be city, state, zip  but currently I think it's state zip city which the postal machine doesn't recognize.   Does anybody know where the address order layout is set please?

melina

Hi Celticwebs! If I am not mistaken the address shown on the email correspon to the user fields on BE. I think the order you give to the fields on BE of VM is the order to show the fields everywhere, the account, the email, etc. Try changing the order of fields there.
=)

zanardi

Thank you @melina. To complete the information, the SUBJECT of the e-mail can be changed in the language file. The strings are around line 222-244 of the frontend language file.
--
Francesco (zanardi)
http://extensions.gibilogic.com
@gibilogic on Twitter

Bit Stupid

Just an update to this super useful post.

mail_html_invoice_items.php (this is the one for the table with all the items, sku, prices, etc)

No it is currently just invoice_items.php

also you seem to need to edit the core files, editing them in any kind of template override (for me) did not work.  So I do not know how stable these updates will be when updating Virtuemart? (any dev coments to this welcome??)

Also for the subject line - This is controlled through the Language files.

wnrdesign

Hi,

Thanks for this, I've already found the user e-mail templates as well myself.

What I need to change is the order confirmation send to the vendor. Does anyone know where to edit those files?

Kind regards.

maxispin

VM 3.0.17.6 | VM 2.0.24c | VM 1.1.9

skhn123

Thank you so much melina for this useful info.

Sadique Khan

FelixR

Thanks for this

However - my emails include all the text that is in the shop description.

Cannot see where/how to remove that
Pete Rossetti
Perfect Hosts
Chester UK

Currently using VM3.0.14 on Joomla 3.4.8

jenkinhill

In the Shop/Invice/Email tab remove {vm:vendorlegalinfo} from the footer field editor.
Kelvyn
Lowestoft, Suffolk, UK

Retired from forum life November 2023

Please mention your VirtueMart, Joomla and PHP versions when asking a question in this forum

decorette

Quote from: melina on May 14, 2012, 14:10:07 PM
After a lot of time of wanting to give something instead of asking, I finally found something I can give to you!

Many of you, just like me, must be wondering how and where to change the templates for the emails sent to the users when after ordering our roducts.

After A LOT of work, research and trying out things with no results, I found it!

Let me tell you, it is amazing to have something like Joomla and Virtuemart and I love what they do. But was that hard to explain this kind of changes somewhere? I could find it anywhere... little explanation... nothing.

Ok, when you want to change the emails, the first thing you have to know is that iit is nothing like the old VM. This time you have your emails put together with different files. Header, footer, content... all separarted. That means you have to find and edit all of the files.

As usual, the text on emails are taken from the language files, so you can look for that there and change it as you wish.

Regarding the rest, I cant help with everything but at least I can tell you what I found out to help. You have to go to components/com_virtuemart/views/invoice/tmpl
Over there you will find:
mail_html.php for the genral rules of the email (background color, for example)
mail_html_header.php
mail_html_footer.php
mail_html_shopper.php (this is the one for the order number, etc)
mail_html_shopperaddresses.php (this is the one for the block with the 2 addresses information)
mail_html_vendor.php (for the vendor email, the one you get)
mail_html_invoice_items.php (this is the one for the table with all the items, sku, prices, etc)

Hope to help in some way to someone!!
=)


There used to be an order_confirmation_email file to edit the language for emails sent to customers... I can't find that file now on the new virtuemart... can someone direct me to the correct language files? Thank you!

VM 2.0.20b
Joomla 2.5.19

jenkinhill

Quote from: decorette on July 15, 2015, 08:23:54 AM
I can't find that file now on the new virtuemart...
Quote
VM 2.0.20b
Joomla 2.5.19

Those versions are not new, but old and insecure. What "new" version are you referring to?
Kelvyn
Lowestoft, Suffolk, UK

Retired from forum life November 2023

Please mention your VirtueMart, Joomla and PHP versions when asking a question in this forum

decorette

I'm sorry I wasn't clear. I'm using those versions (VM 2.0.20b) and am unable to find the order confirmation email language file since upgrading to version 2... appreciate your help!