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

#   Create Categories with CSV

##

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

Less More

- Posts: 242
- Thank you received: 0
-
-
- [](http://www.HighDesertVideo.com)
-

15 years 8 months ago [\#10752](#10752) by [hdracing](/forum/user/742-hdracing "View hdracing's Profile")  *[Create Categories with CSV](/forum/4-how-to/10752-create-categories-with-csv#10752 "Hello All,  Is it possible to CREATE categories with an import file (CSV), or must categories be created from within Hikashop? The import documentation page near the top says that since v1.4.1 categories can be imported, but further down it states that they must already exist in Hikashop.  If they can be created that way, what would the column headers look like to make sure parent/child relationships were established?  Thanks, Ed")* was created by *[hdracing](/forum/user/742-hdracing "View hdracing's Profile")*

Hello All,

Is it possible to CREATE categories with an import file (CSV), or must categories be created from within Hikashop? The import documentation page near the top says that since v1.4.1 categories can be imported, but further down it states that they must already exist in Hikashop.

If they can be created that way, what would the column headers look like to make sure parent/child relationships were established?

Thanks,
Ed

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzEwNzUyLWNyZWF0ZS1jYXRlZ29yaWVzLXdpdGgtY3N2P3RtcGw9bWFya2Rvd24=) 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: 86567
- Thank you received: 14314
-
-

15 years 8 months ago [\#10753](#10753) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Re: Create Categories with CSV](/forum/4-how-to/10752-create-categories-with-csv#10753 "Hello All,  Is it possible to CREATE categories with an import file (CSV), or must categories be created from within Hikashop? The import documentation page near the top says that since v1.4.1 categories can be imported, but further down it states that they must already exist in Hikashop.  If they can be created that way, what would the column headers look like to make sure parent/child relationships were established?  Thanks, Ed")*

Hi,

Yes you can create categories with the import. The documentation even has an example:

parent_category,categories
product category,main category 1;main category 2;main category 3
main category 1,sub category 1;sub category 2

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

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

Less More

- Posts: 242
- Thank you received: 0
-
-
- [](http://www.HighDesertVideo.com)
-

15 years 8 months ago [\#10807](#10807) by [hdracing](/forum/user/742-hdracing "View hdracing's Profile")  Replied by *[hdracing](/forum/user/742-hdracing "View hdracing's Profile")* on topic *[Re: Create Categories with CSV](/forum/4-how-to/10752-create-categories-with-csv#10807 "Hello All,  Is it possible to CREATE categories with an import file (CSV), or must categories be created from within Hikashop? The import documentation page near the top says that since v1.4.1 categories can be imported, but further down it states that they must already exist in Hikashop.  If they can be created that way, what would the column headers look like to make sure parent/child relationships were established?  Thanks, Ed")*

Thanks Nicolas,

So if I understand correctly, the parent_category can be anywhere in the category tree structure and the category column reflects sub-categories of that particular parent_category only. Is that correct?

Rather than put all sub-categories in a single column on one row in the spreadsheet, for the sake of readability could each sub-category be on its own row and reference the same parent_category? In this case I guess "Create Automatically Missing Categories" would need to be enabled.

And finally, after an import is done to create the parent and sub-categories, any product imports would include the single column "categories" which would contain all pertinent category id numbers without reference to parent/sub-category level. Correct, or am I still confused?

Regards,
Ed

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzEwNzUyLWNyZWF0ZS1jYXRlZ29yaWVzLXdpdGgtY3N2P3RtcGw9bWFya2Rvd24=) 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: 86567
- Thank you received: 14314
-
-

15 years 8 months ago [\#10808](#10808) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Re: Create Categories with CSV](/forum/4-how-to/10752-create-categories-with-csv#10808 "Hello All,  Is it possible to CREATE categories with an import file (CSV), or must categories be created from within Hikashop? The import documentation page near the top says that since v1.4.1 categories can be imported, but further down it states that they must already exist in Hikashop.  If they can be created that way, what would the column headers look like to make sure parent/child relationships were established?  Thanks, Ed")*

Yes.

Yes.

Yes.

You're correct on all your points.

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

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

Less More

- Posts: 242
- Thank you received: 0
-
-
- [](http://www.HighDesertVideo.com)
-

15 years 8 months ago [\#11132](#11132) by [hdracing](/forum/user/742-hdracing "View hdracing's Profile")  Replied by *[hdracing](/forum/user/742-hdracing "View hdracing's Profile")* on topic *[Re: Create Categories with CSV](/forum/4-how-to/10752-create-categories-with-csv#11132 "Hello All,  Is it possible to CREATE categories with an import file (CSV), or must categories be created from within Hikashop? The import documentation page near the top says that since v1.4.1 categories can be imported, but further down it states that they must already exist in Hikashop.  If they can be created that way, what would the column headers look like to make sure parent/child relationships were established?  Thanks, Ed")*

Nicolas,

A quick question: If a category is deleted in Hikashop, do all sub-categories associated with that category also get deleted or do they get left as orphan records in the database?

Thanks,
Ed

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzEwNzUyLWNyZWF0ZS1jYXRlZ29yaWVzLXdpdGgtY3N2P3RtcGw9bWFya2Rvd24=) 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: 86567
- Thank you received: 14314
-
-

15 years 8 months ago [\#11136](#11136) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Re: Create Categories with CSV](/forum/4-how-to/10752-create-categories-with-csv#11136 "Hello All,  Is it possible to CREATE categories with an import file (CSV), or must categories be created from within Hikashop? The import documentation page near the top says that since v1.4.1 categories can be imported, but further down it states that they must already exist in Hikashop.  If they can be created that way, what would the column headers look like to make sure parent/child relationships were established?  Thanks, Ed")*

The third option. The get transfered to the parent category of the deleted category.

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

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

Less More

- Posts: 242
- Thank you received: 0
-
-
- [](http://www.HighDesertVideo.com)
-

15 years 8 months ago [\#11147](#11147) by [hdracing](/forum/user/742-hdracing "View hdracing's Profile")  Replied by *[hdracing](/forum/user/742-hdracing "View hdracing's Profile")* on topic *[Re: Create Categories with CSV](/forum/4-how-to/10752-create-categories-with-csv#11147 "Hello All,  Is it possible to CREATE categories with an import file (CSV), or must categories be created from within Hikashop? The import documentation page near the top says that since v1.4.1 categories can be imported, but further down it states that they must already exist in Hikashop.  If they can be created that way, what would the column headers look like to make sure parent/child relationships were established?  Thanks, Ed")*

I created a BUNCH of categories via import, but realize I need to structure them differently. What I would like to do is delete ALL product categories that currently exist and start over. I was going to just delete all records in jos_hikashop_category, but see there are some records in there that are not related to products. Can you give me an SQL query that would safely delete all the product categories without screwing anything else up in that table?

Thanks,
Ed

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzEwNzUyLWNyZWF0ZS1jYXRlZ29yaWVzLXdpdGgtY3N2P3RtcGw9bWFya2Rvd24=) 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: 86567
- Thank you received: 14314
-
-

15 years 8 months ago [\#11148](#11148) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Re: Create Categories with CSV](/forum/4-how-to/10752-create-categories-with-csv#11148 "Hello All,  Is it possible to CREATE categories with an import file (CSV), or must categories be created from within Hikashop? The import documentation page near the top says that since v1.4.1 categories can be imported, but further down it states that they must already exist in Hikashop.  If they can be created that way, what would the column headers look like to make sure parent/child relationships were established?  Thanks, Ed")*

That's unfortunately not so easy. In order to improve performances, the category table has pre calculated binary tree leaves information. If you delete the categories in there directly via phpmyadmin, the pre calculated values won't be updated for all the other categories and that might break the category tree...You would have to rebuild the tree by changing the parent category of a category (there is a function which is triggered in that case to recalculate all these values automatically in that case).

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

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

Less More

- Posts: 242
- Thank you received: 0
-
-
- [](http://www.HighDesertVideo.com)
-

15 years 8 months ago [\#11150](#11150) by [hdracing](/forum/user/742-hdracing "View hdracing's Profile")  Replied by *[hdracing](/forum/user/742-hdracing "View hdracing's Profile")* on topic *[Re: Create Categories with CSV](/forum/4-how-to/10752-create-categories-with-csv#11150 "Hello All,  Is it possible to CREATE categories with an import file (CSV), or must categories be created from within Hikashop? The import documentation page near the top says that since v1.4.1 categories can be imported, but further down it states that they must already exist in Hikashop.  If they can be created that way, what would the column headers look like to make sure parent/child relationships were established?  Thanks, Ed")*

OK - So if I delete them through Hikashop then there won't be a problem?

Ed

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzEwNzUyLWNyZWF0ZS1jYXRlZ29yaWVzLXdpdGgtY3N2P3RtcGw9bWFya2Rvd24=) 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: 86567
- Thank you received: 14314
-
-

15 years 8 months ago [\#11151](#11151) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Re: Create Categories with CSV](/forum/4-how-to/10752-create-categories-with-csv#11151 "Hello All,  Is it possible to CREATE categories with an import file (CSV), or must categories be created from within Hikashop? The import documentation page near the top says that since v1.4.1 categories can be imported, but further down it states that they must already exist in Hikashop.  If they can be created that way, what would the column headers look like to make sure parent/child relationships were established?  Thanks, Ed")*

Sure

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

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

Less More

- Posts: 11
- Thank you received: 0
-
- [](http://MediaArmory.com)
-

14 years 2 months ago [\#65646](#65646) by [FidelGonzales](/forum/user/9522-fidelgonzales "View FidelGonzales's Profile")  Replied by *[FidelGonzales](/forum/user/9522-fidelgonzales "View FidelGonzales's Profile")* on topic *[Re: Create Categories with CSV](/forum/4-how-to/10752-create-categories-with-csv#65646 "Hello All,  Is it possible to CREATE categories with an import file (CSV), or must categories be created from within Hikashop? The import documentation page near the top says that since v1.4.1 categories can be imported, but further down it states that they must already exist in Hikashop.  If they can be created that way, what would the column headers look like to make sure parent/child relationships were established?  Thanks, Ed")*

I began creating a shop within Virtuemart 2.0. I have thousands of new and previously-used products and approximately a thousand categories I will eventually integrate from another shop. Though, I am restructuring the category structure as well as adding new products and updating old.

Having created the ideal category structure for the shop within Virtuemart with no products yet imported, I am having difficulty getting the CSV file correct to import category, category description, category meta title and other parameters.

Do you have a sample CSV file for category and category data import as well as available fields? Any other advice would be helpful.

Thank you.

---

[ MediaArmory.com](http://MediaArmory.com)

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzEwNzUyLWNyZWF0ZS1jYXRlZ29yaWVzLXdpdGgtY3N2P3RtcGw9bWFya2Rvd24=) 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: 86567
- Thank you received: 14314
-
-

14 years 2 months ago [\#65804](#65804) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Re: Create Categories with CSV](/forum/4-how-to/10752-create-categories-with-csv#65804 "Hello All,  Is it possible to CREATE categories with an import file (CSV), or must categories be created from within Hikashop? The import documentation page near the top says that since v1.4.1 categories can be imported, but further down it states that they must already exist in Hikashop.  If they can be created that way, what would the column headers look like to make sure parent/child relationships were established?  Thanks, Ed")*

You can't insert all the categories information via the CSV import.
It only allows you to import the name of the categories in order to link products to existing categories on your website and rapidly create the categories structure when the categories are not pre created.

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

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