cf_ezcart Search Engine Safe File System

The main thing here is thoroughness. You must be sure that each and every manufacturer (if using that table), main category and category has a valid Search Engine Safe Name. This is very important. You don't have to do the products if you don't want to have individual links to each product. The Search Engine Safe Name will be used in all folder and file names. This may be as simple as using the item name, or you may add your most important relative keyword[s] for each item in the URL path. We've given 150 characters for each name. Exactly when a name is too long depends upon your web server. We suspect having a ridiculously long filename may not make the search engines happy, but that is just a guess.

Using our Avon example product path from the overview...

cosmetics-brands/avon-products/beauty-products-cosmetics/lip-makeup/avon-ultra-moisture-rich-lipstick-spf-15.cfm

cosmetics-brands = name of root manufacturers folder as set in request.sesmanufacturers in Application.cfm.
avon-products = Manufacturers Search Engine Safe Name
beauty-products-cosmetics = Main Category Search Engine Safe Name
lip-makeup = Sub Category Search Engine Safe Name
avon-ultra-moisture-rich-lipstick-spf-15 = Product Search Engine Safe Name

Of course, it would be senseless going through this trouble without setting a good Page Title and Meta Description for each page. You may also set keywords and if you wish, a description for display on the page. The following 5 fields are available under Edit Mode in Manufacturers, Main Categories, Categories and Products.

When adding a new Manufacturer, Main Category or Category, you must click the ID to show the form to enter these items. For products these may be entered right on the Add Products page.

NOTE. If you are using a single level of category, simply place all of your Categories into the Main Category General(ID=0). Even though you do not have to show or link to it, we must still have a valid name to use for the folder holding the categories. Use a good keyword/keyphrase for this category name. For example, if you sell Handmade Silkscreen T-shirts and Sweatshirts, make the Search Engine Safe Name for the Main Category "silkscreen-t-shirts-sweatshirts".

Basic Rules and Instructions

  1. Each item's Search Engine Safe Name must adhere to these basic rules.
  2. Deleting and renaming files is something we have not addressed. Before you create the files, be certain the search engine safe file naming structure is what you want. The reason we don't delete and rename files is that if someone visits a page for a product that is no longer available, or for a category which no longer exists or no longer has products in it, we don't want them to receive a Page Not Found error. Instead the page will be there and we will give them an appropriate message and show the Product Map. The file will eventually get "un-indexed" by the search engines as we stop linking to it.
  3. We have 2 modes for creating files. Overwrite Files and Replace Missing Files Only. Replace Missing Files is active by default. This way you may and add any new files that are necessary without needlessly recreating all files every time. You may toggle between Overwrite and Replace if you NEED to replace files, which will be the case if you change the ID of a manufacturer, main category, category or product.

When you've double checked everything, and you're ready to create files, continue below.

How It Works

A quick synopsis on how it works. cf_ezcart uses several variables to tell it which categories, products, etc. to show. Normally those products are passed to a web page (the cartpage template in the case of cf_ezcart) in a query string. So, rather than passing them in a query string, we set them in a file that has been named how YOU want. Then after they are set, we load the cartpage template through that file. Here is an example of the content of a search engine safe file. This contains 5 variables used to tell cf-ezcart to list products under which category by which manufacturers. The variable variables.sesfile tells cf_ezcart that this is a search engine safe file. We will then automatically create new pages if necessary, etc. The last line below loads the file specified in request.sestemplatepath just as if we had passed the variables through a query string.

<cfset page = "c">
<cfset action = "list">
<cfset cat = "11">
<cfset criteria = "2">
<cfset man = "">
<cfset variables.sesfile = "1">
<cfinclude template="#request.sestemplatepath#">

Creating Files

  1. If you haven't done so, go over the Application.cfm settings for this section.
  2. While logged into cf_ezcart administration, click the SES File System button in the black menu. You will be given the options of viewing the product index by category and by manufacturer.
  3. Choose to show by Manufacturer (or whatever you're using the manufacturers table for) or by Category. You don't HAVE to create the manufacturer hierarchy of files, but you won't be able to list products based on the manufacturer while using the search engine safe file system.
  4. Clicking on any link will create the files from that point down to the products (if you enter search engine safe names for the products). There is also a link to create ALL files. This could obviously give some problems if you have tens of thousands of items. Hopefully clicking each individual manufacturer or main category will work for you in this case.
  5. You may "toggle" between File Write Modes. You will want to stay in Create Missing Files Only mode unless you need to create new files, such as if you changed the IDs of some items. As you can see in the How It Works section above, since IDs are set within the file itself, files related to any item which has it's ID changed, must be recreated.