order_creation_notification.text.php error.log

  • Posts: 7
  • Thank you received: 0
11 years 3 months ago #146219

-- url of the page with the problem -- : mywebsite.com/mypage
-- HikaShop version -- : 2.3.0
-- Joomla version -- : 3.2.2
-- PHP version -- : 5.3
-- Browser(s) name and version -- : XXXXX x.x.x
-- Error-message(debug-mod must be tuned on) -- : from Apache error.log:

[[warn] [client XX] mod_fcgid: stderr: PHP Notice:  Undefined property: stdClass::$order_addresses_fields in /media/com_hikashop/mail/order_creation_notification.text.php on line 78, referer: .../task-step/step-3.html
[warn] [client XX] mod_fcgid: stderr: PHP Warning:  Invalid argument supplied for foreach() in /media/com_hikashop/mail/order_creation_notification.text.php on line 78, referer: .../task-step/step-3.html
Since upgrade to 2.3.0 this script order_creation_notification.text.php produces the errors above on every checkout.

Maybe i'm on the wrong way, but if i compare this code from order_creation_notification.text.php:78:
foreach($data->order_addresses_fields as $field){
		$fieldname = $field->field_namekey;
		$address =& $data->order_addresses[$data->cart->billing_address->address_id];
		$billing=str_replace('{'.$fieldname.'}',$fieldsClass->show($field,$address->$fieldname),$billing);
	}
	echo JText::_('HIKASHOP_BILLING_ADDRESS')."\n";
	echo preg_replace('#{(?:(?!}).)*}#i','',$billing)."\n\n";
}....

with this part from order_creation_notification.preload.php:400
foreach($data->cart->fields as $field){
		$fieldname = $field->field_namekey;
		if(!empty($data->cart->billing_address->$fieldname)) $billing=str_replace('{'.$fieldname.'}',$fieldsClass->show($field,$data->cart->billing_address->$fieldname,'user_email'),$billing);
	}
	$vars['BILLING_ADDRESS'] = str_replace(array("\r\n","\r","\n"),'<br/>',preg_replace('#{(?:(?!}).)*}#i','',$billing));
}

it looks for me, that this is a old Version of order_creation_notification.text.php.
To ensure, that this version is not just an old version on my server, i've compared it with the the original from the installation-zip, both are identical.

Greets

Michael

Please Log in or Create an account to join the conversation.

  • Posts: 13201
  • Thank you received: 2322
11 years 3 months ago #146270

Hi,

Thanks to try with:

foreach($data->cart->fields as $field){
		$fieldname = $field->field_namekey;
		if(!empty($data->cart->billing_address->$fieldname))
			$billing=str_replace('{'.$fieldname.'}',$fieldsClass->show($field,$data->cart->billing_address->$fieldname,'user_email'),$billing);
	}
	echo JText::_('HIKASHOP_BILLING_ADDRESS')."\n";
	echo preg_replace('#{(?:(?!}).)*}#i','',$billing)."\n\n";
}....

The following user(s) said Thank You: ballonsportclub

Please Log in or Create an account to join the conversation.

  • Posts: 7
  • Thank you received: 0
11 years 3 months ago #146413

Xavier wrote: Hi,

Thanks to try with:

Hi Xavier,

As i wrote in my intial post, the quoted code is the original code from "/media/com_hikashop/mail/order_creation_notification.text.php" shipped in your .zip.
I applied your patch to it and the errors are gone. :woohoo:

Thanks!

Please Log in or Create an account to join the conversation.

Time to create page: 0.071 seconds
Powered by Kunena Forum