Website export reference guide

Organise can export data from selected items when they are saved or when the quantity is changed by adding it to (or deleting it from) an Order. I am currently developing a website content management application which will use the data. Information and quantity showing on the website will be updated with minimum intervention as the information changes within Organise.

I'm making this information available to developers who would like to create a similar app or any other app which might use this data.

Exported data

Information about each item is exported as an individual file, with the filename 'OrgItemXXXX' where XXXX is the item's code. The user chooses the location - this is intended to be the website's project or main folder. Organise puts the files into a subfolder called 'data'. It will create that folder if it doesn't exist.

If you need this information in a single file then see Data Management. You can select and export the information in the columns that you choose, albeit at the press of a button rather than automatically as here.

Sample code

A list of these files is obtained with the following code:

NSFileManager *fileManager = [NSFileManager defaultManager];
NSArray *data = [fileManager directoryContentsAtPath:dataLocation];

// where dataLocation is the said data folder

 

And the data can be obtained like this:

NSDictionary *dataDictionary = [NSDictionary dictionaryWithContentsOfFile:dataPath];

// where dataPath is the full path of one of the data files in the first step

 

And the dictionary is queried like this:

[dataDictionary objectForKey:@"price"]

 

Field names

The information available is:

brand
code
condition
description
ean
item
price
qty
shipping
taxcode
variation

plus three special fields:

qtymsg - a marked up description of the availability of the item based on settings on the Item
buttoncode - html code for the 'buy' button this may be hidden when quantity is zero if the user chooses
template - this always has the value 'catitem' when this data is exported from Organise

<<contents

You are viewing part of the manual / help for Organise for Mac OSX by Peacockmedia.