Results 1 to 10 of 2445

Hybrid View

  1. #1
    Join Date
    Aug 2004
    Location
    Belfast, Northern Ireland
    Posts
    2,480
    Plugin Contributions
    14

    Default Re: Ceon URI Mapping v4.x

    Hi,

    Quote Originally Posted by saplanet View Post
    I have just upgraded to 4.4.1
    What version did you upgrade from?

    All the best...

    Conor
    ceon

  2. #2
    Join Date
    Jun 2008
    Location
    Singapore, Australia, America
    Posts
    96
    Plugin Contributions
    0

    Default Re: Ceon URI Mapping v4.x

    Quote Originally Posted by conor View Post
    Hi,



    What version did you upgrade from?

    All the best...

    Conor
    ceon
    From 4.0.7

  3. #3
    Join Date
    Aug 2004
    Location
    Belfast, Northern Ireland
    Posts
    2,480
    Plugin Contributions
    14

    Default Re: Ceon URI Mapping v4.x

    Hi,

    Quote Originally Posted by saplanet View Post
    From 4.0.7
    The admin page key didn't change between those versions so I've no explanation for the duplication other than user error when installing. Just use PHPMyAdmin to remove the duplicate key by hand.

    All the best...

    Conor
    ceon

  4. #4
    Join Date
    Oct 2004
    Location
    Southport, UK
    Posts
    4,244
    Plugin Contributions
    20

    Default Re: Ceon URI Mapping v4.x

    I regret to advise you that Conor passed away last night. Please see http://www.zen-cart.com/showthread.php?202939

  5. #5
    Join Date
    Nov 2008
    Posts
    164
    Plugin Contributions
    0

    Default Re: Ceon URI Mapping v4.x

    This is terrible to hear about Conor I just found the CEON URI module this morning and it's a pretty good tool - after SSU had problems with V1.5 this has picked up the slack.

    I didn't want to go through products 1-by-1 to add them to the database, so I put together this script in the past hour to do it automatically.

    Open index.php, save it as update-ceon-uri.php and replace the content of <body>...</body> with the following: (make sure to keep the require header.php)
    Code:
    <div style='width:1000px;margin:0 auto;'>
    
    	<p>Categories must be updated manually through the regular store interface before running this script.</p><hr/>
    
    	<?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><hr/>";
    	?>
    
    	<?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)) {
    			$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 = str_replace($replacechars,"",$newuri); // remove characters from array above
    			$today = date ('Y-m-d G:i:s'); // today
    			
    		$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 - $result</p>\n"; // display whether updated or inserted and any problems encountered
    		}
    		
    ?>
    
    </div><!-- end center div -->
    NOTE: It always sets language_id to 1 (english in my case).
    NOTE: You'll have to specify all the characters you want removed directly in the $replacechars[] array.
    NOTE: You'll have to manually type in http://yoursite.com/admin/update-ceon-uri.php to run the script.

 

 

Similar Threads

  1. v139d Ceon uri mapping, how to generate uri mapping for bulk bulk-imported products?
    By mybiz9999 in forum All Other Contributions/Addons
    Replies: 3
    Last Post: 8 Jan 2013, 06:52 AM
  2. CEON URI Mapping
    By jmkent in forum All Other Contributions/Addons
    Replies: 3
    Last Post: 22 Nov 2012, 04:28 PM
  3. Ceon URI Mapping (SEO)
    By conor in forum All Other Contributions/Addons
    Replies: 2906
    Last Post: 9 Sep 2011, 08:31 AM
  4. Ceon URI Mapping v4
    By conor in forum All Other Contributions/Addons
    Replies: 110
    Last Post: 14 Aug 2011, 02:51 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg