Zen Cart Logo
Forums / All Other Contributions/Addons / Ceon URI Mapping (SEO)

Ceon URI Mapping (SEO)

Locked

Views: 472,352

Results 1,621 to 1,640 of 2,913
This thread is locked. New replies are disabled.
20 Jun 2010, 8:31 AM
#1621
kamelion0927 avatar

kamelion0927

Zen Follower

Join Date:
Dec 2009
Posts:
208
Plugin Contributions:
1

Ceon URI Mapping (SEO)

Has anyone been able to get this mod working with 1.3.9d?

I've uninstalled and reinstalled the mod twice, triple checked that I merged my files correctly and still no dice - I don't have the configuration options in my Admin (CEON URI Mapping (SEO) isn't in Admin->Configuration) and when I try to edit my EZ Pages, I get:

1146 Table '(my database).zen_ceon_uri_mappings' doesn't exist
in:
[ SELECT language_id, uri FROM zen_ceon_uri_mappings WHERE main_page = 'page' AND associated_db_id = '2' AND current_uri = '1';]
If you were entering information, press the BACK button in your browser and re-check the information you had entered to be sure you left no blank fields.

I had it working beautifully in 1.3.8a with all the same add ons and am confused as to where I could be going wrong...:yuck:

P.S. I've searched the entire forum several times but if I missed the answer, just smack me. :)

20 Jun 2010, 8:37 AM
#1622
saplanet avatar

saplanet

New Zenner

Join Date:
Jun 2008
Location:
Singapore, Australia, America
Posts:
97
Plugin Contributions:
0

Re: Ceon URI Mapping (SEO)

kamelion0927:

Has anyone been able to get this mod working with 1.3.9d?

I am using this mod on 1.39d. I didn't uninstall the earlier versions though, I use kdiff application to compare the core files that come with the latest CEON URL mappings and the ones I have in my local folder.

20 Jun 2010, 8:39 AM
#1623
mike_dean avatar

mike_dean

Totally Zenned

Join Date:
Feb 2006
Location:
Central Coast, NSW, Australia
Posts:
531
Plugin Contributions:
0

Re: Ceon URI Mapping (SEO)

kamelion0927:

Has anyone been able to get this mod working with 1.3.9d?

I can't answer your question as to why it's not working, but I can answer the first question

I have version 3.6.3 running on ZC 1.3.9d on a test site and I have no issues..

Do you have an alternate name for your your admin folder ?

Have you copied ALL the files across, including the template files and the modified files for the correct version of ZC that you are running ?

20 Jun 2010, 11:54 AM
#1624
conor avatar

conor

Passed

Join Date:
Aug 2004
Location:
Belfast, Northern Ireland
Posts:
2,480
Plugin Contributions:
4

Re: Ceon URI Mapping (SEO)

Hi,

kamelion0927:

I've uninstalled and reinstalled the mod twice, triple checked that I merged my files correctly and still no dice - I don't have the configuration options in my Admin (CEON URI Mapping (SEO) isn't in Admin->Configuration) and when I try to edit my EZ Pages, I get:

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

20 Jun 2010, 3:15 PM
#1625
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,068
Plugin Contributions:
56

Re: Ceon URI Mapping (SEO)

Running ZC 1.3.9c with Ceon URI Mapping v3.6.1 on my local machine (currently). My site has two languages (English and Spanish) and I've defined language-specific URIs for all my pages.

I'm also using the "Languages and Currency in Header" mod v1.0, which uses this code

  $content = "  ";

  while (list($key, $value) = each($lng->catalog_languages)) {
    $content .= '<a href="' . zen_href_link($_GET['main_page'], zen_get_all_get_params(array('language', 'currency')) . 'language=' . $key, $request_type) . '">' . zen_image(DIR_WS_LANGUAGES .  $value['directory'] . '/images/' . $value['image'], $value['name'], '', '', 'align="middle"') . '</a>  ';
  }
  
  echo $content;

to insert the language links in the header. My problem is that these links (1) don't get "translated" and (2) include the language_id= parameter.

For example, I've got the contact_us page translated to /contact_us for English and /contactar for Spanish. If you're currently on the English version of the page, the English language link is /localhost/mystore/contact_us&language_id=en and the Spanish language link is /localhost/mystore/contact_us&language_id=es. When you click on the links, they're resolved to /localhost/mystore/contact_us&language_id=en and /localhost/mystore/contactar, respectively

Is there any way to get the language_id parameter stripped?

20 Jun 2010, 7:43 PM
#1626
csicontact avatar

csicontact

New Zenner

Join Date:
Jun 2010
Posts:
2
Plugin Contributions:
0

Re: Ceon URI Mapping (SEO)

Hi,
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.

csicontact

20 Jun 2010, 10:49 PM
#1627
conor avatar

conor

Passed

Join Date:
Aug 2004
Location:
Belfast, Northern Ireland
Posts:
2,480
Plugin Contributions:
4

Re: Ceon URI Mapping (SEO)

Hi,

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:

                $category_and_product_path_array[$i] = String::regexpReplace(
                $category_and_product_path_array[$i],

to:

                $ez_page_name = String::regexpReplace($ez_page_name,

And change lines 1467-1468 from:

                $category_and_product_path_array[$i] = String::regexpReplace(
                $category_and_product_path_array[$i],

to:

            $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

21 Jun 2010, 12:42 AM
#1628
kamelion0927 avatar

kamelion0927

Zen Follower

Join Date:
Dec 2009
Posts:
208
Plugin Contributions:
1

Re: Ceon URI Mapping (SEO)

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.

21 Jun 2010, 12:16 PM
#1629
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,068
Plugin Contributions:
56

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.

    // 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.

21 Jun 2010, 12:38 PM
#1630
conor avatar

conor

Passed

Join Date:
Aug 2004
Location:
Belfast, Northern Ireland
Posts:
2,480
Plugin Contributions:
4

Re: Ceon URI Mapping (SEO)

Hi,

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

21 Jun 2010, 1:59 PM
#1631
csicontact avatar

csicontact

New Zenner

Join Date:
Jun 2010
Posts:
2
Plugin Contributions:
0

Re: Ceon URI Mapping (SEO)

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

21 Jun 2010, 9:57 PM
#1632
divavocals avatar

divavocals

Totally Zenned

Join Date:
Jan 2007
Location:
Los Angeles, California, United States
Posts:
10,011
Plugin Contributions:
3

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)

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

22 Jun 2010, 3:34 AM
#1633
bangsters avatar

bangsters

Zen Follower

Join Date:
Jun 2006
Posts:
168
Plugin Contributions:
0

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?

22 Jun 2010, 10:40 AM
#1634
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,068
Plugin Contributions:
56

Re: Ceon URI Mapping (SEO)

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.

22 Jun 2010, 12:39 PM
#1635
divavocals avatar

divavocals

Totally Zenned

Join Date:
Jan 2007
Location:
Los Angeles, California, United States
Posts:
10,011
Plugin Contributions:
3

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..

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?

22 Jun 2010, 3:42 PM
#1636
conor avatar

conor

Passed

Join Date:
Aug 2004
Location:
Belfast, Northern Ireland
Posts:
2,480
Plugin Contributions:
4

Re: Ceon URI Mapping (SEO)

Hi,

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

22 Jun 2010, 3:46 PM
#1637
conor avatar

conor

Passed

Join Date:
Aug 2004
Location:
Belfast, Northern Ireland
Posts:
2,480
Plugin Contributions:
4

Re: Ceon URI Mapping (SEO)

Hi,

DivaVocals:

In my early days as a BA/PM,

What's a BA/PM?

DivaVocals:

I was always taught that you program by rules not exceptions..

I'm not sure what you mean by that?

DivaVocals:

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)

I'd really like some more thoughts on this. I might try a speed test and see what difference it makes on a site with 100,000 mappings (and an index).. if it's not much then I'll just include the changes in the next version. If it is then I'll wait for more feedback here.

All the best..

Conor
ceon

22 Jun 2010, 4:17 PM
#1638
divavocals avatar

divavocals

Totally Zenned

Join Date:
Jan 2007
Location:
Los Angeles, California, United States
Posts:
10,011
Plugin Contributions:
3

Re: Ceon URI Mapping (SEO)

conor:

What's a BA/PM?Business Analyst/Project Manager

conor:

I'm not sure what you mean by that?
Very simply put we never included requirements in our specifications or included code in our software that dealt with exceptional processes (those things which only occur on exceptional/rare occasions or in one off instances) Instead requirement/programming should be focused on the normal business rules. Hope that's clearer..:smile:

22 Jun 2010, 5:39 PM
#1639
countrycharm avatar

countrycharm

Totally Zenned

Join Date:
Jul 2007
Posts:
2,179
Plugin Contributions:
2

Re: Ceon URI Mapping (SEO)

conor:

Hi Alan,

Sorry I don't know anything about that and can't see anything in your code. Hopefully someone else here can help you with that.

This code is custom code on your site. It is NOT part of the standard Zen Cart installation.

This code is messing up and generating a cPath variable when a category isn't being displayed (and so a cPath isn't needed). URI Mapping can't read minds so it doesn't know what the cPath is doing there so it leaves in it in case it's needed (using the "better safe than sorry" approach).

What you need to do is modify the code you posted and remove the part:

'cPath=' .zen_get_generated_category_path_rev($_GET['cPath'])

> 
> Thanks.
> 
> All the best...
> 
> Conor
> [ceon](http://dev.ceon.net)


Conor I know you said you didn't want a followup question about ?cPath= but I have a question about it. This may be how it is suppose to work I really don't know. If I have a category name American Patriotic and I have some products linked to other categories from that main category. Now if I click on the American Patriotic category it displays american-patriotic/american-eagle-clock-and-calendar that is right, now if I click on the same product from a different category it a has a link like this american-patriotic/american-eagle-clock-and-calendar?cPath=157
Question is the ?cpath=157 suppose to be there or how can I get rid of it. Thank You in advance. It may have nothing to do with Ceon URI Mapping.
22 Jun 2010, 6:46 PM
#1640
conor avatar

conor

Passed

Join Date:
Aug 2004
Location:
Belfast, Northern Ireland
Posts:
2,480
Plugin Contributions:
4

Re: Ceon URI Mapping (SEO)

Hi,

countrycharm:

If I have a category name American Patriotic and I have some products linked.

Linked products must have a cPath otherwise Zen Cart breaks and can't display the correct category; it would only be able to use the master category for a product if the cPath information wasn't available to maintain "context" on your site.

Just ignore the cPath you can't do anything about it and it does no harm, the canonical URI for the linked products is that of the product itself so there are no duplicate content issues.

Hope that sets your mind at rest!

All the best..

Conor
ceon