[Skip to main content](#vessel-content)

#   Export User Mass Action not exporting all of the addresses

##

- **[wildweststudios](/forum/user/31720-wildweststudios "View wildweststudios's Profile")**
- [![wildweststudios's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/31720-wildweststudios "View wildweststudios's Profile") Topic Author
- [ Offline](/forum/user/31720-wildweststudios)

Less More

- Posts: 75
- Thank you received: 7
-
-

6 years 11 months ago -  6 years 11 months ago [\#313949](#313949) by [wildweststudios](/forum/user/31720-wildweststudios "View wildweststudios's Profile")  *[Export User Mass Action not exporting all of the addresses](/forum/44-mass-actions/898845-export-user-mass-action-not-exporting-all-of-the-addresses#313949 "-- HikaShop version -- : 4.2.2 -- Joomla version -- : 3.9.13 -- PHP version -- : 7.2.24 -- Browser(s) name and version -- : Version 78.0.3904.108  Hi all,  I'm trying to get all the user info out into a csv file, but I notice that not all the addresses are being output. I checked and those addresses are definitely there. I can't really tell what's the difference between the entries that work and the ones that don't.This happens if I export users and if I export addresses.  I turned on error reporting, set to maximum and once I did that the mass action did not actually complete. Instead I got a page full of errors, as seen below. Can someone point me in the right direction to clear up this problem?")* was created by *[wildweststudios](/forum/user/31720-wildweststudios "View wildweststudios's Profile")*

-- HikaShop version -- : 4.2.2
-- Joomla version -- : 3.9.13
-- PHP version -- : 7.2.24
-- Browser(s) name and version -- : Version 78.0.3904.108

Hi all,

I'm trying to get all the user info out into a csv file, but I notice that not all the addresses are being output. I checked and those addresses are definitely there. I can't really tell what's the difference between the entries that work and the ones that don't.This happens if I export users and if I export addresses.

I turned on error reporting, set to maximum and once I did that the mass action did not actually complete. Instead I got a page full of errors, as seen below. Can someone point me in the right direction to clear up this problem?

This message contains confidential information

Last edit: 6 years 11 months ago by [nicolas](/forum/user/63-nicolas "View nicolas's Profile"). Reason: removed user information

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQ0LW1hc3MtYWN0aW9ucy84OTg4NDUtZXhwb3J0LXVzZXItbWFzcy1hY3Rpb24tbm90LWV4cG9ydGluZy1hbGwtb2YtdGhlLWFkZHJlc3Nlcz90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86584
- Thank you received: 14325
-
-

6 years 11 months ago [\#313957](#313957) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Export User Mass Action not exporting all of the addresses](/forum/44-mass-actions/898845-export-user-mass-action-not-exporting-all-of-the-addresses#313957 "-- HikaShop version -- : 4.2.2 -- Joomla version -- : 3.9.13 -- PHP version -- : 7.2.24 -- Browser(s) name and version -- : Version 78.0.3904.108  Hi all,  I'm trying to get all the user info out into a csv file, but I notice that not all the addresses are being output. I checked and those addresses are definitely there. I can't really tell what's the difference between the entries that work and the ones that don't.This happens if I export users and if I export addresses.  I turned on error reporting, set to maximum and once I did that the mass action did not actually complete. Instead I got a page full of errors, as seen below. Can someone point me in the right direction to clear up this problem?")*

Hi,

These notice and warning messages comes from another extension:
[ www.hikashop.com/forum/mass-actions/8983...-strings.html#311235](https://www.hikashop.com/forum/mass-actions/898329-mass-actions-error-operator-not-supported-for-strings.html#311235)
You can ignore them.
Now regarding the export of users, only the default address will be added to the CSV. If you want a CSV export of all the addresses, then you should select the data "address" and not the data "user" in your mass action.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQ0LW1hc3MtYWN0aW9ucy84OTg4NDUtZXhwb3J0LXVzZXItbWFzcy1hY3Rpb24tbm90LWV4cG9ydGluZy1hbGwtb2YtdGhlLWFkZHJlc3Nlcz90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[wildweststudios](/forum/user/31720-wildweststudios "View wildweststudios's Profile")**
- [![wildweststudios's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/31720-wildweststudios "View wildweststudios's Profile") Topic Author
- [ Offline](/forum/user/31720-wildweststudios)

Less More

- Posts: 75
- Thank you received: 7
-
-

6 years 11 months ago [\#313969](#313969) by [wildweststudios](/forum/user/31720-wildweststudios "View wildweststudios's Profile")  Replied by *[wildweststudios](/forum/user/31720-wildweststudios "View wildweststudios's Profile")* on topic *[Export User Mass Action not exporting all of the addresses](/forum/44-mass-actions/898845-export-user-mass-action-not-exporting-all-of-the-addresses#313969 "-- HikaShop version -- : 4.2.2 -- Joomla version -- : 3.9.13 -- PHP version -- : 7.2.24 -- Browser(s) name and version -- : Version 78.0.3904.108  Hi all,  I'm trying to get all the user info out into a csv file, but I notice that not all the addresses are being output. I checked and those addresses are definitely there. I can't really tell what's the difference between the entries that work and the ones that don't.This happens if I export users and if I export addresses.  I turned on error reporting, set to maximum and once I did that the mass action did not actually complete. Instead I got a page full of errors, as seen below. Can someone point me in the right direction to clear up this problem?")*

Hi Nicolas,

alright, I will ignore those errors then.

But I already tried using the Address selection and got the same result.

When I open up my customer, I can see both the default billing address and default shipping address are completely filled out, and yet when I export the csv that same user will inexplicably not have any information in those fields.

This doesn't happen with every user, only some, and I can't figure out what is different about them.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQ0LW1hc3MtYWN0aW9ucy84OTg4NDUtZXhwb3J0LXVzZXItbWFzcy1hY3Rpb24tbm90LWV4cG9ydGluZy1hbGwtb2YtdGhlLWFkZHJlc3Nlcz90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86584
- Thank you received: 14325
-
-

6 years 11 months ago [\#313976](#313976) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Export User Mass Action not exporting all of the addresses](/forum/44-mass-actions/898845-export-user-mass-action-not-exporting-all-of-the-addresses#313976 "-- HikaShop version -- : 4.2.2 -- Joomla version -- : 3.9.13 -- PHP version -- : 7.2.24 -- Browser(s) name and version -- : Version 78.0.3904.108  Hi all,  I'm trying to get all the user info out into a csv file, but I notice that not all the addresses are being output. I checked and those addresses are definitely there. I can't really tell what's the difference between the entries that work and the ones that don't.This happens if I export users and if I export addresses.  I turned on error reporting, set to maximum and once I did that the mass action did not actually complete. Instead I got a page full of errors, as seen below. Can someone point me in the right direction to clear up this problem?")*

Hi,

It could be that those users don't have separate billing and shipping addresses ?
A few versions ago of HikaShop, we added an address_type to the addresses so that shipping addresses and billing addresses can be separated. That way, it makes more sense on the checkout for the customers, and you can also configure custom address fields based on the type of the address.
This also mean that we had to modify the export areas to handle these. But maybe some of your users still have addresses without a type and in that case the addresses can be used both for billing and shipping on the checkout, but maybe the mass action system doesn't handle them properly.
In fact, looking at the code of the mass action export, I think it's probably the issue here.
Edit the file administrator/components/com_hikashop/classes/massaction.php and change the line: Code:

if(!count($element-&gt;shipping_address) &amp;&amp; $address-&gt;address_type == 'shipping') {

to: Code:

if(!count($element-&gt;shipping_address) &amp;&amp; in_array($address-&gt;address_type, array('shipping', '', 'both'))) {

and the line: Code:

if(!count($element-&gt;billing_address) &amp;&amp; $address-&gt;address_type == 'billing') {

to: Code:

if(!count($element-&gt;billing_address) &amp;&amp; in_array($address-&gt;address_type, array('billing', '', 'both'))) {

It should then work better.
Let us know how it goes so that we can include that patch on our end.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQ0LW1hc3MtYWN0aW9ucy84OTg4NDUtZXhwb3J0LXVzZXItbWFzcy1hY3Rpb24tbm90LWV4cG9ydGluZy1hbGwtb2YtdGhlLWFkZHJlc3Nlcz90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[wildweststudios](/forum/user/31720-wildweststudios "View wildweststudios's Profile")**
- [![wildweststudios's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/31720-wildweststudios "View wildweststudios's Profile") Topic Author
- [ Offline](/forum/user/31720-wildweststudios)

Less More

- Posts: 75
- Thank you received: 7
-
-

6 years 11 months ago [\#314033](#314033) by [wildweststudios](/forum/user/31720-wildweststudios "View wildweststudios's Profile")  Replied by *[wildweststudios](/forum/user/31720-wildweststudios "View wildweststudios's Profile")* on topic *[Export User Mass Action not exporting all of the addresses](/forum/44-mass-actions/898845-export-user-mass-action-not-exporting-all-of-the-addresses#314033 "-- HikaShop version -- : 4.2.2 -- Joomla version -- : 3.9.13 -- PHP version -- : 7.2.24 -- Browser(s) name and version -- : Version 78.0.3904.108  Hi all,  I'm trying to get all the user info out into a csv file, but I notice that not all the addresses are being output. I checked and those addresses are definitely there. I can't really tell what's the difference between the entries that work and the ones that don't.This happens if I export users and if I export addresses.  I turned on error reporting, set to maximum and once I did that the mass action did not actually complete. Instead I got a page full of errors, as seen below. Can someone point me in the right direction to clear up this problem?")*

Hi Nicolas,

sorry I thought I had replied to this earlier.

The fix did work partially. I found that when I had the action set to 'User' then it worked! I was able to get all of the addresses as I would expect.

Out of curiosity I went back and set the action to 'Address'. This time I got the earlier result, where some addresses were not being downloaded, leaving empty fields in the csv.

So I did get what I needed. If you want me to try anything else for the addresses I can do that, just let me know.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQ0LW1hc3MtYWN0aW9ucy84OTg4NDUtZXhwb3J0LXVzZXItbWFzcy1hY3Rpb24tbm90LWV4cG9ydGluZy1hbGwtb2YtdGhlLWFkZHJlc3Nlcz90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86584
- Thank you received: 14325
-
-

6 years 11 months ago [\#314034](#314034) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Export User Mass Action not exporting all of the addresses](/forum/44-mass-actions/898845-export-user-mass-action-not-exporting-all-of-the-addresses#314034 "-- HikaShop version -- : 4.2.2 -- Joomla version -- : 3.9.13 -- PHP version -- : 7.2.24 -- Browser(s) name and version -- : Version 78.0.3904.108  Hi all,  I'm trying to get all the user info out into a csv file, but I notice that not all the addresses are being output. I checked and those addresses are definitely there. I can't really tell what's the difference between the entries that work and the ones that don't.This happens if I export users and if I export addresses.  I turned on error reporting, set to maximum and once I did that the mass action did not actually complete. Instead I got a page full of errors, as seen below. Can someone point me in the right direction to clear up this problem?")*

Hi,

Yes my patch was only for the "user" data.
I'm not sure why you would have the problem with the "address" data in fact.
For the "user" data, I could understand since the check that I patched was checking the "address_type" in an incomplete maner to generate shipping and billing columns separately.
However, for the address data, there is no such mechanism. If a user has 10 addresses, then you'll get 10 lines in the export so no need to change the columns like we have to do for the user data.
In fact, I checked the export with the "address" type and did get all the addresses on my end so I don't see why that would happen for you.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQ0LW1hc3MtYWN0aW9ucy84OTg4NDUtZXhwb3J0LXVzZXItbWFzcy1hY3Rpb24tbm90LWV4cG9ydGluZy1hbGwtb2YtdGhlLWFkZHJlc3Nlcz90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[wildweststudios](/forum/user/31720-wildweststudios "View wildweststudios's Profile")**
- [![wildweststudios's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/31720-wildweststudios "View wildweststudios's Profile") Topic Author
- [ Offline](/forum/user/31720-wildweststudios)

Less More

- Posts: 75
- Thank you received: 7
-
-

6 years 11 months ago [\#314061](#314061) by [wildweststudios](/forum/user/31720-wildweststudios "View wildweststudios's Profile")  Replied by *[wildweststudios](/forum/user/31720-wildweststudios "View wildweststudios's Profile")* on topic *[Export User Mass Action not exporting all of the addresses](/forum/44-mass-actions/898845-export-user-mass-action-not-exporting-all-of-the-addresses#314061 "-- HikaShop version -- : 4.2.2 -- Joomla version -- : 3.9.13 -- PHP version -- : 7.2.24 -- Browser(s) name and version -- : Version 78.0.3904.108  Hi all,  I'm trying to get all the user info out into a csv file, but I notice that not all the addresses are being output. I checked and those addresses are definitely there. I can't really tell what's the difference between the entries that work and the ones that don't.This happens if I export users and if I export addresses.  I turned on error reporting, set to maximum and once I did that the mass action did not actually complete. Instead I got a page full of errors, as seen below. Can someone point me in the right direction to clear up this problem?")*

Hi Nicolas,

I don't know the answer to that, unfortunately. I went back to try again and got the same results.

With your patch, when set to User, the export works fine and I get all the address info, but when set to Address I am missing addresses in some of the users.

It worked well enough to get me through this though.

The following user(s) said Thank You: [nicolas](/forum/user/63-nicolas "View nicolas's Profile")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQ0LW1hc3MtYWN0aW9ucy84OTg4NDUtZXhwb3J0LXVzZXItbWFzcy1hY3Rpb24tbm90LWV4cG9ydGluZy1hbGwtb2YtdGhlLWFkZHJlc3Nlcz90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

Board Categories HikaShop Install &amp; Update Product &amp; Category Display Content Creation Sales and Orders Orders management Reports &amp; Statistics Customers Checkout Payment Methods Shipping Methods Import &amp; Export (CSV, XLS…) Specific Features Affilation Taxes Wishlist Vote Carousel &amp; Slider Mass Actions Filters &amp; Search Discount &amp; Coupon Feature Request Integrations Showcase General Talk about HikaShop Development HikaShop 3.0 Beta Translation Commercial Jobs HikaShop Components HikaMarket Market: Feature requests Market: How to? Market: Bug Report HikaSerial General talk about HikaSerial Serial: Bug Report Serial: How to? Support en Français de HikaSerial (French Support) HikaSubscription HikaAuction Auction: Feature requests Auction: How to? Auction: Bug report Hikashop around the world Support en Français (French Support) Russian FAQ. Курс выживания с Hikashop. Частые вопросы и о Расширения Hikashop Наши сайты на Hikashop 日本語版サポート(Japanese Support) Thai German Archives Bug Report How to?

[](/forum/topics/feed/mode-topics?format=feed&type=rss)

Time to create page: 0.061 seconds

[Powered by](/forum/credits) [Kunena Forum](https://www.kunena.org)
