VirtueMart Forum

VirtueMart 2 + 3 + 4 => Templating & Layouts => Topic started by: Peterkrk on May 17, 2020, 16:37:45 PM

Title: Display manufacturer name in confirmation email
Post by: Peterkrk on May 17, 2020, 16:37:45 PM
Hi,
I would like to show in my confirmation email also manufacturer (manufacturers) of the ordered products. In components/com_virtuemart/views/invoice/tmpl/mail_html_pricelist.php I put this code:

$query = 'SELECT `mf_name` ' . ' FROM `#__virtuemart_manufacturers_sl_si` ' . ' WHERE `virtuemart_manufacturer_id` =' .$item->virtuemart_category_id ;
$db->setQuery($query);
$manuname = $db->loadResult();

and after that also

<?php echo $manuname; ?>

It is not working... any suggestions?

Regards,
Peter
Title: Re: Display manufacturer name in confirmation email
Post by: AH on May 17, 2020, 17:37:40 PM
The manufacturer name is already provided in the item date

Just try echoing

$item->mf_name
Title: Re: Display manufacturer name in confirmation email
Post by: Peterkrk on May 17, 2020, 18:58:23 PM
Hi,
You have right, it is working.
Thank you very much.

Regards, Peter
Title: Re: Display manufacturer name in confirmation email
Post by: AH on May 18, 2020, 10:44:31 AM
Thank you for the update.  Great to that your problem is solved.