Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

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


Recommended Posts

skittles your a star man :D

 

fixed the problem

 

my one question is though

 

the setting up of categories etc

 

ive set the multi-fuel stoves section us as Multi-fuel-stoves but it just removes the -s is that just the way it works?

 

In the admin configuration section for SEO urls, set the filter short words to zero. That's it.

Link to comment
Share on other sites

Hi guys, hope you can help me.

 

I've installed Ultimate SEO URLS 21da which seems to be working well, apart from the Manufacturers dropdown box. Thats not working now, it just goes back to the index regardless of which manufacturer you select. But when I set "configuration, SEO URLs, Enable SEO URLs?" to "flase" the manufacturer box starts working again. Can anyone help me make the manufacturers box work when SEO URLs is enabled?

 

heres my site, CoolChip Computers

 

Many Thanks

 

Rob

When i select a manufacture from the manufacturers info box from the drop down menu nothing happens.

 

I've got 2.1c installed with Randelia fix and also the '&' character fix from Bchecketts.

 

I turned off automatic re-directs in admin and it does work.

 

Although is there an actual fix for this?!

 

Many Thanks

 

Becki

 

Do i need the &amp fix or should i remove it.

 

Other than that working great!

 

This was my post a few days ago but have had no answer I don't think. It works with automatic re-directs off. If anyone does know of an actual fix for this it would be good!

 

Becki

Link to comment
Share on other sites

This was my post a few days ago but have had no answer I don't think. It works with automatic re-directs off. If anyone does know of an actual fix for this it would be good!

 

Becki

 

What exactly does 'automatic redirects' do?

 

Rob

Edited by coolchip
Link to comment
Share on other sites

I have installed everything for this contribution but do not know how to merge the seo admin/categories.php file with my header tags admin/categories.php files together. Can someone tell me how to either merge the two files together or maybe post up or email me ([email protected]) the code in that working file with both of those contributions installed?

I have winmerge but dont know how to use it. Thanks

Link to comment
Share on other sites

I remember seeing a post a few pages back from someone stating the contributions didn't clash and actually complemented each other - he didn't mention any problems with the two files...

 

What can be so difficult to merge them using a text-diff program??

Upon receiving fixes and advice, too many people don't bother to post updates informing the forum of how it went. Until of course they need help again on other issues and they come running back!

 

Why receive the information you require in good faith for free, only to then have the attitude to ignore the people who gave it to you?

 

There's no harm in saying, 'Thanks, it worked'. On the contrary, it creates a better atmosphere.

 

CHOOCH

Link to comment
Share on other sites

"What can be so difficult to merge them using a text-diff program??"

 

Im sure it cant be that difficult to use it, I just dont know how. I read all over that they work great together but I just dont know how to merge the two files. I am relativly new to php.

Link to comment
Share on other sites

Im sure it cant be that difficult to use it, I just dont know how. I read all over that they work great together but I just dont know how to merge the two files. I am relativly new to php.
Well, judging by the way your osc store is, it sure doesn't look like you are relatively new to php...

 

Anyway, the easiest thing for you to do is to open up your admin/categories page using a text diff program.

 

Then open up the downloaded version of the Ultimate SEO URL's admin/categories page.

 

After that, text-diff the two files... where you see the text that appears in the Utlimate SEO URL's file but not in your store admin/categories file - you must copy and paste the text in the same location.

 

Once that is done, upload the modified file to admin/categories and check if it all works properly.

 

HTH

Upon receiving fixes and advice, too many people don't bother to post updates informing the forum of how it went. Until of course they need help again on other issues and they come running back!

 

Why receive the information you require in good faith for free, only to then have the attitude to ignore the people who gave it to you?

 

There's no harm in saying, 'Thanks, it worked'. On the contrary, it creates a better atmosphere.

 

CHOOCH

Link to comment
Share on other sites

After that, text-diff the two files... where you see the text that appears in the Utlimate SEO URL's file but not in your store admin/categories file - you must copy and paste the text in the same location.

 

Once that is done, upload the modified file to admin/categories and check if it all works properly.

 

HTH

 

Some of the changes that are in the seo file override the same code that the header tags code already modified, and this is the part i am having trouble with. Is Winmerge a text.diff program? Because in that I put up the two files next to each other and if I merge them together it puts everything from the seo file and overrides what what was modified in the header files. There must be a way to do this that I am just missing, sorry if it sounds dumb but I am just stumped!

I changed my website from pure html to oscommerce just in october and that is the first experience with php I have had...

Thank you for your help.

Link to comment
Share on other sites

Some of the changes that are in the seo file override the same code that the header tags code already modified, and this is the part i am having trouble with. Is Winmerge a text.diff program? Because in that I put up the two files next to each other and if I merge them together it puts everything from the seo file and overrides what what was modified in the header files. There must be a way to do this that I am just missing, sorry if it sounds dumb but I am just stumped!

I changed my website from pure html to oscommerce just in october and that is the first experience with php I have had...

Thank you for your help.

I honestly cannot see why you would ask a queston on text-diffing two file when you must have text-diffed files when you did your website. Yes, download winmerge and follow the instructions I gave above.

Upon receiving fixes and advice, too many people don't bother to post updates informing the forum of how it went. Until of course they need help again on other issues and they come running back!

 

Why receive the information you require in good faith for free, only to then have the attitude to ignore the people who gave it to you?

 

There's no harm in saying, 'Thanks, it worked'. On the contrary, it creates a better atmosphere.

 

CHOOCH

Link to comment
Share on other sites

I honestly cannot see why you would ask a queston on text-diffing two file when you must have text-diffed files when you did your website. Yes, download winmerge and follow the instructions I gave above.

Has it been so long ago, Chooch, since you started working in PHP (or osCommerce) that you don't remember how intimidating it is to the newbie? A little patience, and a little grace can easily go as far, towards creating "a better atmosphere", as remembering to say thank you to the folks that provide "fixes and advice".

 

Grunionfab,

 

I have to be gone for a few hours, but when I get back, I'll post the snippet of code from my categories.php file that combines changes from both header tags controller and Ultimate SEO URLs.

 

Take care,

-Skittles

Link to comment
Share on other sites

I just tried to add some products to my store after instaling ultimate seo urls and I now get this message only when I click on catalog in my admin:

 

Categories / Products

Search:

Go To:

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]

 

Any idea of whats causing this?

 

Also from time to time my urls will change from /c-24.html to /c-24.html?osc38d8h98a9hdaijasd etc.

 

Thanks,

TJ

Link to comment
Share on other sites

SKittles,

Thank you so much for your time and patience, I really appreciate it!

Grunionfab,

 

I am attaching a text file with snippets of code you need for categories.php to integrate Ultimate SEO URLs with an existing install of Header Tags Controller. The code you will be replacing has already been modified.

 

This is not a complete list of changes. The code in the following list refers only to code that has been modified by both contributions.

 

The line numbers given are approximate, and based on the installation notes of Header Tags Controller.

 

You should be able to simply "cut and paste" from the text file to your categories.php file. (Back up first!)

 

Good Luck, :)

-Skittles

add_ultimate_seo_urls_to_header_tags_controller_categorie_php.txt

Link to comment
Share on other sites

I just tried to add some products to my store after instaling ultimate seo urls and I now get this message only when I click on catalog in my admin:

 

Categories / Products

Search:

Go To:

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]

 

Any idea of whats causing this?

 

Also from time to time my urls will change from /c-24.html to /c-24.html?osc38d8h98a9hdaijasd etc.

 

Thanks,

TJ

TJ,

 

"1054 - Unknown column 'cd.categories_seo_url' in 'field list'" indicates the categories_seo_url field has not been added to the database

 

That would suggest you may have inadvertently skipped Step 6:

STEP #6 - SQL Update

 

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 ;

 

?osc38d8h98a9hdaijasd is a session id. If cookies are enabled, it will disappear as the visitor moves around the site. Sessions can time out due to inactivity, so a new id may get assigned, which would explain it showing up from time to time.

 

You need it, whether it is part of the URL or put in a cookie, so you don't need to worry about it. Trust me, most of your site visitors will be oblivious to it. (Unless your target market is computer geeks like me...)

 

Hope this helps,

-Skittles

Link to comment
Share on other sites

Hello,

 

I get this error whenever I try and edit a product category:

 

Fatal error: Call to undefined function tep_get_category_seo_url() in /home/wwwshop/public_html/admin/categories.php on line 1060

 

Any ideas on how to fix?

 

Much appreciated

 

Thanks

Link to comment
Share on other sites

Has it been so long ago, Chooch, since you started working in PHP (or osCommerce) that you don't remember how intimidating it is to the newbie? A little patience, and a little grace can easily go as far, towards creating "a better atmosphere", as remembering to say thank you to the folks that provide "fixes and advice".
Maybe a little tact on my part wouldn't have gone astray...

Upon receiving fixes and advice, too many people don't bother to post updates informing the forum of how it went. Until of course they need help again on other issues and they come running back!

 

Why receive the information you require in good faith for free, only to then have the attitude to ignore the people who gave it to you?

 

There's no harm in saying, 'Thanks, it worked'. On the contrary, it creates a better atmosphere.

 

CHOOCH

Link to comment
Share on other sites

Hello,

 

I am trying to do a 301 redirect from one SEO URL to another. e.g.

 

redirect 301 /xyz-c-1-2-3.html http://www.abc.co.uk/xyz-c-2-3.html

 

however when I visit the old URL /xyz-c-1-2-3.html it gets redirected to http://www.abc.co.uk/xyz-c-2-3.html?cpath=1_2_3

 

Any ideas on why this happens or how to redirect so cpath does not show?

 

Thanks

Link to comment
Share on other sites

Hello,

 

I get this error whenever I try and edit a product category:

 

Fatal error: Call to undefined function tep_get_category_seo_url() in /home/wwwshop/public_html/admin/categories.php on line 1060

 

Any ideas on how to fix?

 

Much appreciated

 

Thanks

Ausgirl,

 

Looks like you may have missed Step 7:

STEP #7 - Additional Instructions

 

Follow the install instructions in the file, in this release, called additional_install_instructions.txt.

There is a text file with three constant definitions: TEXT_PRODUCTS_SEO_URL, TEXT_EDIT_CATEGORIES_SEO_URL, and TEXT_CATEGORIES_SEO_URL; and two functions tep_get_category_seo_url() and tep_get_products_seo_url().

 

These changes support the new fields in categories.php that allow you to specify an alternate name for the category or product, (and must be added before the ?>.)

 

With so many changes to the code for any given contribution, it is so easy to miss a step. And we've all done it. (Some of us more often then others... :blush: )

 

Cheers,

-Skittles

Link to comment
Share on other sites

Hello,

 

I am trying to do a 301 redirect from one SEO URL to another. e.g.

 

redirect 301 /xyz-c-1-2-3.html http://www.abc.co.uk/xyz-c-2-3.html

 

however when I visit the old URL /xyz-c-1-2-3.html it gets redirected to http://www.abc.co.uk/xyz-c-2-3.html?cpath=1_2_3

 

Any ideas on why this happens or how to redirect so cpath does not show?

 

Thanks

pbbabla,

 

There is an option in Configuration->SEO URLs, to "Add cPath to product URLs?" Set this to false.

 

Assuming nothing else is amiss, that should remove the "?cPath=..." from your URL.

 

Let us know if they don't go away.

 

-Skittles

Link to comment
Share on other sites

I WANT MORE CHARACTERS IN "ENTER SPECIAL CHARACTER CONVERSIONS" HOW TO CHANGE?

PLEASE HELP ME

Paradisebg,

 

Special characters are removed from the string by the "strip" function of the SEO class. In seo.class.php, on or around line 1309, you will find the function definition:

	function strip($string){
	if ( is_array($this->attributes['SEO_CHAR_CONVERT_SET']) ) $string = strtr($string, $this->attributes['SEO_CHAR_CONVERT_SET']);
	$pattern = $this->attributes['SEO_REMOVE_ALL_SPEC_CHARS'] == 'true'
					?	"([^[:alnum:]])+"
					:	"([[:punct:]])+";
	$anchor = ereg_replace($pattern, '', strtolower($string));
	$pattern = "([[:space:]]|[[:blank:]])+";
	$anchor = ereg_replace($pattern, '-', $anchor);
	return $this->short_name($anchor); // return the short filtered name
} # end function

You will need to modify the "regular expression" "([^[:alnum:]])+".

 

I'm no expert in regex, but here's a link to some relatively clear information, from "The National Digital Archives of Datasets", that may help: http://www.ndad.nationalarchives.gov.uk/he...xpressions.html.

 

Good luck,

-Skittles

Link to comment
Share on other sites

Hi Skittles,

 

Thanks for your reply. This option is already set to false in admin. The ?cpath does not appear when this URL is accessed via browsing. Only when accessed via the redirected URL it appears. Any other suggestions?

 

Thanks

Edited by pbbabla
Link to comment
Share on other sites

Paradisebg,

 

Special characters are removed from the string by the "strip" function of the SEO class. In seo.class.php, on or around line 1309, you will find the function definition:

	function strip($string){
	if ( is_array($this->attributes['SEO_CHAR_CONVERT_SET']) ) $string = strtr($string, $this->attributes['SEO_CHAR_CONVERT_SET']);
	$pattern = $this->attributes['SEO_REMOVE_ALL_SPEC_CHARS'] == 'true'
					?	"([^[:alnum:]])+"
					:	"([[:punct:]])+";
	$anchor = ereg_replace($pattern, '', strtolower($string));
	$pattern = "([[:space:]]|[[:blank:]])+";
	$anchor = ereg_replace($pattern, '-', $anchor);
	return $this->short_name($anchor); // return the short filtered name
} # end function

You will need to modify the "regular expression" "([^[:alnum:]])+".

 

I'm no expert in regex, but here's a link to some relatively clear information, from "The National Digital Archives of Datasets", that may help: http://www.ndad.nationalarchives.gov.uk/he...xpressions.html.

 

Good luck,

-Skittles

Okay. Maybe I should have thought that through a little harder before answering... :blush:

 

After re-reading Paradisebg's request, it occurs to me he is asking how to add specific characters via the Admin Configuration.

 

I've never tried this, but I suspect the examples "char=>conv,char2=>conv2" translate to "®=>conv,©=>conv,£=>conv". (I'm using the characters, not the html equivalents. If you don't see the characters, they are the circle-R for Registered, circle-C for Copyright and the currency symbol for English Pounds.)

 

Hope this helps.

-Skittles

Link to comment
Share on other sites

Grunionfab,

 

I am attaching a text file with snippets of code you need for categories.php to integrate Ultimate SEO URLs with an existing install of Header Tags Controller. The code you will be replacing has already been modified.

 

This is not a complete list of changes. The code in the following list refers only to code that has been modified by both contributions.

 

The line numbers given are approximate, and based on the installation notes of Header Tags Controller.

 

You should be able to simply "cut and paste" from the text file to your categories.php file. (Back up first!)

 

Good Luck, :)

-Skittles

 

Skittle,

You are wonderful, thank you!!!

I installed your changes and installed the other changes and it appears to be working!!! The only thing not working is that when a customer types in their cc info and hits continue instead of getting the confirmation page they getting the login screen and the add to cart buttons show an empty cart, but I believe I read a fix for this somwhere in this forum.... i will look for it now. Thank you so much for your help!

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