News:

Looking for documentation? Take a look on our wiki

Main Menu

Where do order_status_email_layout overrides have to be placed?

Started by Alexb65, February 03, 2023, 10:11:58 AM

Previous topic - Next topic

Alexb65

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

Alexb65

Ok
I probably discovered this

template overrides, com_virtuemart/invoices/mail_nomeunicodellayout.php

Jumbo!


AH

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
}
?>





Regards
A

Joomla 4.4.5
php 8.1