Zen Cart Logo
Forums / All Other Contributions/Addons / Ceon URI Mapping v4.x

Ceon URI Mapping v4.x

Views: 451,990

Results 1,941 to 1,960 of 2,454
18 Dec 2015, 4:23 PM
#1941
feznizzle avatar

feznizzle

Totally Zenned

Join Date:
Apr 2010
Posts:
900
Plugin Contributions:
0

Ceon URI Mapping v4.x

One more quick question. Let's say I have a Ceon uri for an EZpage like this:
/About_Us

And I change it to:
/About_Acme_Products_Inc

Then the first uri becomes legacy and will continue to work, redirecting any visitor the new uri.

But what kind of redirect occurs? Is it a 301 permanent redirect?

28 Dec 2015, 11:30 AM
#1942
jasonshanks avatar

jasonshanks

Zen Follower

Join Date:
Feb 2009
Location:
atlanta GA
Posts:
296
Plugin Contributions:
0

Re: Ceon URI Mapping v4.x

Hello,

I just wanted to say , I love this plugin and it makes things so much nicer looking.

I am noticing two versions of links in google search from some of my products.

example : I sell a Netgear ac adapter model AD8180LF. When i search for that product, I get the old link for the non module version and the new version with the SEO links.

Will i be penalized by google for this in my search ranking ? Having two links that go to the same place like that ? Will this count and duplicate links ?

28 Dec 2015, 4:45 PM
#1943
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: Ceon URI Mapping v4.x

jasonshanks:

Hello,

I just wanted to say , I love this plugin and it makes things so much nicer looking.

I am noticing two versions of links in google search from some of my products.

example : I sell a Netgear ac adapter model AD8180LF. When i search for that product, I get the old link for the non module version and the new version with the SEO links.

Will i be penalized by google for this in my search ranking ? Having two links that go to the same place like that ? Will this count and duplicate links ?

Apparently at some point your store did not have user friendly URIs and now it does after those were indexed... So, allow me to offer this thought, if you were to be penalized, wouldn't it already have been applied? Not exactly a, on Tuesday we regrade type event...

On the flip side, the expectation, without getting into a huge discussion that has been had multiple times in this thread and many others, is that both (or however many) addresses resolve to the same canonical address... This is something to tell the SEs, hey you might have gotten here 5 ways to Sunday, but I'm the same thing for all versions and I know this it is by design to get here from all those addresses, it's not like I'm trying to dupe the customers or SEs.

And one thing about CEON URIs is that you can "move" the product from URI to other URI and at any one time if you maintain the database instead of using a series of .htaccess rules, there is always at most one jump from the address provided to the address chosen by the store owner. So there's no redirect of a redirect of a redirect, oops that one's caught in a loop redirect issue...

I would also like to say that I am no SEO "expert" and am applying what has been considered by others to be good (acceptable?) product/URI management.

28 Feb 2016, 7:09 AM
#1944
tpbeck avatar

tpbeck

New Zenner

Join Date:
Oct 2010
Posts:
1
Plugin Contributions:
0

Re: Ceon URI Mapping v4.x

With version 4.5 of CEON and Zen Cart 1.5.4, I'm seeing the following errors when copying a product. When can be done?

[27-Feb-2016 13:24:53] PHP Strict Standards: Non-static method String::regexpReplace() should not be called statically, assuming $this from incompatible context in /var/www/vhosts/learnhomeopathynow.com/httpdocs/shop/includes/classes/class.CeonURIMappingAdmin.php on line 561
[27-Feb-2016 13:24:53] PHP Strict Standards: Non-static method String::convertCharset() should not be called statically, assuming $this from incompatible context in /var/www/vhosts/learnhomeopathynow.com/httpdocs/shop/includes/classes/class.String.php on line 879
[27-Feb-2016 13:24:53] PHP Strict Standards: Non-static method String::toLowercase() should not be called statically, assuming $this from incompatible context in /var/www/vhosts/learnhomeopathynow.com/httpdocs/shop/includes/classes/class.String.php on line 112
[27-Feb-2016 13:24:53] PHP Strict Standards: Non-static method String::toLowercase() should not be called statically, assuming $this from incompatible context in /var/www/vhosts/learnhomeopathynow.com/httpdocs/shop/includes/classes/class.String.php on line 113
...

28 Feb 2016, 7:47 AM
#1945
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: Ceon URI Mapping v4.x

tpbeck:

With version 4.5 of CEON and Zen Cart 1.5.4, I'm seeing the following errors when copying a product. When can be done?

[27-Feb-2016 13:24:53] PHP Strict Standards: Non-static method String::regexpReplace() should not be called statically, assuming $this from incompatible context in /var/www/vhosts/learnhomeopathynow.com/httpdocs/shop/includes/classes/class.CeonURIMappingAdmin.php on line 561
[27-Feb-2016 13:24:53] PHP Strict Standards: Non-static method String::convertCharset() should not be called statically, assuming $this from incompatible context in /var/www/vhosts/learnhomeopathynow.com/httpdocs/shop/includes/classes/class.String.php on line 879
[27-Feb-2016 13:24:53] PHP Strict Standards: Non-static method String::toLowercase() should not be called statically, assuming $this from incompatible context in /var/www/vhosts/learnhomeopathynow.com/httpdocs/shop/includes/classes/class.String.php on line 112
[27-Feb-2016 13:24:53] PHP Strict Standards: Non-static method String::toLowercase() should not be called statically, assuming $this from incompatible context in /var/www/vhosts/learnhomeopathynow.com/httpdocs/shop/includes/classes/class.String.php on line 113
...

Not experiencing this type of error when creating copy of products so far... Have tried, link copying as well as duplication of product with attributes as well... Please explain what process is being used for duplication, also what is the URI for the product downstream of the path to your site. What are the other conditions? PHP version? Etc...

20 Mar 2016, 5:42 AM
#1946
redspinnaker avatar

redspinnaker

New Zenner

Join Date:
Oct 2010
Posts:
50
Plugin Contributions:
0

Re: Ceon URI Mapping v4.x

Will this current version of Ceon URI mapping work with the latest zen cart version 1.5.5? Any thoughts?
Cheers
Terry

20 Mar 2016, 5:58 AM
#1947
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: Ceon URI Mapping v4.x

RedSpinnaker:

Will this current version of Ceon URI mapping work with the latest zen cart version 1.5.5? Any thoughts?
Cheers
Terry

"Work" and contain the latest changes/upgrades to underlying processing are two different things. An update including the suggested security updates and further ZC 1.5.5 compatibility are expected relatively soon. But haven't tried installing pretty much anything with ZC 1.5.5 uet as trying to resolve some other related issues.

22 Mar 2016, 3:21 PM
#1948
stellarweb avatar

stellarweb

Zen Follower

Join Date:
May 2006
Location:
Montana
Posts:
293
Plugin Contributions:
8

Re: Ceon URI Mapping v4.x

Chad - You know I love you, but I am confused with what you said.... lol

I am getting ready to do a 1.5.5 upgrade to a site that has this mod... so is the current version compatible with 1.5.5? Or should I just upgrade the customer to 1.5.4?

mc12345678:

"Work" and contain the latest changes/upgrades to underlying processing are two different things. An update including the suggested security updates and further ZC 1.5.5 compatibility are expected relatively soon. But haven't tried installing pretty much anything with ZC 1.5.5 uet as trying to resolve some other related issues.

22 Mar 2016, 3:36 PM
#1949
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: Ceon URI Mapping v4.x

stellarweb:

Chad - You know I love you, but I am confused with what you said.... lol

I am getting ready to do a 1.5.5 upgrade to a site that has this mod... so is the current version compatible with 1.5.5? Or should I just upgrade the customer to 1.5.4?

Can not advise on how to progress with customer. I have not tested on ZC 1.5.5. As is will not work on PHP 7.0. There is also a change to the ZC core code for canonical URIs that needs review to ensure that the addtional features implemented were not already/previously addressed in one way or another.

Otherwise, I haven't seen any changes to the ZC core code that would prevent operation. (The November security alerts from 2015 should be applied when merging the changes of this code to the ZC 1.5.5 code.)

22 Mar 2016, 4:03 PM
#1950
stellarweb avatar

stellarweb

Zen Follower

Join Date:
May 2006
Location:
Montana
Posts:
293
Plugin Contributions:
8

Re: Ceon URI Mapping v4.x

Thanks Chad!! Will see what customer wants to do.

mc12345678:

Can not advise on how to progress with customer. I have not tested on ZC 1.5.5. As is will not work on PHP 7.0. There is also a change to the ZC core code for canonical URIs that needs review to ensure that the addtional features implemented were not already/previously addressed in one way or another.

Otherwise, I haven't seen any changes to the ZC core code that would prevent operation. (The November security alerts from 2015 should be applied when merging the changes of this code to the ZC 1.5.5 code.)

22 Mar 2016, 7:50 PM
#1951
feznizzle avatar

feznizzle

Totally Zenned

Join Date:
Apr 2010
Posts:
900
Plugin Contributions:
0

Re: Ceon URI Mapping v4.x

Situation:
I am staging products/categories one site and will later move them to the live site. I am not bothering to create my CEON URIs on the staging site, will do that on the live site. The reason I'm not triggering CEON URIs is that Zen though the product ID will not change between staging and live, the categories may change. Since the category will appear in the URI, I must wait.

Question:
Is there a way to create an href from one internal product product page to another that will trigger the CEON URI? Given that I know the Product ID will not change, it seems like I should be able to just use the Zen cpath.

Testing:
To test it out, I created an href from one product to another before triggering a CEON URI for the second page. Then I triggered a URI for the second page. Sadly I can't seem to get it to work!

Here is the test page:
http://0stage.justmedicalDOTbiz/Product_Test/Product_Test_1_Images

On that page, you will see a reference to Clark Socket. If you hover over it, you will see a Zen created url. But if you click on the link, you will transport to a CEON URI.

Here is the actual code I used:

<p>Here is a link: <strong><a href="/index.php?main_page=product_info&cPath=4&products_id=124">Clark Socket</a></strong></p>

Is there a way to trigger the URI (cause it to print into the html) of the originating page, without actually knowing what the URI will be?

22 Mar 2016, 8:26 PM
#1952
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: Ceon URI Mapping v4.x

URIs from this plugin are generated/substituted when using the zen_href_link function, not by parsing page hard entered code. To perform some sort of similar substitution would require code to parse the description. And make that substitution. Alternatively, the description can be later modified through whatever "tool" is desired. Ie. Phpmyadmin, a sql query to replace, a mass update type program.

In the end though this is proof that with or without the uri being known. To be rewritten that CEON URI mapping works with original ZC URIs as well...

Further alternatively, this is a reason that if generating URIs that the development site be setup to support the live site as a mirror to the live site making movement of that data seamless.

22 Mar 2016, 8:39 PM
#1953
feznizzle avatar

feznizzle

Totally Zenned

Join Date:
Apr 2010
Posts:
900
Plugin Contributions:
0

Re: Ceon URI Mapping v4.x

I was afraid that would be the answer: "URIs from this plugin are generated/substituted when using the zen_href_link function, not by parsing page hard entered code."

Bummer. I'll find another way...

Thanks MC!

22 Mar 2016, 11:38 PM
#1954
bobthemolder avatar

bobthemolder

Zen Follower

Join Date:
Nov 2008
Posts:
164
Plugin Contributions:
0

Re: Ceon URI Mapping v4.x

I hacked this together a few years back to auto generate CEON product URIs - it's crude but it's worked well for me, and it's free. Simply copy one of the admin pages and drop the code in, run as needed to update product URIs.

It lists all the categories on the site. Click the category name to auto populate the product URIs into the database.

Notes:

  • It uses the old mysql function because I haven't kept up to date on coding practices
  • Filebase it works with for me is CEON 4.4.1
  • The site I have it on is running ZC 1.5.1
  • You do need the category slug to be generated before generating the product URIs - just navigate to the regular zencart "edit categories" page and edit then save each category
<?php // display categories to select from
        $categories = mysql_query("SELECT * FROM zen_categories LEFT JOIN zen_categories_description ON zen_categories.categories_id = zen_categories_description.categories_id WHERE zen_categories.categories_status='1'");
        echo "<p>Click on a category to update it's products: <br/>";
        while ($showthiscat = mysql_fetch_assoc($categories)){
            echo "<a href='update-ceon-uri.php?updatecategory={$showthiscat['categories_id']}'>{$showthiscat['categories_name']}</a>, \n";
        }
        echo "</p>\n<hr/>\n";
    ?>

    <?php 
        $replacechars = array("(",")","'","\"","$","%","&"); // specify all characters to be eliminated
        // update all products in category
        $updateuris = mysql_query("SELECT * FROM zen_products WHERE master_categories_id='{$_GET['updatecategory']}'"); 
        while ($thisuri = mysql_fetch_assoc($updateuris)) {
            unset($catname);
            $productsid = $thisuri['products_id'];
            $productsname = implode(mysql_fetch_assoc(mysql_query("SELECT products_name FROM zen_products_description WHERE products_id='{$productsid}'"))); 
            $catname = implode(mysql_fetch_assoc(mysql_query("SELECT uri FROM zen_ceon_uri_mappings WHERE main_page='index' AND associated_db_id='{$thisuri['master_categories_id']}'")));
            $newuri = $catname."/".strtolower(str_replace(" ","-",$productsname));
            //$newuri = "/".strtolower(str_replace(" ","-",$productsname));    // product-only on this site
            $newuri = str_replace($replacechars,"",$newuri); // remove characters in the array above
            $today = date('Y-m-d G:i:s'); // today
            
            if($productsname == ''){continue;} // skip empty names
            
        $exists = implode(mysql_fetch_assoc(mysql_query("SELECT * FROM zen_ceon_uri_mappings WHERE main_page='product_info' AND associated_db_id='$productsid'")));     // used to check if product already exists to do update vs insert
        
        if ($exists) { // if already in zen_ceon_uri_mappings, update
            mysql_query("UPDATE zen_ceon_uri_mappings SET uri='$newuri' WHERE main_page='product_info' AND associated_db_id='$productsid'");
            $result = "Updated... ".mysql_error();
        } else { // else, insert
            mysql_query("INSERT IGNORE INTO zen_ceon_uri_mappings 
                        (`uri`, `language_id`, `current_uri`, `main_page`, `query_string_parameters`, `associated_db_id`, `alternate_uri`, `redirection_type_code`, `date_added`) VALUES 
                        ('$newuri','1','1','product_info',NULL,'$productsid',NULL,NULL,'$today')");
            $result = "Inserted... ".mysql_error();
        }
            
            echo "<p>$newuri (cat: {$thisuri['master_categories_id']}) - $result</p>\n"; // display whether updated or inserted and any problems encountered
        }
        
?>
22 Mar 2016, 11:45 PM
#1955
feznizzle avatar

feznizzle

Totally Zenned

Join Date:
Apr 2010
Posts:
900
Plugin Contributions:
0

Re: Ceon URI Mapping v4.x

bobthemolder:

I hacked this together a few years back to auto generate CEON product URIs - it's crude but it's worked well for me, and it's free. Simply copy one of the admin pages and drop the code in, run as needed to update product URIs.

It lists all the categories on the site. Click the category name to auto populate the product URIs into the database.

A standalone URI generator? Awesomeness! Right on!!!!

23 Mar 2016, 1:29 AM
#1956
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
177

Re: Ceon URI Mapping v4.x

@bobthemolder,

I think the following does the same thing, but uses the Zen Cart $db stuff to do the queries, making your stuff compatible with newer ZC versions.
I don't have a CEON URI site to test it on, but I think I've converted it correctly.

// display categories to select from
$categories = $db->Execute("SELECT * FROM " . TABLE_CATEGORIES . " c LEFT JOIN " . TABLE_CATEGORIES_DESCRIPTION . " cd ON c.categories_id = cd.categories_id WHERE c.categories_status='1'");
echo "<p>Click on a category to update its products: <br/>";
while (!$categories->EOF) {
    echo "<a href='update-ceon-uri.php?updatecategory={$categories->fields['categories_id']}'>{$categories->fields['categories_name']}</a>, \n";
    $categories->MoveNext();
}
echo "</p>\n<hr/>\n";


$replacechars = array("(",")","'","\"","$","%","&"); // specify all characters to be eliminated
// update all products in category
$_GET['updatecategory'] = (int)$_GET['updatecategory'];
$updateuris = $db->Execute("SELECT * FROM " . TABLE_PRODUCTS . " WHERE master_categories_id='{$_GET['updatecategory']}'");
while (!$updateuris->EOF)) {
    $thisuri = $updateuris->fields;
    unset($catname);


    $productsid = $thisuri['products_id'];
    $productsname = zen_get_products_name($productsid); 
    if($productsname == '') continue; // skip empty names


    $result = $db->Execute("SELECT uri FROM " . TABLE_CEON_URI_MAPPINGS . " WHERE main_page='index' AND associated_db_id='{$thisuri['master_categories_id']}'");
    $catname = $result->fields['uri'];
    $newuri = $catname."/".strtolower(str_replace(" ","-",$productsname));
    //$newuri = "/".strtolower(str_replace(" ","-",$productsname));    // product-only on this site


    // remove characters in the array above
    $newuri = str_replace($replacechars,"",$newuri); 
    $today = date('Y-m-d G:i:s'); // today


    // check if product already exists to do update vs insert
    $result = $db->Execute("SELECT * FROM " . TABLE_CEON_URI_MAPPINGS . " WHERE main_page='product_info' AND associated_db_id='$productsid'");
    $exists = $result->RecordCount();


    if ($exists) { // if already in TABLE_CEON_URI_MAPPINGS, update
        $db->Execute("UPDATE " . TABLE_CEON_URI_MAPPINGS . " SET uri='$newuri' WHERE main_page='product_info' AND associated_db_id='$productsid'");
        $status = "Updated. ";
    } else { // else, insert
        $db->Execute("INSERT IGNORE INTO " . TABLE_CEON_URI_MAPPINGS . " 
                    (`uri`, `language_id`, `current_uri`, `main_page`, `query_string_parameters`, `associated_db_id`, `alternate_uri`, `redirection_type_code`, `date_added`) VALUES 
                    ('$newuri','1','1','product_info',NULL,'$productsid',NULL,NULL,'$today')");
        $status = "Inserted. ";
    }


    // display whether updated or inserted and any problems encountered
    echo "<p>$newuri (cat: {$thisuri['master_categories_id']}) - $status</p>\n"; 


    $updateuris->MoveNext();
}
2 Apr 2016, 10:54 PM
#1957
enzo_ita avatar

enzo_ita

Zen Follower

Join Date:
Jul 2009
Posts:
402
Plugin Contributions:
0

Re: Ceon URI Mapping v4.x

DrByte:

@bobthemolder,

I think the following does the same thing, but uses the Zen Cart $db stuff to do the queries, making your stuff compatible with newer ZC versions.
I don't have a CEON URI site to test it on, but I think I've converted it correctly.

// display categories to select from
$categories = $db->Execute("SELECT * FROM " . TABLE_CATEGORIES . " c LEFT JOIN " . TABLE_CATEGORIES_DESCRIPTION . " cd ON c.categories_id = cd.categories_id WHERE c.categories_status='1'");
echo "<p>Click on a category to update its products: <br/>";
while (!$categories->EOF) {
echo "<a href='update-ceon-uri.php?updatecategory={$categories->fields['categories_id']}'>{$categories->fields['categories_name']}</a>, \n";
$categories->MoveNext();
}
echo "</p>\n<hr/>\n";

$replacechars = array("(",")","'",""","$","%","&"); // specify all characters to be eliminated
// update all products in category
$_GET['updatecategory'] = (int)$_GET['updatecategory'];
$updateuris = $db->Execute("SELECT * FROM " . TABLE_PRODUCTS . " WHERE master_categories_id='{$_GET['updatecategory']}'");
while (!$updateuris->EOF)) {
$thisuri = $updateuris->fields;
unset($catname);

$productsid = $thisuri['products_id'];
$productsname = zen_get_products_name($productsid); 
if($productsname == '') continue; // skip empty names


$result = $db->Execute("SELECT uri FROM " . TABLE_CEON_URI_MAPPINGS . " WHERE main_page='index' AND associated_db_id='{$thisuri['master_categories_id']}'");
$catname = $result->fields['uri'];
$newuri = $catname."/".strtolower(str_replace(" ","-",$productsname));
//$newuri = "/".strtolower(str_replace(" ","-",$productsname));    // product-only on this site


// remove characters in the array above
$newuri = str_replace($replacechars,"",$newuri); 
$today = date('Y-m-d G:i:s'); // today


// check if product already exists to do update vs insert
$result = $db->Execute("SELECT * FROM " . TABLE_CEON_URI_MAPPINGS . " WHERE main_page='product_info' AND associated_db_id='$productsid'");
$exists = $result->RecordCount();


if ($exists) { // if already in TABLE_CEON_URI_MAPPINGS, update
    $db->Execute("UPDATE " . TABLE_CEON_URI_MAPPINGS . " SET uri='$newuri' WHERE main_page='product_info' AND associated_db_id='$productsid'");
    $status = "Updated. ";
} else { // else, insert
    $db->Execute("INSERT IGNORE INTO " . TABLE_CEON_URI_MAPPINGS . " 
                (`uri`, `language_id`, `current_uri`, `main_page`, `query_string_parameters`, `associated_db_id`, `alternate_uri`, `redirection_type_code`, `date_added`) VALUES 
                ('$newuri','1','1','product_info',NULL,'$productsid',NULL,NULL,'$today')");
    $status = "Inserted. ";
}


// display whether updated or inserted and any problems encountered
echo "<p>$newuri (cat: {$thisuri['master_categories_id']}) - $status</p>\n"; 


$updateuris->MoveNext();

}

Hi,
I am not sure I understood how to use the code above, I mean how to make in work. 
bobthemolder said to copy it in a amdin page but I did it in the categories.php page and all what I get is a blank page (zen cart v1.5.5)
Can you please explain it in more details?
Thanks
enzo
2 Apr 2016, 11:08 PM
#1958
hairydog avatar

hairydog

Zen Follower

Join Date:
Sep 2006
Posts:
165
Plugin Contributions:
0

Re: Ceon URI Mapping v4.x

You don't need to understand it: there is now a 155 version available for download. Simply install that!

2 Apr 2016, 11:20 PM
#1959
enzo_ita avatar

enzo_ita

Zen Follower

Join Date:
Jul 2009
Posts:
402
Plugin Contributions:
0

Re: Ceon URI Mapping v4.x

hairydog:

You don't need to understand it: there is now a 155 version available for download. Simply install that!
Thanks but there is not a version that does this
auto generate CEON product URIs - it's crude but it's worked well for me, and it's free. Simply copy one of the admin pages and drop the code in, run as needed to update product URIs.
as bobthemolder said.
I like to understand and experimet, however.
Ciao
enzo

10 Apr 2016, 7:45 PM
#1960
mesnitu avatar

mesnitu

Totally Zenned

Join Date:
Aug 2014
Location:
Lisbon
Posts:
597
Plugin Contributions:
0

Re: Ceon URI Mapping v4.x

Hi
Kind of Feature request:

Is there a possibility in a near future that ceon could add the bookx product type to his package ?
There's a product type ( in the install ) for product_book ... but I think that module has drop from updates.
This one, BookX it's new and it's alive.

I've pasted on git , what I've done to have the Ceon working with BookX product type, so basically copy and pasting the code from book module to bookx module.

Well, I never use the other book module, but I guess it would update the products uri, and not the authors, genres...etc...but I don't know.
Anyway , it would be nice :)

Perhaps this link could save you some additional work... or not

https://github.com/mesnitu/Ceon-BookX/

Thanks