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

#   No Category id and cat parent id when export csv

##

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

Less More

- Posts: 101
- Thank you received: 12
-
-

11 years 11 months ago -  11 years 11 months ago [\#183943](#183943) by [SG](/forum/user/12204-sg "View SG's Profile")  *[No Category id and cat parent id when export csv](/forum/44-mass-actions/873766-no-category-id-and-cat-parent-id-when-export-csv#183943 "-- HikaShop version -- : 2.3.4 -- Joomla version -- : 2.5.27 -- PHP version -- : 5.4  Hi,  As you can see in the printscreen I've selected category id and category parent id but they are not exported (see second printscreen). As you can see I'm filtering out categories that have an id bigger or equal to 154. I selected: product&#95;name, product&#95;code, category&#95;id, category&#95;parent&#95;id.  &#91;image&#93;  Export generated:  &#91;image&#93;  As you can see, the product&#95;id is also exported although I didn't select it.  What Could be the reason? Is there a fix? Questions: 1) Why aren't the category id and category parent id exported? Edit: actually none of the category fields except for CATEGORIES are exported.  2) Why are the product id exported when NOT selected?  3) Why are products exported multiple times when they belong to more than one category? This generates doubles. Is there a way to only export one line per product. (see picture below for example of doubles) &#91;image&#93;  Thanks in advance  Cheers")* was created by *[SG](/forum/user/12204-sg "View SG's Profile")*

-- HikaShop version -- : 2.3.4
-- Joomla version -- : 2.5.27
-- PHP version -- : 5.4

Hi,

As you can see in the printscreen I've selected category id and category parent id but they are not exported (see second printscreen).
As you can see I'm filtering out categories that have an id bigger or equal to 154.
I selected: product_name, product_code, category_id, category_parent_id.

[ ![&#91;IMG](http://i57.tinypic.com/fw1s9j.jpg) ](http://i57.tinypic.com/fw1s9j.jpg "&#91;IMG")

**Export generated:**

[ ![&#91;IMG](http://i62.tinypic.com/3444gva.jpg) ](http://i62.tinypic.com/3444gva.jpg "&#91;IMG")

As you can see, the product_id is also exported although I didn't select it.

What Could be the reason? Is there a fix?
Questions:
**1) Why aren't the category id and category parent id exported? Edit: actually none of the category fields except for CATEGORIES are exported.

2) Why are the product id exported when NOT selected?

3) Why are products exported multiple times when they belong to more than one category? This generates doubles. Is there a way to only export one line per product. (see picture below for example of doubles)**
[ ![&#91;IMG](http://i59.tinypic.com/2s1qfsm.jpg) ](http://i59.tinypic.com/2s1qfsm.jpg "&#91;IMG")

Thanks in advance

Cheers

Last edit: 11 years 11 months ago by [SG](/forum/user/12204-sg "View SG's Profile"). Reason: added EDIT to question 1)

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQ0LW1hc3MtYWN0aW9ucy84NzM3NjYtbm8tY2F0ZWdvcnktaWQtYW5kLWNhdC1wYXJlbnQtaWQtd2hlbi1leHBvcnQtY3N2P3RtcGw9bWFya2Rvd24=) 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 11 months ago [\#184092](#184092) by [Xavier](/forum/user/4105-xavier "View Xavier's Profile")  Replied by *[Xavier](/forum/user/4105-xavier "View Xavier's Profile")* on topic *[No Category id and cat parent id when export csv](/forum/44-mass-actions/873766-no-category-id-and-cat-parent-id-when-export-csv#184092 "-- HikaShop version -- : 2.3.4 -- Joomla version -- : 2.5.27 -- PHP version -- : 5.4  Hi,  As you can see in the printscreen I've selected category id and category parent id but they are not exported (see second printscreen). As you can see I'm filtering out categories that have an id bigger or equal to 154. I selected: product&#95;name, product&#95;code, category&#95;id, category&#95;parent&#95;id.  &#91;image&#93;  Export generated:  &#91;image&#93;  As you can see, the product&#95;id is also exported although I didn't select it.  What Could be the reason? Is there a fix? Questions: 1) Why aren't the category id and category parent id exported? Edit: actually none of the category fields except for CATEGORIES are exported.  2) Why are the product id exported when NOT selected?  3) Why are products exported multiple times when they belong to more than one category? This generates doubles. Is there a way to only export one line per product. (see picture below for example of doubles) &#91;image&#93;  Thanks in advance  Cheers")*

Hi,

The export is indeed working like that, it allow to have the correct format to import back the products in HikaShop.
To import, you need the product_id and the category name, so that's why we export it this way.

I understand that you want to have the checked columns data in the csv file, so you can edit the file "administrator/components/com_hikashop/classes/massaction.php" and in the function "_exportCSV()" comment the line: Code:

$this-&gt;organizeExportColumn($params-&gt;table,$keyTable,$params-&gt;elements,$params-&gt;action,$params-&gt;types);

This will let the category_id and category_parent_id columns, to remove the "product_id" you can edit the file "plugins/hikashop/massaction_product/massaction_product.php" and in the function "onProcessProductMassActionexportCsv()" remove the line: Code:

$action['product']['product_id'] = 'product_id';

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

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