-- HikaShop version -- : 2.4.0
-- Joomla version -- : 3.4.1
-- PHP version -- : 5.4.40
-- Browser(s) name and version -- : Firefox 38.0.1
Hello,
We using the Business edition and would like to have the Order Administrator Notification email sent to additional email addresses based upon the Category ID of the product sold.
We're not sure what data structure to make the checks on in the Preload of this email.
We would like to do something like the following, but would appreciate a correction for the reference ($item, $data, or $this with final subelement):
if ($this->element->category_id == 'xx') {
$this->mailer->addBCC('This email address is being protected from spambots. You need JavaScript enabled to view it.');
} elseif ($this->element->category_id == 'yy') {
$this->mailer->addBCC('This email address is being protected from spambots. You need JavaScript enabled to view it.');
} else {
$this->mailer->addBCC('This email address is being protected from spambots. You need JavaScript enabled to view it.');
}
Will this work in this admin notification email? Or do we need to reference $data or $item instead to access the category_id?
And finally, is this the correct way to add an email address to the recipient list? Or do we have to add to the customer email instead (in the order creation email preload) using code such as:
$data->customer->user_email .= ',This email address is being protected from spambots. You need JavaScript enabled to view it.';
Thanks in advance for your answer.