Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

[Contribution] Ultimate SEO URLs v2.0


Guest

Recommended Posts

Chris,

 

Sounds like a good test to me! :)

 

I would recommend leaving it in place since it is critical that all old links resolve. If they enter the store with a new SEO URL it does not execute any code so over time it will not add any more processing overhead. However, it does add a lot a assurance!

 

Bobby

Link to comment
Share on other sites

  • Replies 89
  • Created
  • Last Reply

Top Posters In This Topic

FYI, I've installed the Redirect .php file (beta 3) and it seems to work great.  Here's what I did to test (let me know if I should test it another way):

 

Before installing I looked for the old style links in Yahoo and Google and clicked them to confirm that I would go to the "Product not found page." on my site.  Then I installed your file, and re-clicked the same links, as well as a bunch of others, and I was redirected to the correct product page with the new SEO URLs displayed!  Seems to work!  Worked great for products and for category listings.

 

So I guess I could take this include out of application_top.php after a few months, right?  What do you recommend?  Does it slow things down to leave it in?  If not, maybe just leave it there?

 

-Chris.

 

another thing i can suggest is checking the search engines' indexes of your pages in a few months and see if they've updated... i know that on google and msn this works, and i would imagine that the others may have something similar, but since a ton of minor engines pull their results from these 2, you won't have to worry about them... if you do a search for "site:<domain name>" it'll show you all of the pages it has in its index for that site (including those of less than 4 pagerank in the case of google, which doesn't display those in normal results), so in the case of my own site, a search for this:

 

site:allthingschildren.com

 

only shows me like 2 pages on google, and only about 25 on msn (hey, we're only a week old :D), and if you check those in a few months you'll be able to see if the urls have the old-style format or if they've reindexed w/ the new one...

 

now because this doesn't work on all engines probably, and like chemo said, it doesn't add any overhead, you may want to leave it in like he suggested, but if you keep feeling the itch to take it out, you can check some of the search engines w/ the method i showed above :)

 

Richard Lindsey.

Richard Lindsey

Link to comment
Share on other sites

Bobby,

 

This question fits better in the PageCache support thread, but since I can't find it, and since the question also involves Ultimate SEOs as well, I'll ask it here. :)

 

During installation of PageCache 1.5, I get to the instructions to change:

 

if (isset($_sid)) {
  $link .= $separator . $_sid;
}

To this:

if (isset($_sid)) {
  $link .= $separator . $_sid;
  $seo_link .= $separator . $_sid;
  $seo_rewrite_link .= $separator . $_sid;
}

But since I have Ultimate SEO URLs installed, my code actually looked like this (and not the code above):

if (!tep_session_is_registered('customer_id') && ENABLE_PAGE_CACHE == 'true' && class_exists('page_cache')) {
  $link .= $separator . '<osCsid>';
} elseif (isset($_sid)) {
  $link .= $separator . $_sid;
}

So, I made some assumptions and changed my code to this instead:

if (!tep_session_is_registered('customer_id') && ENABLE_PAGE_CACHE == 'true' && class_exists('page_cache')) {
  $link .= $separator . '<osCsid>';
} elseif (isset($_sid)) {
  $link .= $separator . $_sid;
  $seo_link .= $separator . $_sid;  // New line
  $seo_rewrite_link .= $separator . $_sid;  // New line
}

I hope what I'm asking makes sense to you. Does this logic look correct? Everything seems to work but I'm worried that it may not be right.

 

-Chris.

Link to comment
Share on other sites

Sorry, I messed up on the code order. Here's the correct order:

 

During installation of PageCache 1.5, I get to the instructions to change:

if (isset($_sid)) {
? $link .= $separator . $_sid;
}

To this:

if (!tep_session_is_registered('customer_id') && ENABLE_PAGE_CACHE == 'true' && class_exists('page_cache')) {
  $link .= $separator . '<osCsid>';
} elseif (isset($_sid)) {
  $link .= $separator . $_sid;
}

But since I have Ultimate SEO URLs installed, my code actually looked like this (and not the code above):

if (isset($_sid)) {
  $link .= $separator . $_sid;
  $seo_link .= $separator . $_sid;
  $seo_rewrite_link .= $separator . $_sid;
}

So, I made some assumptions and changed my code to this instead:

if (!tep_session_is_registered('customer_id') && ENABLE_PAGE_CACHE == 'true' && class_exists('page_cache')) {
? $link .= $separator . '<osCsid>';
} elseif (isset($_sid)) {
? $link .= $separator . $_sid;
? $seo_link .= $separator . $_sid; ?// New line
? $seo_rewrite_link .= $separator . $_sid; ?// New line
}

I hope what I'm asking makes sense to you. Does this logic look correct? Everything seems to work but I'm worried that it may not be right.

Link to comment
Share on other sites

Bobby,

 

This question fits better in the PageCache support thread, but since I can't find it, and since the question also involves Ultimate SEOs as well, I'll ask it here. :)

 

During installation of PageCache 1.5, I get to the instructions to change:

 

if (isset($_sid)) {
  $link .= $separator . $_sid;
}

To this:

if (isset($_sid)) {
  $link .= $separator . $_sid;
  $seo_link .= $separator . $_sid;
  $seo_rewrite_link .= $separator . $_sid;
}

But since I have Ultimate SEO URLs installed, my code actually looked like this (and not the code above):

if (!tep_session_is_registered('customer_id') && ENABLE_PAGE_CACHE == 'true' && class_exists('page_cache')) {
  $link .= $separator . '<osCsid>';
} elseif (isset($_sid)) {
  $link .= $separator . $_sid;
}

So, I made some assumptions and changed my code to this instead:

if (!tep_session_is_registered('customer_id') && ENABLE_PAGE_CACHE == 'true' && class_exists('page_cache')) {
  $link .= $separator . '<osCsid>';
} elseif (isset($_sid)) {
  $link .= $separator . $_sid;
  $seo_link .= $separator . $_sid;  // New line
  $seo_rewrite_link .= $separator . $_sid;  // New line
}

I hope what I'm asking makes sense to you.  Does this logic look correct?  Everything seems to work but I'm worried that it may not be right.

 

-Chris.

If you notice there is a section in the installation file for Ultimate SEO URLs that says "if you have page cache installed...do this..." :)

 

Here is the code:

	if (!tep_session_is_registered('customer_id') && ENABLE_PAGE_CACHE == 'true' && class_exists('page_cache')) {
 $link .= $separator . '<osCsid>';
	 $seo_link .= $separator . '<osCsid>';
	 $seo_rewrite_link .= $separator . '<osCsid>';
} elseif (isset($_sid)) {
 $link .= $separator . $_sid;
   $seo_link .= $separator . $_sid;
   $seo_rewrite_link .= $separator . $_sid;
}

Here is the reference: Ultimate SEO URLs for osCommerce Installation

 

Now you owe me one...get over to this thread and help support ME: http://www.oscommerce.com/forums/index.php?showtopic=140133

 

Bobby

Link to comment
Share on other sites

OK now I turned on the force cookies config to make the Untimate SEO work correctly. But now I cannot login to my site at all. And neither can any of my customers. Even if I have the security set to low I still cannot log into the site. It keeps saying my browser does not accept cookies even though it really does. What could cause this and how can I fix this one?

Link to comment
Share on other sites

OK now I turned on the force cookies config to make the Untimate SEO work correctly. But now I cannot login to my site at all. And neither can any of my customers. Even if I have the security set to low I still cannot log into the site. It keeps saying my browser does not accept cookies even though it really does. What could cause this and how can I fix this one?

 

I had that same problem for some reason on my site when i enabled Force Cookies to get rid of the SID in the url... heady, yet again, i'm going to refer you to the other thread for Ultimate SEO URLs, in which, on page 36, halfway down, i print a solution for keeping SIDs out of the url, without having to force cookie usage...

 

Richard Lindsey.

Richard Lindsey

Link to comment
Share on other sites

I replaced the code you had given in the post but it does not work. The SID's still show up on the end when I set force cookies to false.

 

I have to wait a few mins now though becasue the minute I turned the force cookies to false I had 5 people rush the site now that they can get in.

Edited by headyntl
Link to comment
Share on other sites

Hi Chemo,

 

I hope you can help me. I try to install you U Seo Urls. Maby you can help me. You wrote:

STEP 6 - Edit *admin directory*/categories.php

6 (1) Find this code:

 

$action = (isset($HTTP_GET_VARS['action']) ? $HTTP_GET_VARS['action'] : '');

 

I do not find it. :blush: Can you help me?

:-"

 

 

Here is my admin directory*/categories.php

 

[cut -- sorry, this is a bit too long]

Edited by Christian Lescuyer
Link to comment
Share on other sites

Never, ever, ever post the entire contents of a file...especially one that is as long as that file.

 

At the top find this code:

require(DIR_WS_CLASSES . 'currencies.php');
$currencies = new currencies();

 

Under that paste this:

  // Ultimate SEO URLs - by Chemo
 // If the action will affect the cache entries
 if ( eregi("(insert|update|setflag)", $HTTP_GET_VARS['action']) ) include_once('includes/reset_seo_cache.php');

 

Bobby

Link to comment
Share on other sites

I have been having this issue since I installed the Ultimate SEO / page cache contrib. I think it is related to the cache but not sure if it is cache or both.

 

Upon resetting the cache I am getting this error after I reset the cache.

 

What is wrong and how does it get fixed.

 

Error:

Warning: in_array(): Wrong datatype for second argument in /home/whale/public_html/templates/Original/boxes/categories.php on line 35

 

 

Section of code in reference.

 

33 $categories_string .= '<tr><td width="100%"';

 

34 if ( ($id) && (in_array($counter, $id)) ) {

35 $categories_string .= ' background="' . DIR_WS_TEMPLATES . TEMPLATE_NAME . '/images/infobox//r' .$image.'.gif" name="' . $foo[$counter]['name'] . '" width="100%" height="' .$HEIGHT . '" border="0" style="padding-left:5px;padding-right:5px;">';

36 $categories_string .= '<a class="navBlue" href="';

37

38 }else{ .............continues

 

Please help

Link to comment
Share on other sites

Never, ever, ever post the entire contents of a file...especially one that is as long as that file.

 

At the top find this code:

require(DIR_WS_CLASSES . 'currencies.php');
$currencies = new currencies();

 

Under that paste this:

 ?// Ultimate SEO URLs - by Chemo
?// If the action will affect the cache entries
?if ( eregi("(insert|update|setflag)", $HTTP_GET_VARS['action']) ) include_once('includes/reset_seo_cache.php');

 

Bobby

 

 

:thumbsup:

many thanks for the help. In the future I make my posts shorter sorry...

XaaXaa

Link to comment
Share on other sites

Hi Chemo,

 

Not sure if this is the correct "area" to ask this question. (sorry if it is!)

 

On a clean osc (latest version) installation, I added only 2 contributions: first Ultimate SEO Urls v.2 and later Article Manager (works fine).

 

The trouble is that now I cannot view my site at all because of the following error after modifying files per the "Ultimate SEO for Articles Manager" update:

 

Fatal error: Call to undefined function: tep_get_parent_topics() in /home/horoplus/public_html/includes/seo_cache.php on line 277

 

Line 277 of seo_cashe is the very last bit of the "unmodified" version in Ultimate SEO.

 

The instructions stated to add after this line the following code named "End of the xx definitions - start of the topics" --- it is this specif line that is causing the ruckus:

 

# Initialize the array to hold the topic path
 $c = array();
 # Get the topic path
 tep_get_parent_topics($c, $record['id']);

 

I thought by commenting out the tep get stuff it might help, but instead when you click on the article (example: 3rd-article-a-3.html), I get a Http 404 Not Found error.

 

Hope you can help!

Thanks,

Kait

Link to comment
Share on other sites

Hi everybody,

@ Chemo

 

i have still problems with the installing of the scriptparts. And can ran it. in this moment my problem is in change of html_output. I get error mistake. >_<

I do not know how to reselve this problem, maby you can help me.

 

Becaue I sould not post to long spripts here, but i don?t see a otherway for showing. I put it to my server. The complete script you see here:

total script html output

 

 

The parse error you see here:

parse error

 

Note: xxx is only because my shop is online and I try the funktion of the changed Datei.

I had to change the Dir... to catalog like it is by me.

 

 

You wrot Find the function tep_href_link() ...

in my orginal is a little more informations than this what you wrote to change, so I tried to include it. But maby there is a mistake.

Look here is the orginal (like it is running now) without any change to your SEO

The Orginal

 

I hope you anderstand my english and the problem.

 

Please :D help :blush: me B)

Link to comment
Share on other sites

...

The trouble is that now I cannot view my site at all because of the following error after modifying files per the "Ultimate SEO for Articles Manager" update:

 

Fatal error: Call to undefined function: tep_get_parent_topics() in /home/horoplus/public_html/includes/seo_cache.php on line 277

...

Thanks,

Kait

Kait,

 

I'm sorry that I cannot offer any input other than to say that you are missing a function for the articles manager. That error is due to not having the function available that the article manager uses to fetch the parent topics.

 

Contact the author of the modification and see if he will offer support for his code.

 

Hi everybody,

@ Chemo

 

i have still problems with the installing of the scriptparts. And can ran it. in this moment my problem is in change of html_output. I get error mistake.  >_<

I do not know how to reselve this problem, maby you can help me.

...

I hope you anderstand my english and the problem.

 

Please  :D  help  :blush: me  B)

Sorry...I cannot offer support for custom modifications to the code. I can tell you that you are missing a bracket somewhere but cannot look over the entire script to find it for you.

 

Bobby

Link to comment
Share on other sites

Kait,

 

I'm sorry that I cannot offer any input other than to say that you are missing a function for the articles manager.  That error is due to not having the function available that the article manager uses to fetch the parent topics.

 

Contact the author of the modification and see if he will offer support for his code.

Sorry...I cannot offer support for custom modifications to the code.  I can tell you that you are missing a bracket somewhere but cannot look over the entire script to find it for you.

 

Bobby

 

Thats ok :thumbsup: , but I send you allready two days ago one mail, that i want you to build it in for me, to mail on the sript, I ask you for the way of doing and paying it . You are not building in this sripts anymore ? I didn?get any answer ? :'(

Link to comment
Share on other sites

Hi

it me again. I?m soon getting crazy :'( . I can not get it working. Maby somebody can help me.

I have Fatal Error for the tep_output_string s in the install.

 

If I install the code like it it sould be, it comes the following Error:

Fatal error: Call to undefined function: tep_output_string() in /srv/www/htdocs/web72/html/catalog/includes/functions/html_output.php on line 78

 

 

Line 78 is that:

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

 

If I change it to:

$link .= $page . '?' . $parameters; (without tep_outout_string)

 

----------------------------------------------------

it goes on to the follow error:

Fatal error: Call to undefined function: tep_output_string() in /srv/www/htdocs/web72/html/catalog/includes/functions/html_output.php on line 137

 

 

Line 137 is that:

$seo_rewrite_link .= $rewrite_page . ( tep_not_null($params_stripped) ? '?'.tep_output_string($params_stripped) : '' );

 

This looks like it is for the rewrite mode.

 

If I take this off to

$seo_rewrite_link .= $rewrite_page . ( tep_not_null($params_stripped) ? '?'. ($params_stripped) : '' );

 

It looks ok. In the Categories I see the change link, but when I click it comes a ERROR 404.

---------------------------------------------------

 

If I change in the admin to cName comes the the Error:

Fatal error: Call to undefined function: tep_output_string() in /srv/www/htdocs/web72/html/catalog/includes/functions/html_output.php on line 167

 

line 167 is this:

$seo_link .= $page . '?'.tep_output_string($params_stripped);

 

If I take off the tep_out_string the Cname works perfectly.

 

---------------------------------------------------

 

Now I do not know that the mistake comes by the tep_output_string or maby bei the ht.access file.

 

# $Id: .htaccess,v 1.1.1.1 2002/11/28 23:21:31 wilt Exp $
#
# This is used with Apache WebServers
#
# The following makes adjustments to the SSL protocol for Internet
# Explorer browsers
#
# For this to work, you must include the parameter 'Limit' to the
# AllowOverride configuration
#
# Example:
#
#<Directory "/usr/local/apache/htdocs">
#  AllowOverride Limit
#</Directory>
#
# 'All' with also work. (This configuration is in your
# apache/conf/httpd.conf file)

<IfModule mod_setenvif.c>
 <IfDefine SSL>
   SetEnvIf User-Agent ".*MSIE.*" \
            nokeepalive ssl-unclean-shutdown \
            downgrade-1.0 force-response-1.0
 </IfDefine>
</IfModule>


Options +FollowSymLinks
RewriteEngine On 
# Change "folder" to your catalog directory name
RewriteBase /
RewriteRule ^(.*)-p-(.*).html$ product_info.php?products_id=$2&%{QUERY_STRING}
RewriteRule ^(.*)-c-(.*).html$ default.php?cPath=$2&%{QUERY_STRING}
RewriteRule ^(.*)-m-(.*).html$ default.php?manufacturers_id=$2&%{QUERY_STRING}

 

Please, Please Help me :(

Link to comment
Share on other sites

$seo_rewrite_link .= $rewrite_page . ( tep_not_null($params_stripped) ? '?'.tep_output_string($params_stripped) : '' );

 

This looks like it is for the rewrite mode.

 

What version of OSC are you running? tep_output_string should be a stock function, at least in MS2 it is i believe (i don't remember adding it to mine at any point)... all it does is format the output text to replace (by default i believe) any special characters (via the htmlspecialchars if i recall correctly) such as quotation marks, apostrophes, ampersands, etc. with their corresponding html syntax: " & etc... i would imagine that if you took out the calls to tep_output_string, those links should still work fine the most part, except when they included one of these characters that should be translated... but those don't specifically have anything to do with the SEO url contribution here, as far as i know, as this contribution didn't implement that function, it came with OSC... perhaps you're running an older version that doesn't have this function? Or perhaps you're not including the proper file to have access to it... it should be in your *catalog*/includes/functions/general.php file... and i believe it's right at the top, like 3rd or 4th function down...

 

Richard Lindsey.

Richard Lindsey

Link to comment
Share on other sites

OK I have tried 5 or 6 different things now but I cannot find a way to get those pesky SID's to disappear. I have this mod installed and it works great. It is doing what it is supposed to but the SID is still getting tacked onto the end of it. I have changed the cookie domain and also the code replace that is in the other SEO support forum on page 36 that is half way down. it works but it gives many bugs when doing so. for example when logging into the site if you have an account it does not allow you to put anything into a cart. it just says no products in cart once You hit the check out button. So I had to remove that.

 

 

I am still getting indexed ok by the engines but I just cannot figure out why the SID's still show up.

 

Anyone else possibly have a suggestion for this?

Link to comment
Share on other sites

I've been using the SEO Ultimate Urls 2.0 for about a month and it is working very well.

 

I just installed the Output Debug Queries contrib, and seen the the number of queries does not change if I refresh. Looks to me like the page cache wasn't working. So in the Admin -> Config -> Cache I set this to true and now it seems to be caching. I'd just like to confirm that this is where I can turn on and off Chemo's Page cache, or is this still the original cache?

Link to comment
Share on other sites

I am having a problem with google since I added the cache and redirect mod.

 

Problem is google is following my add to cart button links.

Also all of my listings currently show only the old link.

 

For example here is how one of my google listings looks

http://www.whalesale.com/product_info.php?...4&products_id=1

 

I hope this is something temporary.

Its really odd though because here is the header for that page.

 

<head>

<title>filstar xp1 canister filters - Aquarium Supply Whalesale</title>

<base href="http://www.whalesale.com/">

<meta name="description" content="Filstar xp1 canister filters are for fresh and saltwater aquariums up to 45 US gal / 170 L">

<meta name="keywords" content="aquarium supplies, aquarium, aquarium store, home aquarium, discount aquarium supplies, aquarium shop, aquatic supplies, marine aquarium supply, salt water aquarium supply, fish tank equipment, Filstar xp1 canister filter, Aquarium Supply Whalesale">

<meta name="robots" content="index,follow">

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

<link rel="stylesheet" type="text/css" href="templates/Original/stylesheet.css">

 

<script language="JavaScript">

<!--

 

function SymError()

{

return true;

}

 

window.onerror = SymError;

 

var SymRealWinOpen = window.open;

 

function SymWinOpen(url, name, attributes)

{

return (new Object());

}

 

window.open = SymWinOpen;

 

//-->

</script>

 

<script language="javascript"><!--

function popupWindow(url) {

window.open(url,'popupWindow','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,res

izable=yes,copyhistory=no,width=100,height=100,screenX=150,screenY=150,top=150,le

ft=150')

}

//--></script>

</head>

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