10. Miscellaneous |
|
|
|
The Miscellaneous section is comprised of two tabs, Miscellaneous Functions and File Transfer. Because we have already covered File Transfer in another section, we will not cover it here and concentrate on the Miscellaneous Functions Tab. The Miscellaneous Function tab consists of several sections, which I suspect will become tabs in the future. But for now they are listed on one page as links, so we will lay them out and discuss each in turn. |
|
|
|
|
|
10.1 – Miscellaneous – Miscellaneous Functions |
|
10.1.1 – Misc – Misc Functions – File Management File management is simply different starting locations for the same File Transfer utility that we have discussed previously. On the server, Interchange has a standardized directory structure, one that is quite consistent throughout different versions and installations. There is normally a “home” directory that is usually named with the name of the catalog. Under that directory are the many different directories that hold the files that the catalog is made of. One reason for the consistent structure, and the fact that all other directories fall UNDER the “home” or catalog directory, is portability. If you need to transfer your catalog to another location, generally you can compress the entire catalog and simply move it. It is recommended to keep symbolic links and so forth limited to within this directory structure for that reason. Again, nothing is written in stone, and Interchange can be made to run with directories spread all over if you wanted to. But for the best efficiency, use what others Each of the following sections is just a link to the area described by the title –
|
|
|
|
10.1.2 – Misc – Misc Functions – Backup Functions |
|
10.1.2a – Misc – Misc Functions – Backup Functions - Create catalog tar file Transfer a catalog -this function creates a compressed tar file and an editable restore script for transferring a catalog from one server or location to another. This is a complex operation, and there are MANY variables. Only qualified Interchange Administrators or Developers should attempt to use this feature. As stated in the online help for this feature, “It will only work properly with a "foundation" style setup with appropriate variables set properly” and it goes on to say “Also, this is designed for Linux systems or other systems with the GNU utility set. It relies on GNU tar and gzip. This only works for the default database, Mysql, and Postgres.” With those caveats in mind, lets discuss the feature a little more in depth. What is happening here is that a script is being created to create a new catalog on the target server using your existing data and configuration. So all the options you see on the screen above will go into the script. If you want everything to remain as it is on your current server, then most likely you will leave each of the above settings with their default (current to your existing catalog) settings. Depending on how your new location is set up, you may HAVE to change some of the settings. If you simply want a different catalog name with everything else being the same, you can use the Rename window at the top of the screen. Simply enter the new name for the catalog in the window at the top of the screen, and click on the Rename button. Everywhere the old catalog name is used will be replaced with your new selection. Now, we will go over each of these fields briefly:
http://_SERVER_NAME__CGI_URL_ or after the variables are interpolated -> http://www.yahoo.com/cgi-bin/mycatalog Note the slash preceding cgi-bin? That is included in the CGI_URL variable, not in the SERVER_NAME variable. Keep an eye out for such things as they are a common cause for problems if not entered correctly.
That will take care of most of the catalog configuration issues. The other area being dealt with is database. THIS UTIILITY WILL ONLY WORK FOR THE DEFAULT INTERCHANGE DATABASE, MYSQL, AND POSTGRES. Quoting directly from the IC help file on Transfer a catalog: “If you are using a SQL database on one DSN defined in SQLDSN, it will dump the database using the mysqldump or pg_dump utilities; they must be available in your PATH. If you have more than one DSN, it will do the dumps but not create the restore script for those dumps; that must be done manually. It exports all non-Postgres/MySQL database files to text files and does NOT transfer their associated .gdbm, .dbor .sqlfiles. This may suffice to transfer other SQL databases depending on how they were defined in the dbconf/directory. It puts the database dumps and exports in the directory "xfer". Finally, it creates a tar file named CATALOGNAME.tar.gz, where CATALOGNAME is equal to IC's name for your catalog. To restore the catalog, create the target directory where the catalog will be, then change directory there and restore the tar file. mkdir -p /var/lib/interchange/newcat cd /var/lib/interchange/newcat tar -xzf /tmp/oldcat.tar.gz
If the directory already exists, move it somewhere else for backup purposes (or delete it entirely if you are sure it is safe to do so). From that directory, inspect the shell script xfer/restore.shand make appropriate changes; this may include authorization or path information for the restoring calls to mysqlor psql. Once you have made any changes, run the shell script: cd /var/lib/interchange/newcat xfer/restore.sh
You will have to set any permissions separately if the restoring user ID does not have them.” |
|
|
|
10.1.3 – Misc – Misc Functions – Legacy Tools The legacy tools section provides some backwards compatibility with the previous versions of Interchange. There are two tabs in Legacy tools, Layout editor and Layout Auto-populate. They are somewhat inter-dependent, so it will shed light on the workings of each to give an overview of how this section works in total. The Layout editor operates on two tables, area and cat. These tables work together to create a manageable hierarchy of your products or services. Area can be thought of as the top of the hierarchy grouping or the parent, with cat being the next level down or the child. For example, in the Demo you have a product group that would be in the Area table, Hand tools. Within the product group of hand tools, you have categories such as Pliers or Shears, which are defined in the cat table. Each table, area and cat, needs to be associated with the products table in order for you to effectively relate these groups and categories to the individual products. That is where the Layout Auto-populate tab comes in. You select which columns will be related to the area table (as the parent level in the hierarchy) and which columns will be related to the cat table (or the secondary or child level in the hierarchy.) After you have selected this, you use the Layout Auto-populate tab and it will add the required information to the area and cat tables, automatically. Normally, with a new catalog, you would use the Layout Auto-populate tool first. Then you would go into the Editor and select what goes where. So if you wish, you can read the section on the Layout Auto-populate tab first, or just continue on to the Layout Editor.
|
|
10.1.3a – Misc – Misc Functions – Legacy Tools – Layout Editor
The Layout Editor allows you to create a manageable hierarchy for products and services on your site. As explained above, the Layout Editor is normally used AFTER the Auto-Populate tab. In the example above, Auto-populate has already been run. NOTE: you do not have to run Auto Populate, and in some cases it may be easier not to. We will talk more about Auto Populate in that section. For now we will assume you have the groups and categories above already loaded into the Layout Editor. When you first come to the Layout Editor, you will see something like what is displayed above. So lets talk about what to do first! First there are three sections on the top of the page, Area – Section, Contains, and Available categories.
Before we move to the Section Properties, and Category properties, I will quickly describe the Icon meanings:
Let’s move on to the Properties windows. There are two Properties windows, Section and Category. The Section Properties contains several text entry areas:
You can use the Create button to go to the Search Wizard and allow Interchange to guide you through building a search, or you can simply enter the search that you want, using Interchange standard search format, into the text window as shown above. If you are not familiar with the standard search format, either use the Search Wizard, or contact your Interchange Developer.
The Category Properties also contains several text entry areas and is very similar to the Section Properties:
You can use the Create button to go to the Search Wizard and allow Interchange to guide you through building a search, or you can simply enter the search that you want, using Interchange standard search format, into the text window as shown above. If you are not familiar with the standard search format, either use the Search Wizard, or contact your Interchange Developer.
|
|
10.1.3b – Misc – Misc Functions – Legacy Tools – Layout Editor Auto-populate The Layout Auto-populate tab, as we briefly discussed before can be used to populate the area and cat tables from various tables, and fields. Normally you will probably use the products table, and would choose 2 fields from your data that would allow you to begin to organize your products or services in a rational hierarchical structure. Although the area and cat tables are related to whatever table you chose to pull your information, they are only “loosely” related. That is you could have a “section” in the “area” table that did not exist in your products table. Normally you would not have this, but the point is you could. The tables are not restricted in this way. This allows you to create any type of structure you want to group and display your products or services. You are not limited by the data. For example, suppose you have your data already entered into the products database, and it is in sync with your accounting database for any number of reasons. Now you want to display an arbitrary group of products for the 4th of July sale you have coming up. You can’t change the products database; it is linked to the accounting database. So you simply add a new section to the area table via the Layout Editor, and either create a special search to locate the items, or assign appropriate categories to the section. So the Layout Editor allows you to freely group your products in any way that is convenient to your application. Not only can you simply choose a table and 2 columns, you can also limit what is returned from those two columns. So lets go through each selection on the Layout Auto-populate page:
|
|
|
|
|
|
10.1.4 – Misc – Misc Functions – ITL Helpers ITL or Interchange Tag Language helpers. The 3 sections in this chapter deal with the ITL and wizards that can simplify the tasks of building a syntactically correct Search or Button, as well as providing a platform to test code without actually putting it into a page… |
|
10.1.4a – Misc – Misc Functions – ITL Helpers – Search Wizard The search wizard consists of a series of screens that will help you assemble a search based on criteria you provide along the way. At the end you can see a sample return of your search, and you can generate the code that can be cut and pasted into a template that will return the results of your search when executed. A normal search will consist of 3 pages, a table selection page, a criteria selection page, and a sort page. You can also create more complex searches by using the Narrow further button on the criteria page. We will cover the basic search pages here, if you understand them, the additional criteria pages will not be difficult to maneuver.
|
|
The table selection area of the Search Builder is shown above. For our example lets assume that we are going to have a 10-dollar sale, and we want to create a link that will lead to everything that costs 10 dollars or less. The first field is
|
|
Ok, page 2 criteria. We have just entered in where we are looking now let’s enter what we are looking for.
At this point, we could do one of two things. We can continue on to the third and final page, or we could specify further search criteria. For our example, we are going to continue on, but if you wanted to further restrict the search, you would click on the Narrow Further button. This will simply take you through the same page we just described, but you can select another field to further restrict the search. For example, suppose in our example, we wanted to not only limit the search to items equal to or under $10, but we also wanted only New items. Perhaps we would have a field “new” that had either a yes or no in it. We could then first specify the 10 or under numeric search, and then further specify a text search for the word “yes” that would further restrict our search to New products under $10. For now, lets move on to the third and final page, sorting.
The third and final page on the Search Wizard is the sort page. This formats how your results will be displayed when they are returned. There are two areas, sort field, and Search return field. We will break them out and examine them.
Once you have specified all the above, you should select the Preview button to make sure that what you have entered, in fact returns the results you intended. We have entered a search that should return all products equal to or less than $10 in price, and sorted first by price from most expensive to least expensive, and next sorted by description if 2 products are the same price. Here are the results:
We got back all products equal to (there were none) or under $10. Two products where $8.99 and two where $5.99. If you look at those products, you will see that that are arranged in alphabetical order. So now we have the search we want, so click on your browsers back button and go to the final page again. This time click on the Finish button, and you will come to this screen:
You can now cut and paste this code into the location of your choice and your search is formatted and ready to go. There are of course some criteria that need to be followed, to be sure that your code will work. For example, if you wish to create a clickable link, you will need to format it something like this: <a href=” [your cut and paste search here] “>My Search</a> Or using the demo above <a href=” [area href=scan search=|
fi=products st=db
co=1
sf=price se=10 op=<= nu=1
ml=50 tf=price to=nr tf=description to=x | ] “>My Search</a>
Use the Search builder to assure yourself of both the format, and the results. It will save you time! |
|
10.1.4b – Misc – Misc Functions – ITL Helpers – Button Builder The Button Builder should really be called the Item Order Button OR Link builder. This little utility will allow you to build an order link that can be placed within the <a href=”[your cut and paste link “>Your link</a>, similar to the search builder described previously, OR a button within a form tag. Quickly build an order link or button. Lets go through the process to build an order link or button.
Starting at the top of the screen and working down, we will describe each item.
You can now cut and paste this code (located in the Resulting Button text area) into the location of your choice and your search or button is formatted and ready to go. *Remember to use the link within the <a href=””> tag. Also you can format the button to be more aesthetically appealing by adding HTML . |
|
10.1.5b – Misc – Misc Functions – Encryption – Encryption Preferences This link will take you to the following window:
Neither of the variables above need to be set with the newer versions of Interchange. If you used the Add GPG key function that we just described, you will not need to change these settings. These are primarily here for backwards compatibility.
|
|
|
|
10.1.6 – Misc – Misc Functions – Upgrade Helpers – Merge metadata
If you have upgraded or moved an older catalog to a newer Interchange server, this utility will bring your existing catalog metadata into the current mv_metadata table. If you have an older catalog, you may have metadata that is crucial to the operation of your catalog, and you may not want Interchange to blow away that data in an upgrade. So you have the choice of whether to keep the metadata or update. The screen below shows a sample of an Merge Screen and the choices for the various updates. This will of course be different than yours, but it shows what types of things will be displayed, and the choices associated with each.
In the screen above, you see first a list of what needs to be merged, what has been merged, and so on. You also see a dropdown window with the “Defer decision” value displayed. There are 3 options in this window that bear discussion and they are
|
|
|
|
|
|
|
||