Category Attribute Import From Flat File
Copyright © 2002, William Weiland
Overview
This module makes it easy to update category pagination length, title display, tree image, title image, header, and footer by importing from a flat file. It does not update the page layout settings.
Initial Setup and Usage
Use the Merchant admin upload feature to upload the module catsattr.mvc to the server. Then click the Add button to add it to the mall/domain.

Import modules automatically reside in each store within a domain so there is no need to update them to the store.

Import: Click on the image to the left of the word Utilities under the store. Then click on the image for Import Data. Then click on the link for Category Attribute Import. Upload the flat file from your PC.



Understanding the Flat File Format
The data elements which comprise the categories attributes are pulled from the flat file in a specific order. Since there is no artificial intelligence involved in this flat file import, it is imperative that the data be placed in a flat file in the same order that the program expects it to be. Any variance from that is likely to result in corrupt data in your database.

Creating the Flat File
Create the flat file using an ascii text editor, like notepad. Name the flat file catsattr.dat

Format the Flat File
The file contains the category code, pagination length, title display (yes/no, y/n, true/false, t/f), tree image, title image, header, footer; for example:
1AA|20|yes|graphics/soft.gif|~|Software for the 3rd millennium|Copyright 2001
1S|10|no|~|~||All items insured

Leave the last line of catsattr.dat blank It must have 7 fields, but some can be empty

When you want to delete what is already in the field, use the ~ character. This will signal the module to "clear out" the contents of that particular field. If you do not want to change the contents of the field, just leave the field empty, but still put in the | delimiter. Any data that is in the flat file, will replace what was in the particular field. As example above:

1) Category 1AA will be set to 20 products per page, category title will display, establish tree image path, remove any reference to a title image path, header and footer are to be included as shown.

2) Category 1S will be set to 10 products per page, category title field will be set to no, remove any reference to a tree image and title image path, no change will be made to header (even if it exists already), establish footer as shown.

You must not have line feeds or carriage returns embedded in the header or footer fields. These would cause the line to break and the software would be fooled into thinking that a new record was being started. Miva imports and uses the line feed and carriage return to detect that a new record starts.