Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

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


Recommended Posts

Hello Emiel, Use of the html and also the additional instruction text file will allow you to fully manipulate your product and category urls.

Edited by yesudo

Your online success is Paramount.

Link to comment
Share on other sites

I have tried both versions (original 2.1.d posted 11.05.2006 and the version of Yesudo posted on 31.10.2006). Unfortunately netiher one of them fixed the issue I have (refer to page 53, posts #1049 + #1053).

 

Does anyone have any other suggestions because I really want to keep using Ultimate SEO but also the payment module?

 

Because I'm not a PHP guru, am not sure where to look. The changes made for the payment module are only made to the checkout_* pages. on the other hand, someone made the point that SEO doesn't impact these pages because it only impacts those listed in the htaccess file in root directory.

Strange ...

 

I think it must have to do with the .class or another general file because in the htaccess file the checkout* pages are not mentioned to be impacted.

Does someone has any idea where the SEO contrib could still impact the checkout* pages ?

 

much appreciated.

Link to comment
Share on other sites

Chemo, if you're reading this, man thats gotta stink.

 

To everyone that is having the problem where it displays ?cpath=# for the product info page:

 

On mine, it actually breaks it and says no product found, others it seems to work but displays the unneeded ?cpath=# (like for the person that posted their website.

 

I did some hacking around the code, and figured out a real quick fix. Keep in mind, this is NOT FULLY TESTED and it probably breaks some other functionality... Now with that disclamer out of the way, here is the fix:

 

in the file catalog/includes/classes/seo.classes.php find the code starting on line 340:

		} elseif ( !$this->is_product_string($params) ) {
  $container[$p2[0]] = $p2[1];
	}

 

This is the code that is causing it to add the extra cpath at the end. So I commented it out, like so (so replace it with this code)

		} elseif ( !$this->is_product_string($params) ) {
  //$container[$p2[0]] = $p2[1];
	}

 

As you can see all I did was comment out that one line, it seems to work. I'm sure a better fix would be to find out what is causing it to go into this elseif statement and fix it. Since I am in a hurry right now, I could not investigate further to produce a better fix at this time.

 

I recomend not doing this fix if your site works with the extra cpath=# at the end, until someone comes up with a better fix that finds out why it is going into this loop in the first place.

 

btw I have ultimate image pack installed, that might ahve something to do with it.

 

I'm not getting the errors people are talking about so I don't know how to fix those.

 

Hope someone can take this and find a better fix, maybe if we are lucky it will be Chemo but from the sound of that post probably not soon. Later tonight or some time within the next week I'll try to better fix it (if someone else does not beat me to it) and post the fix here as well as on the contrib section. (no promises though :P )

 

Oh yeah, and as always, backup your files before doing this...

 

 

Hi,

 

does anyone have the original files which i modified for the ultimate SEO URL's? I didnt do a back up and something went wrong somewhere. Whe SEO is turned on in admin, the URL's are like this:

 

https://www.british-warrior.co.uk/shop/kung...lack-p-132.html

 

and this:

 

https://www.british-warrior.co.uk/shop/uniforms-c-21.html

 

When they are off, my pages just dont load.

 

The files are listed below as stated in the install file. Thanks.

 

 

Step #1 - Add new files

 

Add these new files to catalog:

admin/includes/reset_seo_cache.php

includes/classes/seo.class.php

 

Step #2 - Modify files

 

These files has been modified:

admin/categories.php

admin/includes/functions/general.php

.htaccess

includes/application_top.php

includes/functions/html_output.php

 

Oh yeah, i already have the new seo.class.php file

Edited by stecol
Link to comment
Share on other sites

Checkout the Randelia fix - which is incorporated in the latest version. Fix effects application_top and html_output files.

Edited by yesudo

Your online success is Paramount.

Link to comment
Share on other sites

Checkout the Randelia fix - which is incorporated in the latest version. Fix effects application_top and html_output files.

 

Hi,

 

Thanks for reply.

 

the version i installed was the one which already included the randelia fix (31 Oct 2006). I amended the 2 files in the fix and tryed this anyway but the pages still don't load. I also cleared the browser cache but no joy.

 

before i added this contribution, i also added the custom meta tage http://www.oscommerce.com/community/contri...custom+meta+tag

 

this included an sql update.

 

I backed this up though and restored successfully.

 

Can i get a full set of files to restore the site? I don't have these as it was an automatic install through Cpanel with my host.

 

Thanks.

Edited by stecol
Link to comment
Share on other sites

I downloaded the October 31 version of Ultimate SEO URLs. When installing I found this in categories.php

 

// Ultimate SEO URLs BEGIN
// If the action will affect the cache entries
if (eregi("(insert|update|setflag)", $action))
	include_once ('includes/reset_seo_cache.php');
// Ultimate SEO URLs END

 

Except for some reason the line breaks were not in the file causing this to be commented out. Just an FYI.

 

 

Link to comment
Share on other sites

Odd, I just downloaded it and found the lines are showing correctly for me:

 

// Ultimate SEO URLs BEGIN
// If the action will affect the cache entries
if (eregi("(insert|update|setflag)", $action))
	include_once ('includes/reset_seo_cache.php');
// Ultimate SEO URLs END

Edited by yesudo

Your online success is Paramount.

Link to comment
Share on other sites

Odd, I just downloaded it and found the lines are showing correctly for me:

 

// Ultimate SEO URLs BEGIN
// If the action will affect the cache entries
if (eregi("(insert|update|setflag)", $action))
	include_once ('includes/reset_seo_cache.php');
// Ultimate SEO URLs END

 

Hi,

 

ok with regards to updating my site, am i ok just taking the whole of the catalog folder and uploading to my site? Below is the current version i have set up and what i plan to upgrade to:

 

current> (2.2 MS2 (051113) >upgrade to> oscommerce-2.2ms2-060817

 

I presume this will not affect all of the data in the database?

 

I also noticed that there is an 'extras' folder in the new installation package, what do i do with this? I cant find any instructions for an upgrade in the documentation.

 

Thanks.

Link to comment
Share on other sites

The thread you want for the osCommerce upgrade is: http://www.oscommerce.com/forums/index.php?showtopic=223556

that thread has nothing specific to the contribution, I have added the new fixes and seem to have no problems at all.

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

that thread has nothing specific to the contribution, I have added the new fixes and seem to have no problems at all.

 

 

Hi, i Have now upgraded my store to version 2.2ms2-060817 and it is now up and running again. I noticed that SEO URL's is still showing in admin but when set to 'true', nothing seems to alter. Could somebody please advise as to which version of ultimate SEO URL's i now need for this version of oscommerce and wether there are any fixes needed which are not included in the package. Thanks.

Link to comment
Share on other sites

31 October version is fine for any version of osCommerce 2.2 MS2.

 

Maybe check all elements of the contribution are installed incase you lost anything during your upgrade of osCommerce.

Edited by yesudo

Your online success is Paramount.

Link to comment
Share on other sites

does someone know how to modify the $breadcrumb so that it lists the corrent links to the products and information pages, so when you move your mouse over the....... top >> catelog >> category 1 >> it shows the new changed URL instead of the ugly one like information.php?id=3 i want it to say

 

i think it has to do with this line in the application_top.php file but i cannot figure out what to change or to add or delete, can someone help?

// add category names or the manufacturer name to the breadcrumb trail
 if (isset($cPath_array)) {
for ($i=0, $n=sizeof($cPath_array); $i<$n; $i++) {
  $categories_query = tep_db_query("select categories_name from " . TABLE_CATEGORIES_DESCRIPTION . " where categories_id = '" . (int)$cPath_array[$i] . "' and language_id = '" . (int)$languages_id . "'");
  if (tep_db_num_rows($categories_query) > 0) {
	$categories = tep_db_fetch_array($categories_query);
	$breadcrumb->add($categories['categories_name'], tep_href_link(FILENAME_DEFAULT, 'cPath=' . implode('_', array_slice($cPath_array, 0, ($i+1)))));
  } else {
	break;
  }
}

Link to comment
Share on other sites

Hi,

 

I installed version 2.5.9.1 and it seems to work fine on a clean installation.

 

I am getting this error in the admin section:

Warning: call_user_func(tep_reset_cache_data_seo_urls) [function.call-user-func]: First argument is expected to be a valid callback in /home/tennants/public_html/cleaning/admin/includes/functions/general.php on line 1199

 

Working through the forum, I noticed that others had the same problem but I do not seem to find the solution to this problem. Could someone please clarify.

 

I also installed header tags as it is important to me to use it seeing that I am an online marketing specialist, and this problem occured once I installed the header tags module.

 

I am using an Apache server if that means anything.

 

Please advise urgently.

 

Thanks

Marinda Stuiver

Link to comment
Share on other sites

I installed the very latest version of this product today... checked it, double checked it, and still don't have the "Configuration => SEO URLs" option in my Admin... I have the "search engine friendly URL" option, but when turned on, anything I click on returns me to the home page of my catalog... No options are in my categories to change descriptions...

 

The three additional lines are in my admin/includes/languages/english/categories.php

The new blurb is in my admin/includes/functions/general.php

The two new files are uploaded to admin/includes/ (reset_seo_cache.php) and includes/classes/ (seo.class.php)

The includes/application_top.php has the new blurb

The new code was replaced to includes/functions/html_output.php

The SQL lines were updated

the .htaccess file was updated

 

What did I miss?

 

http://www.familymemoriesandmore.com

Link to comment
Share on other sites

I installed the very latest version of this product today... checked it, double checked it, and still don't have the "Configuration => SEO URLs" option in my Admin... I have the "search engine friendly URL" option, but when turned on, anything I click on returns me to the home page of my catalog... No options are in my categories to change descriptions...

 

The three additional lines are in my admin/includes/languages/english/categories.php

The new blurb is in my admin/includes/functions/general.php

The two new files are uploaded to admin/includes/ (reset_seo_cache.php) and includes/classes/ (seo.class.php)

The includes/application_top.php has the new blurb

The new code was replaced to includes/functions/html_output.php

The SQL lines were updated

the .htaccess file was updated

 

What did I miss?

 

http://www.familymemoriesandmore.com

 

search engine friendly URLs must be turned OFF (this option has nothing to do with ths mod) I know, it doesn't make sense :-)

Link to comment
Share on other sites

Emmett,

 

do you have any pointers on how to go about making this contribution (2.1d or your update) so that Articles Manager, Newsdesk and even FAQ desk are compatiable with it?

 

I will try to look in to this in detail and post my results here when I get somewhere :D

 

Thanks

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 Chooch,

 

When wanting to combine more contributions with Ultimate SEO URLS, the files you primarily want to focus on are:

 

catalog/includes/classes/seo.class.php

catalog/.htaccess

 

Cheers,

Emmett

Your online success is Paramount.

Link to comment
Share on other sites

catalog/includes/classes/seo.class.php

catalog/.htaccess

thanks for the swift reply Emmett, as much as i appreciate your help i think i'll pass on the tattoo :D

 

i will take an indepth look next week as i will have a few days to spare. i'll update the forum if i have any success - thanks Emmett

Edited by chooch

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

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