Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

[CONTRIBUTION] Ultimate SEO URLs v2.1 - by Chemo


Recommended Posts

I've been trying to figure out a solution to a problem I've got. I've got a store I'm working on that I need to add "biography-artwork" to the the SEO URL's for the manufacturers portion of the code only, such that a URL from clicking on the manufacturer's list box would read

 

domain.com/artist-name-biography-artwork-m-15.html for example.

 

I know the technically that I could just add it into the database but then having biography-artwork tacked on to all the artists names through out the store is pretty tacky and I figure hard coding it into the SEO URL COde somehow may be the best option.

 

With my very limited php I went into the seo-class.php in includes and was able to add the text easily into the URL's in '.html' portion of the case statement although the link refused to work.

 

Is this possible to "hard code" this text string into the existing code somehow and make it work?

 

Any help would be greatly appreciated.

 

Thanks

Travis

Travis,

 

I've done something like this, though it was just to change '-p-' to '.p', but I believe the fix is essentially the same:

 

In [catalog/]includes/classes/seo.class.php, (around line 585)

 

Find:

		$this->reg_anchors = array('products_id' => '-p-',
							   'cPath' => '-c-',
							   'manufacturers_id' => '-m-',

Change it to:

		$this->reg_anchors = array('products_id' => '-p-',
							   'cPath' => '-c-',
							   'manufacturers_id' => '-biography-artwork-m-',

 

In [catalog/].htaccess

 

find:

RewriteRule ^(.*)-m-([0-9]+).html$ index.php?manufacturers_id=$2&%{QUERY_STRING}

 

Change it to

RewriteRule ^(.*)-biography-artwork-m-([0-9]+).html$ index.php?manufacturers_id=$2&%{QUERY_STRING}

 

I think it should work.

 

-Skittles

Link to comment
Share on other sites

How are they broken? Give an example. For instance, when you click on one, does it come to "page not found"? if that is the case, make sure you have followed the instructions for the .htaccess file.

 

 

Hello

 

It is the 404 page not found:

 

Not Found
The requested URL /shop/details.php was not found on this server.

Apache/1.3.33 Server at 192.168.0.9 Port 80

 

 

My htaccess is:

 

 

Options +FollowSymLinks
RewriteEngine On 
RewriteBase /shop/

[code]RewriteRule ^(.*)-p-(.*).html$ details.php?products_id=$2&%{QUERY_STRING}
RewriteRule ^(.*)-c-(.*).html$ index.php?cPath=$2&%{QUERY_STRING}
RewriteRule ^(.*)-m-([0-9]+).html$ index.php?manufacturers_id=$2&%{QUERY_STRING}
RewriteRule ^(.*)-pi-([0-9]+).html$ popup_image.php?pID=$2&%{QUERY_STRING}
RewriteRule ^(.*)-t-([0-9]+).html$ articles.php?tPath=$2&%{QUERY_STRING}
RewriteRule ^(.*)-a-([0-9]+).html$ article_info.php?articles_id=$2&%{QUERY_STRING}
RewriteRule ^(.*)-pr-([0-9]+).html$ product_reviews.php?products_id=$2&%{QUERY_STRING}
RewriteRule ^(.*)-pri-([0-9]+).html$ product_reviews_info.php?products_id=$2&%{QUERY_STRING}
RewriteRule ^(.*)-i-([0-9]+).html$ information.php?info_id=$2&%{QUERY_STRING}

 

I always have the same problem my links are broken, I do not succeed in using this contrib :'(

 

 

I even performed following modification but he doesn't work:

 

in my local server \EasyPHP1-8\apache\conf\httpd

delete the # in :LoadModule rewrite_module modules/mod_rewrite.so and AddModule mod_rewrite.c

 

:blush:

Link to comment
Share on other sites

Travis,

 

I've done something like this, though it was just to change '-p-' to '.p', but I believe the fix is essentially the same:

 

In [catalog/]includes/classes/seo.class.php, (around line 585)

 

Find:

		$this->reg_anchors = array('products_id' => '-p-',
							   'cPath' => '-c-',
							   'manufacturers_id' => '-m-',

Change it to:

		$this->reg_anchors = array('products_id' => '-p-',
							   'cPath' => '-c-',
							   'manufacturers_id' => '-biography-artwork-m-',

 

In [catalog/].htaccess

 

find:

RewriteRule ^(.*)-m-([0-9]+).html$ index.php?manufacturers_id=$2&%{QUERY_STRING}

 

Change it to

RewriteRule ^(.*)-biography-artwork-m-([0-9]+).html$ index.php?manufacturers_id=$2&%{QUERY_STRING}

 

I think it should work.

 

-Skittles

 

Thanks a ton. Its working perfectly with 1 small change. I got rid of "([0-9]+)" in the .htaccess file, it came to life.

 

Travis

Link to comment
Share on other sites

Hi,

 

I installed this contribution a few days ago and everything seemed to work fine. But when I checked today I cannot add items to my sites shopping cart.

 

I know what the problem is its the amp; in add cart url. But I do not know how to remove it. I have installed the amp; contribution but I think this error is a little diffrent. The url is below:

http://www.mysite.ca/product-info-p-608.html?op=list&osCsid=6431ae57e284c3b0a3740c3919e625da

This happens after I click on the Add to Cart Button

 

If someone can point me in the right direction that would be great as I have been at it all day!

 

 

Can anyone help me with the above problem. It is the only link of the site that has the problem that is why I cant figure it out. I have the latest version 2.1d installed so I have no clue why its doing it. If anyone can help that would be great.

 

Thanks,

Jamie

Link to comment
Share on other sites

Hi there,

 

Just upgrading an install from Ultimate_SEO_URLs_v2.2.2.tar.gz to Ultimate_SEO_URLsv21da and have run into an issue.

 

Everything seems fine in the admin. I can enter what I'd like for products and categories but on the frontend only the product displays what I'm looking for and the categories show urls in this form:

 

/-c-1.html

 

Replacing /includes/classes/seo.class.php with the file from the 2.2.2 archive returns the "generic" listing for a given category ie

 

/hardware-c-1.html

 

and products still return the custom entry.

 

I'm running PHP5.

 

Is this a known issue with 2.1d with PHP5 or should I suspect I've missed something (although I've been over it several times already so I'm reasonably sure it's correct)?

 

Thanks,

Iggy

Everything's funny but nothing's a joke...

Link to comment
Share on other sites

Sorry for the multiple posts but below is the code that I have for the add to cart button. Maybe someone can see the problem in there.

 

product_info.php
<td class="main" align="right"><?php echo TEXT_QUANTITY . tep_draw_input_field('quantity', '1', 'SIZE=2 maxlength=2') . tep_draw_separator('pixel_trans.gif', '5', '1') . tep_draw_hidden_field('products_id', $product_info['products_id']) . tep_image_submit('button_in_cart.gif', IMAGE_BUTTON_IN_CART, 'align=absmiddle'); ?></td>

application_top.php
$cart->add_cart($HTTP_POST_VARS['products_id'], $cart->get_quantity(tep_get_uprid($HTTP_POST_VARS['products_id'], $HTTP_POST_VARS['id']))+ (int)$HTTP_POST_VARS['quantity'], $HTTP_POST_VARS['id']);

 

Thanks,

Jamie

Link to comment
Share on other sites

Hi there,

 

Just upgrading an install from Ultimate_SEO_URLs_v2.2.2.tar.gz to Ultimate_SEO_URLsv21da and have run into an issue.

 

Everything seems fine in the admin. I can enter what I'd like for products and categories but on the frontend only the product displays what I'm looking for and the categories show urls in this form:

 

/-c-1.html

 

Replacing /includes/classes/seo.class.php with the file from the 2.2.2 archive returns the "generic" listing for a given category ie

 

/hardware-c-1.html

 

and products still return the custom entry.

 

I'm running PHP5.

 

Is this a known issue with 2.1d with PHP5 or should I suspect I've missed something (although I've been over it several times already so I'm reasonably sure it's correct)?

 

Thanks,

Iggy

 

Hrrrm,

 

So running through the two files it seems to be this set of calls starting at line 975 that's not returning a value. MySQL 5 issue?

 

						 $sql = "SELECT cd.categories_seo_url, c.categories_id, c.parent_id, cd.categories_name as cName, cd2.categories_name as pName  
							  FROM ".TABLE_CATEGORIES." c, 
							  ".TABLE_CATEGORIES_DESCRIPTION." cd 
							  LEFT JOIN ".TABLE_CATEGORIES_DESCRIPTION." cd2 
							  ON c.parent_id=cd2.categories_id AND cd2.language_id='".(int)$this->languages_id."' 
							  WHERE c.categories_id='".(int)$single_cID."' 
							  AND cd.categories_id='".(int)$single_cID."' 
							  AND cd.language_id='".(int)$this->languages_id."' 
							  LIMIT 1";
					  $result = $this->DB->FetchArray( $this->DB->Query( $sql ) );
					  if($result['categories_seo_url'] != '')
					  {
						$cName = $this->not_null($result['pName']) ? $result['pName'] . ' ' . $result['categories_seo_url'] : $result['categories_seo_url'];
					  }
					  else
					  {
						$cName = $this->not_null($result['pName']) ? $result['pName'] . ' ' . $result['cName'] : $result['cName'];						  
					  }	

					break;
				default:

					  $sql = "SELECT categories_name as cName, categories_seo_url as csu 
							  FROM ".TABLE_CATEGORIES_DESCRIPTION." 
							  WHERE categories_id='".(int)$single_cID."' 
							  AND language_id='".(int)$this->languages_id."' 
							  LIMIT 1";
					  $result = $this->DB->FetchArray( $this->DB->Query( $sql ) );
					  if($result['csu'] != '')
					  {
						$cName = $result['csu'];
					  }
					  else
					  {
						$cName = $result['cName'];						  
					  }

 

For comparison here's the same section from Chemo's 2.2.2

 

						$sql = "SELECT c.categories_id, c.parent_id, cd.categories_name as cName, cd2.categories_name as pName  
							FROM ".TABLE_CATEGORIES." c
							JOIN ".TABLE_CATEGORIES_DESCRIPTION." cd 
							ON c.categories_id = cd.categories_id
							LEFT JOIN ".TABLE_CATEGORIES_DESCRIPTION." cd2 
							ON c.parent_id=cd2.categories_id AND cd2.language_id='".(int)$this->languages_id."' 
							WHERE c.categories_id='".(int)$single_cID."' 
							AND cd.categories_id='".(int)$single_cID."' 
							AND cd.language_id='".(int)$this->languages_id."' 
							LIMIT 1";
					$result = $this->DB->FetchArray( $this->DB->Query( $sql ) );
					$cName = $this->not_null($result['pName']) ? $result['pName'] . ' ' . $result['cName'] : $result['cName'];
					break;
				default:
					$sql = "SELECT categories_name as cName 
							FROM ".TABLE_CATEGORIES_DESCRIPTION." 
							WHERE categories_id='".(int)$single_cID."' 
							AND language_id='".(int)$this->languages_id."' 
							LIMIT 1";
					$result = $this->DB->FetchArray( $this->DB->Query( $sql ) );
					$cName = $result['cName'];

 

Iggy

Everything's funny but nothing's a joke...

Link to comment
Share on other sites

Iggy,

 

This has been covered numerous times in this thread. I just don't understand ;) why you haven't been able to find the answer somewhere in the previous 88 :wacko: pages... (I'm being facetious...)

 

I think it's time for someone with spare time to incorporate the fix into a new release! (Anybody got some spare time? (w00t) Yeah, that's what I thought.)

 

There is an updated seo.class.php file available in the downloads area. Just replace the existing file with the new file and your problem should go away! Cool, huh?

 

Here's the link: http://www.oscommerce.com/community/contributions,2823/

 

And you're looking for "Fixed seo.class.php" by jpweber, released 25 Nov 2006

 

Have fun,

-Skittles :)

Link to comment
Share on other sites

I just finished installing Ultimate SEO on my test site. My test site is a subdirectory of my main site. Main site is http://mysite, the test site is http://mysite/testsite (not their real names).

 

From my test home page all links are fine, then point at http://mysite/testsite/page.php. That is, they link me to the correct page on my test site. When I go to my catalog page that lists my product (used to be product_list.php but now is catalog-subcatalog-c-32_21.html) all the links including the navigation bar links now point to http://mysite/page.php. That is they now link me to my main site rather then my test site. I checked all the confige.php file and they are all correct.

Link to comment
Share on other sites

I just finished installing Ultimate SEO on my test site. My test site is a subdirectory of my main site. Main site is http://mysite, the test site is http://mysite/testsite (not their real names).

 

From my test home page all links are fine, then point at http://mysite/testsite/page.php. That is, they link me to the correct page on my test site. When I go to my catalog page that lists my product (used to be product_list.php but now is catalog-subcatalog-c-32_21.html) all the links including the navigation bar links now point to http://mysite/page.php. That is they now link me to my main site rather then my test site. I checked all the confige.php file and they are all correct.

Link to comment
Share on other sites

Can anyone help me with the above problem. It is the only link of the site that has the problem that is why I cant figure it out. I have the latest version 2.1d installed so I have no clue why its doing it. If anyone can help that would be great.

 

Thanks,

Jamie

Hi Jamie,

 

Like the solution to Iggy's problem (posted on the previous page), this question (and the answer) keeps showing up in this thread. But finding the posts with the answer is like finding a needle in a haystack, with nearly 1800 posts to browse through... :blink:

 

You need to go to the download page here: http://www.oscommerce.com/community/contributions,2823/

 

And download the fix for this problem. There are two, actually:

"fixed: redirection &Param=" by edgecrush3r, released 9 May 2006

Removes the use of 'htmlspecialchars' from the href_link() and stock_href_link() functions.

and

"Redirects shouldn't have &'s in them" by bchecketts, released 1 Jan 2006

Processes the resulting url and replaces the "&" with "&" before returning it.

I think either one should do the trick, although bchecketts' solution lets other html characters be converted. At this time, I have no bias towards one way or the other.

 

Have fun!

-Skittles

Edited by Skittles
Link to comment
Share on other sites

Iggy,

 

This has been covered numerous times in this thread. I just don't understand ;) why you haven't been able to find the answer somewhere in the previous 88 :wacko: pages... (I'm being facetious...)

 

I think it's time for someone with spare time to incorporate the fix into a new release! (Anybody got some spare time? (w00t) Yeah, that's what I thought.)

 

There is an updated seo.class.php file available in the downloads area. Just replace the existing file with the new file and your problem should go away! Cool, huh?

 

Here's the link: http://www.oscommerce.com/community/contributions,2823/

 

And you're looking for "Fixed seo.class.php" by jpweber, released 25 Nov 2006

 

Have fun,

-Skittles :)

 

Excellent! Thanks Skittles!

 

So now it's returning the result the regular category result but not the custom. Looks like it's mostly a matter of the fixed file not having the if/else statement?

 

Fixed seo.class.php

						$sql = "SELECT c.categories_id, c.parent_id, cd.categories_name as cName, cd2.categories_name as pName  
							FROM ".TABLE_CATEGORIES." c
							JOIN ".TABLE_CATEGORIES_DESCRIPTION." cd 
							ON c.categories_id = cd.categories_id
							LEFT JOIN ".TABLE_CATEGORIES_DESCRIPTION." cd2 
							ON c.parent_id=cd2.categories_id AND cd2.language_id='".(int)$this->languages_id."' 
							WHERE c.categories_id='".(int)$single_cID."' 
							AND cd.categories_id='".(int)$single_cID."' 
							AND cd.language_id='".(int)$this->languages_id."' 
							LIMIT 1";
					$result = $this->DB->FetchArray( $this->DB->Query( $sql ) );
					$cName = $this->not_null($result['pName']) ? $result['pName'] . ' ' . $result['cName'] : $result['cName'];
					break;
				default:
					$sql = "SELECT categories_name as cName 
							FROM ".TABLE_CATEGORIES_DESCRIPTION." 
							WHERE categories_id='".(int)$single_cID."' 
							AND language_id='".(int)$this->languages_id."' 
							LIMIT 1";
					$result = $this->DB->FetchArray( $this->DB->Query( $sql ) );
					$cName = $result['cName'];

 

2.1d

						 $sql = "SELECT cd.categories_seo_url, c.categories_id, c.parent_id, cd.categories_name as cName, cd2.categories_name as pName  
							  FROM ".TABLE_CATEGORIES." c, 
							  ".TABLE_CATEGORIES_DESCRIPTION." cd 
							  LEFT JOIN ".TABLE_CATEGORIES_DESCRIPTION." cd2 
							  ON c.parent_id=cd2.categories_id AND cd2.language_id='".(int)$this->languages_id."' 
							  WHERE c.categories_id='".(int)$single_cID."' 
							  AND cd.categories_id='".(int)$single_cID."' 
							  AND cd.language_id='".(int)$this->languages_id."' 
							  LIMIT 1";
					  $result = $this->DB->FetchArray( $this->DB->Query( $sql ) );
					  if($result['categories_seo_url'] != '')
					  {
						$cName = $this->not_null($result['pName']) ? $result['pName'] . ' ' . $result['categories_seo_url'] : $result['categories_seo_url'];
					  }
					  else
					  {
						$cName = $this->not_null($result['pName']) ? $result['pName'] . ' ' . $result['cName'] : $result['cName'];						  
					  }	

					break;
				default:

					  $sql = "SELECT categories_name as cName, categories_seo_url as csu 
							  FROM ".TABLE_CATEGORIES_DESCRIPTION." 
							  WHERE categories_id='".(int)$single_cID."' 
							  AND language_id='".(int)$this->languages_id."' 
							  LIMIT 1";
					  $result = $this->DB->FetchArray( $this->DB->Query( $sql ) );
					  if($result['csu'] != '')
					  {
						$cName = $result['csu'];
					  }
					  else
					  {
						$cName = $result['cName'];						  
					  }

 

In the interest of full disclosure this is on a box running PHP 5.2.1 , MySQL 5.0.33 and register globals are off.

 

Thanks for any light you can shed!

 

Iggy

Edited by Iggy

Everything's funny but nothing's a joke...

Link to comment
Share on other sites

Hrrrm,

 

I guess the wierd part there is that it seems to test positive for a value but is failing to pass it in? Otherwise it would just do the else and give me the "generic" hardware-c-1

 

Hrrrm,

Iggy

Everything's funny but nothing's a joke...

Link to comment
Share on other sites

Hi Jamie,

 

Like the solution to Iggy's problem (posted on the previous page), this question (and the answer) keeps showing up in this thread. But finding the posts with the answer is like finding a needle in a haystack, with nearly 1800 posts to browse through... :blink:

 

You need to go to the download page here: http://www.oscommerce.com/community/contributions,2823/

 

And download the fix for this problem. There are two, actually:

"fixed: redirection &Param=" by edgecrush3r, released 9 May 2006

Removes the use of 'htmlspecialchars' from the href_link() and stock_href_link() functions.

and

"Redirects shouldn't have &'s in them" by bchecketts, released 1 Jan 2006

Processes the resulting url and replaces the "&" with "&" before returning it.

I think either one should do the trick, although bchecketts' solution lets other html characters be converted. At this time, I have no bias towards one way or the other.

 

Have fun!

-Skittles

 

Thanks so much, I assumed that these contributions would have been rolled into the new releases so I didn't really take a good look at them. It has fixed the problem and that makes me really happy! Thank you so much and your right trying to find things in the forum is very hard as it is a very popular place!

 

Thanks again and the SEO contribution is awsome!

Jamie

Link to comment
Share on other sites

Hi Skittles

 

Tanks very much for te reply, I'm now gonna see if I can install/Enable it.

 

Cheers

Shoja

 

Hi shoja,

 

It sounds like the problem is with mod_rewrite. Either your .htaccess file is not set up to rewrite the URLs, or mod_rewrite isn't set up on the server.

 

If your .htaccess file has been modified according to the install directions, then you need to get mod_rewrite working on your server. You should be able to get the tech-support guys from your web host to enable mod_rewrite for you.

 

Good luck,

-Skittles

Link to comment
Share on other sites

thank you! this did the trick :>)

 

 

Iggy,

 

This has been covered numerous times in this thread. I just don't understand ;) why you haven't been able to find the answer somewhere in the previous 88 :wacko: pages... (I'm being facetious...)

 

I think it's time for someone with spare time to incorporate the fix into a new release! (Anybody got some spare time? (w00t) Yeah, that's what I thought.)

 

There is an updated seo.class.php file available in the downloads area. Just replace the existing file with the new file and your problem should go away! Cool, huh?

 

Here's the link: http://www.oscommerce.com/community/contributions,2823/

 

And you're looking for "Fixed seo.class.php" by jpweber, released 25 Nov 2006

 

Have fun,

-Skittles :)

Link to comment
Share on other sites

Hrrrm,

 

I guess the wierd part there is that it seems to test positive for a value but is failing to pass it in? Otherwise it would just do the else and give me the "generic" hardware-c-1

 

Hrrrm,

Iggy

 

Double hrrrm,

 

Welp, works fine on a machine running PHP4/MySQL4 so the 5 version of either of those is the culprit. PHP5 would be my guess given the symptoms. I'll poke at it and see if I can get it fixed.

 

Thanks,

Iggy

Everything's funny but nothing's a joke...

Link to comment
Share on other sites

Double hrrrm,

 

Welp, works fine on a machine running PHP4/MySQL4 so the 5 version of either of those is the culprit. PHP5 would be my guess given the symptoms. I'll poke at it and see if I can get it fixed.

 

Thanks,

Iggy

 

Just one more post before I bail out for the evening. Perusing the thread (yes all 45 pages :) it looks like this is an unresolved issue.

 

Does anyone have 2.1d working on a PHP5/MySQL5 machine?

 

Again, just for reference the function to get the product name works fine

 * Function to get the product name. Use evaluated cache, per page cache, or database query in that order of precedent	
* @author Bobby Easland 
* @version 1.1
* @param integer $pID
* @return string Stripped anchor text
*/	
function get_product_name($pID){
	switch(true){
		case ($this->attributes['USE_SEO_CACHE_GLOBAL'] == 'true' && defined('PRODUCT_NAME_' . $pID)):
			$this->performance['CACHE_QUERY_SAVINGS']++;
			$return = constant('PRODUCT_NAME_' . $pID);
			$this->cache['PRODUCTS'][$pID] = $return;
			break;
		case ($this->attributes['USE_SEO_CACHE_GLOBAL'] == 'true' && isset($this->cache['PRODUCTS'][$pID])):
			$this->performance['CACHE_QUERY_SAVINGS']++;
			$return = $this->cache['PRODUCTS'][$pID];
			break;
		default:
			$this->performance['NUMBER_QUERIES']++;

			  $sql = "SELECT products_name as pName, products_seo_url as psu 
					  FROM ".TABLE_PRODUCTS_DESCRIPTION." 
					  WHERE products_id='".(int)$pID."' 
					  AND language_id='".(int)$this->languages_id."' 
					  LIMIT 1";
			  $result = $this->DB->FetchArray( $this->DB->Query( $sql ) );
			  if($result['psu'] != '')
			  {
				$pName = $this->strip( $result['psu'] );
			  }
			  else
			  {
				$pName = $this->strip( $result['pName'] );				  
			  }	

			$this->cache['PRODUCTS'][$pID] = $pName;
			$this->performance['QUERIES']['PRODUCTS'][] = $sql;
			$return = $pName;
			break;								
	} # end switch		
	return $return;
} # end function

 

The function to get the category name does not under PHP5/MySQL5

 

 * Function to get the category name. Use evaluated cache, per page cache, or database query in that order of precedent 
* @author Bobby Easland 
* @version 1.1
* @param integer $cID NOTE: passed by reference
* @return string Stripped anchor text
*/	
function get_category_name(&$cID){
	$full_cPath = $this->get_full_cPath($cID, $single_cID); // full cPath needed for uniformity
	switch(true){
		case ($this->attributes['USE_SEO_CACHE_GLOBAL'] == 'true' && defined('CATEGORY_NAME_' . $full_cPath)):
			$this->performance['CACHE_QUERY_SAVINGS']++;
			$return = constant('CATEGORY_NAME_' . $full_cPath);
			$this->cache['CATEGORIES'][$full_cPath] = $return;
			break;
		case ($this->attributes['USE_SEO_CACHE_GLOBAL'] == 'true' && isset($this->cache['CATEGORIES'][$full_cPath])):
			$this->performance['CACHE_QUERY_SAVINGS']++;
			$return = $this->cache['CATEGORIES'][$full_cPath];
			break;
		default:
			$this->performance['NUMBER_QUERIES']++;
			switch(true){
				case ($this->attributes['SEO_ADD_CAT_PARENT'] == 'true'):
					 $sql = "SELECT cd.categories_seo_url, c.categories_id, c.parent_id, cd.categories_name as cName, cd2.categories_name as pName  
							  FROM ".TABLE_CATEGORIES." c, 
							  ".TABLE_CATEGORIES_DESCRIPTION." cd 
							  LEFT JOIN ".TABLE_CATEGORIES_DESCRIPTION." cd2 
							  ON c.parent_id=cd2.categories_id AND cd2.language_id='".(int)$this->languages_id."' 
							  WHERE c.categories_id='".(int)$single_cID."' 
							  AND cd.categories_id='".(int)$single_cID."' 
							  AND cd.language_id='".(int)$this->languages_id."' 
							  LIMIT 1";
					  $result = $this->DB->FetchArray( $this->DB->Query( $sql ) );
					  if($result['categories_seo_url'] != '')
					  {
						$cName = $this->not_null($result['pName']) ? $result['pName'] . ' ' . $result['categories_seo_url'] : $result['categories_seo_url'];
					  }
					  else
					  {
						$cName = $this->not_null($result['pName']) ? $result['pName'] . ' ' . $result['cName'] : $result['cName'];						  
					  }	

					break;
				default:

					  $sql = "SELECT categories_name as cName, categories_seo_url as csu 
							  FROM ".TABLE_CATEGORIES_DESCRIPTION." 
							  WHERE categories_id='".(int)$single_cID."' 
							  AND language_id='".(int)$this->languages_id."' 
							  LIMIT 1";
					  $result = $this->DB->FetchArray( $this->DB->Query( $sql ) );
					  if($result['csu'] != '')
					  {
						$cName = $result['csu'];
					  }
					  else
					  {
						$cName = $result['cName'];						  
					  }


					break;
			}										
			$cName = $this->strip($cName);
			$this->cache['CATEGORIES'][$full_cPath] = $cName;
			$this->performance['QUERIES']['CATEGORIES'][] = $sql;
			$return = $cName;
			break;								
	} # end switch		
	$cID = $full_cPath;
	return $return;
} # end function

 

Thanks,

Iggy

Everything's funny but nothing's a joke...

Link to comment
Share on other sites

Hi Skittles

 

Tanks very much for te reply, I'm now gonna see if I can install/Enable it.

 

Cheers

Shoja

 

Hi Skittles,

 

mod_rewrite WAS installed and enabled, looking into your other posts regarding this matter I realized that I need to edit my httpd.conf to AllowOverride,

did that and its working now.

 

Thanks again.

Shoja

Link to comment
Share on other sites

Regarding my posts above involving USU 2.1d and PHP5 it looks like scanditan solved that (and with only having to change 2 lines of code in 2 sql statements. Niiiiice.)

 

Now my only issue is when USU is set false in the admin I get "Too many redirects" and the page fails to load. No issues at all when enabled.

 

Any ideas? Removing the htaccess file entirely yields the same result.

 

Thanks,

Iggy

Edited by Iggy

Everything's funny but nothing's a joke...

Link to comment
Share on other sites

I'm finally making progress. I have v 2.1d posted by Yesudo on 25Nov2006 and Randelia's fix working on my test site. This is on a local install with Xampp. Have mod rewrite and htaccess configured. (Hopefully correct) I've also tried the seoclass fix for category names.

 

Product urls are fine. No probs with session ids. I have cat name in URL enabled. Category name shows on mouse over of category. Does not show in seo product url.

 

I have several questions:

 

1. How do I get the category name to show in the product url?

 

2. Have I missed a fix somewhere?

 

Any help appreciated!

Link to comment
Share on other sites

I'm experiencing missing product and category names this is AFTER it was working good for a while.

 

The "Fixed seo.class.php" by jpweber, released 25 Nov 2006 DID NOT work for me.

 

Not sure what else to do? Can anyone suggest? all I see is: '-c-21_97.html' etc for URLs.

Link to comment
Share on other sites

Hi Guy's,

 

Where have I gone wrong?

 

I have a site on one server which is running okay with this contrib :)

 

However...

 

I have a second site of which I have duplicated all the files, but the SEO URL's don't work :(

 

The site generates the correct URL (same as the good site), but I get the following error

Not Found

The requested URL /catalog/bikes-c-58.html was not found on this server.

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.

Can anyone give me an idea of whats gone wrong please?

 

In admin I can switch off this contrib to run with the original URL's, but perfer to have the proper SEO URL's

 

Thanks in advance to all

 

Steve

____________________________________________________________________

____________________________________________________________________

Link to comment
Share on other sites

Okay, bit of progress...

 

I've taken a look at the files in the 'cache' folder and found the full URL of the original site, so currently updating all the files to the second sites URL. Then I'll try uploading and try again.

 

How can I get the system to renew the cache files? I've already tried the 'Reset SEO URLs Cache' option in admin, but that dosn't seem to have any effect.

 

Any guidence please?

____________________________________________________________________

____________________________________________________________________

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...