-- HikaShop version -- : 5.0.0
-- Joomla version -- : 4.0.3
-- PHP version -- : 7.4.33
-- Browser(s) name and version -- : browser and version independent
-- Error-message(debug-mod must be tuned on) -- : no error message
Hi, I am trying to develope Hikashop payment plugin, what will generate a payment QR code. It works properly except one issue - I am not able to add image with QR code as attachment to email. I used this:
public function onAfterOrderCreate(&$order, &$send_email) {
$qrCodeFile = JPATH_ROOT . '/images/qrcode.png';
$mailer = JFactory::getMailer();
$mailer->addAttachment($qrCodeFile, 'qrcode.png');
$send_email = true;
}
There are no error messages, everything seems to be fine, but email order confirmation comes without the attachment. Path of the file is OK, the file exists, attachments are allowed in the settings in Hikashop. could anyone give me some advice?