CS-Cartshopping cartsoftware · Ecommerce solution
Go Back   CS-Cart Community Forums > General CS-Cart Forum > General Questions
Reply
 
Thread Tools Display Modes
Old 01-20-2009, 02:59 AM   #1
brandonvd
Senior Member
CS Guru
 
brandonvd's Avatar
 
Join Date: Dec 2006
Posts: 1,244
Default I searched, but can't fix my SEO Problem

I searched and searched through the forum but couldn't find the answer to my SEO problem.

I added some new categories today. My first category was called

T5 High Output Lighting

and was a sub-category of

Lighting

and worked great. I then added a sub-category to the T5 lighting and this is what I ended up with:

36-inch-1-2-3-4-5

This is the total URL:

http://www.saltwatertogo.com/lightin...nch-1-2-3-4-5/

Can anyone help me? I would really appreciate it.

Brandon
__________________
Saltwater and Freshwater Aquarium Supplies
Using CS-Cart 2.0.14
brandonvd is offline   Reply With Quote
Old 01-20-2009, 04:32 AM   #2
JesseLeeStringer
Administrator
Site Admin
 
JesseLeeStringer's Avatar
 
Join Date: Aug 2006
Location: Titusville, FL
Posts: 3,018
Default

The easiest way to create better urls is to remove them from the database using PHPMyAdmin and let them auto-create themselves from the product title.

Obviously you'll lose google rankings a bit, but your site will get the benefit of being "fresh" to an extent if you remove hte generic 1-2-3-4-5 urls.

J
__________________
CS-Cart Hosting & Support | CS-Cart Skins & Templates (Coming Soon)

-> Why do I host with SecureCartHost? (Typo's fixed soon!)
JesseLeeStringer is offline   Reply With Quote
Old 01-20-2009, 04:53 AM   #3
brandonvd
Senior Member
CS Guru
 
brandonvd's Avatar
 
Join Date: Dec 2006
Posts: 1,244
Default

Yeah that would work, but why did this all of a sudden happen and why did it only happen with 3 out of the 4 new categories I added today?

The SEO addon worked fine for the first category, but the following three didn't. The SEO addon also worked just fine for the new products I added today.

Also when I go to manually change the SEO name for the category I can't. Why would it not allow me?

Brandon
__________________
Saltwater and Freshwater Aquarium Supplies
Using CS-Cart 2.0.14
brandonvd is offline   Reply With Quote
Old 01-20-2009, 06:08 AM   #4
termalert
Senior Member
CS Expert
 
Join Date: Jan 2009
Location: Gosford NSW
Posts: 105
Default Very nice ( and fast ) site Brandon.

Are you going to write a book of secrets...lol
termalert is offline   Reply With Quote
Old 01-20-2009, 09:47 AM   #5
JesseLeeStringer
Administrator
Site Admin
 
JesseLeeStringer's Avatar
 
Join Date: Aug 2006
Location: Titusville, FL
Posts: 3,018
Default

Quote:
Originally Posted by brandonvd View Post
Yeah that would work, but why did this all of a sudden happen and why did it only happen with 3 out of the 4 new categories I added today?

The SEO addon worked fine for the first category, but the following three didn't. The SEO addon also worked just fine for the new products I added today.

Also when I go to manually change the SEO name for the category I can't. Why would it not allow me?

Brandon
The main reason I could think of this happening that you've got more than one category with the seo name "36" as you've got the
Code:
"
in the product title it might have an effect on the SEO rewrite to ACSII.

If anything I suggest that you change the product title to "36 inch" and delete the seo url and see what it creates.

J
__________________
CS-Cart Hosting & Support | CS-Cart Skins & Templates (Coming Soon)

-> Why do I host with SecureCartHost? (Typo's fixed soon!)
JesseLeeStringer is offline   Reply With Quote
Old 01-20-2009, 02:31 PM   #6
brandonvd
Senior Member
CS Guru
 
brandonvd's Avatar
 
Join Date: Dec 2006
Posts: 1,244
Default

Quote:
Very nice ( and fast ) site Brandon.
Thank you for the compliment. I haven't done anything special. The only thing I can take credit for is I feel I chose the right host when I decided to go with CyberLNC.

Jesse

I think you are on to something. When I changed the category name the SEO worked perfect. I actually have 6 categories in various places named 36 Inches and I guess I never noticed the numbers being added on.

As for the products with the quotes, the SEO addon actually just ignores the quotes and assigns the SEO name just fine.

Is there any way to have the SEO addon assign different names for each category that has the same name like 36 Inch? If not than I guess I just need to go through and give new category names.

Thank you for your help,

Brandon
__________________
Saltwater and Freshwater Aquarium Supplies
Using CS-Cart 2.0.14
brandonvd is offline   Reply With Quote
Old 02-01-2009, 10:00 AM   #7
itsg
Junior Member
CS Rookie
 
Join Date: Jan 2008
Posts: 3
Default

We have just applied this piece of code (in red) in the file addons/seo/func.php. It isn't fully tested yet, but It should be helpful...
When you apply this code you'll need to clean the cscart_seo_names table in order to allow SEO to recreate links.

Quote:
function fn_create_seo_name($object_id, $object_type, $object_name, $index = 0)
{
global $db_tables;

$_object_name = preg_replace("/[^-_a-zA-Z0-9]?/", "", fn_generate_name($object_name));
if (empty($_object_name)) {
$__name = fn_get_seo_vars($object_type);
$_object_name = $__name['description'] . '-' . $object_id;
}

$exist = db_get_field("SELECT name FROM $db_tables[seo_names] WHERE name='$_object_name' AND (object_id<>'$object_id' OR type<>'$object_type')");
if (!$exist) {
$_data = array(
'name' => $_object_name,
'type' => $object_type,
'object_id' => $object_id
);
db_insert_by_array($db_tables['seo_names'], $_data, true);
} else {
/* __CUSTOM http://www.itsoluzioniglobali.it */
if (substr($object_name, strlen($object_name)-strlen(CS_SEO_DELIMITER . $index)) == CS_SEO_DELIMITER . $index) {
$object_name = substr($object_name, 0, strlen($object_name)-strlen(CS_SEO_DELIMITER . $index));
}
/* __CUSTOM http://www.itsoluzioniglobali.it */


$index ++;
fn_create_seo_name($object_id, $object_type, $object_name .CS_SEO_DELIMITER. $index, $index);
}

return $_object_name;
}
Bye
IT Soluzioni Globali
http://www.itsoluzioniglobali.it

Last edited by itsg : 02-01-2009 at 10:06 AM.
itsg is offline   Reply With Quote
Old 02-01-2009, 06:23 PM   #8
brandonvd
Senior Member
CS Guru
 
brandonvd's Avatar
 
Join Date: Dec 2006
Posts: 1,244
Default

Thank you for the code.

Your code kind of fixed the problem. Now instead of saying:

48-Inch-1-2-3-4-5.html

It now just says:

48-Inch-1.html

Thank you very much for this.

Brandon
__________________
Saltwater and Freshwater Aquarium Supplies
Using CS-Cart 2.0.14
brandonvd is offline   Reply With Quote
Old 10-04-2009, 07:18 AM   #9
redking
Member
CS Member
 
Join Date: May 2007
Posts: 56
Default

We're using 2.0.8.

Could we use the same additional code?

Cheers
Red
__________________
CS-CART: version 2.0.8 - now live!
redking is offline   Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
SEO mod fix for those using Macs moka v1.x Configuration 2 12-30-2008 09:15 PM
How can I fix this IE problem rahail v1.x Configuration 1 03-05-2008 10:00 AM
How can I fix these problems msharnoubi v1.x Configuration 0 01-16-2007 06:55 PM