
Originally Posted by
lat9
I've got a client who's using v2.212 of Ultimate SEO on Zen Cart v1.5.1. When I look at the canonical link generated for a product, it has the full category information prepended to the product's information. Is this working-as-designed?
Depends on how Ultimate URLs is configured, if the product is a "linked" product, if the canonical override is in place ("/init_includes/overrides/init_canonical.php"), and if Ultimate URLs has been modified by the end user.
If the end user has successfully installed an unmodified copy of Ultimate URLs, the following will apply:
When configured to "Display categories as directories", product URLs will be prepended with the category information. When not configured to "Display categories as directories" and "Format of alternate URLs" is configured to use "parent", product URLs will be prepended with the parent category name. Otherwise product URLs will not be prepended with category information.
When a linked product is encountered, the master category cPath is used to generate the canonical.
Example (Stock Zen Cart URLs):
Code:
Generated URLs:
/index.php?main_page=product_info&cPath=2_20&products_id=24
/index.php?main_page=product_info&cPath=22&products_id=24
Canonical URL:
/index.php?main_page=product_info&products_id=24
Example (Format of alternate URLs = original; Display categories as directories = full):
Code:
Generated URLs:
/software-c-2/strategy-c-2_20/disciples-sacred-lands-linked-p-24
/big-linked-c-22/disciples-sacred-lands-linked-p-24
Canonical URL:
/software-c-2/strategy-c-2_20/disciples-sacred-lands-linked-p-24
Example (Format of alternate URLs = original; Display categories as directories = short):
Code:
Generated URLs:
/strategy-c-2_20/disciples-sacred-lands-linked-p-24
/big-linked-c-22/disciples-sacred-lands-linked-p-24
Canonical URL:
/strategy-c-2_20/disciples-sacred-lands-linked-p-24
Example (Format of alternate URLs = parent; Display categories as directories = short):
Code:
Generated URLs:
/software-strategy-c-2_20/disciples-sacred-lands-linked-p-24
/big-linked-c-22/disciples-sacred-lands-linked-p-24
Canonical URL:
/software-strategy-c-2_20/disciples-sacred-lands-linked-p-24
Example (Format of alternate URLs = parent; Display categories as directories = off):
Code:
Generated URLs:
/strategy-disciples-sacred-lands-linked-p-24?cPath=2_20
/big-linked-disciples-sacred-lands-linked-p-24?cPath=22
Canonical URL:
/strategy-disciples-sacred-lands-linked-p-24
Example (Format of alternate URLs = original; Display categories as directories = off):
Code:
Generated URLs:
/disciples-sacred-lands-linked-p-24?cPath=2_20
/disciples-sacred-lands-linked-p-24?cPath=22
Canonical URL:
/disciples-sacred-lands-linked-p-24
Note 1: When "Display categories as directories" is configured as off, the handling of cPath matches the Zen Cart stock URL behavior (this may change in the future).
Note 2: Ultimate URLs 2.215 includes a large number of changes, enhancements, and fixes. I am no longer actively supporting older versions of Ultimate URLs (and would recommend upgrading as soon as possible).
Note 3: I do not provide support for forks (I know of at least one fork reporting itself as "Ultimate SEO URLs" - the author did not change the plugin name in the database or files). Third party forks of "Ultimate URLs" are not always actively maintained. Upgrading directly from a fork may result in unintended behavior. Some forks may also contain hard-coded changes to the URLs (instead of using the built-in PCRE filter) or may include changes in violation of the HTML specification (such as replacing "&" with "&" in attributes).
Note 3: Ultimate URLs will also handle "shortened" URLs (anchor + id; ex: "/-p-24" or "/sacred-land-p-24?cPath=22"). The canonical for "shortened" URLs will be the same as for the configured alternate URL (ex: "/software-c-2/strategy-c-2_20/disciples-sacred-lands-linked-p-24"). If making use of this feature, one may wish to enable "automatic redirects" (will issue a 301 to the configured alternative URL when a "shortened" URL is requested).
Bookmarks