I published my first tutorial on embedding WordPress into OS Commerce.
At the time, I was relatively new to working with OSC, so I was
unaware of the many different template modules available for the
software. Through the comments on my post, I learned that the OSC
install that I was working with used the Basic Template Structure
(BTS). However, people inquired about adjusting my tutorial for use with
the Simple Template System (STS). Still more persons asked questions
pertaining to default installs of OSC MS2.2.
Keeping all of these comments in mind, this month I put together a
default install of OSC MS2.2 with an integrated WordPress blogWhat follows is a step-by-step tutorial (with the novice in mind)
showing you how to do this. For the many people who are looking for
an effective way to integrate OS Commerce and WordPress, I hope this
tutorial proves to be a valuable and effective contribution to the
OSC Community.
- First, you will need to install OSC MS2.2
on your web server. This tutorial will assume that your OSC install
is located in the default location for a typical OSC install: http://yourdomain.com/catalog/.
- Next, install WordPress in the /catalog/ directory (i.e. http://yourdomain.com/catalog/wordpress/). Once you’ve installed WordPress, login to your WordPress admin and set Options > General > Blog address (URI) to “http://yourdomain.com/catalog/blog.php” (Note: If you would prefer to have your blog file named something other than blog.php, be sure to set this value accordingly and rename the file that you upload in step 4).
- Now, just after the opening comments of the /catalog/includes/application_top.php file, add the following PHP code:
// turn off WordPress themes and include the WordPress core:
define('WP_USE_THEMES', false);
require('./wordpress/wp-blog-header.php');
- Next, download these two files (blog.php and stylesheet.blog.css) and place them in the root of your OSC install.