Purpose of Module
This module allows you to place "breadcrumb" navigation at the top of your category and product pages. This is a trail of nested categories showing where the user currently is in the hierarchy of categories. Features include the ability to customize the separator, font and style control, location control, a customizable "home" link, and whether to show the product name when on the product page.
Additional features in the Plus version include static URL overrides for individual categories, optional primary categories for individual products, and compatibility with Search Friendly Links.
How to Install
- Installing the Module
- Unzip nbbcp_C.zip to your hard drive
- Log into your Miva admin utility
- Expand the navigation tree next to Modules
- Click the link "Add Module"
- Click the "Upload File" graphic
- Click the "Browse" button
- Browse to the location where you stored the files from nbbreadcrumbs.zip
- Select nbbreadcrumbs_plus.mv(c)
- Click the "Upload" button
- When the graphic has been uploaded, the small "Upload File" window will disappear, leaving you with the main Miva admin screen visible
- Click the "Add" button on the main Miva admin screen
- Repeat this process for the import module, nbbcp_impt.mv(c)
- Associating the Main Module with a Store
- Log into your Miva admin utility
- Expand the navigation tree next to Stores
- Expand the navigation tree next to the store with which you wish to associate this module
- Click the link "Utilities"
- In the assigned module list, you should see an entry for "NetBlazon's Category Breadcrumbs Plus"
- Check the checkbox next to this module and click Update
- When the screen refreshes, you should see a tab near the top of the screen that reads "Category Breadcrumbs Plus"
- Click the "Category Breadcrumbs Plus" tab
- Enter your license key and click the Update button
- Note: the import module does not have to be associated with the store, and also does not require a license key.
Main Configuration
- Log into your Miva admin utility
- Expand the navigation tree next to Stores
- Expand the navigation tree next to the store with which you wish to associate this module
- Click the link "Utilities"
- Click the "Category Breadcrumbs Plus" tab
- If you wish to have a "Home" link prior to the list of categories, enter the URL the link will go to, and a label for the URL. By default these values are set to your storefront and as "Home". If you do not wish to have a Home link, simply leave the Home URL field blank.
- Choose the locations where you'd like the breadcrumbs to appear.
- If you wish to show the product name (on the product pages only) at the end of the list of categories, check "Show Product Name".
- Enter HTML to define the separator that appears between each category name.
- Enter any HTML you want to surround the entire list of categories in the Pre-Breadcrumbs HTML and Post-Breadcrumbs HTML boxes. (Be sure to close any tags you open.)
- Enter any HTML you want to surround the selected item (current category if on category page, or product name if on product page) in the Pre-Selected Item HTML and Post-Selected Item HTML boxes. (Be sure to close any tags you open.)
- In link style, choose one of the following:
- Default Merchant URLs: Uses standard MIVA Merchant URL Format
- Short: Uses the format c-ctgycode.html, where "ctgycode" is replaced by the actual category code. (Requires mod_rewrite rules.)
- CBS Directory Style: Uses the directory style format as shown (requires Copernicus' Search Friendly Links module)
- CBS Short Link: Uses the short link format as shown (requires Copernicus' Search Friendly Links module)
- Custom Style: Uses the format specified in the box below the dropdown. In that box, enter the format, using the token "%catcode%" for the category code (or alternatively, "%catcodelower%" for the category code converted to all lower-case). The session URL may also be included with the token %sessionurl%.
- Check the "Add Named Anchor" box to add the product code as a named anchor to its parent category link. For example, it's parent category would have the format
http://www.yourstore.com/Merchant2/merchant.mvc?Screen=CTGY&Category_Code=somecat#someprod
If you have a templated website and you have named anchors on your category pages, this can be used to force the breadcrumbs link to "jump" to the product's location on the category page. - Click the update button to save your changes.
- Note: To control the style of your links, use a stylesheet and create a class called "nbbreadcrumbs". The anchor tags created with this module already have this class applied to them. If you do not create this class, the links will have the same style as the rest of your links.
Primary Category Configuration
Miva Merchant produces two types of URLs that lead to the product page. One includes the Category_Code parameter, and is typically used when navigating to the product from a category screen. The other does not include the Category_Code parameter, and is typically used when navigating to the product from the product list or search screens.
When the Category_Code parameter is passed, the breadcrumb trail will use that category as the starting point. However, in Miva Merchant, a product can be assigned to more than one category. So when no Category_Code parameter is used, the standard Category Breadcrumbs module will simply choose the first assigned category found in the CategoryXProduct database.
The Plus version of the module offers greater control over this process. For each product, you can specify a "primary category". When the Category_Code parameter is not passed to the product page, Category Breadcrumbs Plus will use the primary category (if assigned) as the starting point for the breadcrumbs. (If no primary category is specified for a product, the starting point for the breadcrumbs will be selected in the same manner as the standard version of the module.)
The included import module for Category Breadcrumbs Plus will allow you to import primary categories from a flat file. For more details see the Import Module Usage section below.
- Log into your Miva admin utility
- Expand the navigation tree next to Stores
- Expand the navigation tree next to the store with which you wish to associate this module
- Click the link "Products" link
- Locate the product for which you wish to assign a primary category. Click the Edit button for that product.
- Choose the "Breadcrumbs - Primary Category" tab
- Enter the code for the primary category you wish to assign to this product
- Click the Update button
Import Module - Importing Primary Categories
The import module, "Category Breadcrumbs Plus - Import Primary Categories", allows you to more easily set the primary category for a larger number of products. The format of the import file contains two columns. The first column is the product code, the second should be the code of the primary category. For example:
prodcode1|ctgycode1
prodcode2|ctgycode1
prodcode3|ctgycode1
prodcode4|ctgycode2
prodcode5|ctgycode2
This example uses the pipe (|) character as a delimiter; other characters may be used as well. If the import file is built in Microsoft Excel and then saved as a tab-delimited file, then the delimiter will be the tab character.
- Log into your Miva admin utility
- Expand the navigation tree next to Stores
- Expand the navigation tree next to the store with which you wish to associate this module
- Click the triangle next to the "Utilities" link
- Click the triangle next to the "Import Data"
- Click the "Category Breadcrumbs Plus - Import Primary Categories" link
- On the right side of the admin interface, upload the import file in the field labeled "Data File"
- Choose the delimiter. Either select the "Tab" radio button, or select "Other" and enter the delimiter character in the box
- If you wish to delete all existing primary categories (for ALL products), check the box labeled "Truncate Database". Otherwise leave this field blank.
- Click the Import button.
URL Override Settings
If your store uses static pages for some (or all) categories, you may wish to point the links within the breadcrumbs trail to a page other than the Miva Merchant page for that category. To do this, specify the URL Override for the category.
- Log into your Miva admin utility
- Expand the navigation tree next to Stores
- Expand the navigation tree next to the store with which you wish to associate this module
- Click the "Categories" link
- Locate the category for which you wish to assign a URL Override. Click the Edit button for this category
- Click the "Breadcrumbs - URL Override" tab
- Enter the alternate URL that links to this category should use. Links should be absolute, relative to the Merchant2 directory, or should begin with a slash "/" in order to be relative to the document root.
- Click the Update button
Tokens and Templates
If you are using a templating system, such as those from Viking Coders, OpenUI, or Copernicus, you may need to use the tokens provided by Category Breadcrumbs Plus in order to display the breadcrumb links. Specific instructions for registering and using a token with individual templatings systems can be found in the documentation for those templating systems.
Register our module with the token code NBBC_PLUS and the module code NBBC_PLUS. Then the tokens are as follows:
- %module|NBBC_PLUS|1% displays the breadcrumbs on the CTGY (Category) screen
- %module|NBBC_PLUS|2% displays the breadcrumbs on the PROD (Product) screen
- %module|NBBC_PLUS|primary-code% displays the primary category code for the current product, if defined. Returns a blank string if not defined.
- %module|NBBC_PLUS|primary-name% displays the primary category name for the current product, if defined. Returns a blank string if not defined.
- %module|NBBC_PLUS|primary-code2% displays the primary category code for the current product, if defined. If not defined, returns the first category code found in the CategoriesXProducts database for this product. If this product is not assigned to any categories, this token returns a blank string.
- %module|NBBC_PLUS|primary-name2% displays the primary category name for the current product, if defined. If not defined, returns the first category code found in the CategoriesXProducts database for this product. If this product is not assigned to any categories, this token returns a blank string.
- %module|NBBC_PLUS|catcrumbs% displays the breadcrumbs without links, stripped of HTML, and with ">" as the separator. This is for use within Ultimate Feed Generator's Froogle Feed.
Note that the Viking Coders' modules have a slightly different format, with an extra pipe (|) at the end. An example is: %module|NBBC_PLUS|2|%