Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

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


Recommended Posts

IT WORKS!!!!!!!!!!!!!!!!!! :lol:

 

Thanks mate, it works perfect far as I have tested.

 

Thanks again for you help and your contribution

 

PS: do I have to leave it that way for ever without anyother changing?

 

You are welcome Eric

 

I am glad I was able to help.

 

Yes you can leave it like that without any other changes.

 

It has been my experience that some servers require "Options +FollowSymLinks", while others do not. If it works without it then that is the way your server is configured.

Link to comment
Share on other sites

Many thanks anyway...

osCommerce Online Merchant v2.2 RC1 W3C Valid FR avec : colissimo_v1.9 // CGV // GoogleXML_sitemap - Update -> googlexml_sitemap_seo_v_1.5 // Ultimate SEO URLs 2.1d - Update -> v22d_12 // AntiRobotRegistrationValidation-3.1 // TinyMCE WYSIWYG HTML EDITOR // HEader Tag SEO 3.1.4 // PDF Invoice 1.5 // Specials_enhanced_v1_3_1 // quick_stock_update_v3.5_FRENCH // xmembers_v2.2 // contact_us_form_in_db_with_amin_v1.1 // photo_display_1 // previous_next_with_details // infoBox Admin v.2.25 // whosonlineturbov1.1fr // customer_discount_v1.3 // flash_bannersv2 // Horizontal_menu_V3 // Loginbox_Best_1 // CCGV // XSell_v2_7_2 // Printable Catalog XSS Flaw Fixed // all_specials_slideshow // Birthdays_v1.4 // Search_price_range_pulldown_menu_1.1 // contrib-categories // Reviews_in_Product_Display_v2.3 // Easy Graphical Borders // Simple Multiple Images (Unlimited) with Fancy Popups V1.3.5 // Guestbook V3.0 // Blacklist_IP_v.3 // Quicker Product Edit v2.1 // Chronopost_2010 // Easy Center // Size Shop with Layers // Safari-Chrome_fix // Protection to Configuration v1.3a // Page_Cache_v1.6... Thanks to everyone!

Link to comment
Share on other sites

Hey guys I just installed the Ultimate SEO URL 2.6 on my site.

 

And now when I go to log-in I get this error @ www.boostanddestroy.com/admin

 

"Warning: include_once(includes/classes/seo.class.php) [function.include-once]: failed to open stream: No such file or directory in /home/cbweaver/public_html/boostanddestroy.com/admin/includes/application_top.php on line 160

 

Warning: include_once() [function.include]: Failed opening 'includes/classes/seo.class.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/cbweaver/public_html/boostanddestroy.com/admin/includes/application_top.php on line 160

 

Fatal error: Class 'SEO_URL' not found in /home/cbweaver/public_html/boostanddestroy.com/admin/includes/application_top.php on line 162"

 

Also Ultimate SEO does not seem to be working at all after my install.

Thank you!

 

If you got this error then you have put the code in the wrong application_top.php :)

 

Thanks to FWR Media who helped me fix this!!!!! www.fwrmedia.co.uk

Link to comment
Share on other sites

Can anyone help me at all???

 

I have been trying to get this to work on my site (modded and custom template ), after much trouble I removed it from my live site and added it to my testing site. I know that I have a working mod rewrite set and that I have the correct path on my .htaccess file since I had this contribution professionally installed on a really customized osc site on mine previously. I am trying to manually install version 2.7 on my cart which is osc 2.2m2 update 051112

 

I am getting the following errors:

 

on index.php :

 

 

 

Fatal error: Call to undefined function: mb_convert_case() in /home/content/my/site/path/demos/shoppingcart01/includes/classes/seo.class.php on line 1810

 

 

the code is as follows:

 

 

$anchor = ereg_replace($pattern, '', mb_convert_case($string, MB_CASE_LOWER, "utf-8"));

 

 

and the code just prior and previous from lines 1805-1814:

 

 

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, '', mb_convert_case($string, MB_CASE_LOWER, "utf-8"));
	$pattern = "([[:space:]]|[[:blank:]])+"; 
	$anchor = ereg_replace($pattern, '-', $anchor);
	return $this->short_name($anchor); // return the short filtered name 
} # end function

 

 

and I also get these errors on my admin page:

ERROR #1

 

 

Warning: tep_href_link(includes/classes/seo.class.php): failed to open stream: No such file or directory in /home/content/my/site/path/demos/shoppingcart01/admin/includes/functions/html_output.php on line 22

 

 

ERROR #2

 

 

Warning: tep_href_link(): Failed opening 'includes/classes/seo.class.php' for inclusion (include_path='.:/usr/local/lib/php') in /home/content/my/site/path/demos/shoppingcart01/admin/includes/functions/html_output.php on line 22

 

 

ERROR #3

 

 

Fatal error: Cannot instantiate non-existent class: seo_url in /home/content/my/site/path/demos/shoppingcart01/admin/includes/functions/html_output.php on line 25

 

 

The code is as follows for line 22:

 

 

include_once(DIR_WS_CLASSES . 'seo.class.php');

 

 

The code is as follows for line 25:

 

 

$seo_urls = new SEO_URL($languages_id);

 

 

and the code just prior and previous from lines 17-28:

 

 

 

if (SEO_ENABLED == 'true') { //run chemo's code
 function tep_href_link($page = '', $parameters = '', $connection = 'NONSSL', $add_session_id = true, $search_engine_safe = true) {
	global $seo_urls;
			if ( !is_object($seo_urls) ){
					if ( !class_exists('SEO_URL') ){
							include_once(DIR_WS_CLASSES . 'seo.class.php');
					}
					global $languages_id;
					$seo_urls = new SEO_URL($languages_id);
			}
	return preg_replace('/&/','&',$seo_urls->href_link($page, $parameters, $connection, $add_session_id));
 }

 

 

Thanks in advance for any help you may be able to give or if you know a more compatable version of the SEO contribution.

Link to comment
Share on other sites

Well I have it installed and working fine now, I took FWR Media's advice and used the 2.1d ORIGINAL updated version of this contribution. Now it works quite well. My last 3 Q's are these. First off is there any way to get the product name included in the url or am I only able to have the catagory and product number? my links now are like this http://www.mydomain.com/glass-pipes-p-78.html and I'd like to see http://www.mydomain.com/three-inch-glass-pipes-p-78.html. and lastly, which header tags is compatable with this contribution? Lastly do I need to install IndependentSeoUrlValidation_v1.0.4 since my urls appear to be the correct type?

 

Thanks FWR Media for suggesting the use of 2.1d ORIGINAL updated version.

Edited by jester420247sl
Link to comment
Share on other sites

Thanks, is header tags for novices http://addons.oscommerce.com/info/4822 compatable as well? I am looking for something I dont have to manually set up each header with.

 

Yes Header Tags for Novices is compatible as well. This is the contribution I use with Ultimate SEO URLs, but only because I am using a template monster template, and I was unable to install Header Tags SEO by Jack_mcs. Header Tags For Novices is very easy to install, There is the option to manually enter a different title or description but you do not have to, it will use your products name and description by default.

Link to comment
Share on other sites

So I have have come up against a issue and while I'm still searching I figured I would post here as well. I have installed 2.1d updated and not any time an error happens within the checkout process the user is dumped back to the login page and the shopping cart is emptied, so pretty much loses the osCid. If anyone has found a resolution to this issue I would be greatly appreciative.

 

Thank you in advance for your time and consideration.

Link to comment
Share on other sites

Eventually found a solution. Made the following changes to the index.php rewrite:

 

RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /index\.php\ HTTP/

RewriteRule ^index\.php$ "http\:\/\/www\.oneofakind\.org\.uk" [R=301,L]

 

Everything now works, (still don't understand .htaccess syntax but it works)

 

I use an index.php rewrite, too, and now I am wondering if this is causing the categories not to show up in the URLs? The URLs for the product pages work fine, but the categories just show something like ?cpath=32, etc.

 

I use USU v2.1d Updated, STS 4.5.8 with os 2.2Rc2a (php 5.2.9 and Mysql 5.0.51). Any ideas on how to make the categories work on the URLs?

 

Thanks in advance!

I repeat myself when under stress, I repeat myself when under stress, I repeat myself...

 

--King Crimson (“Discipline”)

Link to comment
Share on other sites

I use an index.php rewrite, too, and now I am wondering if this is causing the categories not to show up in the URLs? The URLs for the product pages work fine, but the categories just show something like ?cpath=32, etc.

 

I use USU v2.1d Updated, STS 4.5.8 with os 2.2Rc2a (php 5.2.9 and Mysql 5.0.51). Any ideas on how to make the categories work on the URLs?

 

Thanks in advance!

 

Able to show a url? I support 2.1d ORIGINAL updated .. perhaps also your php redirects script.

Edited by FWR Media
Link to comment
Share on other sites

So I have gone through and reinstalled Ultimate SEO three times, I tried with 2.1d original and with 2.7 and the same problem occurs whenever a error is (credit card is invalid etc) detected in checkout you lose your osCid. I thought about forcing cookies but I would rather not have to take that step. Is there a way for Ultimate SEO to not apply itself during the checkout stage?

Link to comment
Share on other sites

Able to show a url? I support 2.1d ORIGINAL updated .. perhaps also your php redirects script.

Yes, that is the version I have (sorry, I forgot to add the “original” part). It shows the URLs for products no problem, for example: http://www.sacred-jewelry.com/buddha-eyes-necklace-p-28.html, but if I click on any category, the URL becomes http://.../?cPath=21

 

What do you mean my redirect php script? Could you please guide a little more here? I tried removing the index.php redirect from the .htaccess file, but it didn't make any difference.

 

Thanks!

I repeat myself when under stress, I repeat myself when under stress, I repeat myself...

 

--King Crimson (“Discipline”)

Link to comment
Share on other sites

So I have gone through and reinstalled Ultimate SEO three times, I tried with 2.1d original and with 2.7 and the same problem occurs whenever a error is (credit card is invalid etc) detected in checkout you lose your osCid. I thought about forcing cookies but I would rather not have to take that step. Is there a way for Ultimate SEO to not apply itself during the checkout stage?

 

SEO urls has no effect whatsoever during the checkout stage. ( at least 2.1d ORIGINAL updated)

 

All urls that are not seo related are ignored and passed back to the standard tep_href_link() function.

Link to comment
Share on other sites

Yes, that is the version I have (sorry, I forgot to add the “original” part). It shows the URLs for products no problem, for example: http://www.sacred-jewelry.com/buddha-eyes-necklace-p-28.html, but if I click on any category, the URL becomes http://.../?cPath=21

 

What do you mean my redirect php script? Could you please guide a little more here? I tried removing the index.php redirect from the .htaccess file, but it didn't make any difference.

 

Thanks!

 

In your post you stated ..

 

I use an index.php rewrite, too

 

Which suggested to me that you have a php file redirecting as well as .htaccess.

 

Other than that .. the main (or probably only) reason for menus not producing SEO URLs is that they hardcode links (generally html monkeys (PHP non savvy designers) do this) and do not utilise the correct tep_href_link() function to generate urls.

 

It is through the function that correct urls are produced .. hope that helps.

Link to comment
Share on other sites

In your post you stated ..

 

I use an index.php rewrite, too

 

Which suggested to me that you have a php file redirecting as well as .htaccess.

 

Other than that .. the main (or probably only) reason for menus not producing SEO URLs is that they hardcode links (generally html monkeys (PHP non savvy designers) do this) and do not utilise the correct tep_href_link() function to generate urls.

 

It is through the function that correct urls are produced .. hope that helps.

Thanks for your reply, but I am not sure I follow you... I don't have a php file redirecting, just the redirect in the .htaccess file. As far as the categories are concerned, I don't understand why the site wouldn't generate urls for the categories when it does it without any problem for the products. I use STS, so there is a bit of html in there (not necessarily mine), but the template simply “frames” the content, so to speak, and everything works like any other osc site. Any ideas on where to look, and for what?

 

I have the same version of this contribution on another site and it has no problems at all.

 

Thanks again!

I repeat myself when under stress, I repeat myself when under stress, I repeat myself...

 

--King Crimson (“Discipline”)

Link to comment
Share on other sites

Thanks for your reply, but I am not sure I follow you... I don't have a php file redirecting, just the redirect in the .htaccess file. As far as the categories are concerned, I don't understand why the site wouldn't generate urls for the categories when it does it without any problem for the products. I use STS, so there is a bit of html in there (not necessarily mine), but the template simply “frames” the content, so to speak, and everything works like any other osc site. Any ideas on where to look, and for what?

 

I have the same version of this contribution on another site and it has no problems at all.

 

Thanks again!

 

As I said .. SEO urls requires tep_href_link() .. STS has no problem with this contribution .. you need to look at the code that is producing the non working links.

Link to comment
Share on other sites

As I said .. SEO urls requires tep_href_link() .. STS has no problem with this contribution .. you need to look at the code that is producing the non working links.

Ok, let me try this. Maybe I messed something up when trying to integrate the SID killer contribution. Could you please look at the beginning of my includes/functions/html_output.php file, and tell me if it is right, or if I messed something up? Thanks!

 

////

// Ultimate SEO URLs v2.1

// The HTML href link wrapper function

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

global $kill_sid, $HTTP_GET_VARS; //SID killer

global $seo_urls;

if ( !is_object($seo_urls) ){

if ( !class_exists('SEO_URL') ){

include_once(DIR_WS_CLASSES . 'seo.class.php');

}

global $languages_id;

$seo_urls = new SEO_URL($languages_id);

}

return $seo_urls->href_link($page, $parameters, $connection, $add_session_id);

}

 

////////////////////////////////////////////////////////////// SID killer

 

if ($HTTP_GET_VARS['language'] && $kill_sid) {

 

$l = ereg('[&\?/]?language[=/][a-z][a-z]', $parameters, $m);

 

if ($l) {

 

$parameters = ereg_replace("[&\?/]?language[=/][a-z][a-z]", "", $parameters);

 

$HTTP_GET_VARS['language'] = substr($m[0],-2);

 

}

 

if (tep_not_null($parameters)) {

 

$parameters .= "&language=" . $HTTP_GET_VARS['language'];

 

} else {

 

$parameters = "language=" . $HTTP_GET_VARS['language'];

 

}

 

}

 

////////////////////////////////////////////////////////////// eoc SID

////

//////////////////////////////////////////////////////////////

 

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

 

$link .= $separator . $_sid;

 

}

 

//////////////////////////////////////////////////////////////

// The HTML image wrapper function

function tep_image($src, $alt = '', $width = '', $height = '', $parameters = '') {

I repeat myself when under stress, I repeat myself when under stress, I repeat myself...

 

--King Crimson (“Discipline”)

Link to comment
Share on other sites

Ok, let me try this. Maybe I messed something up when trying to integrate the SID killer contribution. Could you please look at the beginning of my includes/functions/html_output.php file, and tell me if it is right, or if I messed something up? Thanks!

 

////

// Ultimate SEO URLs v2.1

// The HTML href link wrapper function

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

global $kill_sid, $HTTP_GET_VARS; //SID killer

global $seo_urls;

if ( !is_object($seo_urls) ){

if ( !class_exists('SEO_URL') ){

include_once(DIR_WS_CLASSES . 'seo.class.php');

}

global $languages_id;

$seo_urls = new SEO_URL($languages_id);

}

return $seo_urls->href_link($page, $parameters, $connection, $add_session_id);

}

 

////////////////////////////////////////////////////////////// SID killer

 

if ($HTTP_GET_VARS['language'] && $kill_sid) {

 

$l = ereg('[&\?/]?language[=/][a-z][a-z]', $parameters, $m);

 

if ($l) {

 

$parameters = ereg_replace("[&\?/]?language[=/][a-z][a-z]", "", $parameters);

 

$HTTP_GET_VARS['language'] = substr($m[0],-2);

 

}

 

if (tep_not_null($parameters)) {

 

$parameters .= "&language=" . $HTTP_GET_VARS['language'];

 

} else {

 

$parameters = "language=" . $HTTP_GET_VARS['language'];

 

}

 

}

 

////////////////////////////////////////////////////////////// eoc SID

////

//////////////////////////////////////////////////////////////

 

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

 

$link .= $separator . $_sid;

 

}

 

//////////////////////////////////////////////////////////////

// The HTML image wrapper function

function tep_image($src, $alt = '', $width = '', $height = '', $parameters = '') {

 

I don't understand this sid killer thing .. just remove it.

 

If your settings are correct then the sid will disappear after one click .. if you are still not happy then get a proper cert matching your http address and set "force cookies"

Link to comment
Share on other sites

I don't understand this sid killer thing .. just remove it.

 

If your settings are correct then the sid will disappear after one click .. if you are still not happy then get a proper cert matching your http address and set "force cookies"

I have removed it, but cannot see any difference... I am not sure what you are talking about when you say to get a proper certificate, since I have one that matches my site. What I need help with is figuring out why the categories do not show the seo friendly urls, instead of ?cPath=21, etc., while the products do show the seo friendly urls. :(

 

Thanks anyway...

Edited by jailaxmi

I repeat myself when under stress, I repeat myself when under stress, I repeat myself...

 

--King Crimson (“Discipline”)

Link to comment
Share on other sites

I have removed it, but cannot see any difference... I am not sure what you are talking about when you say to get a proper certificate, since I have one that matches my site. What I need help with is figuring out why the categories do not show the seo friendly urls, instead of ?cPath=21, etc., while the products do show the seo friendly urls. :(

 

Thanks anyway...

 

I just looked at your site and it does seem an odd case ..

 

e.g.

 

http://www.sacred-jewelry.com/yogajewelry/...ra-c-21_28.html

 

translates to (browser)..

 

http://www.sacred-jewelry.com/?cPath=21_28

 

The page is loading regardless .. which is odd .. normally this would fail with a server error.

 

Can I just confirm that you are on a *nix server and not WinDoze

Link to comment
Share on other sites

I just looked at your site and it does seem an odd case ..

 

e.g.

 

http://www.sacred-jewelry.com/yogajewelry/...ra-c-21_28.html

 

translates to (browser)..

 

http://www.sacred-jewelry.com/?cPath=21_28

 

The page is loading regardless .. which is odd .. normally this would fail with a server error.

 

Can I just confirm that you are on a *nix server and not WinDoze

Yes, that's odd. The store used to be in the directory /yogajewelry/ but I just switched it to the root folder at http://www.sacred-jewelry.com. Not sure why it is redirecting the page instead of giving a 404 error!

Anyway, I am on a Linux server. You can see that the categories don't have seo friendly urls, but if you click on any of the products, those look ok.

Edited by jailaxmi

I repeat myself when under stress, I repeat myself when under stress, I repeat myself...

 

--King Crimson (“Discipline”)

Link to comment
Share on other sites

Hello,

 

Just 2 questions...

 

Is Header Tags SEO V 3.1.3 compatible with USU v2.1d ???

 

Is Anti Robot Registration Validation V3.1 compatible too?

 

Thanks

osCommerce Online Merchant v2.2 RC1 W3C Valid FR avec : colissimo_v1.9 // CGV // GoogleXML_sitemap - Update -> googlexml_sitemap_seo_v_1.5 // Ultimate SEO URLs 2.1d - Update -> v22d_12 // AntiRobotRegistrationValidation-3.1 // TinyMCE WYSIWYG HTML EDITOR // HEader Tag SEO 3.1.4 // PDF Invoice 1.5 // Specials_enhanced_v1_3_1 // quick_stock_update_v3.5_FRENCH // xmembers_v2.2 // contact_us_form_in_db_with_amin_v1.1 // photo_display_1 // previous_next_with_details // infoBox Admin v.2.25 // whosonlineturbov1.1fr // customer_discount_v1.3 // flash_bannersv2 // Horizontal_menu_V3 // Loginbox_Best_1 // CCGV // XSell_v2_7_2 // Printable Catalog XSS Flaw Fixed // all_specials_slideshow // Birthdays_v1.4 // Search_price_range_pulldown_menu_1.1 // contrib-categories // Reviews_in_Product_Display_v2.3 // Easy Graphical Borders // Simple Multiple Images (Unlimited) with Fancy Popups V1.3.5 // Guestbook V3.0 // Blacklist_IP_v.3 // Quicker Product Edit v2.1 // Chronopost_2010 // Easy Center // Size Shop with Layers // Safari-Chrome_fix // Protection to Configuration v1.3a // Page_Cache_v1.6... Thanks to everyone!

Link to comment
Share on other sites

I just looked at your site and it does seem an odd case ..

 

e.g.

 

http://www.sacred-jewelry.com/yogajewelry/...ra-c-21_28.html

 

translates to (browser)..

 

http://www.sacred-jewelry.com/?cPath=21_28

 

The page is loading regardless .. which is odd .. normally this would fail with a server error.

 

Can I just confirm that you are on a *nix server and not WinDoze

 

 

Hey guys,

 

i have exactly the same problem! But it includes a second problem in my case: the product-detail page cannot be opened! I have no clue what to do to fix that?!

When you hover over the links they show up perfectly in the statusbar. But once you click on the link it says "?cPath=21" in the browserline.

 

Greez from Germany,

Tobi

Edited by tdoubleu
Link to comment
Share on other sites

http://www.sacred-jewelry.com has a problem in that the seo url is being 301 redirected to the bad url.

 

Where this is happening I don't know.

 

Could be in .htaccess .. could be a php script in place doing the redirect.

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