Categories in your CrystalCommerce admin may contain either products or other categories, but they cannot contain both. All of the categories in your admin are set in the correct manner when your admin is created, but it is important to understand how the settings function so that you can maintain the integrity of your category structure. If these are set up improperly, it will have a negative effect on the following functions:
Two types of categories exist in your CrystalCommerce category structure: organizational categories and destination categories. These are defined below:
Organizational categories: Categories that are used to organize your category structure so that it is easy and intuitive to navigate. These categories will contain other categories. They never contain products. Organizational categories must not have the "Category may contain products" box checked.
Destination categories: Categories that contain products. This is the "deepest" level of the category structure, where the products actually live. These categories never contain other categories. Organizational categories are sometimes referred to as 'leaf' categories (A leaf is the termination of the branch, just as the leaf category is the termination of that part of the category structure.)
As a way of describing the relationship between these categories, we will frequently use the terms "Parent" and "Child." These simply refer to where the category falls in the category tree.
For example, because "Magic Singles" is an organizational parent category, it needs to have "Category may contain products" unchecked:
Negative effects of improper category settings
1. Customer browsing experience:
When a customer is on your direct website, if they click directly on a parent category, they will be taken to a screen where all subcategories within that parent are displayed. That page will only display correctly if the parent category has the "Category may contain products" box un-checked. If that box is checked and products are imported into the parent category directly, only those products will appear when the customer clicks on that parent category. None of the subcategories will be displayed.
2. Category breakdown financial data:
The bar graph on the Dashboard tab is designed to display sales numbers from destination categories only. Organizational categories do not appear in this graph. If any product or group of products is imported into an organizational category (ie: a category that is not a destination category), any sale of that product will not appear on this graph.
3. Importing products from our source catalog:
The final step in the process of importing any product or group of products into your admin is to specify what category you would like to import the products to. Those options are: import into an existing category or create a new category as a part of the import process. For both options, the "Category may contain products" box determines whether a category will appear in one list or the other:
Pick an existing category: For a category to appear in this list, it must have the "Category may contain products" box checked. This should just be a list of destination categories, as no organizational categories should have that box checked.
Create a new category: For a category to appear in this list, it must not have the "Category may contain products" box checked. This should be a list of only organizational categories, as you will be creating a new category within a category during the import process.
4. Related products on your website:
When a user navigates to a page where they see all of the details about a single product, they will also see a dynamic "Related Products" display further down on the page. The logic for that display finds other products within the same category as the current product, and populates the display with those items. If the current category contains subcategories, then all products contained in those subcategories may appear in the display as well. This may be undesirable, since products in subcategories may not actually be related.