Jump to content
spidometrs

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

Recommended Posts

Hi Skittles, thanks for you help with this one.

 

I think you need a rest, seems everyones jumping on you for answers at the moment, :)

 

Would it not be best for me to simply remove the SEO URL and then re-install it? Bit of a pain

but that might help? Is there anyway of getting hold of Chemo who developed it? Seems he

is invisible at the moment?

 

Thanks again

Dawson

Dawson,

 

You could try contacting Chemo directly through the site linked to in the install html page. However, there's been a falling out between him and the forum (I don't know what or why) and Chemo has been banned. Sigh. We sure could use his help with this contribution.

 

Anyway, I don't believe uninstalling and re-installing the contribution will help. It doesn't matter if the URLs are in the cache or not. If the rewrite to support the URLs is in the .htaccess file, and this contribution is enabled, osCommerce will serve the page. End of story. :(

 

If what you want to do is have all the SEO URLs produce 404 errors, you could just disable the contribution and comment out the rewrite code in .htaccess. Then after a period of time, six months or so, uncomment the rewrite code in your .htaccess file, and enable the contribution.

 

Frankly, I don't see an easy or elegant solution to your problem. As for me, I've added the robots meta tag solution to all three sites I maintain, in the hopes they never find themselves in your site's predicament!

 

As always, good luck.

-Skittles

Share this post


Link to post
Share on other sites
@ Skittles

What are the exact "aspects of incompatibility of Ultimate SEO URLs and Update 060817" you are referring to?

I have got osc(060817) and "Ultimate SEO URLs - 2.1d (the original) and they seem to harmonize quite well.

(except the above issues -- but they already affected older versions)

Mikeman,

 

Several people were having similar problems and asking what to do. When this contribution was enabled, osc was using '0' for the id number (order_id, account_id, customer_id, etc.):

 

sweetseduction wrote (post):

If the seo is turned on , it works, only if you order on our shop, the order is being placed, but it gets the ordernumber : 0

And it is not visible in the admin section ?

 

In the mail you get :

Sweet Seduction

-===================================================-

Bestelnummer: 0

Gedetailleerde pakbon:

Besteldatum: Sunday, 21 January 2007

classiccamerons followed immediately with this post:

I have the EXACT same problem as above. No order numbers are being generated, and order history does not work.

Shortly after that, lieven wrote (post):

I have the Ultimate SEO installed and it works fine. Just one little problem. Customers can't create accounts anymore. Well the account is created but there's no relation between the customers table and the address_book table. The link should be filled in the field customers_default_address_id, but ther's just a 0 in that field.

 

This only happens when i turn seo urls on??? Help crying.gif

In an effort to help them, I found a much earlier post in this thread from yanayun that stated:

Bugs in osCommerce 2.2 Milestone 2 Update "060817"

fields customers_default_address_id in customers table cant change, only add with 0

fields customers_id in address_book table can't change. only add with 0

 

Order number always report 0

Order Number: 0

 

I suggest to use osCommerce 2.2 Milestone 2 Update 051112 to use Ultimate SEO URLs, not Update "060817"

I posted the results of my search as a possible source of the problem.

 

Since then, every time someone reports the '0' id problem, it's turned out they have 060817 installed.

 

Everyone who has gone back to 051112 or 051113, that has reported it here, says everything is working now (except for one fellow I'm in the process of helping now, and we don't yet know why he's having problems)

 

Is it really that 060817 is buggy? Probably not. But until someone has the time to figure out what to change in this contribution, it is still easier to just use update 051112 or 051113.

 

The fact that you are running the two without any problems begs the question does the real issue have more to do with which version of php and/or mysql is running rather than the version/update of osc. It remains to be seen what the real issue is.

 

In the meantime, I suspect most shop owners don't really care which update their store is running, as long as it works correctly. I know I don't. :)

 

-Skittles

Share this post


Link to post
Share on other sites

MultiService-Canon

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

numar comanda: 33

detalii factura:

http://www.multiservice-canon.ro/multiserv...php/order_id/33

data comenzii: Sunday 18 February, 2007

 

produse

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

1 x Digital Ixus 800 IS () = 1.195,950-RON

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

 

This is how my e-mail looks after i've made an order. If i follow the link, and o login, i can't see any history orders. Instead of this it appears a series of numbers like : -40 , -30, -20 , -10 , 0. And again, in my admin section no order appear.

 

What could be the problem?

Thanks.

Edited by xperyens

Share this post


Link to post
Share on other sites
Can someone help me with this please.

 

I have just installed this contribution - although I did not know which version to install from the contribution list version 2.1C added by Chemo added 8 June 2005 - not sure if that was the right one....

 

I now am getting the same error as "Ausgirl" but don't know what to do to fix it.

 

In admin everything is fine in configeration apart from the fact that I have no Categories or Products - I have the following error:

 

1054 - Unknown column 'cd.categories_seo_url' in 'field list'

 

select c.categories_id, cd.categories_name, cd.categories_seo_url, c.categories_image, c.parent_id, c.sort_order, c.date_added, c.last_modified from categories c, categories_description cd where c.parent_id = '0' and c.categories_id = cd.categories_id and cd.language_id = '1' order by c.sort_order, cd.categories_name

 

[TEP STOP]

 

and in my live site everything is fine until you go to click on the actual product and I get the following:

 

Fatal error: Call to undefined function: clean_html_comments() in /home/ufthokd/public_html/shop/includes/header_tags.php on line 208

 

I'm not sure how to use the SQL updating of the database that Chemo has quote on his web page on how to install this contribution but I did follow the instructions that came with the download.

 

Run the following sql on your store database:

 

ALTER TABLE `categories_description` ADD `categories_seo_url` VARCHAR( 100 ) NOT NULL ;

ALTER TABLE `products_description` ADD `products_seo_url` VARCHAR( 100 ) NOT NULL ;

 

How do I do this - I have never used SQL to upload a contribution - I always copy the files using my FTP manager. I don't know where to put this code.

 

Sorry if this is a total numpty question but I am struggling with this and I don't know what else to do.

 

Thanks for any help anyone can give.

owl17sb,

 

You have two issues going on.

 

The first is the SQL issue.

 

if you don't have direct access to your database, you can update the sql with the following snippet of code. Just copy it into a new file in your text editor and in your catalog directory as temporary.php. After you've ran the file, you shouldn't be getting the error in the Admin, and you can delete the temporary file.

<?php
 require('includes/application_top.php');
 tep_db_query("ALTER TABLE `categories_description` ADD `categories_seo_url` VARCHAR( 100 ) NOT NULL");
 tep_db_query("ALTER TABLE `products_description` ADD `products_seo_url` VARCHAR( 100 ) NOT NULL");
?>

 

The second problem is from an incomplete install (or removal) of a header tag contribution (Header Tags Controller?). If you were unable to install the other contribution, you now need to use the installation instructions to remove all the code that supports it. If you want to use the header tag contribution, you should still remove the code until you have this one working right.

 

If you really want to hold onto your sanity, never install another contribution until the last one is working correctly. :'(

 

(Although I suspect you didn't realize you had problems from two contributions at the same time.)

 

-Skittles

Share this post


Link to post
Share on other sites
The fact that you are running the two without any problems begs the question does the real issue have more to do with which version of php and/or mysql is running rather than the version/update of osc. It remains to be seen what the real issue is.

 

@ Skittles

 

I will explore this matter with my test-installation.

 

Thanks for your reply.

 

 

mikeman

Share this post


Link to post
Share on other sites
Dawson,

 

You could try contacting Chemo directly through the site linked to in the install html page. However, there's been a falling out between him and the forum (I don't know what or why) and Chemo has been banned. Sigh. We sure could use his help with this contribution.

 

Anyway, I don't believe uninstalling and re-installing the contribution will help. It doesn't matter if the URLs are in the cache or not. If the rewrite to support the URLs is in the .htaccess file, and this contribution is enabled, osCommerce will serve the page. End of story. :(

 

If what you want to do is have all the SEO URLs produce 404 errors, you could just disable the contribution and comment out the rewrite code in .htaccess. Then after a period of time, six months or so, uncomment the rewrite code in your .htaccess file, and enable the contribution.

 

Frankly, I don't see an easy or elegant solution to your problem. As for me, I've added the robots meta tag solution to all three sites I maintain, in the hopes they never find themselves in your site's predicament!

 

As always, good luck.

-Skittles

 

Hi, Ok but i am very high in msn and yahoo results with first page on various keywords. Meaning if i comment it out the SEO URL's wont show and it

will effect my other rankings and i will completely drop out of all search results for 6 month period.

 

It seems looking into it that only one or two main keywords is giving me terrible results. I am still showing first page for various other keywords. I have added

the robots tag file into the product info page but the problem i have is that categories for my website have changed but the same products are being shown.

 

For example - mysite/mysite/my

 

has been changed to - mysite/my

 

I made this change as i had to go to a new supplier and categories have changed. So what is shown is duplicated pages with exact same information

on both pages and the only difference being the URL.

 

Is there a robots meta tag i can include onto the index.php page by any chance to solve this duplication????

 

All help is always appreciated

 

Many thanks

Andrew

Share this post


Link to post
Share on other sites

Oh dear it seems although this contribution is working for products, categories still do not show up.

 

Furthermore, I cannot add any new products. Whenever I try nothing shows up. I enter in all the information, upload a pitcure etc.. then when I click on preview, I am presented with an invisable product. If i then click add, nothing is added.

 

has this happend to anyone else?

Share this post


Link to post
Share on other sites
@ Skittles

 

I will explore this matter with my test-installation.

 

Thanks for your reply.

mikeman

 

Hi,

 

I've been reading this thread and I have SEO 2.1c installed on the update '06...' and it all seems to work perfectly. Orders are showing and correct etc etc.

 

I do have 1 concern and that is the problem Dawson is having - skittles you mentioned you have added the robots meta tag solution to your stores? What is this and where can I find it?

 

Many Thanks

 

Becki

Share this post


Link to post
Share on other sites
Hi,

 

I've been reading this thread and I have SEO 2.1c installed on the update '06...' and it all seems to work perfectly. Orders are showing and correct etc etc.

 

I do have 1 concern and that is the problem Dawson is having - skittles you mentioned you have added the robots meta tag solution to your stores? What is this and where can I find it?

 

Many Thanks

 

Becki

Becki,

 

It's just an idea I presented to Dawson in this post.

 

It uses an existing check on the products_info.php page and writes the meta tag in the header if the product_id doesn't exist in the database. It's really simple. Just place this snippet of code anywhere between the "head" tags of products_info.php:

<?php 
 if ($product_check['total'] < 1) {
echo '<meta name="robots" content="noindex,nofollow">';
 }
?>

 

And you should probably do the same thing for categories, too. Place this snippet of code anywhere between the "head" tags of index.php:

<?php 
 if ($category_parent['total'] < 1)  {
echo '<meta name="robots" content="noindex,nofollow">';
 }
?>

 

Now if we're really lucky, the search engines will honor this and keep out/remove any URL for a product or category that doesn't exist.

 

-Skittles

Share this post


Link to post
Share on other sites
And you should probably do the same thing for categories, too. Place this snippet of code anywhere between the "head" tags of index.php:

<?php 
 if ($category_parent['total'] < 1)  {
echo '<meta name="robots" content="noindex,nofollow">';
 }
?>

Oops! That's not gonna work quite right!

 

Any category without products would then display the meta tag. But the category could still exist!

 

Give me a minute or ten, and I'll see if I can solve that.

 

-Skittles

Share this post


Link to post
Share on other sites
Oops! That's not gonna work quite right!

 

Any category without products would then display the meta tag. But the category could still exist!

 

Give me a minute or ten, and I'll see if I can solve that.

 

-Skittles

Okay. Here's a better solution...

 

In index.php, find:

$categories_products_query = tep_db_query("select count(*) as total from " . TABLE_PRODUCTS_TO_CATEGORIES . " where categories_id = '" . (int)$current_category_id . "'");
$cateqories_products = tep_db_fetch_array($categories_products_query);
if ($cateqories_products['total'] > 0) {
  $category_depth = 'products'; // display products
} else {
  $category_parent_query = tep_db_query("select count(*) as total from " . TABLE_CATEGORIES . " where parent_id = '" . (int)$current_category_id . "'");
  $category_parent = tep_db_fetch_array($category_parent_query);
  if ($category_parent['total'] > 0) {
	$category_depth = 'nested'; // navigate through the categories
  } else {
	$category_depth = 'products'; // category has no products, but display the 'no products' message
  }
}
 }

 

Change it to this:

$category_exists = true;
$categories_products_query = tep_db_query("select count(*) as total from " . TABLE_PRODUCTS_TO_CATEGORIES . " where categories_id = '" . (int)$current_category_id . "'");
$cateqories_products = tep_db_fetch_array($categories_products_query);
if ($cateqories_products['total'] > 0) {
  $category_depth = 'products'; // display products
} else {
  $category_parent_query = tep_db_query("select count(*) as total from " . TABLE_CATEGORIES . " where parent_id = '" . (int)$current_category_id . "'");
  $category_parent = tep_db_fetch_array($category_parent_query);
  if ($category_parent['total'] > 0) {
	$category_depth = 'nested'; // navigate through the categories
  } else {
	$category_depth = 'products'; // category has no products, but display the 'no products' message
	$category_query = tep_db_query("SELECT categories_id FROM " . TABLE_CATEGORIES . " WHERE categories_id = '" . (int)$current_category_id . "' LIMIT 1");
	$category = tep_db_fetch_array($category_query);
	if (!$category['categories_id']) {
	  $category_exists = false;
	} 
  }
}
 }

 

Then somewhere inside the "head" tags, add this:

<?php
 if (!$category_exists)  {
echo '<meta name="robots" content="noindex,nofollow">';
 }
?>

 

Now the robots meta tag will only be used if the category doesn't exist.

 

-Skittles

Share this post


Link to post
Share on other sites
Hi, Ok but i am very high in msn and yahoo results with first page on various keywords. Meaning if i comment it out the SEO URL's wont show and it

will effect my other rankings and i will completely drop out of all search results for 6 month period.

 

It seems looking into it that only one or two main keywords is giving me terrible results. I am still showing first page for various other keywords. I have added

the robots tag file into the product info page but the problem i have is that categories for my website have changed but the same products are being shown.

 

For example - mysite/mysite/my

 

has been changed to - mysite/my

 

I made this change as i had to go to a new supplier and categories have changed. So what is shown is duplicated pages with exact same information

on both pages and the only difference being the URL.

 

Is there a robots meta tag i can include onto the index.php page by any chance to solve this duplication????

 

All help is always appreciated

 

Many thanks

Andrew

Andrew,

 

The robots meta tag recognizes only four things: follow, index, nofollow, and noindex.

 

You could try adding the corrected code changes for index.php I just presented to Becki. That would include the robots meta tag for any category that doesn't exist.

 

Considering the prolific number of dynamically created shopping sites, many with constantly changing inventories, you'd think the search engines would have a special tag just for ecommerce sites. No such luck.

 

Do you use Google Sitemaps? It might help to provide the xml sitemap. If G doesn't see the page in the sitemap, maybe it will relegate the old URLs to the supplemental results. I'm guessing here, so don't take this as gospel. But it might be worth a try. Just make sure the script to create the sitemap uses the tep_href_link function so it creates the SEO URLs.

 

Good luck,

-Skittles

Share this post


Link to post
Share on other sites

Thank you very much Skittles! I really appreciate your help.

 

Has this always been an issue with Ultimate SEO's and its only just come to light? I presume you're making the changes you have mentioned aswell so hopefully it will work for the future!

 

Thank you again

 

Becki

Share this post


Link to post
Share on other sites
Thank you very much Skittles! I really appreciate your help.

 

Has this always been an issue with Ultimate SEO's and its only just come to light? I presume you're making the changes you have mentioned aswell so hopefully it will work for the future!

 

Thank you again

 

Becki

Becki,

 

This problem has been around for ages.

 

And it affects nearly all, if not all, dynamically created sites using a database. Ever bookmark a product from a major site (JC Penney, Macy's, Sears, etc.) and come back a few months later and the product is gone? Even there, you see the basic page with a "product not found" message of some sort.

 

It is possible to use the tests I posted and redirect the page to something non-existent to force the 404 error. Then use a custom error page. But that solution is geared more to the search engines than your potential customers. And there are limitations.

 

In my own online shopping experiences, I've never seen a "product not found" instance where I was redirected to a 404 page.

 

Of course, that doesn't mean it can't be done, just that the majority of sites appear to think the way we handle it now is better for the potential customer.

 

And I think the search engines have gotten better at handling the idiosyncrasies of dynamic sites. However, it is the "?" and "&" in the URL that give away the fact the site is dynamic. When we use seo urls, we are removing the dead give-away that the pages are dynamically created.

 

Dawson's problem is a lot more complex. Because he changed the name/location of his categories, and has been using SEO URLs for some time, links he is no longer using are in the search engine index along with the new links. This produces multiple "static" URLs with the same (duplicate) content. He's searching for a way to remove the old URLs from the SEs index.

 

It certainly is a lesson for all of us, to use category names that we won't need to change.

 

-Skittles

Share this post


Link to post
Share on other sites

Hi,

 

Just installed this contribution. All seems to work fine, but my urls arent been generated properly. They are almost right.. They look like this http://www.mystore.com/ladies-clothing-c-2...3e6140f3ed83f6b the end is wrong.

 

Anybody know whats wrong? I'm so close but obviously there is something small I am missing.

 

Thanks for any help.

Share this post


Link to post
Share on other sites
Hi,

 

Just installed this contribution. All seems to work fine, but my urls arent been generated properly. They are almost right.. They look like this http://www.mystore.com/ladies-clothing-c-2...3e6140f3ed83f6b the end is wrong.

 

Anybody know whats wrong? I'm so close but obviously there is something small I am missing.

 

Thanks for any help.

Grimmyfrombar,

 

By "the end is wrong" do you mean the appended session_id (?osCsid=e9df8b8042d170b563e6140f3ed83f6b)?

 

If so, you are mistaken. There is nothing wrong with the session_id being appended to the URL. If cookies are enabled, the session_id will disappear as it will be placed in a cookie on the visitor's computer. If they have cookies blocked, it will be on all of their URLs. Without a session_id, the cart won't work. There are numerous posts about this on previous pages of this thread, if you're interested.

 

-Skittles

Share this post


Link to post
Share on other sites
Grimmyfrombar,

 

By "the end is wrong" do you mean the appended session_id (?osCsid=e9df8b8042d170b563e6140f3ed83f6b)?

 

If so, you are mistaken. There is nothing wrong with the session_id being appended to the URL. If cookies are enabled, the session_id will disappear as it will be placed in a cookie on the visitor's computer. If they have cookies blocked, it will be on all of their URLs. Without a session_id, the cart won't work. There are numerous posts about this on previous pages of this thread, if you're interested.

 

-Skittles

 

Hello Skittles,

 

Thanks very much.. I have this working on another store and it shows with out the session_id, so i presumed something was wrong with this install. Thank you for the reply and I will begin lookin and reading more on this right now.

 

Thanks again,

 

Lee.

Share this post


Link to post
Share on other sites

Hi, Apologize for reposting this request to this thread... but may be some one can help me with this issue...

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

I installed the 2.1d version of Ultimate SEO URLs contrib, but am having problems with the redirects in the .htaccess file. The category link in the cart seems to be fine... (see below)

 

...but when I click on the category link in the cart, the redirection doesn't happen. I get the following error...

 

Too many redirects occurred trying to open “http://jayateas.netfirms.com/testshoppingcart//catalog/hardware-c-1.html?osCsid=3aa4c2030a1c01b9586e291032a64bc5”. This might occur if you open a page that is redirected to open another page which then is redirected to open the original page.

 

I checked with my host, but they don't want to help. Below are some examples of the rewriteengine codes they provide on their website, but much of this is greek to me

 

I wonder if some one can help decipher this, and tell me if I should be changing the RewriteEngine code in the file. I have provided some additional info below my name

 

Thx..

 

Pav

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

What I have in my .htaccess file currently

 

Options +FollowSymLinks

RewriteEngine On

RewriteBase /testshoppingcart/catalog/

 

RewriteRule ^(.*)-p-(.*).html$ product_info.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}

 

Instructions provided by my Webhost, on how to write mod_rewrite

 

REWRITE ENGINE (mod_rewrite): useful for url forwarding

 

Example #1:

The following converts http://yourdomain.com/xyz.html into http://yourdomain.com/index.php?xyz):

 

RewriteEngine on

RewriteBase /

RewriteRule ^([a-z]+).html$ /index.php?$1 [R,L]

 

NOTE: The RewriteBase cannot be empty. It must indidcate the base directory or a referring directory.

 

Example #2:

The following converts http://yourdomain.com/directory/xyz.html into http://yourdomain.com/directory/index.php?xyz):

 

RewriteEngine on

RewriteBase /directory

RewriteRule ^([a-z]+).html$ /index.php?$1 [R,L]

 

Example #3:

The following converts: http://yourdomain.com/tutorials.php?req=tu...id=3&page=0 to http://yourdomain.com/tutorials/3/0.php:

 

RewriteEngine On

RewriteRule ^tutorials/(.*)/(.*).php /tutorials.php?req=tutorial&tut_id=$1&page=$2

 

Example #4:

The following will display contents in newpage.html when visitor browses to oldpage.html:

 

RewriteEngine on

RewriteRule ^oldpage.html$ /newpage.html

 

Example #5:

The following will rewrite the URL to http://yourdomain.com/directory/newpage.html when visitors browse to http://yourdomain.com/anypage.html

 

RewriteEngine on

RewriteRule ^([a-z]+).html$ /directory/newpage.html [R,NC,L]

 

Example #6:

The following will forward a user coming from a specified IP address (eg. 123.45.67.8) to another location (eg. /):

 

RewriteEngine on

RewriteCond %{REMOTE_ADDR} ^123.45.67.8$

RewriteRule ^.*$ - [F]

 

The following example will forward a visitor coming from a specified IP address (eg. 123.45.67.8) to another location (eg. /) if they try to access any .php files:

 

RewriteEngine on

RewriteCond %{REMOTE_ADDR} ^123.45.67.8$

RewriteRule .php$ - [F]

 

Another example of a similar .htaccess file using ip blocking in RewriteCond directive will forward user to http://www.yahoo.com URL if they come from a specified IP address (eg. 123.45.67.8):

 

RewriteEngine on

RewriteCond %{REMOTE_ADDR} ^123.45.67.8$

RewriteRule ^(.*)$ http://www.yahoo.com [L]

 

Example #7:

The following will redirect users from an old page to a new page. For example if you use index.htm as your index file and then rename index.htm to home.htm, you can redirect your users to the newly named homepage:

 

Redirect /index.html http://www.yourdomain.com/home.htm

 

Example #8:

The following are additional examples using the redirect directive:

 

Redirect / /photos/

Redirect /index.html /default.html

Redirect /blah/ http://www.anotherdomain.com/blah/

 

Example #9:

Hot linking (ie. bandwidth stealing) happens when people link to files and images on a different server, display them on their website and the bandwidth is at the other website owner's expense. The following example can prevent hot linking to your website:

 

RewriteEngine On

RewriteCond %{HTTP_REFERER} !^$

RewriteCond %{HTTP_REFERER} !^http://(www.)?yourdomain/.*$ [NC]

RewriteRule .(gif|jpg)$ http://yorudomain.com/image.gif [R,L]

Share this post


Link to post
Share on other sites
When I disable the seo urls, add a user, it works fine.

 

Have not tried to purchase anything when enabled.

 

Is there anything else I can provide to try to trouble shoot this one?

 

Thanks


_________________________________________________________________________

 

David G Aschenbrener

Tranquil | Sense - Your Stop for Tranquility.

Share this post


Link to post
Share on other sites
Is there anything else I can provide to try to trouble shoot this one?

 

Thanks

tranquilsense,

 

With SEO URLs enabled, place an order and check the order number on the confirmation email. If it's 0 you are probably running osCommerce Update 060817.

 

If that's the case, your best bet is to install Update 051112 or 051113 instead. Only one person posting in this thread has had any luck running the this contribution with Update 060817.

 

-Skittles

Share this post


Link to post
Share on other sites
Becki,

 

It's just an idea I presented to Dawson in this post.

 

It uses an existing check on the products_info.php page and writes the meta tag in the header if the product_id doesn't exist in the database. It's really simple. Just place this snippet of code anywhere between the "head" tags of products_info.php:

<?php 
 if ($product_check['total'] < 1) {
echo '<meta name="robots" content="noindex,nofollow">';
 }
?>

 

And you should probably do the same thing for categories, too. Place this snippet of code anywhere between the "head" tags of index.php:

<?php 
 if ($category_parent['total'] < 1)  {
echo '<meta name="robots" content="noindex,nofollow">';
 }
?>

 

Now if we're really lucky, the search engines will honor this and keep out/remove any URL for a product or category that doesn't exist.

 

-Skittles

 

hi Skittles,

 

thanks again for your answers. I made the changes to product_info.php as you said but it does not seem to have any effect at all (tested at home and on the live site). I have STS 4.2 and HTC 2.6 installed so presume it's something to do with HTC possibly? In fact when i delete a product and go back to it I still have the meta tags that were generated by HTC even though I get the 'product not found' page.

Any ideas?! :)

 

Many Thanks again

Becki

 

Here is my head contect from product_info:

<head>
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>">
<title><?php echo TITLE; ?></title>
<base href="<?php echo (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG; ?>">
<link rel="stylesheet" type="text/css" href="stylesheet.css">
<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>
<?php 
 if ($product_check['total'] < 1) {
echo '<meta name="robots" content="noindex,nofollow">';
 }
?>
</head>

 

and here is the meta code from the live page:

 

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
 <title>testing</title>
 <meta name="Description" content="testing"/>
 <meta name="Keywords" content="testing"/>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/>
<!-- EOF: Generated Meta Tags -->

Edited by Becki

Share this post


Link to post
Share on other sites
Oh dear it seems although this contribution is working for products, categories still do not show up.

 

Furthermore, I cannot add any new products. Whenever I try nothing shows up. I enter in all the information, upload a pitcure etc.. then when I click on preview, I am presented with an invisable product. If i then click add, nothing is added.

 

has this happend to anyone else?

 

 

Still no closer to fixing this issue, can anyone help please?

Share this post


Link to post
Share on other sites
Still no closer to fixing this issue, can anyone help please?

 

Try going through the install instructions again just to check all has been amended correctly.


Your online success is Paramount.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×