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

#   export csv - change header

##

- **[anut\_peach](/forum/user/51552-anut-peach "View anut&#95;peach's Profile")**
- [![anut&#95;peach's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/51552-anut-peach "View anut&#95;peach's Profile") Topic Author
- [ Offline](/forum/user/51552-anut-peach)

Less More

- Posts: 30
- Thank you received: 1
-
-

9 years 4 months ago [\#274826](#274826) by [anut\_peach](/forum/user/51552-anut-peach "View anut&#95;peach's Profile")  *[export csv - change header](/forum/37-import-export-csv-xls/891305-export-csv-change-header#274826 "Hi, i would like to export every order to a csv file with the mass action - that already seems to work as it should. Problem: the attached system that should import the csv-file needs a specific order of the columns and specific header lines in the csv. i suppose it should be pretty easy for hikashop to change this details of the csv file? but i was not able to find the corresponding file or the settings for that. thanks.")* was created by *[anut\_peach](/forum/user/51552-anut-peach "View anut&#95;peach's Profile")*

Hi,
i would like to export every order to a csv file with the mass action - that already seems to work as it should.
Problem:
the attached system that should import the csv-file needs a specific order of the columns and specific header lines in the csv.
i suppose it should be pretty easy for hikashop to change this details of the csv file?
but i was not able to find the corresponding file or the settings for that.
thanks.

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

- **[Jerome](/forum/user/80-jerome "View Jerome's Profile")**
- [![Jerome's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar80.png)](/forum/user/80-jerome "View Jerome's Profile")
- [ Offline](/forum/user/80-jerome)
- HikaShop core developer

Less More

- Posts: 26402
- Thank you received: 4081
-
- [](http://obsi.dev)
-

9 years 4 months ago [\#274830](#274830) by [Jerome](/forum/user/80-jerome "View Jerome's Profile")  Replied by *[Jerome](/forum/user/80-jerome "View Jerome's Profile")* on topic *[export csv - change header](/forum/37-import-export-csv-xls/891305-export-csv-change-header#274830 "Hi, i would like to export every order to a csv file with the mass action - that already seems to work as it should. Problem: the attached system that should import the csv-file needs a specific order of the columns and specific header lines in the csv. i suppose it should be pretty easy for hikashop to change this details of the csv file? but i was not able to find the corresponding file or the settings for that. thanks.")*

Hello,

You can use the trigger "onBeforeOrderExport" in order to change dynamically the content during the export :
[ www.hikashop.com/support/documentation/6...#onBeforeOrderExport](https://www.hikashop.com/support/documentation/62-hikashop-developer-documentation.html#onBeforeOrderExport)

And you can use a view override in order to change other elements during the export.
That's in the view where it will be easier to change the header ; or at least to "translate" the header names.

Regards,

---

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

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

- **[anut\_peach](/forum/user/51552-anut-peach "View anut&#95;peach's Profile")**
- [![anut&#95;peach's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/51552-anut-peach "View anut&#95;peach's Profile") Topic Author
- [ Offline](/forum/user/51552-anut-peach)

Less More

- Posts: 30
- Thank you received: 1
-
-

9 years 4 months ago [\#275058](#275058) by [anut\_peach](/forum/user/51552-anut-peach "View anut&#95;peach's Profile")  Replied by *[anut\_peach](/forum/user/51552-anut-peach "View anut&#95;peach's Profile")* on topic *[export csv - change header](/forum/37-import-export-csv-xls/891305-export-csv-change-header#275058 "Hi, i would like to export every order to a csv file with the mass action - that already seems to work as it should. Problem: the attached system that should import the csv-file needs a specific order of the columns and specific header lines in the csv. i suppose it should be pretty easy for hikashop to change this details of the csv file? but i was not able to find the corresponding file or the settings for that. thanks.")*

thanks for your reply, but its too complicated for me ![:)](/media/kunena/emoticons/3.png ":)")
the onBeforeOrderExport has something to do with "how to develop a hikashop plugin"!? much too complicated.
the second point sounds good to me, "override" the headers.
this should work fro me: eg. override "item1_order_product_shipping_price" with "shipping price"
but i don't know where to configure the overrides?

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzM3LWltcG9ydC1leHBvcnQtY3N2LXhscy84OTEzMDUtZXhwb3J0LWNzdi1jaGFuZ2UtaGVhZGVyP3RtcGw9bWFya2Rvd24=) 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
-
-

9 years 4 months ago [\#275061](#275061) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[export csv - change header](/forum/37-import-export-csv-xls/891305-export-csv-change-header#275061 "Hi, i would like to export every order to a csv file with the mass action - that already seems to work as it should. Problem: the attached system that should import the csv-file needs a specific order of the columns and specific header lines in the csv. i suppose it should be pretty easy for hikashop to change this details of the csv file? but i was not able to find the corresponding file or the settings for that. thanks.")*

Hi,

You can override view files via the menu Display&gt;Views.
The one you want to edit is the file "export" of the view "order".

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

- **[anut\_peach](/forum/user/51552-anut-peach "View anut&#95;peach's Profile")**
- [![anut&#95;peach's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/51552-anut-peach "View anut&#95;peach's Profile") Topic Author
- [ Offline](/forum/user/51552-anut-peach)

Less More

- Posts: 30
- Thank you received: 1
-
-

9 years 4 months ago [\#275093](#275093) by [anut\_peach](/forum/user/51552-anut-peach "View anut&#95;peach's Profile")  Replied by *[anut\_peach](/forum/user/51552-anut-peach "View anut&#95;peach's Profile")* on topic *[export csv - change header](/forum/37-import-export-csv-xls/891305-export-csv-change-header#275093 "Hi, i would like to export every order to a csv file with the mass action - that already seems to work as it should. Problem: the attached system that should import the csv-file needs a specific order of the columns and specific header lines in the csv. i suppose it should be pretty easy for hikashop to change this details of the csv file? but i was not able to find the corresponding file or the settings for that. thanks.")*

hi nicolas,
i checked the view file orders-&gt;export, but i cannot make the overrides there.
that file does only describe the logically behavior of the export process.
but where can i find the text of the header lines to override or change them?

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzM3LWltcG9ydC1leHBvcnQtY3N2LXhscy84OTEzMDUtZXhwb3J0LWNzdi1jaGFuZ2UtaGVhZGVyP3RtcGw9bWFya2Rvd24=) 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
-
-

9 years 4 months ago [\#275095](#275095) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[export csv - change header](/forum/37-import-export-csv-xls/891305-export-csv-change-header#275095 "Hi, i would like to export every order to a csv file with the mass action - that already seems to work as it should. Problem: the attached system that should import the csv-file needs a specific order of the columns and specific header lines in the csv. i suppose it should be pretty easy for hikashop to change this details of the csv file? but i was not able to find the corresponding file or the settings for that. thanks.")*

Hi,

It's also there.
This code handles the display of the header: Code:

if($maxProd &amp;&amp; !empty($productFields)) { $first = array(); $o = reset($this-&gt;orders); foreach($o as $key =&gt; $val) { if(is_array($val)) continue; $first[] = $key; } $o = null; for($i=1;$i&lt;=$maxProd;$i++){ foreach($productFields as $field){ $first[] = 'item'.$i.'_'.$field; } } } else { $first = array_keys(get_object_vars(reset($this-&gt;orders))); } $export-&gt;writeLine($first);

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

- **[anut\_peach](/forum/user/51552-anut-peach "View anut&#95;peach's Profile")**
- [![anut&#95;peach's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/51552-anut-peach "View anut&#95;peach's Profile") Topic Author
- [ Offline](/forum/user/51552-anut-peach)

Less More

- Posts: 30
- Thank you received: 1
-
-

9 years 3 months ago [\#275613](#275613) by [anut\_peach](/forum/user/51552-anut-peach "View anut&#95;peach's Profile")  Replied by *[anut\_peach](/forum/user/51552-anut-peach "View anut&#95;peach's Profile")* on topic *[export csv - change header](/forum/37-import-export-csv-xls/891305-export-csv-change-header#275613 "Hi, i would like to export every order to a csv file with the mass action - that already seems to work as it should. Problem: the attached system that should import the csv-file needs a specific order of the columns and specific header lines in the csv. i suppose it should be pretty easy for hikashop to change this details of the csv file? but i was not able to find the corresponding file or the settings for that. thanks.")*

Hi nicholas,
i am affraid, we are not talking about the same thing!?
for example, i cannot see the text "item1_order_product_name" in your code shown above!?

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzM3LWltcG9ydC1leHBvcnQtY3N2LXhscy84OTEzMDUtZXhwb3J0LWNzdi1jaGFuZ2UtaGVhZGVyP3RtcGw9bWFya2Rvd24=) 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
-
-

9 years 3 months ago [\#275615](#275615) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[export csv - change header](/forum/37-import-export-csv-xls/891305-export-csv-change-header#275615 "Hi, i would like to export every order to a csv file with the mass action - that already seems to work as it should. Problem: the attached system that should import the csv-file needs a specific order of the columns and specific header lines in the csv. i suppose it should be pretty easy for hikashop to change this details of the csv file? but i was not able to find the corresponding file or the settings for that. thanks.")*

Hi,

That's because the column names are generated dynamically.
The display of the item1_order_product_name column is handled by the line of code: Code:

$first[] = 'item'.$i.'_'.$field;

Remove that line from that file and you'll see that it will remove the itemX_YYY column names from the CSV files when you export your orders.

So I do believe that we're talking about the same thing. It's just that it is not as easy to change as you believed.

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

- **[anut\_peach](/forum/user/51552-anut-peach "View anut&#95;peach's Profile")**
- [![anut&#95;peach's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/51552-anut-peach "View anut&#95;peach's Profile") Topic Author
- [ Offline](/forum/user/51552-anut-peach)

Less More

- Posts: 30
- Thank you received: 1
-
-

9 years 3 months ago [\#275676](#275676) by [anut\_peach](/forum/user/51552-anut-peach "View anut&#95;peach's Profile")  Replied by *[anut\_peach](/forum/user/51552-anut-peach "View anut&#95;peach's Profile")* on topic *[export csv - change header](/forum/37-import-export-csv-xls/891305-export-csv-change-header#275676 "Hi, i would like to export every order to a csv file with the mass action - that already seems to work as it should. Problem: the attached system that should import the csv-file needs a specific order of the columns and specific header lines in the csv. i suppose it should be pretty easy for hikashop to change this details of the csv file? but i was not able to find the corresponding file or the settings for that. thanks.")*

ok, you are right, it is not as easy to change as i believed ..
thanks for your support i will try to get it working.

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

- **[kyratn](/forum/user/38342-kyratn "View kyratn's Profile")**
- [![kyratn's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/gallery/redswirl.jpg)](/forum/user/38342-kyratn "View kyratn's Profile")
- [ Offline](/forum/user/38342-kyratn)

Less More

- Posts: 1119
- Thank you received: 114
-
- [](http://kyra.lt)
-

9 years 3 months ago [\#275677](#275677) by [kyratn](/forum/user/38342-kyratn "View kyratn's Profile")  Replied by *[kyratn](/forum/user/38342-kyratn "View kyratn's Profile")* on topic *[export csv - change header](/forum/37-import-export-csv-xls/891305-export-csv-change-header#275677 "Hi, i would like to export every order to a csv file with the mass action - that already seems to work as it should. Problem: the attached system that should import the csv-file needs a specific order of the columns and specific header lines in the csv. i suppose it should be pretty easy for hikashop to change this details of the csv file? but i was not able to find the corresponding file or the settings for that. thanks.")*

Hi,

I suggest you to check component CSVimproved. You will be able to get what you want.

We use it by our selfs to export orders.

Thanks

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

- **[anut\_peach](/forum/user/51552-anut-peach "View anut&#95;peach's Profile")**
- [![anut&#95;peach's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/51552-anut-peach "View anut&#95;peach's Profile") Topic Author
- [ Offline](/forum/user/51552-anut-peach)

Less More

- Posts: 30
- Thank you received: 1
-
-

9 years 3 months ago [\#275685](#275685) by [anut\_peach](/forum/user/51552-anut-peach "View anut&#95;peach's Profile")  Replied by *[anut\_peach](/forum/user/51552-anut-peach "View anut&#95;peach's Profile")* on topic *[export csv - change header](/forum/37-import-export-csv-xls/891305-export-csv-change-header#275685 "Hi, i would like to export every order to a csv file with the mass action - that already seems to work as it should. Problem: the attached system that should import the csv-file needs a specific order of the columns and specific header lines in the csv. i suppose it should be pretty easy for hikashop to change this details of the csv file? but i was not able to find the corresponding file or the settings for that. thanks.")*

thanks.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzM3LWltcG9ydC1leHBvcnQtY3N2LXhscy84OTEzMDUtZXhwb3J0LWNzdi1jaGFuZ2UtaGVhZGVyP3RtcGw9bWFya2Rvd24=) 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
-
-

9 years 3 months ago [\#275679](#275679) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[export csv - change header](/forum/37-import-export-csv-xls/891305-export-csv-change-header#275679 "Hi, i would like to export every order to a csv file with the mass action - that already seems to work as it should. Problem: the attached system that should import the csv-file needs a specific order of the columns and specific header lines in the csv. i suppose it should be pretty easy for hikashop to change this details of the csv file? but i was not able to find the corresponding file or the settings for that. thanks.")*

Hi,

Thanks for the input. Yes, CSV improved is a great way to import/export data with HikaShop. So if you need more custom things than what HikaShop provides, it can be a life saver.

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

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