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

#   Wrong columns in massaction export

##

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

Less More

- Posts: 431
- Thank you received: 22
-

3 years 8 months ago -  3 years 8 months ago [\#349408](#349408) by [mojweb](/forum/user/5128-mojweb "View mojweb's Profile")  *[Wrong columns in massaction export](/forum/44-mass-actions/905930-wrong-columns-in-massaction-export#349408 "-- HikaShop version -- : 4.7.1 -- Joomla version -- : 3.10 -- PHP version -- : 7.3  After update from 4.7.0 to 4.7.1 massaction export have wrong (changed) order of columns. We use that to import to our accounting app, but now cant import becouse order of columns are changed.  For example if you look at S column. It should be order&#95;product&#95;price. Name of column is ok in both cases. But data in columns are wrong. In new export there is product name in order&#95;product&#95;price column.")* was created by *[mojweb](/forum/user/5128-mojweb "View mojweb's Profile")*

-- HikaShop version -- : 4.7.1
-- Joomla version -- : 3.10
-- PHP version -- : 7.3

After update from 4.7.0 to 4.7.1 massaction export have wrong (changed) order of columns.
We use that to import to our accounting app, but now cant import becouse order of columns are changed.

For example if you look at S column. It should be order_product_price. Name of column is ok in both cases. But data in columns are wrong. In new export there is product name in order_product_price column.

- [ ![mass1.jpg](/forum/attachment/56539) ](/forum/attachment/56539 "mass1.jpg") [ ](/forum/attachment/56539?download=1 "mass1.jpg")
- [ ![mass2.jpg](/forum/attachment/56540) ](/forum/attachment/56540 "mass2.jpg") [ ](/forum/attachment/56540?download=1 "mass2.jpg")
- [ ![mass-ok.JPG](/forum/attachment/56541) ](/forum/attachment/56541 "mass-ok.JPG") [ ](/forum/attachment/56541?download=1 "mass-ok.JPG")
- [ ![mass-wrong.jpg](/forum/attachment/56542) ](/forum/attachment/56542 "mass-wrong.jpg") [ ](/forum/attachment/56542?download=1 "mass-wrong.jpg")

Last edit: 3 years 8 months ago by [mojweb](/forum/user/5128-mojweb "View mojweb's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtL21hc3MtYWN0aW9ucy85MDU5MzAtd3JvbmctY29sdW1ucy1pbi1tYXNzYWN0aW9uLWV4cG9ydD90bXBsPW1hcmtkb3du) 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)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86292
- Thank you received: 14271
-
-

3 years 8 months ago [\#349410](#349410) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Wrong columns in massaction export](/forum/44-mass-actions/905930-wrong-columns-in-massaction-export#349410 "-- HikaShop version -- : 4.7.1 -- Joomla version -- : 3.10 -- PHP version -- : 7.3  After update from 4.7.0 to 4.7.1 massaction export have wrong (changed) order of columns. We use that to import to our accounting app, but now cant import becouse order of columns are changed.  For example if you look at S column. It should be order&#95;product&#95;price. Name of column is ok in both cases. But data in columns are wrong. In new export there is product name in order&#95;product&#95;price column.")*

Hi,

There is no mechanism to select the order of the columns. The order is basically how they are stored in the mass action data.
The simplest I think would be to edit the data of the mass action in the hikashop_massaction table in your PHPMyAdmin and check the order of the columns in the serialized data.
Ideally, it would be best to not rely on the order of the columns when handling a CSV but rather the name of the columns. That's what we do for the import in HikaShop and how I've seen it anywhere I've had to import CSV files.

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

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

Less More

- Posts: 431
- Thank you received: 22
-

3 years 8 months ago [\#349424](#349424) by [mojweb](/forum/user/5128-mojweb "View mojweb's Profile")  Replied by *[mojweb](/forum/user/5128-mojweb "View mojweb's Profile")* on topic *[Wrong columns in massaction export](/forum/44-mass-actions/905930-wrong-columns-in-massaction-export#349424 "-- HikaShop version -- : 4.7.1 -- Joomla version -- : 3.10 -- PHP version -- : 7.3  After update from 4.7.0 to 4.7.1 massaction export have wrong (changed) order of columns. We use that to import to our accounting app, but now cant import becouse order of columns are changed.  For example if you look at S column. It should be order&#95;product&#95;price. Name of column is ok in both cases. But data in columns are wrong. In new export there is product name in order&#95;product&#95;price column.")*

Nicolas, look again at screenshots. It is not the order. It is the wrong data in columns.
In column order_product_price is product name and so on.
We need to solve this urgent.

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

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

Less More

- Posts: 431
- Thank you received: 22
-

3 years 8 months ago [\#349428](#349428) by [mojweb](/forum/user/5128-mojweb "View mojweb's Profile")  Replied by *[mojweb](/forum/user/5128-mojweb "View mojweb's Profile")* on topic *[Wrong columns in massaction export](/forum/44-mass-actions/905930-wrong-columns-in-massaction-export#349428 "-- HikaShop version -- : 4.7.1 -- Joomla version -- : 3.10 -- PHP version -- : 7.3  After update from 4.7.0 to 4.7.1 massaction export have wrong (changed) order of columns. We use that to import to our accounting app, but now cant import becouse order of columns are changed.  For example if you look at S column. It should be order&#95;product&#95;price. Name of column is ok in both cases. But data in columns are wrong. In new export there is product name in order&#95;product&#95;price column.")*

Further investigation shows one more thing.
When I try to create new massaction, in first select is missing order_full_tax.

- [ ![fulltax.jpg](/forum/attachment/56546) ](/forum/attachment/56546 "fulltax.jpg") [ ](/forum/attachment/56546?download=1 "fulltax.jpg")
- [ ![nofulltax.jpg](/forum/attachment/56547) ](/forum/attachment/56547 "nofulltax.jpg") [ ](/forum/attachment/56547?download=1 "nofulltax.jpg")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtL21hc3MtYWN0aW9ucy85MDU5MzAtd3JvbmctY29sdW1ucy1pbi1tYXNzYWN0aW9uLWV4cG9ydD90bXBsPW1hcmtkb3du) 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)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86292
- Thank you received: 14271
-
-

3 years 8 months ago [\#349437](#349437) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Wrong columns in massaction export](/forum/44-mass-actions/905930-wrong-columns-in-massaction-export#349437 "-- HikaShop version -- : 4.7.1 -- Joomla version -- : 3.10 -- PHP version -- : 7.3  After update from 4.7.0 to 4.7.1 massaction export have wrong (changed) order of columns. We use that to import to our accounting app, but now cant import becouse order of columns are changed.  For example if you look at S column. It should be order&#95;product&#95;price. Name of column is ok in both cases. But data in columns are wrong. In new export there is product name in order&#95;product&#95;price column.")*

Hi,

Ok, I see what you mean now.
I tried to reproduce the problem on my end but I wasn't able to.
So there must be something specific to your setup which led to this issue.
Could you provide a backend access, a FTP access, the name of the mass action to use for my tests and a link to this thread for reference via our contact form so that I can look into it ?
[ www.hikashop.com/support/contact-us.html](https://www.hikashop.com/support/contact-us.html)

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

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

Less More

- Posts: 431
- Thank you received: 22
-

3 years 8 months ago [\#349438](#349438) by [mojweb](/forum/user/5128-mojweb "View mojweb's Profile")  Replied by *[mojweb](/forum/user/5128-mojweb "View mojweb's Profile")* on topic *[Wrong columns in massaction export](/forum/44-mass-actions/905930-wrong-columns-in-massaction-export#349438 "-- HikaShop version -- : 4.7.1 -- Joomla version -- : 3.10 -- PHP version -- : 7.3  After update from 4.7.0 to 4.7.1 massaction export have wrong (changed) order of columns. We use that to import to our accounting app, but now cant import becouse order of columns are changed.  For example if you look at S column. It should be order&#95;product&#95;price. Name of column is ok in both cases. But data in columns are wrong. In new export there is product name in order&#95;product&#95;price column.")*

Thank you. Sent.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtL21hc3MtYWN0aW9ucy85MDU5MzAtd3JvbmctY29sdW1ucy1pbi1tYXNzYWN0aW9uLWV4cG9ydD90bXBsPW1hcmtkb3du) 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)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86292
- Thank you received: 14271
-
-

3 years 8 months ago [\#349450](#349450) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Wrong columns in massaction export](/forum/44-mass-actions/905930-wrong-columns-in-massaction-export#349450 "-- HikaShop version -- : 4.7.1 -- Joomla version -- : 3.10 -- PHP version -- : 7.3  After update from 4.7.0 to 4.7.1 massaction export have wrong (changed) order of columns. We use that to import to our accounting app, but now cant import becouse order of columns are changed.  For example if you look at S column. It should be order&#95;product&#95;price. Name of column is ok in both cases. But data in columns are wrong. In new export there is product name in order&#95;product&#95;price column.")*

Thanks. Looking at the situation on your website, I found that you had selected the "order_id" in the order_product selector, not in the "order" selector. And that caused the issue with the XLSX.
I was then able to reproduce the problem on my local test website.
That way I was able to do some debugging and found what was the problem.
I've made a patch and it is now working fine for me.
I've included the patch on our end. To get it on your website, download the latest version install package of HikaShop on our website and install it on yours.

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

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

Less More

- Posts: 431
- Thank you received: 22
-

3 years 8 months ago [\#349482](#349482) by [mojweb](/forum/user/5128-mojweb "View mojweb's Profile")  Replied by *[mojweb](/forum/user/5128-mojweb "View mojweb's Profile")* on topic *[Wrong columns in massaction export](/forum/44-mass-actions/905930-wrong-columns-in-massaction-export#349482 "-- HikaShop version -- : 4.7.1 -- Joomla version -- : 3.10 -- PHP version -- : 7.3  After update from 4.7.0 to 4.7.1 massaction export have wrong (changed) order of columns. We use that to import to our accounting app, but now cant import becouse order of columns are changed.  For example if you look at S column. It should be order&#95;product&#95;price. Name of column is ok in both cases. But data in columns are wrong. In new export there is product name in order&#95;product&#95;price column.")*

Columns are now proper align but Now I have new issue. See attachment.
Order_id column is duplicated.

If I delete duplicated column in xls my import works.

- [ ![mass-duplicate.jpg](/forum/attachment/56562) ](/forum/attachment/56562 "...-duplicate.jpg") [ ](/forum/attachment/56562?download=1 "...-duplicate.jpg")
- [ ![mass-config.jpg](/forum/attachment/56563) ](/forum/attachment/56563 "mass-config.jpg") [ ](/forum/attachment/56563?download=1 "mass-config.jpg")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtL21hc3MtYWN0aW9ucy85MDU5MzAtd3JvbmctY29sdW1ucy1pbi1tYXNzYWN0aW9uLWV4cG9ydD90bXBsPW1hcmtkb3du) 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)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86292
- Thank you received: 14271
-
-

3 years 8 months ago [\#349483](#349483) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Wrong columns in massaction export](/forum/44-mass-actions/905930-wrong-columns-in-massaction-export#349483 "-- HikaShop version -- : 4.7.1 -- Joomla version -- : 3.10 -- PHP version -- : 7.3  After update from 4.7.0 to 4.7.1 massaction export have wrong (changed) order of columns. We use that to import to our accounting app, but now cant import becouse order of columns are changed.  For example if you look at S column. It should be order&#95;product&#95;price. Name of column is ok in both cases. But data in columns are wrong. In new export there is product name in order&#95;product&#95;price column.")*

Hi,

Disable the order_id column from the order_product area and activate it in the order area and you'll have only one order_id column.

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

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

Less More

- Posts: 431
- Thank you received: 22
-

3 years 8 months ago [\#349520](#349520) by [mojweb](/forum/user/5128-mojweb "View mojweb's Profile")  Replied by *[mojweb](/forum/user/5128-mojweb "View mojweb's Profile")* on topic *[Wrong columns in massaction export](/forum/44-mass-actions/905930-wrong-columns-in-massaction-export#349520 "-- HikaShop version -- : 4.7.1 -- Joomla version -- : 3.10 -- PHP version -- : 7.3  After update from 4.7.0 to 4.7.1 massaction export have wrong (changed) order of columns. We use that to import to our accounting app, but now cant import becouse order of columns are changed.  For example if you look at S column. It should be order&#95;product&#95;price. Name of column is ok in both cases. But data in columns are wrong. In new export there is product name in order&#95;product&#95;price column.")*

Then the order of columns is broken. Can in some way be duplicate order_id column in order product area be fixed?

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtL21hc3MtYWN0aW9ucy85MDU5MzAtd3JvbmctY29sdW1ucy1pbi1tYXNzYWN0aW9uLWV4cG9ydD90bXBsPW1hcmtkb3du) 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)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86292
- Thank you received: 14271
-
-

3 years 8 months ago [\#349572](#349572) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Wrong columns in massaction export](/forum/44-mass-actions/905930-wrong-columns-in-massaction-export#349572 "-- HikaShop version -- : 4.7.1 -- Joomla version -- : 3.10 -- PHP version -- : 7.3  After update from 4.7.0 to 4.7.1 massaction export have wrong (changed) order of columns. We use that to import to our accounting app, but now cant import becouse order of columns are changed.  For example if you look at S column. It should be order&#95;product&#95;price. Name of column is ok in both cases. But data in columns are wrong. In new export there is product name in order&#95;product&#95;price column.")*

Hi,

It's not really a duplication. The first one is the order_id from the hikashop_order table. The second one is the order_id from the hikashop_order_product table.
When you export an order without any products, the first one will have the id of the order while the second one will be empty.

The first one is added to all the export files. I'm not sure why this is done. I suppose it is used in some cases to link the other data of the order with the order itself.
However, removing it doesn't cause any issue in the tests I did. So we probably could remove it. The column was actually added to the export in a wrong way when it was first added, 10 years ago. Recently, I stubbled on that piece of code and saw the code was incorrect and thus I fixed it, which led to the column being in the CSV even if you don't select it.

I suppose it would make sense to not have it since it can be selected anyways and it doesn't cause any issue not having it as far as I can see.
For that, remove the line: Code:

$params-&gt;action['order']['order_id'] = 'order_id';

in the file plugins/hikashop/massaction_order/massaction_order.php
I'll look at adding that change for the next version of HikaShop too.

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

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

[](#top)
