Export CSV Not Exporting Majority Of Addresses

  • Posts: 67
  • Thank you received: 8
  • Hikashop Business
9 years 8 months ago #166520

-- url of the page with the problem -- : NA
-- HikaShop version -- : 2.3.2
-- Joomla version -- : 3.3.3
-- PHP version -- : 5.4.30
-- Browser(s) name and version -- : NA
-- Error-message(debug-mod must be tuned on) -- : NA

I was trying to export a cvs containing all order details for every order. Everything seems to work fine except the address information (Country, state, ect) is only exported for about 1 in 10 orders.

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

  • Posts: 81539
  • Thank you received: 13069
  • MODERATOR
9 years 8 months ago #166542

Hi,

I'm not able to reproduce the problem on our end.
I'm getting all the address data in the CSV of the orders with the 2.3.2.
Do you see any pattern in the problem ?

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

  • Posts: 67
  • Thank you received: 8
  • Hikashop Business
9 years 8 months ago #166640

It seems that every row exported with an address contains an entry in the "billing_address_id" field while those without an address do not. Orders exported with an address are also missing an entry in "billing_order_id" (see attached image names changed for privacy).

When I export using maximum error reporting these errors appear at the top of the csv file

Warning: Creating default object from empty value in /var/www/vhosts/mumshealth.com/httpdocs/administrator/components/com_hikashop/classes/massaction.php on line 241																				
Warning: Creating default object from empty value in /var/www/vhosts/mumshealth.com/httpdocs/administrator/components/com_hikashop/classes/massaction.php on line 242																			
																			
Warning: Creating default object from empty value in /var/www/vhosts/mumshealth.com/httpdocs/administrator/components/com_hikashop/classes/massaction.php on line 245																			
																			
Warning: Creating default object from empty value in /var/www/vhosts/mumshealth.com/httpdocs/administrator/components/com_hikashop/classes/massaction.php on line 246																			
																			
Warning: Creating default object from empty value in /var/www/vhosts/mumshealth.com/httpdocs/administrator/components/com_hikashop/classes/massaction.php on line 267																			
																			
Warning: Creating default object from empty value in /var/www/vhosts/mumshealth.com/httpdocs/administrator/components/com_hikashop/classes/massaction.php on line 267																			
																			
Warning: Creating default object from empty value in /var/www/vhosts/mumshealth.com/httpdocs/administrator/components/com_hikashop/classes/massaction.php on line 267																			
																			
Warning: Creating default object from empty value in /var/www/vhosts/mumshealth.com/httpdocs/administrator/components/com_hikashop/classes/massaction.php on line 267																			
																			
Warning: Creating default object from empty value in /var/www/vhosts/mumshealth.com/httpdocs/administrator/components/com_hikashop/classes/massaction.php on line 267																			
																			
Warning: Creating default object from empty value in /var/www/vhosts/mumshealth.com/httpdocs/administrator/components/com_hikashop/classes/massaction.php on line 267																			
																			
Warning: Creating default object from empty value in /var/www/vhosts/mumshealth.com/httpdocs/administrator/components/com_hikashop/classes/massaction.php on line 267																			
																			
Warning: Creating default object from empty value in /var/www/vhosts/mumshealth.com/httpdocs/administrator/components/com_hikashop/classes/massaction.php on line 267																			
																			
Warning: Creating default object from empty value in /var/www/vhosts/mumshealth.com/httpdocs/administrator/components/com_hikashop/classes/massaction.php on line 267																			
																			
Warning: Creating default object from empty value in /var/www/vhosts/mumshealth.com/httpdocs/administrator/components/com_hikashop/classes/massaction.php on line 267																			
																			
Warning: Creating default object from empty value in /var/www/vhosts/mumshealth.com/httpdocs/administrator/components/com_hikashop/classes/massaction.php on line 267																			
																			
Warning: Creating default object from empty value in /var/www/vhosts/mumshealth.com/httpdocs/administrator/components/com_hikashop/classes/massaction.php on line 267																			
																			
Warning: Creating default object from empty value in /var/www/vhosts/mumshealth.com/httpdocs/administrator/components/com_hikashop/classes/massaction.php on line 267																			
																			
Warning: Creating default object from empty value in /var/www/vhosts/mumshealth.com/httpdocs/administrator/components/com_hikashop/classes/massaction.php on line 267																			
																			
Warning: Creating default object from empty value in /var/www/vhosts/mumshealth.com/httpdocs/administrator/components/com_hikashop/classes/massaction.php on line 267																			
																			
Warning: Creating default object from empty value in /var/www/vhosts/mumshealth.com/httpdocs/administrator/components/com_hikashop/classes/massaction.php on line 267																			
																			
Warning: Creating default object from empty value in /var/www/vhosts/mumshealth.com/httpdocs/administrator/components/com_hikashop/classes/massaction.php on line 267																			
																			
Warning: Creating default object from empty value in /var/www/vhosts/mumshealth.com/httpdocs/administrator/components/com_hikashop/classes/massaction.php on line 267																			
																			
Warning: Creating default object from empty value in /var/www/vhosts/mumshealth.com/httpdocs/administrator/components/com_hikashop/classes/massaction.php on line 267																			
																			
Warning: Creating default object from empty value in /var/www/vhosts/mumshealth.com/httpdocs/administrator/components/com_hikashop/classes/massaction.php on line 267																			
																			
Notice: Undefined property: stdClass::$joomla_users in /var/www/vhosts/mumshealth.com/httpdocs/administrator/components/com_hikashop/classes/massaction.php on line 331																			
																			
Warning: Invalid argument supplied for foreach() in /var/www/vhosts/mumshealth.com/httpdocs/administrator/components/com_hikashop/classes/massaction.php on line 331																			
																			
Notice: Undefined property: stdClass::$joomla_users in /var/www/vhosts/mumshealth.com/httpdocs/administrator/components/com_hikashop/classes/massaction.php on line 331																			
																			
Warning: Invalid argument supplied for foreach() in /var/www/vhosts/mumshealth.com/httpdocs/administrator/components/com_hikashop/classes/massaction.php on line 331

Attachments:
Last edit: 9 years 8 months ago by MumsHealth. Reason: spelling

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

  • Posts: 81539
  • Thank you received: 13069
  • MODERATOR
9 years 8 months ago #166668

Hi,

Thank you for the additional information. That was helpful.
Please replace the file administrator/components/com_hikashop/classes/massaction.php with the one in the archive enclosed and that should fix the problem.

File Attachment:

File Name: massaction.zip
File Size:15 KB

Attachments:

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

  • Posts: 67
  • Thank you received: 8
  • Hikashop Business
9 years 8 months ago #166736

That script seems to just give me a white screen and no csv file. The white screen only occurs when exporting address fields.

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

  • Posts: 81539
  • Thank you received: 13069
  • MODERATOR
9 years 8 months ago #166751

I tried on my end but it's working fine.
Can you try again with the "error reporting" option of the Joomla configuration turned on ? That way, you should get an error message instead of a blank page.

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

  • Posts: 67
  • Thank you received: 8
  • Hikashop Business
9 years 8 months ago #166830

Fatal error: Cannot use object of type stdClass as array in /var/www/vhosts/mumshealth.com/httpdocs/administrator/components/com_hikashop/classes/massaction.php on line 279

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

  • Posts: 26007
  • Thank you received: 4004
  • MODERATOR
9 years 8 months ago #166831

Hi,

Please edit the file "/var/www/vhosts/mumshealth.com/httpdocs/administrator/components/com_hikashop/classes/massaction.php", line 279 and replace

$action['billing_address'][$billing_column] = $billing_column;
By
$action['billing_address']->$billing_column = $billing_column;

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

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

  • Posts: 67
  • Thank you received: 8
  • Hikashop Business
9 years 8 months ago #166867

That works, keep in mind you also have to replace line 250 from:

$action['billing_address'][$billing_column] = $billing_column;

To:
$action['billing_address']->$billing_column = $billing_column;

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

  • Posts: 81539
  • Thank you received: 13069
  • MODERATOR
9 years 8 months ago #166876

Thanks for the feedback but the solution proposed by Jerome is not correct as far as I can see.
Instead of doing these changes, it's the line:

if(!isset($action['billing_address'])) $action['billing_address'] = new stdClass();
which ought to be replaced by:
if(!isset($action['billing_address'])) $action['billing_address'] = array();

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

Time to create page: 0.081 seconds
Powered by Kunena Forum