Error on client addresses

  • Posts: 220
  • Thank you received: 12
2 years 2 months ago #344460

-- HikaShop version -- : 4.6.1
-- Joomla version -- : 3.10.11
-- PHP version -- : 7.4.30
-- Browser(s) name and version -- : Chrome 104.0.5112.102
-- Error-message(debug-mod must be tuned on) -- : Warning: Invalid argument supplied for foreach() in /home/xxx/public_html/administrator/components/com_hikashop/views/order/tmpl/show_address.php on line 88

Warning: Invalid argument supplied for foreach() in /home/xxx/public_html/administrator/components/com_hikashop/views/order/tmpl/show_address.php on line 41

Hello there

We receive the following error message when looking at the order details in Hikashop after upgrading the site to the details provided abovev

Warning: Invalid argument supplied for foreach() in /home/xxx/public_html/administrator/components/com_hikashop/views/order/tmpl/show_address.php on line 41

Warning: Invalid argument supplied for foreach() in /home/xxx/public_html/administrator/components/com_hikashop/views/order/tmpl/show_address.php on line 88

Please can you help?

Last edit: 2 years 2 months ago by joshualdouglas.

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
2 years 2 months ago #344463

Hi,

The only reason I can see these warnings would appear would be if all the custom address fields would be disabled.
So that's quite uncommon, and that might explain why we didn't get the issue and no one else reported it so far.

Removing the warnings can be done by adding the line:
if(empty($this->order->$fields_type)) return;
after the line:
$fields_type = $this->type.'_fields';
in the file administrator/components/com_hikashop/views/order/tmpl/show_address.php

We'll make a more complex and cleaner patch on our end for the next version of HikaShop.

The following user(s) said Thank You: joshualdouglas

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

  • Posts: 220
  • Thank you received: 12
2 years 2 months ago #344469

Thanks - the errors are gone now.

The following user(s) said Thank You: nicolas

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

Time to create page: 0.054 seconds
Powered by Kunena Forum