by Chemo
READ THE WHOLE FILE. EVERY LINE. KNOW EACH STEP BEFORE PERFORMING THE MODIFICATION.
This release is also bundled with the new osC Advanced Cache Class. This moves the cache off the filesystem and into the database.
Why store cache in the database? Well, there were some store owners that had trouble with setting up a cache directory and also getting the permissions correct. This is an elegant solution to those problems since there is no need to enter any path or setup any directory with the right permissions. Also, the cache class will serve as the backbone of my future releases (osC Advanced Templating Engine, osC Search Engine / Spider, more performance enhancements, etc).
Installation of the cache class is a 2 step process: upload the file and call the install script in your browser. That is it! Install couldn't be easier! The directions below are bundled...
Admin Control Panel Options
Version 1.X (cName) Screenshots
URL with category name
URL with product name
URL with product and category name
URL with manufacturer name
http://yourdomain.com/index.php?mName=touchstone-entertainment
Version 2.X (Rewrite) Screenshots
URL with category name
URL with product name
URL with manufacturer name
http://yourdomain.com/touchstone-entertainment-m-15.html
These directions assume you are upgrading from version 1.4. If you are using version 1.3 please upgrade to version 1.4 before upgrading to version 2.0! You have been warned.
Before you install this it should be noted that it is NOT COMPATIBLE with the stock osCommerce option of SEF URLs. Be sure to turn this off if you have it enabled!
STEP 1 - Upload the included files - Overwrite the old ones
The files should be located in the upload directory of this contribution.
- includes/seo_cache.php should be uploaded to your *catalog*/includes directory
- includes/classes/cache.class.php should be uploaded to your *catalog*/includes/classes directory
- admin/includes/reset_seo_cache.php should be uploaded to your *catalog*/*admin directory*/includes directory
- install-seo.php should be uploaded to your *catalog* directory
- install-cache.php should be uploaded to your *catalog* directory
STEP 2 - Install the database settings
In step #1 you should have uploaded a file to your catalog directory called "install-seo.php". Call that file in your web browser. Read the page...there are 2 options => install or uninstall. Select the uninstall link and it will remove the old settings. Turn right around and select the install option to get the latest settings .
In step #1 you should have uploaded a file to your catalog directory called "install-cache.php". Call that file in your web browser. Read the page...there are 2 options => install or uninstall. Select the install link and it will add the cache table. Do this even if you are upgrading.
NOTE: You MUST do this step before the code modifications! You have been warned! Read the bold text! Go pet a puppy! Have a Coke and a smile! Donate some money to me! :-)
STEP 3- Edit *catalog*/includes/application_top.php
3 (1) Find this old code:
3 (1) Replace with this code:
STEP 4 - Edit *admin directory*/categories.php
4 (1) Find this code AND DELETE IT:
4 (2) Find this code:
4 (2) Directly AFTER add this:
STEP 5 - Edit *admin directory*/includes/functions/general.php
Add this code to the file just above the ending ?> tag:
STEP 6 - Edit .htaccess file (in your catalog directory)
If you don't have an .htaccess file in your catalog folder create one.
If you are on a Windows/IIS server skip this step - you won't be able to use the rewrite method.
8 (1a) If your store is located in a FOLDER add this to the /folder/.htaccess file:
NOTE: you will have to edit the "folder" to match your directory name!
8 (1b) If your store is located in the root add this to the /.htaccess file:
STEP 9 - Configure the settings
Admin Control Panel => Configuration => Enable SEO URLs => true
Admin Control Panel => Configuration => Choose URL Type => cName or Rewrite
Admin Control Panel => Configuration => Filter Short Words => 3
Admin Control Panel => Configuration => Reset SEO URLs Cache => false
NOTE: The filter short words option will remove all words less than or equal to the number! You can set this to 0 to disable.
The upgrade is pretty straight forward. I anticipate the biggest source of errors will be with modifying the WRONG .htaccess file. It should be the one in your catalog directory. So, if your store is located in a folder (i.e. - www.domain.com/catalog/ ) then you should edit/create the .htaccess in THAT folder. For those that don't know you can have an .htaccess file in each folder and your site is NOT limited to just 1 in the root.
Following the massive requests for me to install my contributions on store owners sites I will start taking them up on their offer. If you would like me to install this or any other contribution on your site just shoot me an email (link at top of page). Upgrade or installation of Ultimate SEO URLs will be set at $50 per install. Sound steep? Well, $20 of that will go toward the osCommerce development team so they can keep coding too. You get this installed hassle free. I get $30 for my time. The osCommerce team gets $20 for just being so damn cool. Everyone wins. :-)
osCommerce is a community driven organization and as such the support base will fall entirely on the forum members. The base code is thoroughly commented and should be easy to follow for any coder.
If you use this contribution and find it useful a small donation can be made via PayPal. This will enable me to offer one-on-one support and also fund releasing other contributions. In addition, if you make a donation it'll make you eligible for other performance optimization contributions that are not released!
After all the contributions I've coded and released I'm beginning to think nobody reads this far down...
eCommerce-Directory.orgIf you're interested in SEO for your store be sure to submit your site to my directory! It has a high PR and clean links |
Blatant Footer AdvertisementIf you need reliable, extremely fast, and expert webhosting for your store I am opening my server to accounts. Each account gets unlimited everything and trust my server is setup to run osCommerce at top speed. |