Thank you – this is perfect!
I wanted to use the blog directory structure and keep the blog integrated into the osCommerce template instead of using blog.php as TheWebist uses in the above posted tutorial:
Embedding WordPress into OSC Part II
To do this I followed the instructions in the tutorial, but used the code from blog.php in the index.php in the blog’s main directory: http://www.domain.com/catalog/wordpress/index.php
In index.php above:
require('includes/application_top.php');
Add this:
chdir('../../public_html/');
// turn off WordPress themes and include the WordPress core:
define('WP_USE_THEMES', false);
require('./blog/wp-blog-header.php');
require('includes/application_top.php');
Remove this:
require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_BLOG);
You will also need to login to your WordPress admin and set Options > General > Blog address (URI) to “http://www.domain.com/catalog/wordpress/”
So far this has worked great for me – let me know if anyone else sees a problem with this. Thanks!
I get this error:
Fatal error: Cannot redeclare get_cat_name() (previously declared in /home/xxxx/public_html/shop/wordpress/wp-includes/functions-post.php:578) in /home/xxxx/public_html/shop/includes/functions/general.php on line 33
line 33 is:
function get_cat_name ($cat_id) {
MPM – are you finding this:
function get_cat_name ($cat_id) {
on line 33 of: /home/xxxx/public_html/shop/includes/functions/general.php
That is a osCommerce file and I do not believe that function should be in the general.php file – at least it is not in mine. You might want to compare your general.php file to the default general.php file in the latest osCommerce release.
Let me know what you find out … thanks.
Seg, “I wanted to use the blog directory structure “
Thank you for posting this I had been toiling for days with wordpress and my modded shop conflicting with each other as I have ultimate seo urls installed, I did what you did and now all is well 🙂
Thanks for sharing,
w-w
seg and web-widget, could you explain a little bit more detailed how you did that? as i have also ultimate seo urls installed i’m very interested. i couldnt follow, for eg i dont find:
require(DIR_WS_LANGUAGES . $language . ‘/’ . FILENAME_BLOG);
what must be in the application_top.php?
thanks
Hello!
Great contrib
but anyone know how to couple the WordPress user login with the Os commerce customer login?
I don’t want to let the commentaries without registration, so it’s better having only one registration working in each programs…
Any ideas?
Cheers