Author Topic: Template for order emails!  (Read 35893 times)

melina

  • Beginner
  • *
  • Posts: 34
Template for order emails!
« 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!!
=)

Stannite

  • Beginner
  • *
  • Posts: 40
Re: Template for order emails!
« Reply #1 on: May 15, 2012, 11:49:57 am »
Thanks for the info, it saves me some time to figure it out myself.

melina

  • Beginner
  • *
  • Posts: 34
Re: Template for order emails!
« Reply #2 on: May 21, 2012, 20:13:10 pm »
Your are welocme! That was my idea, to save some time to others...  :D

celticwebs

  • Beginner
  • *
  • Posts: 45
Re: Template for order emails!
« Reply #3 on: May 22, 2012, 23:06:05 pm »
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

  • Beginner
  • *
  • Posts: 34
Re: Template for order emails!
« Reply #4 on: May 22, 2012, 23:53:00 pm »
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

  • Contributing Developer
  • Full Member
  • *
  • Posts: 878
    • GiBiLogic
Re: Template for order emails!
« Reply #5 on: September 03, 2012, 17:16:06 pm »
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

  • Beginner
  • *
  • Posts: 13
Re: Template for order emails!
« Reply #6 on: May 13, 2013, 18:19:05 pm »
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

  • Beginner
  • *
  • Posts: 10
Re: Template for order emails!
« Reply #7 on: May 20, 2013, 23:42:33 pm »
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

  • Jr. Member
  • **
  • Posts: 174
Re: Template for order emails!
« Reply #8 on: September 18, 2013, 21:09:30 pm »
Thanks Melina!
VM 3.0.17.6 | VM 2.0.24c | VM 1.1.9

skhn123

  • Jr. Member
  • **
  • Posts: 72
  • Almost everything in virtuemart
  • VirtueMart Version: 2.6.6
Re: Template for order emails!
« Reply #9 on: April 14, 2014, 07:32:29 am »
Thank you so much melina for this useful info.

Sadique Khan

FelixR

  • Beginner
  • *
  • Posts: 27
  • VirtueMart Version: 3.0.14
Re: Template for order emails!
« Reply #10 on: April 25, 2014, 14:17:58 pm »
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

  • UK Web Developer & Consultant
  • Global Moderator
  • Super Hero
  • *
  • Posts: 27426
  • Always on vacation
    • Jenkin Hill Internet
Re: Template for order emails!
« Reply #11 on: April 25, 2014, 18:01:07 pm »
In the Shop/Invice/Email tab remove {vm:vendorlegalinfo} from the footer field editor.
Kelvyn

Jenkin Hill Internet,
Lowestoft, Suffolk, UK

Unsolicited PMs/emails will be ignored.

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

Currently using VM 3.4.3.10057 on Joomla 3.9.8 PHP 7.0.33
Testing VM .3.6.0.10075 on Joomla 3.9.8

decorette

  • Beginner
  • *
  • Posts: 7
Re: Template for order emails!
« Reply #12 on: July 15, 2015, 08:23:54 am »
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

  • UK Web Developer & Consultant
  • Global Moderator
  • Super Hero
  • *
  • Posts: 27426
  • Always on vacation
    • Jenkin Hill Internet
Re: Template for order emails!
« Reply #13 on: July 15, 2015, 10:49:39 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

Jenkin Hill Internet,
Lowestoft, Suffolk, UK

Unsolicited PMs/emails will be ignored.

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

Currently using VM 3.4.3.10057 on Joomla 3.9.8 PHP 7.0.33
Testing VM .3.6.0.10075 on Joomla 3.9.8

decorette

  • Beginner
  • *
  • Posts: 7
Re: Template for order emails!
« Reply #14 on: July 15, 2015, 11:07:41 am »
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!