Guest
02 Jul 2013 16:45

I just made a trial install of cobalt 8. I'm very impressed with features

I see there is a csv import facility, but I cant see that it will import categories.

Did I miss something? Can cobalt 8 import categories from csv?

thanks

Last Modified: 08 Oct 2014


Sergey
Total posts: 13,748
03 Jul 2013 06:32

It cannot create category structure for you. But you may associate categories of Cobalt that was already created with CSV column where supposedly category reference is.


Guest
03 Jul 2013 07:08

thanks for reply

ya ok, I found that about pre exisiting cat with record.

I am just testing cobalt. If I use it I have to create maybe 2k nested categories. Thats too much to do by hand, so I would need to script it.

I see #__js_res_categories is similar (same?) to joomla category table and you extend jtablenested.

I find cobalt category has data in #__js_res_categories and #__assets - anywhere else?

I just need a simple cli script to read in csv. Its in my skillset to write it ok, but maybe you have some tips or pointers? If I go for cobalt and write cat import script I will happily contribute the work back.

thanks anyway


pepperstreet VIP
Total posts: 3,837
03 Jul 2013 09:09

Good point. ME Resources JSmigrator works similar, AFAIK. It was possible to assign categories from a certain column.


Sergey
Total posts: 13,748
03 Jul 2013 09:13

I am just testing cobalt. If I use it I have to create maybe 2k nested categories. Thats too much to do by hand, so I would need to script it.

I agree it is too much :) Why do you need so many categories? If you sare perhaps we have suggestions how to reduce шею

I am just testing cobalt. If I use it I have to create maybe 2k nested categories. Thats too much to do by hand, so I would need to script it.

I see #__js_res_categories is similar (same?) to joomla category table and you extend jtablenested.

I find cobalt category has data in #__js_res_categories and #__assets - anywhere else?

To create categories yes. Only those tables. And assets is not important since we do not yet support core Joomla ACL as it is implemented in Joomla. But we provide flexible user rights management based on Joomla access level.

I am just testing cobalt. If I use it I have to create maybe 2k nested categories. Thats too much to do by hand, so I would need to script it.

I see #__js_res_categories is similar (same?) to joomla category table and you extend jtablenested.

I find cobalt category has data in #__js_res_categories and #__assets - anywhere else?

I just need a simple cli script to read in csv. Its in my skillset to write it ok, but maybe you have some tips or pointers? If I go for cobalt and write cat import script I will happily contribute the work back.

Yes. Do not forget that all sections store categories in the same tables and they all start from category ID 1 named ROOT. And you have to add section_id parameter to save categories.


Guest
03 Jul 2013 11:11

thanks for reply

ok I'll have a look at it tomorrow

Why do you need so many categories?

no choice - I have to follow existing categories for business listings


Sergey
Total posts: 13,748
04 Jul 2013 03:28

no choice - I have to follow existing categories for business listings

But 2k! :)


londoh VIP
Total posts: 137
21 Jul 2013 05:02

Smells like "redundancy" ;-)

yep. maybe so ;-)

but there are more than 2m entries in the complete dataset and even tho only small part of it is used in this particular directory, sorting it out isnt an option I want to consider!

Anyway, I wrote a Joomla cli script that imported my 2k categories to cobalt.

It isnt a 'one-click' generic solution, but if might helpful let me know and I'll post it up or email it.

now for the entries :-)


londoh VIP
Total posts: 137
22 Jul 2013 16:25

well so far I can report that the cobalt import facility doesnt cut it with so many categories and a large number of entries.

As the csv is parsed ram usage spikes massively and the browser hangs :S

It'd be unfair to criticise the import system which I guess simply wasnt designed to work under such circumstances.

I had some ideas about fixing it but decided against that route, and am writing another cli script to import the entries (or records as I must remember to call them in cobalt land!)

I'll get back to you.


Sergey
Total posts: 13,748
23 Jul 2013 10:34

I had some ideas about fixing it but decided against that route, and am writing another cli script to import the entries (or records as I must remember to call them in cobalt land!)

I'll get back to you.

Yes please. Would be nice if you share that CLI with others.


londoh VIP
Total posts: 137
23 Jul 2013 17:01

Hi sergey

I've emailed you the script to import categories. (to admin at - hope thats correct?)

I can say it has worked with my data in my setup - but it is not a generic solution and would need some fiddling for individual cases.

So I dont want to post it in a public forum in case it causes more problems than it solves!

I leave it entirely to your discretion what you want to do with it.

I also pass you the cli script to import entries when I get it done.


Sergey
Total posts: 13,748
24 Jul 2013 08:51

May be you attach this script here? Other can download and see as example. I also did not get it to email.


londoh VIP
Total posts: 137
24 Jul 2013 16:31

Hi Sergey

It should be you got an email from me if you receive email at admin at mintjoomla? I just replied to my subscription confirmation email. but anyway no problem.

Sure I'll post it here - as long as you're happy I'm happy

I included some more comments and notes

zip file is attached

I'll post the cli script to import records when its finished.


Sergey
Total posts: 13,748
25 Jul 2013 00:32

Some notes.

You may use Joomla

JFactory::getApplication()->stringURLSafe()

Instead of

$this->cleanalias()

This will create correct Joomla alieas based on Joomla settings for SEF.


londoh VIP
Total posts: 137
25 Jul 2013 04:02

You may use Joomla

JFactory::getApplication()->stringURLSafe()

its correct solution and better - thanks


techutopia
Total posts: 202
15 Aug 2014 16:58

Hi,

I would be interested in looking at this script, where do I find it please?

Thanks,

Dale.


Sergey
Total posts: 13,748
17 Aug 2014 08:49

techutopia I would be interested in looking at this script

Which script?


pepperstreet VIP
Total posts: 3,837
30 Sep 2014 19:46

Sergey Which script?

londoh Sure I'll post it here - as long as you're happy I'm happy I included some more comments and notes zip file is attached

I'll post the CLI script to import records when its finished.

Anyone seen the CLI script? Might be interesting in general, and for user techutopia's related topic:


Sergey
Total posts: 13,748
01 Oct 2014 01:54

pepperstreet VIP
Total posts: 3,837
08 Oct 2014 20:39

Sergey It cannot create category structure for you.

techutopia no category import, and no mass creation of categories.

@Sergey
Apart from real auto-creation during import...

I could imagine a "mass creation" or "batch tool" for a larger categories structure. Something like the CSV file upload and parser in field "Multiple Level Select". (screenshot)

Powered by Cobalt