VirtueMart Forum

VirtueMart 2 + 3 + 4 => General Questions => Topic started by: annpaul on January 25, 2023, 06:13:32 AM

Title: customize Text email template used to send order completion emails
Post by: annpaul on January 25, 2023, 06:13:32 AM
Two questions:

1. I noticed that the HTML email correctly includes the order number wherever it should be present. But when I changed the Order Mail Format (in Configuration/Orders) to Text, it is missing the order number. The first line of the email looks like this:

Quote
Your order number:

Order confirmedYou bought and confirmed an order in ---- Store shop online.You can check the status of your order by going to your account

your order password = p_vb3NbdLH


Your order status is: Confirmed


view your order online : https://-----.com/index.php?option=com_virtuemart&view=orders&layout=details&order_number=6HU8013&order_pass=p_vb3NbdLH

Your comment:  testing notes

As you can see, the order link at the bottom does have the order number but it is missing at the top.

Besides this, there are several formatting issues with this emails (missing capitalization, spaces, punctuation etc.). So I am guessing there must be a template somewhere that is generating this email and I need to fix that template, right? Where can I find it?


2. Is it possible to send HTML email to the customer and Text email to the vendor upon order completion?

thank you!



Title: Re: customize Text email template used to send order completion emails
Post by: annpaul on January 25, 2023, 16:15:40 PM
Found it.
I searched in vm files for "your order number:" using Agent ransack and found out the hard way how emails are being created. It is not pretty!

This was helpful too: https://forum.virtuemart.net/index.php?topic=102633.15
Title: Re: customize Text email template used to send order completion emails
Post by: annpaul on January 25, 2023, 16:16:31 PM
Can someone please provide some help on this though:

2. Is it possible to send HTML email to the customer and Text email to the vendor upon order completion?
Title: Re: customize Text email template used to send order completion emails
Post by: Jumbo! on January 25, 2023, 16:17:36 PM
1. You need to override and customise the layout files starting with "mail_" in the "components/com_virtuemart/views/invoice/tmpl/" folder.

2. No, you can not simultaneously have HTML and Text formats for different emails.

Alternatively, you can use VP Email Manager (https://www.virtueplanet.com/extensions/vp-email-manager), which allows you to edit all VirtueMart emails using standard Joomla Editors.
Title: Re: customize Text email template used to send order completion emails
Post by: sirius on January 26, 2023, 09:32:15 AM
Yes, VP Email Manager is a must have.
Title: Re: customize Text email template used to send order completion emails
Post by: pinochico on January 26, 2023, 10:59:27 AM
Yes, VirtueMart Mailing Manager (https://www.minijoomla.org/extensions/virtuemart-extensions/virtuemart-mailing-manager) we use 8 years and is a must have definitely :)