Is it possible to duplicate/copy categories in batch?

  • Posts: 41
  • Thank you received: 9
3 years 11 months ago #327000

-- HikaShop version -- : 4.4.0
-- Joomla version -- : 3.9.23
-- PHP version -- : 7.4

Hello!

I'm working on a Hikashop-powered store for car parts, and client has requested a huge bunch of identical nested categories. Each car model is a category, and each of them has identical set of parts grouped by type (sub-categories). Structure looks like this:

* Car model 1
--- Accesories
--- Suspension
--- Tires

* Car model 2
--- Accesories
--- Suspension
--- Tires 

* Car model 3
--- Accesories
--- Suspension
--- Tires
As you can see, sub-categories (including their description, icon and parameters) are the same for each car model, but there are tens of car models. Is it possible to automate the sub-category duplication procedure for each category (car model), so I don't get bored to death while re-creating those subcategories for each?

Many thanks in advance!
Best regards!

Last edit: 3 years 11 months ago by Savickis.

Please Log in or Create an account to join the conversation.

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
3 years 11 months ago #327031

Hi,

There is no "copy" button for categories.
However, you can use the Products>Import menu to generate the categories for you supposing that only the name and structure is important.
For example you could use such CSV:
parent_category;categories
Car model 1;Accesories,Suspension,Tires
Car model 2;Accesories,Suspension,Tires

That should help simplify the process a lot.

The following user(s) said Thank You: Savickis

Please Log in or Create an account to join the conversation.

  • Posts: 41
  • Thank you received: 9
3 years 11 months ago #327621

Hello, and thanks for your answer. I just tried what you suggested, and it seems that Hikashop import expects products to be found, and empty categories can't be created in such a way. I tried exactly what you suggested - created a demo parent category named "Car model 1" and CSV file like this:

parent_category;categories
Car model 1;Accesories,Suspension,Tires

Got a following error from Hikashop:
Notice
The line 'Car model 1;Accesories,Suspension,Tires' could not be imported Product not found

1 products found : 0 new products imported, 1 invalid product code, 0 already existing products
Could you please point out what I'm missing here?

Last edit: 3 years 11 months ago by Savickis.

Please Log in or Create an account to join the conversation.

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
3 years 11 months ago #327637

Hi,

You're not missing anything and there is no error message in what you copy / pasted.
The 4 categories should have been added. Please check.
The message just tells you that there was no product information on that line. and that's normal since you've only specified category information.

The following user(s) said Thank You: Savickis

Please Log in or Create an account to join the conversation.

  • Posts: 41
  • Thank you received: 9
3 years 11 months ago #327710

Oh, indeed it did work - I just saw that notification and assumed that it failed, but it didn't.

Thank you very much! Again and again I'm happy that I always suggest and purchase Hikashop for all my clients - never have let me down, and great support, as always. Thanks!

The following user(s) said Thank You: nicolas

Please Log in or Create an account to join the conversation.

Time to create page: 0.046 seconds
Powered by Kunena Forum