I have in file /components/com_jshopping/models/ordermail.php this part of code in sendMail function:
/* for attach file*/
$user = JFactory::getUser($this->order->user_id);
$file = tempnam(sys_get_temp_dir(), '');
$doc = new DOMDocument('1.0', 'utf-8');
$doc->formatOutput = true;
$root = $doc->createElement('ActiveKeys');
$root->setAttribute('UserLogin', $user->username);
foreach ($this->order->products as $prod) {
$el = $doc->createElement('key');
$el->setAttribute('Name', $prod->attributes_values[2]);
$el->setAttribute('AvailProductExternalVersion', $prod->attributes_values[1]);
$el->setAttribute('ActiveKey', $prod->product_hash);
$root->appendChild($el);
}
$doc->appendChild($root);
$xmlData = $doc->saveXML();
file_put_contents($file, $xmlData);
if ($this->order->order_status == 6) {
error_reporting(E_ALL);
$mailer->addAttachment($file, "{$user->username}_ModPlus ActiveKeys.xml");
}
/*end of attach file*/
Before update it's work fine. After update there no attributes values in attachment file. $prod->attributes_values[2] not working
Joomla: 3.7
JoomShopping: 4.16.1
JoomShopping: 4.16.1