Re: Ceon URI Mapping (SEO)
Hi,
Quote:
Originally Posted by
csicontact
i have the ".=>," added to character/string replacements config, but don't replace the "." in a "dr." by manufacturer mapping. When the "." exists in a product name is ok.
You're right, you've found a bug in the autogeneration algorithms for the Manufacturers and EZ-Pages. The replacement words aren't being used correctly for those two page types. I'll include a fix for this in the next version. In the meantime you can apply the fix yourself by changing a few lines in
admin/includes/functions/extra_functions/ceon_uri_mapping.php
Change lines 1231-1232 from:
PHP Code:
$category_and_product_path_array[$i] = String::regexpReplace(
$category_and_product_path_array[$i],
to:
PHP Code:
$ez_page_name = String::regexpReplace($ez_page_name,
And change lines 1467-1468 from:
PHP Code:
$category_and_product_path_array[$i] = String::regexpReplace(
$category_and_product_path_array[$i],
to:
PHP Code:
$manufacturer_name = String::regexpReplace($manufacturer_name,
That'll get things working as expected.
Sorry about the bug.. that one's been there for years and managed to slip past, guess not many use this functionality in EZ-Page/Manufacturer names!
All the best..
Conor
ceon
Re: Ceon URI Mapping (SEO)
Quote:
Originally Posted by
conor
Hi,
If you don't see the configuration options in the admin then you haven't installed the module properly. Start again, following the installation instructions from the beginning to the end. Don't skip any steps, such as going to the Ceon URI Mapping Config page as it is the step that creates the database tables and admin configuration option.
All the best..
Conor
ceon
Thanks to everyone that answered! I know it's some kind of user error - I just wanted to make sure I wasn't :frusty: for nothing.
Re: Ceon URI Mapping (SEO)
FWIW, here's the patch I made to /includes/functions/html_output.php to use the language parameter, if present, to form the zen_href_link function's URI. I've got pages that have other parameters and it seems to strip out the language= and retain the remaining, valid, parameters.
Code:
// BEGIN CEON URI MAPPING 2 of 4
$uri_mapping_being_used = false;
if (defined('CEON_URI_MAPPING_ENABLED') && CEON_URI_MAPPING_ENABLED == 1) {
// lat9: start
// Check to see if the language is specified as a parameter
$mapping_language_id = (int) $_SESSION['languages_id'];
$pattern = '/language\=([a-z\_]+)/';
if (preg_match($pattern, $parameters, $matches)) {
$parm_lang_id = $matches[1];
$lang_mapping_sql = "
SELECT
languages_id
FROM
" . TABLE_LANGUAGES . "
WHERE
code = '" . zen_db_input($parm_lang_id) . "';";
$lang_mapping_result = $db->Execute($lang_mapping_sql);
if (!$lang_mapping_result->EOF) {
$parameters = str_replace('language=' . $parm_lang_id, '', $parameters);
$mapping_language_id = $lang_mapping_result->fields['languages_id'];
}
}
// lat9: end
if (preg_match('/.*index.php\?main_page=([^&]+)/i', $page, $matches)) {
I then changed all occurrences in zen_href_link of $_SESSION['languages_id'] to $mapping_language_id so that the parameter language, if present, is used in any of the SQL queries needed to form the URI.
Re: Ceon URI Mapping (SEO)
Hi,
Quote:
Originally Posted by
lat9
FWIW, here's the patch
Thanks, that code looks fine. As it only runs if the language ID is being specified in the link it'll never be run on the vast majority of sites (your site is very special/unique in this respect).
However, the fact that it provides additional functionality at the cost of a single preg_match check per link lookup means that it may well be worth including in the next version of the software.
What do others here think? Is an extra preg_match per zen_href_link call acceptable or is this functionality too "niche/specialised" to be included in the main software? (The alternative would be to distribute it as a FAQ/patch).
All the best..
Conor
ceon
Re: Ceon URI Mapping (SEO)
Quote:
Originally Posted by
conor
Sorry about the bug.. that one's been there for years and managed to slip past, guess not many use this functionality in EZ-Page/Manufacturer names!
All the best..
Conor
ceon
Oh, nothing. Thanks for the speedy bugfix, and special thanks for the writing of this fantastic module. Great work.
csicontact
Re: Ceon URI Mapping (SEO)
In my early days as a BA/PM, I was always taught that you program by rules not exceptions..
That said, this functionality IMO seems too specialized to keep in the main software, but will definitely be of use to others in similar specialized situations.. I say FAQ/patch (patch probably being the easiest for end users of your mod)
Quote:
Originally Posted by
conor
Hi,
Thanks, that code looks fine. As it only runs if the language ID is being specified in the link it'll never be run on the vast majority of sites (your site is very special/unique in this respect).
However, the fact that it provides additional functionality at the cost of a single preg_match check per link lookup means that it may well be worth including in the next version of the software.
What do others here think? Is an extra preg_match per zen_href_link call acceptable or is this functionality too "niche/specialised" to be included in the main software? (The alternative would be to distribute it as a FAQ/patch).
All the best..
Conor
ceon
Re: Ceon URI Mapping (SEO)
works like a charm.... although i have a question. it can translate EZpages as I see the URI mapping at the bottom. however, for define pages I cannot see any option, like for contact us, privacy, etc....
any suggestions?
Re: Ceon URI Mapping (SEO)
Quote:
Originally Posted by
conor
... As it only runs if the language ID is being specified in the link it'll never be run on the vast majority of sites (your site is very special/unique in this respect).
Although I'm using the "language in header" mod, the code that it uses to display the language flags is the same as that used by the language sidebox that comes in the standard zen-cart. That said, anyone who has a multi-lingual site and uses the Ceon URI Mapping mod will run into this problem.
Re: Ceon URI Mapping (SEO)
This is discussed in the readme/FAQ that comes with the module.. You'll need to add these pages to the DB manually.. The readme gives details on how..
Quote:
Originally Posted by
bangsters
works like a charm.... although i have a question. it can translate EZpages as I see the URI mapping at the bottom. however, for define pages I cannot see any option, like for contact us, privacy, etc....
any suggestions?
Re: Ceon URI Mapping (SEO)
Hi,
Quote:
Originally Posted by
lat9
Although I'm using the "language in header" mod, the code that it uses to display the language flags is the same as that used by the language sidebox that comes in the standard zen-cart. That said, anyone who has a multi-lingual site and uses the Ceon URI Mapping mod will run into this problem.
It's not a "problem" as it doesn't cause any actual issues, it simply results in the native text for a link to the current page not being used and a background redirect having to take place.
When the languages box is used the module displays the correct page with the correct URI for the applicable language. The links might be in the current language and have ?language=CODE in them but they instantly redirect to the URI for the appropriate page... the user never gets to see the current_language_page_name?language=CODE except when they hover over the link.
I think I'm leaning towards including your patch in the FAQs rather than as part of the main software as it would slow down the code for a feature which is rarely used (comparatively speaking). I'm not sure though.
Again I'd like more feedback on this... personally I like the idea of all the links on a page being "perfect" without any redirects being necessary but the additional processing time per link could add up on large sites.
More comments are welcome!
All the best..
Conor
ceon