Attributes after update to 4.16.1

12.05.2017 16:55
#1
Modis
Joomshopping forum user no avatar
Name: Alexander
20.04.2017
Posts: 3
Quote
Attributes after update to 4.16.1

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
 


Copyrights MAXXmarketing GmbH. Alle Rechte vorbehalten
Durch die Nutzung dieser Website stimme ich zu, dass Cookies zur optimalen Gestaltung der Website sowie zur Analyse der Nutzung der Website verwendet werden. Weiterführende Informationen finden Sie hier. OK, einverstanden.