osCommerce apparently allows categories id's to be added to no end in the url. I have around 1,000 categories 3 levels deep and around 20,000 products. I've had page load times in excess of 5 minutes, which seem to be caused by the caching system (speeds increased after cache has been deleted). After more insight from problems every 3 months at the start, and more frequent as time went on I've came to notice an interesting trend. For some reason the web crawlers just start adding categories such as: 22_34_78_79_99 and so on! I now have around 90k pages indexed at Google, LOL. I'm going to have a lot of pages not found for quite awhile to come. As long as the last two are valid osCommerce category id's the site accepts the entry and displays the last category id.
Many of the cached entries had category depths as high as 5 levels deep or more?
This becomes a serious issue in USU5 because of the size of the cache (seek times in sqlite are enormous, file seek times are impossible, I never tried mysql caching), with google indexing around 90k pages and crawling an amazing amount of pages and continually adding random add-on categories. I was desperate and made a change to the tep_parse_category_path function in general.php, this fixed the caching problem from osCommerce's cache, but did nothing for the problem with caching in USU5. In order to stop USU5 from caching these invalid url's, I tried to modify the index.php in the page modules directory and couldn't figure out how. So instead I was able to modify the hrefLink function in usu5.php file in the main directory like this:
public function hrefLink( $page, $parameters, $connection, $add_session_id, $search_engine_safe ) {
// Badly coded shops often pass in odd characters
if (sizeof($parameters)>2){
$parameters = array_slice ($parameters, -3);
return osc_href_link( $page, $parameters, $connection, $add_session_id, $search_engine_safe );
}
I'm not sure if this is the most elegant way to fix this problem or if there is a better way!
-Bill