Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

[Contribution] Ultimate SEO URLs - by Chemo


Guest

Recommended Posts

Hello,

I installed the Ultimate_SEO_URLs_v2-2.2e and now when your viewing products if you try to go to the second page it just doesn't go anywhere.

 

You Can see what I am talking about here

 

http://www.bikewearhouse.com/cycling-caps-c-7.html

 

When you try to go to the next page nothing happens.

 

Any suggestions?? I would greatly appreciate any help, thank you in advance.

 

Daniel

Link to comment
Share on other sites

  • Replies 1.9k
  • Created
  • Last Reply

Top Posters In This Topic

Tryed to instal this on CRE Loaded wich is basicly a OSC moded and didn't got the same sintax , i found a version 2.0b if i recall good, and had some problems because the CRE 6.2 code was diferent on one file

 

STEP 4 - Edit *catalog*/includes/functions/html_output.php

 

function tep_href_link($page = '', $parameters = '', $connection = 'NONSSL', $add_session_id = true, $search_engine_safe = true) {

global $request_type, $session_started, $SID, $spider_flag;

 

if (!tep_not_null($page)) {

die('</td></tr></table></td></tr></table><br><br><font color="#ff0000"><b>Error!</b></font><br><br><b>Unable to determine the page link!<br><br>');

}

 

if ($connection == 'NONSSL') {

$link = HTTP_SERVER . DIR_WS_HTTP_CATALOG;

} elseif ($connection == 'SSL') {

if (ENABLE_SSL == true) {

$link = HTTPS_SERVER . DIR_WS_HTTPS_CATALOG;

} else {

$link = HTTP_SERVER . DIR_WS_HTTP_CATALOG;

}

} else {

die('</td></tr></table></td></tr></table><br><br><font color="#ff0000"><b>Error!</b></font><br><br><b>Unable to determine connection method on a link!<br><br>Known methods: NONSSL SSL</b><br><br>');

}

 

if (tep_not_null($parameters)) {

$link .= $page . '?' . tep_output_string($parameters);

$separator = '&';

} else {

$link .= $page;

$separator = '?';

}

 

while ( (substr($link, -1) == '&') || (substr($link, -1) == '?') ) $link = substr($link, 0, -1);

 

// Add the session ID when moving from different HTTP and HTTPS servers, or when SID is defined

if ( ($add_session_id == true) && ($session_started == true) && (SESSION_FORCE_COOKIE_USE == 'False') ) {

if (tep_not_null($SID)) {

$_sid = $SID;

} elseif ( ( ($request_type == 'NONSSL') && ($connection == 'SSL') && (ENABLE_SSL == true) ) || ( ($request_type == 'SSL') && ($connection == 'NONSSL') ) ) {

if (HTTP_COOKIE_DOMAIN != HTTPS_COOKIE_DOMAIN) {

$_sid = tep_session_name() . '=' . tep_session_id();

}

}

}

 

if ( (SEARCH_ENGINE_FRIENDLY_URLS == 'true') && ($search_engine_safe == true) ) {

while (strstr($link, '&&')) $link = str_replace('&&', '&', $link);

 

$link = str_replace('?', '/', $link);

$link = str_replace('&', '/', $link);

$link = str_replace('=', '/', $link);

 

$separator = '?';

}

 

if (isset($_sid) && !$spider_flag) {

$link .= $separator . $_sid;

}

 

return $link;

}

 

This does not longer look like this in CRE 6.2 , but cuted a little bit , inserted the new code and works.

 

BUT: i've seen it gets a big big probelem , products urls inside a category go to same page not to products!

 

So we are here

 

I think the old urls are because of chache , they will come clean on linux server!

 

and clicking on a product (movie in example) takes as...to the same url , not to the product url , but click from front page or infobox thakes us to the product url , so that works! Anybody got a fix for my problem! Need it badly and soon! Hope someone can help me! Thanks & sry 4 my english!

 

Links for products inside of category listing look like this

Edited by maryus
Link to comment
Share on other sites

I'm currently rebuilding my "version" of osCommerce to RC1 and today noticed that sorting was not working so I thought it may help others if I report my findings . .

 

Version: seo.class 2-2.2e

 

symptom:

Product listing sorting functions not working.

 

Identified cause:

$HTTP_GET_VARS['sort'] and $HTTP_GET_VARS['page'] going missing due to validation redirects in includes/classes/seo.class.php 2-2.2e.

 

Temporary solution:

 

I just commented out all lines starting with $this->ValidateName as the function Validatename was dropping the sort and page vars on header redirect.

 

This is obviously a temporary hack as functionality has been lost.

 

Was anyone else getting this? or is just a symptom of my modded version?

Edited by Babygurgles
Link to comment
Share on other sites

Search and replace might be an option?

 

$HTTP_GET_VARS -> $_GET

$HTTP_POST_VARS -> $_POST

 

 

Hi Jan

 

Not sure what you mean tbh .. function Validatename is redirecting the header without the $_GET, $HTTP_GET_VARS (['sort'] and ['page']) so to my mind unless the function is reworked to identify and rebuild these onto the querystring it's just not going to work while this function is being used.

 

Rob

Link to comment
Share on other sites

Not sure what you mean tbh .. function Validatename is redirecting the header without the $_GET, $HTTP_GET_VARS (['sort'] and ['page']) so to my mind unless the function is reworked to identify and rebuild these onto the querystring it's just not going to work while this function is being used.

I see what you mean. No clue how to do that though.

Link to comment
Share on other sites

I see what you mean. No clue how to do that though.

 

Thanks for the "move" Jan

Link to comment
Share on other sites

G'day

 

Everything works fine until... I give a product an attribute (option) and then add it to my cart. The link in the cart (and on shopping cart php) does not get SEO friendlied

 

ie http://www.botanicfanatic.com/appleberrycard-p-28.html

 

Add it to your cart

 

Both the link back to Appleberry Card in the cart at left and on shopping cart php points to http://www.botanicfanatic.com/product_info...ucts_id=28{1}14

 

Any ideas?

 

I had this issue with 2-2.2e and other previous versions.

 

Please note that I am testing on PHP5 and MySQL 5 (strict mode) and the problem may simply be related to this.

 

To clarify ..

 

If you add a product to cart that has no attributes . . when you view cart the links back to the product are SEO links and are fine.

 

If however you add a product to cart and it has attributes .. when you view cart the links are not SEO links .. this is happening because seo.class.php is not converting the uprid (e.g. 28{1}14) to a product_id (in this case 28).

These links look like .. products_id=28{1}14

 

Below is how I have got around the problem, but please be aware that I have not exhaustively checked for any untoward behaviour this may cause.

 

Find ..

 

case ( $page == FILENAME_PRODUCT_INFO && !$this->is_attribute_string($p2[1]) ):
						$url = $this->make_url($page, $this->get_product_name($p2[1]), $p2[0], $p2[1], '.html', $separator);
						break;

 

Replace with ..

 

						case ( $page == FILENAME_PRODUCT_INFO):
												 if ($this->is_attribute_string($p2[1])) {  // Hack to allow products with attributes to have correct link in shopping_cart.php
												 $p2[1] = tep_get_prid($p2[1]);
												 } // End hack
						$url = $this->make_url($page, $this->get_product_name($p2[1]), $p2[0], $p2[1], '.html', $separator);
						break;
						//$this->ValidateName($url, "p", $p2[1], @$connection, $separator); // Only for 2-2.2e

Link to comment
Share on other sites

Hello All,

I have installed this and everything is working except the admin page is now blank.

 

I looked back through the last 70 something post but have not found anything. I even double checked my code.

I have run out of ideas. Anybody got any ideas where to start ?

 

I get a : The server encountered an internal error or misconfiguration and was unable to complete your request.

when I add : php_flag display_errors onphp_value error_reporting 7 to my .htaccess file

 

Thanks tim

How to secure your site. A must read

Link to comment
Share on other sites

Hi,

 

I have successfully installed Ultimate SEO Urls. Great contrib, btw. The URL rewriting works fine. But now, I have the old links still indexed in google, and I was wondering if anyone could tell me the code to permanently redirect the old (invalid) URLs to the new ones. An example:

 

The product's name is "Article 300 cm"

 

Old URL indexed:

product_info.php/pName/article-300-cm

 

new URL non-indexed:

article-300-cm-p-118.html

 

What do I have to add into the Ulitmate SEO URLs .htaccess to have the links updated?

 

Thanks in advance for helping.

Link to comment
Share on other sites

Neater fix/hack to the sort functions not working when using seo.class.php version 2-2.2e

 

This should leave the validation functionality working unless there is a sort going on whereby validation is bypassed.

 

Please note this is still a hack and hopefully a new version will be forthcoming that will deal with the "sort= querystring" within the validation code.

 

 

Find ..

 

	if ((@strpos($parts[count($parts) - 2], $type)) !== FALSE)  //make sure it is the correct type for this link
{

 

Replace with ..

 

// Commented out to bypass validation when sort= exists in the querystring
//	if ((@strpos($parts[count($parts) - 2], $type)) !== FALSE)  //make sure it is the correct type for this link
//	{
// HACK - replaces above code
if ( ((@strpos($parts[count($parts) - 2], $type)) !== FALSE) && (($sort_exists = strpos($origUrl, "sort=") == FALSE)) ) //make sure it is the correct type for this link
{
// END HACK

Link to comment
Share on other sites

Hi

 

I have a relatively new store

 

With SEO urls active the site is so slow - almost unusable

 

http://www.ollysguitar.com

 

If I go into the control panel and disable them it is nice and quick again,

 

How can I get around this issue? Have I done something wrong?

 

I had the same problem and I noticed it was because I had some "tm" (trademarks) and "®" in my product description. It was having trouble with those. Once I removed those from the desc. it was fast again.

 

Not sure if it is the same problem for you but might help.

 

Tim

How to secure your site. A must read

Link to comment
Share on other sites

Hello there I recently added a contribution to my web site Ultimate SEO URLs . My web site has also been down for a few days but I have now managed to get it back up and working again.

 

I thought I everything was working but today I went to one of my product pages and as there is so many items on that page it gives you a 1,2,3 at the bottom of the page to select the next page but this does not seem to be working. I click on page 2 or next >> but it will not take me to the next page. If there is anybody that would be able to help me out with this I would be very great full. I have looked and seen somebody else has had the same problem but I'm not sure what the answer was.

 

Regards

Ian

Edited by webstarter
Link to comment
Share on other sites

I have tried a few things now but none of them seem to work is there anybody that can help me with the problem below.

 

Thanks

Regards

Ian :thumbsup:

 

 

Hello there I recently added a contribution to my web site Ultimate SEO URLs . My web site has also been down for a few days but I have now managed to get it back up and working again.

 

I thought I everything was working but today I went to one of my product pages and as there is so many items on that page it gives you a 1,2,3 at the bottom of the page to select the next page but this does not seem to be working. I click on page 2 or next >> but it will not take me to the next page. If there is anybody that would be able to help me out with this I would be very great full. I have looked and seen somebody else has had the same problem but I'm not sure what the answer was.

 

Regards

Ian

Link to comment
Share on other sites

I have tried a few things now but none of them seem to work is there anybody that can help me with the problem below.

 

Thanks

Regards

Ian :thumbsup:

 

I'm having the same issue on my site, but only on the product_listing.php - products_new.php and all the others sort fine. I guess I don't really understand how the SEO is working, but the only inconsistancy I can find is the extension on the pages - product_listing.php is .html (not sure why?) while all of the other pages that might need sorting are .php

 

example of product_listing.php (not working correctly): http://www.store.commoto.com/monster-bodyw...-15_28_108.html

 

example of products_new.php (working correctly): http://www.store.commoto.com/products_new.php?page=1

 

example of allprods.php (working correctly): http://www.store.commoto.com/allprods.php

 

 

Maybe I'm a total goof Babygurgles, but I could not find the code you suggested replacing in any of the files involving SEO.

 

Thanks for any help!

Link to comment
Share on other sites

Maybe I'm a total goof Babygurgles, but I could not find the code you suggested replacing in any of the files involving SEO.

 

Thanks for any help!

 

The search to replace should have been ..

 

	if ((strpos($parts[count($parts) - 2], $type)) !== FALSE)  //make sure it is the correct type for this link
{

 

In catalog/includes/classes/seo.class.php.

 

However you didn't look very hard it was only a @ making the difference.

Edited by Babygurgles
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...