ceon_uri_mapping
probably the best Zen Cart URI Mapping/SEO Module in the world! ...ever!
Configuration
Essential Points - PLEASE READ!
-
All URI mappings entered must be relative to the site's root. For example:
/books/life_is_good
/clothes/children/t-shirts
/company/about_us
This means that the same URIs will map correctly no matter what the actual domain name being used to access the site is (e.g. www.yourstore.com or yourstore.com).
If “http://www.yourstore.com” is entered for a URI mapping it will be stripped from the mapping!
-
It is recommended that all URI mappings for products and categories should use a full path. For example:
/category_one/subcategory_of_category_one
/category_one/subcategory_of_category_one/product_three
/category_one/subcategory_two_of_category_one
/category_one/subcategory_two_of_category_one/product_fifteen
This keeps your site organised and avoids conflicts between two pages which are trying to use the same URI (e.g. “accessories” within one category being seen as the same URI as “accessories” within another category! In this case one of the categories could never be visited!).
-
Any URI mappings created using the module's URI auto-generation functionality will comply to both the above!
Auto-generated URI mappings will use the full path to a category/product and the name of the category/product. Auto-generated URI mappings for EZ-Pages will use the title of the page.
Table Of Contents
Configuring the URI Mapping Auto-generation settings
The configuration utility can be used to change the Capitalisation setting, Whitespace Replacement Character, to edit the list of words which are automatically Removed when auto-generating the URIs and to edit the list of characters/strings that will be Replaced when auto-generating URIs (along with their respective replacements).
- Go to Modules > URI Mapping (SEO) Config in the Zen Cart admin.
Back to table of contents
Specifying the current URI Mapping for a Category
Specifying the current URI mapping for a Category, for each language used by the store, is easily accomplished:
- Use Catalog > Categories/Products to navigate to the category the desired category is within.
- Click the (green) icon for “Edit” alongside the category's name or click the “New Category” button if adding a new category.
The URI mapping can be automatically generated using the store's URI mapping auto-generation settings:
- The URI mapping fields can be found at the bottom of the page.
- Simply tick the URI mapping auto-generation text box and click “Save”.
- The URI mapping will then be generated using the full path to the current category and the name of the category. For stores with multiple languages, a URI mapping will be generated for each language, using the respective category names entered for each language.
Or the current URI mapping can be entered manually:
- The text field(s) for entering the URI mapping(s) which should map this category can be found at the bottom of the page.
- If the URI mapping auto-generation text box is ticked, it must have the tick removed.
- Simply enter the URI mappings for the category (for each language the store uses) in the text field(s) and click “Save”.
- Please Remember: URI mappings entered manually must be relative to the root of the site (“/”), and must be the full path to the category. E.g. “/category_one/subcategory_of_category_one”
Changing the current URI Mapping for a Category
Changing the current URI mapping for a Category is easily accomplished by following the same steps as for specifying one in the first place.
- The URI mapping can be completely re-generated or a new URI mapping can be entered manually for each language the store is using.
- If the store uses multiple languages and auto-generation is used to update the URI mappings, the URI mappings for all languages for the category will be updated, overwriting any previous values.
Please Note: The previous URI mapping will still point towards the category but anyone using it will be redirected to the current URI - this prevents broken links.
Removing the current URI mapping for a Category
- Use Catalog > Categories/Products to navigate to the category the desired category is within.
- Click the (green) icon for “Edit” alongside the category's name.
- Clear the value entered in the text field for the appropriate language (or clear the values for all the languages!): Delete the text, leaving the text field blank.
- Click “Save”
Please Note: The previous URI mapping will still point towards the category but anyone using it will be redirected to the standard Zen Cart dynamic URI for the category - this prevents broken links.
Back to table of contents
Specifying the current URI Mapping for a Product
Specifying the current URI mapping for a Product, for each language used by the store, is easily accomplished:
- Use Catalog > Categories/Products to navigate to the product the desired product is within.
- Click the (green) icon for “Edit” alongside the product's name or click the “New Product” button if adding a new product.
The URI mapping can be automatically generated using the store's URI mapping auto-generation settings:
- The URI mapping fields can be found at the bottom of the page.
- Simply tick the URI mapping auto-generation text box and click “Preview”.
- The URI mapping will then be generated using the full path to the current product and the name of the product. For stores with multiple languages, a URI mapping will be generated for each language, using the respective product names entered for each language.
- The auto-generated URI mappings for each language the store is using will be displayed below the product's description.
- Click “Update” to save the product's information, including its URI mapping(s).
Or the current URI mapping can be entered manually:
- The text field(s) for entering the URI mapping(s) which should map this product can be found at the bottom of the page.
- If the URI mapping auto-generation text box is ticked, it must have the tick removed.
- Simply enter the URI mappings for the product (for each language the store uses) in the text field(s) and click “Preview”.
- Please Remember: URI mappings entered manually must be relative to the root of the site (“/”), and must be the full path to the product. E.g. “/category_one/subcategory_of_category_one/product_three”
- The entered URI mapping(s), for each language the store is using, will be displayed below the product's description, properly formatted to remove any unusable characters.
- If satisifed with the format of the URI click “Update”. To make changes click “Back”.
Changing the current URI Mapping for a Product
Changing the current URI mapping for a Product is easily accomplished by following the same steps as for specifying one in the first place.
- The URI mapping can be completely re-generated or a new URI mapping can be entered manually for each language the store is using.
- If the store uses multiple languages and auto-generation is used to update the URI mappings, the URI mappings for all languages for the product will be updated, overwriting any previous values.
Please Note: The previous URI mapping will still point towards the product but anyone using it will be redirected to the current URI - this prevents broken links.
Removing the current URI mapping for a Product
- Use Catalog > Categories/Products to navigate to the product the desired product is within.
- Click the (green) icon for “Edit” alongside the product's name.
- Clear the value entered in the text field for the appropriate language (or clear the values for all the languages!): Delete the text, leaving the text field blank.
- Click “Preview”.
- The URI mapping(s) for the appropriate language(s), displayed below the product's description, should simply say “No URI Mapping”.
- Click “Update” to save the product's details and delete the cleared URI mapping(s). To make changes click “Back”.
Please Note: The previous URI mapping will still point towards the product but anyone using it will be redirected to the standard Zen Cart dynamic URI for the product - this prevents broken links.
Back to table of contents
Specifying the current URI Mapping for an EZ-Page
Specifying the current URI mapping for an EZ-Page, for each language used by the store, is easily accomplished:
- Click Tools > EZ-Pages and navigate to the page the desired EZ-Page is on.
- Click the (green) icon for “Edit” alongside the EZ-Page's title or click the “New File” button if adding a new EZ-Page.
The URI mapping can be automatically generated using the store's URI mapping auto-generation settings:
- The URI mapping fields can be found at the bottom of the page.
- Simply tick the URI mapping auto-generation text box and click “Update”/“Insert”.
- The URI mapping will then be generated using the full path to the current EZ-Page and the title of the EZ-Page. As EZ-Pages only support one language, the same URI mapping will be generated for each language the store uses, using the EZ-Page title entered.
Or the current URI mapping can be entered manually:
- The text field(s) for entering the URI mapping(s) which should map this EZ-Page can be found at the bottom of the page.
- If the URI mapping auto-generation text box is ticked, it must have the tick removed.
- Simply enter the URI mappings for the EZ-Page (for each language the store uses) in the text field(s) and click “Update”/“Insert”.
- Please Remember: URI mappings entered manually must be relative to the root of the site (“/”), and must be the full path to the EZ-Page. E.g. “/about_us”
Changing the current URI Mapping for an EZ-Page
Changing the current URI mapping for an EZ-Page is easily accomplished by following the same steps as for specifying one in the first place.
- The URI mapping can be completely re-generated or a new URI mapping can be entered manually for each language the store is using.
- If the store uses multiple languages and auto-generation is used to update the URI mappings, the URI mappings for all languages for the EZ-Page will be updated, overwriting any previous values.
Please Note: The previous URI mapping will still point towards the EZ-Page but anyone using it will be redirected to the current URI - this prevents broken links.
Removing the current URI mapping for an EZ-Page
- Click Tools > EZ-Pages and navigate to the page the desired EZ-Page is on.
- Click the (green) icon for “Edit” alongside the EZ-Page's title.
- Clear the value entered in the text field for the appropriate language (or clear the values for all the languages!): Delete the text, leaving the text field blank.
- Click “Update”
Please Note: The previous URI mapping will still point towards the EZ-Page but anyone using it will be redirected to the standard Zen Cart dynamic URI for the EZ-Page - this prevents broken links.
Back to table of contents
Organise EZ-Pages into Site Sections
EZ-Pages can be organised into logical sections by simply putting a bit of thought into the format of their URI mappings.
- A main section should use the first part of the URI. For example:
- An EZ-Page with the main information about a company could use the URI mapping:
/company
- A subsection should use a combination of the URI mapping for its parent section and a new part of the URI. For example:
- An EZ-Page with directions on how to get to a company's offices could use the URI mapping:
/company/how_to_find_us
- Another main section would use different text for the first part of the URI. For example:
- An EZ-Page with the main support information for a company could use the URI mapping:
/support
Hard-coded menus (e.g. Javascript drop-down menus etc.) could then make use of these URIs to link directly to the appropriate section or page within a section, giving the illusion of a structured site with a logical hierarchy!
Back to table of contents
Specifying a Static URI for any other Zen Cart page
There are two ways to specify static URIs for a Zen Cart page. The first is the most useful as it results in all links to that page on the site using the static URI instead of the standard dynamic Zen Cart URI (just as with Products etc. using URI mappings).
The second is designed to allow data to be supplied to Zen Cart, by initialising the GET variables for the Zen Cart page when it is loaded!
Static URIs can be used for any Zen Cart page by directly entering the URIs to map from and to in the database table for the module.
-
- Use software such as PHPMyAdmin to add a new record to the ceon_uri_mapping table.
- The URI mapping to be mapped from should be entered in the uri field.
- The number representing the language ID this URI mapping applies for should be entered in the language_id field.
- The current_uri field should be set to “1” to make this the “current” URI.
- The Zen Cart page to be mapped to should be entered in the main_page field.
- The date/time this URI mapping was added should be set in the date_added (or just use the “NOW()” SQL function).
-
- Use software such as PHPMyAdmin to add a new record to the ceon_uri_mapping table.
- The URI mapping to be mapped from should be entered in the uri field.
- The number representing the language ID this URI mapping applies for should be entered in the language_id field.
- The current_uri field should be set to “1” to make this the “current” URI.
- The Zen Cart URI to be mapped to should be entered in the alternate_uri field.
- If any GET variables should be set, simply append them to the query string after the main_page variable setting. For example, to map to a custom survey page, with the necessary survey_id for the survey to be shown, the alternate_uri field would be set to:
- /index.php?main_page=survey&survey_id=2
- The date/time this URI mapping was added should be set in the date_added (or just use the “NOW()” SQL function).
We're considering building some software, URI Mappings Manager, with an easy-to-use interface for setting up and managing all the URI mappings this module can use. If you think this would be useful, please encourage us by letting us know via our website.
Back to table of contents
Using Static URIs as an Alias for another Static URI
Redirecting from one URI mapping to another is easily done.
- Use software such as PHPMyAdmin to add a new record to the ceon_uri_mapping table.
- The URI mapping to be mapped from should be entered in the uri field.
- The number representing the language ID this URI mapping applies for should be entered in the language_id field.
- The current_uri field should be set to “1” to make this the “current” URI.
- The URI mapping to be mapped to should be entered in the alternate_uri field.
- The type of redirection (temporary/permanent etc.) should be specified by entering the appropriate HTTP Status Code in the redirection_type_code field. Values supported by the module are: 301, 302, 303, 307.
- The date/time this URI mapping was added should be set in the date_added (or just use the “NOW()” SQL function).
We're considering building some software, URI Mappings Manager, with an easy-to-use interface for setting up and managing all the URI mappings this module can use. If you think this would be useful, please encourage us by letting us know via our website.
Back to table of contents
Specifying URI Parts for standard Zen Cart pages related to a Product
The Reviews and Tell-A-Friend sections are automatically made “subsections” of the product's main info page, by appending some specific URI parts to the product info page's static URI.
The URI Parts which are used by default in the module may not match the format of the store's other URI mappings and so it may be desirable to specify different ones.
- Edit the “admin languages file” for the module: admin/includes/languages/english/extra_definitions/ceon_uri_mapping.php.
Please Note: This must be done for each language the store uses.
Back to table of contents
Enabling/Disabling the URI Mapping module
The URI mappings module is fully “backwards compatible” with Zen Cart's standard URIs so there's no realistic need ever to disable it. All of the store's existing Zen Cart URIs will continue to work as always (and will redirect to any current URI mapping which matches a particular page!).
However, some store owners may decide that they don't want the links in their site to use their newly-added static URIs until they've finished adding all the mappings.
The module can be disabled (and re-enabled again) easily through an option in the Zen Cart admin:
- Go to Configuration > URI Mapping (SEO) in the Zen Cart admin, the option to disable/enable the module can be changed there.
Back to table of contents