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

Different mail template for vendor

Started by dirkb, May 29, 2017, 17:00:24 PM

Previous topic - Next topic

dirkb

Hi ... using latest Joomal and Latest VM.

I would like to modify the mailing function a little bit.

Put the mail_html_xxx.php in the override folder.

The file controlling the template structure ... mail_html.php calls the different building blocks (below)

How could I build the following. I want a different pricelist and footer for the vendor. How would I call that ?

I tried to duplicate and replace the recipient ==´shopper" with ==´vendor´... but that is not doing the trick.

Anybody Ideas ?

---------------------------what I tried -----------------------------------------

if ($this->recipient == 'shopper') {
             echo $this->loadTemplate('pricelist');
         }
         if ($this->recipient == 'vendor') {
             echo $this->loadTemplate('pricelist_admin');
         }



--------------------------mail_html.php---------------------------------------
<?php
// Shop desc for shopper and vendor
         if ($this->recipient == 'shopper') {
             echo $this->loadTemplate('header');
         }
// Message for shopper or vendor
         echo $this->loadTemplate($this->recipient);
// render shipto billto adresses
         echo $this->loadTemplate('shopperaddresses');
// render price list
         echo $this->loadTemplate('pricelist');
// more infos
         echo $this->loadTemplate($this->recipient . '_more');
// end of mail
         echo $this->loadTemplate('footer');
         ?>

AH

I want a different pricelist and footer for the vendor.

In your override folder just move the files and create the files you are intending to override

If you want to show order details and just adjust the list of items there are lots of ways you can go about this

Here is one:-

mail_html_pricelist.php



$oldlayout=$this->getLayout();
$this->setLayout('invoice');

if ($this->recipient == 'shopper') {

    echo $this->loadTemplate('items');
}

if ($this->recipient == 'vendor') {
    echo $this->loadTemplate('items_vendor');
}

$this->setLayout($oldlayout);




Then create the new override invoice_items_vendor.php
Regards
A

Joomla 3.10.11
php 8.0

dirkb

sorry I´m late ... thanks I will try what you suggest, sounds like it might work =)

AH

Regards
A

Joomla 3.10.11
php 8.0