VirtueMart Forum

VirtueMart 2 + 3 + 4 => Templating & Layouts => Topic started by: Alexb65 on February 03, 2023, 10:11:58 AM

Title: Where do order_status_email_layout overrides have to be placed?
Post by: Alexb65 on February 03, 2023, 10:11:58 AM
Hi all

VM 4.0.12 J 4.2.7

I searched around and found no answer

I need to override the S status email and have no idea where to look

The invoice area of templates contains several pieces of the puzzle but it seems I'm missin something

TIA for you help
Title: Re: Where do order_status_email_layout overrides have to be placed?
Post by: Alexb65 on February 03, 2023, 10:52:06 AM
Ok
I probably discovered this

template overrides, com_virtuemart/invoices/mail_nomeunicodellayout.php
Title: Re: Where do order_status_email_layout overrides have to be placed?
Post by: Jumbo! on February 03, 2023, 15:38:13 PM
You can accomplish this quickly using VP Email Manager. You can take a look at it - https://www.virtueplanet.com/extensions/vp-email-manager.
Title: Re: Where do order_status_email_layout overrides have to be placed?
Post by: AH on February 05, 2023, 14:27:03 PM
I am assuming you want to use the "Unique email layout" in the order status settings.

As an example - If you have called the layout "unique"

You would store the template in the directory:

templates/YOURSITETEMPLATE/html/com_virtuemart/invoice/

With the filename:

mail_unique.php


You can add related sublayouts for this unique layout,  by doing this:-

echo $this->loadTemplate('header');


Which would load file:-
mail_unique_header.php


And you can differentiate and load additional subfiles to give more information for a shopper VS vendor e.g.


<?php
if (
$this->recipient == 'shopper') {
echo $this->loadTemplate('header');
echo $this->loadTemplate('items');
echo $this->loadTemplate('footer');
}
if ($this->recipient == 'vendor') {
//todo something possibly
}
?>





Title: Re: Where do order_status_email_layout overrides have to be placed?
Post by: Alexb65 on February 22, 2023, 10:56:00 AM
Thank you AH