With MIVA Merchant you can import product categories from a flat file — a plain–text file containing set types of data separated by a tab or text character. You can edit a file that you created by exporting categories from your store (like categories.dat) or create an entirely new file. This can be a very efficient way to create your entire category tree or to set up categories for a new product line you will offer.
Enter the category data in any text editor (not a word processor) or in a spreadsheet program that supports exporting files to comma- or tab-delimited text files. Enter the information about each category on a separate line.
If you are starting with a file you exported from your store earlier like categories.dat delete the top line of the file containing the field names in a header. If you leave it, it will be imported into your store as a new category.
MIVA Merchant imports four fields or pieces of information about each category:
|
|
Note that a category must exist, before it can be referenced as the parent of another category. |
The above are the same four fields you will see when you export categories from your store to a flat file. Your flat file can include them in any order. You will have the opportunity to specify the meaning of each field. The file can also include additional fields for your own reference. These will be ignored during the import process.
Here is a simple example, showing the tab-delimited content of a flat file for creating four categories:
SEEDS Seeds 1
SEEDS-WILD Wildflower Seeds 1 SEEDS
SEEDS-VEG Vegetable Seeds 1 SEEDS
SEEDS-SUN Sunflower Seeds 1 SEEDS
Notice that the 3 categories that use SEEDS as a parent category come after the parent category in the flat file. The category SEEDS is a top-level category, so there is no entry in the parent category field.
Notice, also, that the fields are not necessarily aligned, vertically. A single tab character separates each field. When you are creating flat files, do not be concerned with the appearance of the data. Inserting additional tabs, to force fields into alignment, will bump their contents out of the intended fields in the database.
References to images, like the category tree image and category title image, cannot be imported via a flat file. Similarly, product references cannot be automatically included in imported categories. Both must be handled normally in MIVA Merchant after the categories have been imported.
Upload the plain text flat file that contains your new or edited categories. Follow the same process as you would use for uploading images.
Specify how each data field in a record will be separated from the next. Tab-delimited flat files are common. You can use any character like a comma or a vertical line ("pipe") character: |. Keep in mind that any character used in any field will be interpreted as a break between fields if it is specified as a delimiter.
Select how the categories from the flat file should be used with respect to those currently in your store.
Once you have specified the data file, delimiter, and how existing categories are to be handled, click Next.
The data is now available on the server and ready to be imported. For each column in the table specify the field where that data should be used. For instance the first column may contain the category codes. For any extraneous columns those containing information beyond the four fields to be imported leave the header set at <Select One> and that data will be passed over during the import process.
When you are satisfied that each column is properly labeled click Import. The categories will be imported as specified and available for use in the store.