Skip to main content

order_creation_notification.text.php error.log

12 years 8 months ago #146219 by ballonsportclub
-- 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:
Code:
[[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:
Code:
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
Code:
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.

12 years 8 months ago #146270 by Xavier
Hi,

Thanks to try with:
Code:
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.

12 years 8 months ago #146413 by ballonsportclub

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.042 seconds
Powered by Kunena Forum