HTML Logo by World Wide Web Consortium (www.w3.org). Click to learn more about our commitment to accessibility and standards.

Moving forward with Composr

ocPortal has been relaunched as Composr CMS, which is now in beta. ocPortal 9 will be superseded by Composr 10.

Head over to compo.sr for our new site, and to our migration roadmap. Existing ocPortal member accounts have been mirrored.


Catalogue Categories, Sub-categories and CSV import

Login / Search

 [ Join | More ]
 Add topic 
Posted
Rating:
#63032 (In Topic #13677)
Avatar

Fan in training

Can someone explain how I should format the CSV file to import categories and subcategories?

For example I have something similar to the following:

USA\New York\ Manhattan\
USA\Florida\Miami

etc etc

I just don't quite understand how the CSV file should be organized so that OCP understands what is being imported.

Thanks,
David
Back to the top
 
Posted
Rating:
#63034
Avatar

Do an export and see how that is formatted.


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#63035
Avatar

Community saint

Hi there DigitalCrypto check out this quote from the tututorial

ocPortal Tutorial: Custom structured content (via catalogues) said

There is a special feature on the screen to add a catalogue with a category tree constructed automatically for it.
To define the tree you just need to type in the categories you want in a special format that is very quick to write.

This is best shown by example, so here is an example for a catalogue category tree with that has categories for each of the states/provinces in the USA and Canada:
Code USA\Alabama|USA\Alaska|USA\Arizona|USA\Arkansas|USA\California|USA\Colorado|USA\Connecticut|USA\Delaware|USA\Florida|USA\Georgia|USA\Hawaii|USA\Idaho|USA\Illinois|USA\Indiana|USA\Iowa|USA\Kansas|USA\Kentucky|USA\Louisiana|USA\Maine|USA\Maryland|USA\Massachusetts|USA\Michigan|USA\Minnesota|USA\Mississippi|USA\Missouri|USA\Montana|USA\Nebraska|USA\Nevada|USA\New Hampshire|USA\New Jersey|USA\New Mexico|USA\New York|USA\North Carolina|USA\North Dakota|USA\Ohio|USA\Oklahoma|USA\Oregon|USA\Pennsylvania|USA\Rhode Island|USA\South Carolina|USA\South Dakota|USA\Tennessee|USA\Texas|USA\Utah|USA\Vermont|USA\Virginia|USA\Washington|USA\West Virginia|USA\Wisconsin|USA\Wyoming|Canada\Alberta|Canada\British Columbia|Canada\Manitoba|Canada\New Brunswick|Canada\Newfoundlandand Labrador|Canada\Northwest Territories|USA\Nova Scotia|USA\Ontario|USA\Prince Edward Island|Canada\Quebec|Canada\Saskatchewan|Canada\Yukon Territory
I think you would have to modify your example with a pipe stem after Manhattan


Art and Imagination
of David L Friend

http://davidlfriend.com

  My Art Gallery
powered by ocPortal
Back to the top
 
Posted
Rating:
#63037
Avatar

Fan in training

Hi Chris,

Thanks for the quick response. I forgot to mention that I ran out of room on that auto-fill line. I have several hundred categories so far.

The columns I've got are like the following:

Country, Region, State, Service, Name, Contact, Phone, Fax, Email, Website and so on…


The country, region, state and services could probably be made into dropdown select lists and this would cut the entries down to a minimum in the CSV file. I've not entirely figured out how to create a select list for a catalogue as of yet either.

- David
Back to the top
 
Posted
Rating:
#63043
Avatar

Fan in training

Ok I think I've gotten things sorted but I am not seeing how to create a drop down list or select list for the fields in the catalogue. The list is being created with two entries. One is blank and the other is N/A. Where do I populate the selections for these lists?

Thanks,
David

EDIT: I went back in to edit the Catalogue and saw what I was looking for _after_ I saved it. Just clicked on the field and entered in my default piped values and I am all set. ;)

I really should make some hot tea now.
Back to the top
 
There are too many online users to list.
Control functions:

Quick reply   Contract

Your name:
Your message: