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

#   state\_ and country\_ before state and country name

##

- **[wilfried](/forum/user/35613-wilfried "View wilfried's Profile")**
- [![wilfried's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar35613.jpg)](/forum/user/35613-wilfried "View wilfried's Profile") Topic Author
- [ Offline](/forum/user/35613-wilfried)

Less More

- Posts: 75
- Thank you received: 1
-
-
-

11 years 10 months ago -  11 years 10 months ago [\#186924](#186924) by [wilfried](/forum/user/35613-wilfried "View wilfried's Profile")  *[state\_ and country\_ before state and country name](/forum/37-import-export-csv-xls/874295-state-and-country-before-state-and-country-name#186924 "-- HikaShop version -- : 2.3.5 -- Joomla version -- : 3.3.6 -- Browser(s) name and version -- : latest IE, FF and Chrome  When I look in the csv file from the mass action export is see that the states and country names are not the real names. It looks that name used in the database is shown. See image.  Is this normal?  Kind regards,  Wilfried")* was created by *[wilfried](/forum/user/35613-wilfried "View wilfried's Profile")*

-- HikaShop version -- : 2.3.5
-- Joomla version -- : 3.3.6
-- Browser(s) name and version -- : latest IE, FF and Chrome

When I look in the csv file from the mass action export is see that the states and country names are not the real names. It looks that name used in the database is shown. See image.

Is this normal?

[ ![hika006.jpg](/forum/attachment/21741) ](/forum/attachment/21741 "hika006.jpg")

Kind regards,

Wilfried

- [ ![hika006.jpg](/forum/attachment/21741) ](/forum/attachment/21741 "hika006.jpg") [ ](/forum/attachment/21741?download=1 "hika006.jpg")

Last edit: 11 years 10 months ago by [wilfried](/forum/user/35613-wilfried "View wilfried's Profile"). Reason: SOLVED

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

- **[Xavier](/forum/user/4105-xavier "View Xavier's Profile")**
- [![Xavier's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar4105.png)](/forum/user/4105-xavier "View Xavier's Profile")
- [ Offline](/forum/user/4105-xavier)

Less More

- Posts: 13201
- Thank you received: 2322
-
-
-
- [](http://www.kidiweb.fr)
-

11 years 10 months ago [\#186977](#186977) by [Xavier](/forum/user/4105-xavier "View Xavier's Profile")  Replied by *[Xavier](/forum/user/4105-xavier "View Xavier's Profile")* on topic *[state\_ and country\_ before state and country name](/forum/37-import-export-csv-xls/874295-state-and-country-before-state-and-country-name#186977 "-- HikaShop version -- : 2.3.5 -- Joomla version -- : 3.3.6 -- Browser(s) name and version -- : latest IE, FF and Chrome  When I look in the csv file from the mass action export is see that the states and country names are not the real names. It looks that name used in the database is shown. See image.  Is this normal?  Kind regards,  Wilfried")*

Hi,

These are the values stored in the #__hikashop_address table, so the mass action is get this value directly from Database.

You can potentially use a regex in order to keep only the middle part (the english name).
For that you can edit the file "plugins/hikashop/massaction_order/massaction_order.php" and in the function "onProcessOrderMassActionexportCsv" add: Code:

foreach($params-&gt;elements as $i =&gt; $element){ foreach($element-&gt;address as $j =&gt; $row){ if(isset($row-&gt;address_state)){ $row-&gt;address_state = preg_replace('#^[^_]*_#','',$row-&gt;address_state); $row-&gt;address_state = preg_replace('#_*[0-9]#','',$row-&gt;address_state); } if(isset($row-&gt;address_country)){ $row-&gt;address_country = preg_replace('#^[^_]*_#','',$row-&gt;address_country); $row-&gt;address_country = preg_replace('#_*[0-9]#','',$row-&gt;address_country); } } }

after: Code:

$params = $this-&gt;massaction-&gt;_displayResults('order',$elements,$action,$k);

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

- **[wilfried](/forum/user/35613-wilfried "View wilfried's Profile")**
- [![wilfried's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar35613.jpg)](/forum/user/35613-wilfried "View wilfried's Profile") Topic Author
- [ Offline](/forum/user/35613-wilfried)

Less More

- Posts: 75
- Thank you received: 1
-
-
-

11 years 10 months ago -  11 years 10 months ago [\#187011](#187011) by [wilfried](/forum/user/35613-wilfried "View wilfried's Profile")  Replied by *[wilfried](/forum/user/35613-wilfried "View wilfried's Profile")* on topic *[state\_ and country\_ before state and country name](/forum/37-import-export-csv-xls/874295-state-and-country-before-state-and-country-name#187011 "-- HikaShop version -- : 2.3.5 -- Joomla version -- : 3.3.6 -- Browser(s) name and version -- : latest IE, FF and Chrome  When I look in the csv file from the mass action export is see that the states and country names are not the real names. It looks that name used in the database is shown. See image.  Is this normal?  Kind regards,  Wilfried")*

Hello Xavier,

Clear, I'll do that, thanks for you quick response.

In the last few days I have added some changes to massaction_order.php and I will add some more to get some other things corrected. I was wondering what happens when there is a new version of Hikashop do I have to add all those changes again. What is the policy of hikashop when updating to a new version and how often is hikashop being updated?

Kind regards,

Wilfried

Last edit: 11 years 10 months ago by [wilfried](/forum/user/35613-wilfried "View wilfried's Profile"). Reason: spelling errors

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

- **[Xavier](/forum/user/4105-xavier "View Xavier's Profile")**
- [![Xavier's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar4105.png)](/forum/user/4105-xavier "View Xavier's Profile")
- [ Offline](/forum/user/4105-xavier)

Less More

- Posts: 13201
- Thank you received: 2322
-
-
-
- [](http://www.kidiweb.fr)
-

11 years 10 months ago [\#187024](#187024) by [Xavier](/forum/user/4105-xavier "View Xavier's Profile")  Replied by *[Xavier](/forum/user/4105-xavier "View Xavier's Profile")* on topic *[state\_ and country\_ before state and country name](/forum/37-import-export-csv-xls/874295-state-and-country-before-state-and-country-name#187024 "-- HikaShop version -- : 2.3.5 -- Joomla version -- : 3.3.6 -- Browser(s) name and version -- : latest IE, FF and Chrome  When I look in the csv file from the mass action export is see that the states and country names are not the real names. It looks that name used in the database is shown. See image.  Is this normal?  Kind regards,  Wilfried")*

Hi,

When updating you will indeed lose your modiications.
What I suggest is to copy that plugin, rename it, and do the correct renaming in the files.

Then install it via the Joomla extensions manager, publish it and unpublish our plugin.
This way you will never lose your changes.

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

- **[wilfried](/forum/user/35613-wilfried "View wilfried's Profile")**
- [![wilfried's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar35613.jpg)](/forum/user/35613-wilfried "View wilfried's Profile") Topic Author
- [ Offline](/forum/user/35613-wilfried)

Less More

- Posts: 75
- Thank you received: 1
-
-
-

11 years 10 months ago [\#187119](#187119) by [wilfried](/forum/user/35613-wilfried "View wilfried's Profile")  Replied by *[wilfried](/forum/user/35613-wilfried "View wilfried's Profile")* on topic *[state\_ and country\_ before state and country name](/forum/37-import-export-csv-xls/874295-state-and-country-before-state-and-country-name#187119 "-- HikaShop version -- : 2.3.5 -- Joomla version -- : 3.3.6 -- Browser(s) name and version -- : latest IE, FF and Chrome  When I look in the csv file from the mass action export is see that the states and country names are not the real names. It looks that name used in the database is shown. See image.  Is this normal?  Kind regards,  Wilfried")*

Ok I'll look into the procedure how to make a plugin from a php file, but isn't it so that when hikashop calls massaction_order.php it has to be that name exactly? That because I have made several changes massaction_order.php.

Your way seems much cleaner and better but if I rename massaction_order.php to WR-massaction_order.php how does the export routine know that it has to use WR-massaction_order.php when I want to do mass actions on orders.

Kind regards Wilfried

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzM3LWltcG9ydC1leHBvcnQtY3N2LXhscy84NzQyOTUtc3RhdGUtYW5kLWNvdW50cnktYmVmb3JlLXN0YXRlLWFuZC1jb3VudHJ5LW5hbWU/dG1wbD1tYXJrZG93bg==) 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")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86593
- Thank you received: 14334
-
-

11 years 10 months ago [\#187144](#187144) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[state\_ and country\_ before state and country name](/forum/37-import-export-csv-xls/874295-state-and-country-before-state-and-country-name#187144 "-- HikaShop version -- : 2.3.5 -- Joomla version -- : 3.3.6 -- Browser(s) name and version -- : latest IE, FF and Chrome  When I look in the csv file from the mass action export is see that the states and country names are not the real names. It looks that name used in the database is shown. See image.  Is this normal?  Kind regards,  Wilfried")*

Hi,

When Xavier says that you need to rename the plugin, it involves more than just changing the name of the php file. The xml file has to be renamed as well, the folder as well, and you need to edit both xml and php files to change the name as well (in the php file, it's mainly the class name at the beginning). Then you can zip the files and install it via the Joomla installer and activate it so that Joomla can call it when HikaShop trigger the triggers of the mass actions.

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

- **[wilfried](/forum/user/35613-wilfried "View wilfried's Profile")**
- [![wilfried's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar35613.jpg)](/forum/user/35613-wilfried "View wilfried's Profile") Topic Author
- [ Offline](/forum/user/35613-wilfried)

Less More

- Posts: 75
- Thank you received: 1
-
-
-

11 years 10 months ago [\#187207](#187207) by [wilfried](/forum/user/35613-wilfried "View wilfried's Profile")  Replied by *[wilfried](/forum/user/35613-wilfried "View wilfried's Profile")* on topic *[state\_ and country\_ before state and country name](/forum/37-import-export-csv-xls/874295-state-and-country-before-state-and-country-name#187207 "-- HikaShop version -- : 2.3.5 -- Joomla version -- : 3.3.6 -- Browser(s) name and version -- : latest IE, FF and Chrome  When I look in the csv file from the mass action export is see that the states and country names are not the real names. It looks that name used in the database is shown. See image.  Is this normal?  Kind regards,  Wilfried")*

OK Thanks, I already thought something llike that.

And what makes the trigger with Hikashop. How does Hikashop know that it should use the new plugin instead of massaction.php?
Do I have to change something in the php code to let Hikashop use massaction_order_mine.php instead of massaction_order.php ?

Kind regards Wilfried

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

- **[Xavier](/forum/user/4105-xavier "View Xavier's Profile")**
- [![Xavier's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar4105.png)](/forum/user/4105-xavier "View Xavier's Profile")
- [ Offline](/forum/user/4105-xavier)

Less More

- Posts: 13201
- Thank you received: 2322
-
-
-
- [](http://www.kidiweb.fr)
-

11 years 10 months ago [\#187260](#187260) by [Xavier](/forum/user/4105-xavier "View Xavier's Profile")  Replied by *[Xavier](/forum/user/4105-xavier "View Xavier's Profile")* on topic *[state\_ and country\_ before state and country name](/forum/37-import-export-csv-xls/874295-state-and-country-before-state-and-country-name#187260 "-- HikaShop version -- : 2.3.5 -- Joomla version -- : 3.3.6 -- Browser(s) name and version -- : latest IE, FF and Chrome  When I look in the csv file from the mass action export is see that the states and country names are not the real names. It looks that name used in the database is shown. See image.  Is this normal?  Kind regards,  Wilfried")*

Hi,

After renaming the php and xml files and their content, you just have to unpublish our plugin and enable yours.
This way you are sure that only your plugin will be used.

Your plugin is used when this kind of function is called by hikashop:
onProcessOrderMassActionupdateValues

It is automatic.

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

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

- **[wilfried](/forum/user/35613-wilfried "View wilfried's Profile")**
- [![wilfried's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar35613.jpg)](/forum/user/35613-wilfried "View wilfried's Profile") Topic Author
- [ Offline](/forum/user/35613-wilfried)

Less More

- Posts: 75
- Thank you received: 1
-
-
-

11 years 10 months ago [\#187262](#187262) by [wilfried](/forum/user/35613-wilfried "View wilfried's Profile")  Replied by *[wilfried](/forum/user/35613-wilfried "View wilfried's Profile")* on topic *[state\_ and country\_ before state and country name](/forum/37-import-export-csv-xls/874295-state-and-country-before-state-and-country-name#187262 "-- HikaShop version -- : 2.3.5 -- Joomla version -- : 3.3.6 -- Browser(s) name and version -- : latest IE, FF and Chrome  When I look in the csv file from the mass action export is see that the states and country names are not the real names. It looks that name used in the database is shown. See image.  Is this normal?  Kind regards,  Wilfried")*

Now I understand, thanks!.

kind regards, WIlfried

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

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

Less More

- Posts: 612
- Thank you received: 13
-

11 years 3 months ago [\#212914](#212914) by [mohairbears](/forum/user/916-mohairbears "View mohairbears's Profile")  Replied by *[mohairbears](/forum/user/916-mohairbears "View mohairbears's Profile")* on topic *[state\_ and country\_ before state and country name](/forum/37-import-export-csv-xls/874295-state-and-country-before-state-and-country-name#212914 "-- HikaShop version -- : 2.3.5 -- Joomla version -- : 3.3.6 -- Browser(s) name and version -- : latest IE, FF and Chrome  When I look in the csv file from the mass action export is see that the states and country names are not the real names. It looks that name used in the database is shown. See image.  Is this normal?  Kind regards,  Wilfried")*

Hi, I am looking to export the shipping address details via mass action and found this thread wanting the similar information, however when entering the change some of the exports still have underscores and there are now no spaces in 'United Kingdom' and also underscores in some of the 'state' export as well.

shipping_address_state shipping_address_country
New_Jersey United_States_of_America
New_Jersey United_States_of_America
New_Jersey United_States_of_America
Lisboa Portugal
Leicestershire UnitedKingdom
Hampshire UnitedKingdom
Hertfordshire UnitedKingdom
WestMidlands UnitedKingdom
Middlesex UnitedKingdom
London UnitedKingdom
Kent UnitedKingdom
Dorset UnitedKingdom
WestYorkshire UnitedKingdom
Manchester UnitedKingdom
Cleveland UnitedKingdom
Zagreb Croatia
Rhondda_Cynon_Taf UnitedKingdom

Is there an easier way to export shipping addresses as they are laid out in the 'order'? this is needed for a new bar code system introduced by Royal Mail in the UK to be printed on to address labels.

thanks

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

- **[Xavier](/forum/user/4105-xavier "View Xavier's Profile")**
- [![Xavier's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar4105.png)](/forum/user/4105-xavier "View Xavier's Profile")
- [ Offline](/forum/user/4105-xavier)

Less More

- Posts: 13201
- Thank you received: 2322
-
-
-
- [](http://www.kidiweb.fr)
-

11 years 3 months ago [\#212920](#212920) by [Xavier](/forum/user/4105-xavier "View Xavier's Profile")  Replied by *[Xavier](/forum/user/4105-xavier "View Xavier's Profile")* on topic *[state\_ and country\_ before state and country name](/forum/37-import-export-csv-xls/874295-state-and-country-before-state-and-country-name#212920 "-- HikaShop version -- : 2.3.5 -- Joomla version -- : 3.3.6 -- Browser(s) name and version -- : latest IE, FF and Chrome  When I look in the csv file from the mass action export is see that the states and country names are not the real names. It looks that name used in the database is shown. See image.  Is this normal?  Kind regards,  Wilfried")*

Hi,

Please try that code instead: Code:

foreach($params-&gt;elements as $i =&gt; $element){ foreach($element-&gt;address as $j =&gt; $row){ if(isset($row-&gt;address_state)){ $row-&gt;address_state = preg_replace('#^[^_]*_#','',$row-&gt;address_state); $row-&gt;address_state = preg_replace('#_*[0-9]$#','',$row-&gt;address_state); $row-&gt;address_state = str_replace('_',' ',$row-&gt;address_state); } if(isset($row-&gt;address_country)){ $row-&gt;address_country = preg_replace('#^[^_]*_#','',$row-&gt;address_country); $row-&gt;address_country = preg_replace('#_*[0-9]$#','',$row-&gt;address_country); $row-&gt;address_country = str_replace('_',' ',$row-&gt;address_country); } } }

We don't have ported this modification on our end yet, but it is on our todo list.

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

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

Less More

- Posts: 612
- Thank you received: 13
-

11 years 3 months ago [\#213010](#213010) by [mohairbears](/forum/user/916-mohairbears "View mohairbears's Profile")  Replied by *[mohairbears](/forum/user/916-mohairbears "View mohairbears's Profile")* on topic *[state\_ and country\_ before state and country name](/forum/37-import-export-csv-xls/874295-state-and-country-before-state-and-country-name#213010 "-- HikaShop version -- : 2.3.5 -- Joomla version -- : 3.3.6 -- Browser(s) name and version -- : latest IE, FF and Chrome  When I look in the csv file from the mass action export is see that the states and country names are not the real names. It looks that name used in the database is shown. See image.  Is this normal?  Kind regards,  Wilfried")*

Hi, Works for some but not others and now leaving numbers on the end... see below.
order_id shipping_address_state shipping_address_country
18223 New Jersey 429 United States of America 22
18224 New Jersey 429 United States of America 22
18225 New Jersey 429 United States of America 22
18296 Lisboa 300 Portugal 17
18306 Leicestershire 414 UnitedKingdom 77840086
18307 Hampshire 411 UnitedKingdom 77840086
18309 Hertfordshire 412 UnitedKingdom 77840086
18310 WestMidlands 104986208 UnitedKingdom 77840086
18311 Middlesex 135968147 UnitedKingdom 77840086
18312 London 414 UnitedKingdom 77840086
18313 Kent 413 UnitedKingdom 77840086
18314 Dorset 409 UnitedKingdom 77840086
18315 WestYorkshire 76284918 UnitedKingdom 77840086
18316 Manchester 415 UnitedKingdom 77840086
18318 Cleveland 200498208 UnitedKingdom 77840086
18319 Zagreb 108 Croatia 5
18320 Rhondda Cynon Taf 419 UnitedKingdom 77840086
18321 Devon 408 UnitedKingdom 77840086
18322 Aberdeenshire 402 UnitedKingdom 77840086
18323 Hampshire 411 UnitedKingdom 77840086
18324 Berkshire 111061387 UnitedKingdom 77840086
18325 Dumfries and Galloway 408 UnitedKingdom 77840086
18326 Hampshire 411 UnitedKingdom 77840086
18327 94 China 4

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

- **[Xavier](/forum/user/4105-xavier "View Xavier's Profile")**
- [![Xavier's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar4105.png)](/forum/user/4105-xavier "View Xavier's Profile")
- [ Offline](/forum/user/4105-xavier)

Less More

- Posts: 13201
- Thank you received: 2322
-
-
-
- [](http://www.kidiweb.fr)
-

11 years 3 months ago [\#213030](#213030) by [Xavier](/forum/user/4105-xavier "View Xavier's Profile")  Replied by *[Xavier](/forum/user/4105-xavier "View Xavier's Profile")* on topic *[state\_ and country\_ before state and country name](/forum/37-import-export-csv-xls/874295-state-and-country-before-state-and-country-name#213030 "-- HikaShop version -- : 2.3.5 -- Joomla version -- : 3.3.6 -- Browser(s) name and version -- : latest IE, FF and Chrome  When I look in the csv file from the mass action export is see that the states and country names are not the real names. It looks that name used in the database is shown. See image.  Is this normal?  Kind regards,  Wilfried")*

Hi,

Just to clarify a bit the situation, we will not use that code when we will implement that feature.
That code is a temporary code to manage that situation, but the final code will use database queries to get the desired data from the zone table.

Here is a new version of that temporary code, not tested. Code:

foreach($params-&gt;elements as $i =&gt; $element){ foreach($element-&gt;address as $j =&gt; $row){ if(isset($row-&gt;address_state)){ $row-&gt;address_state = str_replace('_',' ',str_replace('state_','',preg_replace('#_[0-9]*$#','',$row-&gt;address_state))); } if(isset($row-&gt;address_country)){ $row-&gt;address_country = str_replace('_',' ',str_replace('country_','',preg_replace('#_[0-9]*$#','',$row-&gt;address_country))); } } }

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzM3LWltcG9ydC1leHBvcnQtY3N2LXhscy84NzQyOTUtc3RhdGUtYW5kLWNvdW50cnktYmVmb3JlLXN0YXRlLWFuZC1jb3VudHJ5LW5hbWU/dG1wbD1tYXJrZG93bg==) 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.103 seconds

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