Hire an Agile Team for your business

Create your own agile squad with experienced members for your business.

Connect with Experts

Integrating WordPress into Zen Cart

Last Updated on Sep 27, 2024 by Nurul Afsar

Before you start, keep in mind that we also offer a service to integrate WordPress with Zen Cart.  This tutorial and service has been tested with Zen Cart versions: 1.3.8a to 1.5.5f.

When we first launched the Numinix Blog, we tried to use a module called WordPress on Zen Cart to display our WordPress blog as a page inside Zen Cart. Unfortunately, that module hasn’t been updated in years (the word “years” is almost never a good thing when referring to software) and actually causes conflicts with a lot of other modules for Zen Cart. Fast forward to a week ago when one of our loyal customers insisted we find a way to integrate the blog into Zen Cart so that such things as shopping cart quantity and login status can be maintained even when in the blog. After doing a little research, I found that integration had been achieved for osCommerce and that it must also be possible for Zen Cart. So, after a few successful integrations across multiple customer’s websites, including our own, I decided to write this tutorial on how to integrate WordPress with Zen Cart. Due to the large number of steps, I thought it wouldn’t be a good idea to release this as a module.

So firstly, this tutorial assumes you have one the following setups:

Situation 1

  • Zen Cart installed to the root
  • WordPress installed to a sub-folder such as /blog/

We’ve also achieved the following situation:

Situation 2

  • Zen Cart installed to a sub-folder such as /shop/
  • WordPress installed to a sub-folder such as /blog/

It is recommended that your site either not use SEO URLs, or use a SEO URLs module such as SIMPLE SEO URLs (Magic SEO URLs works as well) which can disable/exclude rewriting the “blog” page. If you are using a module that cannot disable rewriting, issues could arise if the module tries to rewrite PHP URLs created by WordPress. For example, when “previewing” a blog post, WordPress creates a PHP URL that could be mistakenly rewritten.

The second situation requires additional steps unless you are fine with your blog appearing in /shop/blog/ rather than /blog/.

Preparing WordPress

WARNING: IF YOU DO NOT HAVE EXPERIENCE WITH DEVELOPING A WEBSITE YOURSELF, DO NOT ATTEMPT TO PERFORM THESE STEPS. CONTACT A PROFESSIONAL!

Step 1:

Create a WordPress Child Theme.

Step 2:

First, you will need to disable access to your current blog by uploading a blank file named index.html to your WordPress root directory. You may also want to rename your index.php file in case your server settings automatically load this file before any html files (this will differ from server to server).

Step 3:

Next, save a copy of your theme’s style.css file and any images that are referenced in the style sheet to a place on your desktop to later be uploaded to your Zen Cart installation.

Rename style.css on your desktop to blog.css and open the file and change all image URL paths to match the URLs found in your Zen Cart style sheets.

Step 4:

Open http://www.domain.com/path_to_wordpress/wp-admin/ and go to SETTINGS

Change WordPress address (URL) to http://www.domain.com/folder_name_of_your_choice (WordPress will be physically installed here)

Change Blog address (URL) http://www.domain.com/blog

Note: these two paths must not match.  If WordPress is located in “/wordpress/”, then the blog will be publicly accessible through an alternate URL (i.e. /blog/).  You can name either whatever you like, but the blog must physically exist at the WordPress Address.  The Blog address will be used as a rewrite for the Zen Cart page we will be building later on.  If you’d like to use a different name other than /blog/ in the URL, you’ll need to modify the htaccess rewrite provided in the Zen Cart installation instructions below.

Step 5:

Rename your WordPress folder to the folder name you chose for the WordPress Address in step 4 above.

** END OF WORDPRESS PREPARATION **

Zen Cart Installation

Step 1:

Upload blog.css to includes/templates/YOUR_TEMPLATE/css/

Upload your wordpress images to includes/templates/YOUR_TEMPLATE/images/

Step 2:

Download the WordPress/Zen Cart integration package.

Unzip the package and upload the full package to your Zen Cart folder.

Step 3:

Open includes/wordpress_page.php and change

require('../wordpress/wp-blog-header.php');

To use your wordpress folder name that you chose previously. If your Zen Cart folder is in the root, remove “../”.

Step 4:

Open includes/template/YOUR_TEMPLATE/common/tpl_main_page.php and find

require($body_code);

Replace it with:

$zc_template = $template;
require($body_code);
$template = $zc_template;

Step 5:

Open includes/application_top.php and find:

require('includes/autoload_func.php');

Add after:

// WordPress integration
require('includes/wordpress_page.php');

Step 6 (skip this step if using a SEO module that cannot be disabled):

In your domain root, open .htaccess and add the following:

Options +FollowSymLinks
RewriteEngine on
RewriteBase /
RewriteRule ^blog(.*)$ /catalog/index.php?main_page=blog&$1 [E=VAR1:$1,QSA,L]

This will rewrite your blog page url to domain.com/blog/. If this causes a server error, try changing the last line above to:

RewriteRule ^blog(.*)$ /catalog/index.php?main_page=blog$1 [L]

Note: if your store is in the root of your domain, remove “/catalog” from the rule.  If you want wordpress to load as a different URL, change the first instance of “blog” in the RewriteRule to whatever you set as the Blog Address in step 3 of the Preparing WordPress section above.

Step 7:

To display your blog titles as the page title:
Open includes/modules/YOUR_TEMPLATE/meta_tags.php
Find:
// EZ-Pages:
case 'page':

And add before:
case 'blog':
define('META_TAG_TITLE', (defined('NAVBAR_TITLE') ? NAVBAR_TITLE . PRIMARY_SECTION : '') . wp_title(PRIMARY_SECTION, false, 'right') . TITLE . TAGLINE);
define('META_TAG_DESCRIPTION', TITLE . PRIMARY_SECTION . (defined('NAVBAR_TITLE') ? NAVBAR_TITLE : '' ) . SECONDARY_SECTION . KEYWORDS);
define('META_TAG_KEYWORDS', KEYWORDS . METATAGS_DIVIDER . (defined('NAVBAR_TITLE') ? NAVBAR_TITLE : '' ) );
break;

You can manipulate this code if you have experience with PHP to create the title format that you’d like. Also opening the meta_tags.php file and creating a custom format for “blog” would be a good idea.

Step 8

Add the following AROUND any meta tags in includes/templates/YOUR_TEMPLATE/common/html_header.php that you do not want to load on the blog page (i.e. description and keywords) so that wordpress tags will be used instead:

<?php if ($_GET['main_page'] != 'blog') { ?>

and

<?php } ?>

** END OF INSTALLATION **

Well, the EASY part is over. Now is the part where you will need some experience with CSS and HTML as you have just imported your entire blog into the main page area of your Zen Cart template… chances are it isn’t going to fit and all of the CSS is ruined by the global style sheet of your Zen Cart. Or, global styles within the blog.css file will have an effect on the look of your store.

Some tips:

  • Remove the header and footer code that you no longer need from header.php and footer.php in your WordPress theme folder.
  • Change all selectors in your css file to be specific to only the main area of the blog page.

Well, that is the end of the tutorial on how to integrate WordPress into Zen Cart. If I’ve missed any steps, please let me know and I will double check everything and update this posting as needed. If you would like to get Numinix to complete these steps for you, please visit our WordPress/Zen Cart Integration service page.

Happy blogging!

353 thoughts on “Integrating WordPress into Zen Cart




  1. We still can not quite think that I could become one of those studying the important guidelines found on your blog.
    My family and I are seriously thankful for your generosity and for offering me the possibility to pursue the chosen profession path.
    Many thanks for the important information I acquired from your web site.


  2. This is a really good tip particularly to those new to the blogosphere.

    Short but very precise information… Thank you for sharing this one.
    A must read article!


  3. It works good! But it looks like WP is only being loaded for ezpages. How do I get WP to load on other pages like category, product, etc?

    The reason is I want to call some functions in my WP’s custom functions.php. I already have edited some zencart code to allow PHP code to be processed in the description of categories.




  4. Missing detail!

    At the end of your zencart tpl_main_page.php, just before , be sure to add

    I couldn’t get instagram embeds to work for weeks until I figured this out.


    1. At the end of your zencart tpl_main_page.php, just before the closing body tag add


      if ($_GET['main_page'] == 'blog') {
      wp_footer();
      }



  5. Hey man, I’m having an issue using this method with zc version 1.5.4 where bloginfo() in jscript_blog.php. Where and how is it that the WP functions are supposed to become available?



  6. Hi Numinix – Thank you for sharing this. I am testing an upgrade from Zencart 1.5.0 (where I have this module installed and works well) to Zencart 1.5.3. The zencart and wordpress installations are in domainname.com/zencart/zc153 (zencart installation) and domainname.com/zencart/zc153/wordpress (wordpress installation – wordpress folder name has been changed to a custom name in the admin settings and site url to /blog/). I can get to my wordpress admin page and create a test page. But when I click on the link I created to open the blog (domainname.com/zencart/zc153/blog) I get a error message:

    The requested URL /custom wordpress name/index.php was not found on this server.

    Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.

    I’ve checked all the steps for both wordpress and zc above and have not missed anything…

    I’ve been playing around with the .htaccess file but can’t seem to figure this out. My .htaccess file is this:

    Options +FollowSymLinks
    RewriteEngine on
    RewriteBase /
    #RewriteRule ^blog(.*)$ /zc153/customwordpressfolder/index.php?main_page=blog&$1 [E=VAR1:$1,QSA,L] <— Tried this and did not work!

    #Options +FollowSymLinks
    #RewriteEngine On
    #RewriteBase /
    #RewriteRule ^blog(.*)$ /index.php?main_page=blog&$1 [E=VAR1:$1,QSA,L] <— Tried this and did not work
    RewriteRule ^blog(.*)$ /customwordpressfolder/index.php?main_page=blog$1 [L] <— Tried this and did not work.

    Can you please guide me as to what I might be doing wrong?



  7. Hi, many thanks for this post. I implemented on puhy.cz and It´s seems ok, but I have problem with access to administration and question about nice adresses on WP.

    1)
    blog adress: https://www.puhy.cz/blog/
    admin adresses: https://www.puhy.cz/blog/wp-admin – not function, when redirect match is in .htaccess (it shows normal blog page and not administration)

    I use magic seo URLs.

    2) is possible to use some “nice adresses” on WP? Now it is https://www.puhy.cz/blog/?p=4/ and i need f.e. https://www.puhy.cz/blog/post-about-ballons-1

    Many thanks.




  8. First, thank you for this tutorial!

    Everything seems to work properly except when clicking on Hello World or Comments link on the WordPress site. The url appears as domain.com/blog/hello-world/ but I am shown the Zencart 404 page.

    I am using CEON Ultimate URI Mapping, and my .htaccess includes the following:

    # Don’t rewrite blog directory
    RewriteCond %{REQUEST_URI} !^/blog/ [NC]

    then the code you provided in the tutorial is added at the bottom.

    My permalinks are set to post name




  9. Hello, thank you very much for this powerfull tool that you shared with us!
    Installed in Valparaisonline.com/blog

    Just that i can’t set the Step 8 right… there is an example of ADD AROUND the metatag the php code ?



  10. Hi Numinix thanks a lot for this powerfull tool that you have shared with us!!..
    I installed this in http://www.valparaisonline.com/blog and its working ok, all except Step 8 meta tags.
    My porpouse of installing this blog was to share the post in my fanpage so bring trafic to the store with content of interest. So it is important to me about HOW the post are shared.
    Facebook for example use the MetaDescription, and i can’nt make it work, cause i’m not sure what do you mean with AROUND the meta tag .
    Can you show me an example? please?



  11. joinsen, unfortunately I do not have experience with nginx. You’ll have to refer to their documentation on how to rewrite a URL to point index.php?main_page=blog.



    1. Hello! can u help me with my problem? Ex. My site is http://www.grace.com and I’v installed worpress under http://www.grace.com/wordpress.

      blog link -> http://www.grace.com/index.php?main_page=blog if I will click any of the link inside the blog content it will directed me to ex. http://www.grace.comblog/?p=4 and the page return blank white page.

      WordPress Address (URL) -> http://localhost/visuo/wordpress
      Site Address (URL)Site Address (URL) -> http://localhost/visuo/blog

      Hoping for your reply soon. Thank you.


  12. Options +FollowSymLinks
    RewriteEngine on
    RewriteBase /
    RewriteRule ^blog(.*)$ /catalog/index.php?main_page=blog&$1 [E=VAR1:$1,QSA,L]
    i use nginx and how can i rewrite it ?


  13. I’m using your most recent version of wordpress_page for Zen Cart integration, and with the TwentyThirteen theme, am still getting same error message ONLY when using a widget in the secondary widget area:
    [10-Oct-2013 19:18:42] PHP Fatal error: Cannot redeclare twentythirteen_setup() in /Users/mikekilmer/Sites/wordpress/steel/wp-content/themes/twentythirteen/functions.php on line 60
    I’ve done a bit of research and troubleshooting,with not luck still. any insights? Thanks much. Your fan – MikeiLL


    1. Mike iLL Kilmer, does this error happen only when you have integrated with Zen Cart? Seems like each widget is trying to load the functions.php file again rather than only once. The issue is likely in your theme and not with the integration.


      1. Thanks for the insight, Numinix! It was actually the social sidebar I was using at http://www.renaissancemaninc.com that was creating the conflict, so for not I’ve just disabled it on the blog pages by adding an if statement to tpl_main_page:
        /*mZoo Remove Social Sidebar from Blog Page*/
        if ($current_page_base != ‘blog’) {?>


  14. I’ve been using this method on a couple of blogs for years (thank you very much), but there is an issue with the Twenty Thirteen theme: PHP Warning:

    call_user_func_array() expects parameter 1 to be a valid callback, function ‘stats_template_redirect’ not found or invalid function name in /path/to/wp-includes/plugin.php on line 406. it occurs when i add any widget into the seconday widget area.

    Any ideas? – thanks.


    1. if ( !function_exists( ‘stats_template_redirect’ ) ) {
      add_action( ‘wp_footer’, ”, 1 );
      } else {
      add_action( ‘wp_footer’, ‘stats_template_redirect’, 1 );
      }


      1. wrong.

        if ( !function_exists( ‘stats_template_redirect’ ) ) {
        add_action( ‘wp_footer’);
        } else {
        add_action( ‘wp_footer’, ‘stats_template_redirect’, 1 );
        }

        or just replace with `add_action( ‘wp_footer’);`



  15. Great mod to have for Zen Cart. Only thing is I can’t get it to work and I’m certain may have to do my SEO mod as you mentioned in the tutorial. I am using CEON’s SEO module, and it has its own rewrite rule htaccess, id this a module that may cause issues that you are aware of?


    1. Jason, you’ll likely need some advanced URL rewriting in your htaccess to get that mod to play nice with the rewrite needed for the virtual blog URL to work.


  16. Having issues with WordPress Stats in the Jetpack plugin? We’ve just uploaded a new wordpress_page.zip package with a modified file located at includes/wordpress_page.php that fixes this bug. Enjoy!


  17. I follow your tutorial, but no luck. I am getting the wp content on the zen cart homepage but nothing else from wordpress past that homepage. when I click on a wp link within that zen cart front page I get a blank page.
    I have been getting the same error with everything single tutorial on zen cart and wordpress integration and nothing dated after 2010.
    will be helpful if anyone has a strong tutorial out there or a way to resolve this. Thanks


    1. Sounds like you are trying to use this tutorial differently than how it was intended. It should be integrated as a DEFINE PAGE in Zen Cart, not on your home page. If you are having it load outside of the “blog” page, or whatever you may have renamed the page to, then the instructions have not been followed correctly. I strongly recommend that you consider our integration service if you are having trouble with our tutorial. There is a lot of file editing and room for error in this integration as it requires introductory PHP and intermediate CSS knowledge.


  18. I have this installed and almost working. The zencart site is at http://74.53.140.227/~abckid/. The blog is at http://74.53.140.227/~abckid/blog/.

    Everything looks fine when you first go to the blog, however, if you try and click any links (posts, comments, etc.), it just redirects back to the blog home page, although it does display the url for the page in the address bar (e.g. http://74.53.140.227/~abckid/blog/?p=5/)

    I did try changing the permalinks, I tried all the different styles, but then I get 404 errors on all blog links.

    I noticed when changing the permalinks that it gives new code that is supposed to be added to the .htaccess file. I did try adding that code, but then the site showed an internal server error.

    I’m guessing it is something in my .htaccess I need to change to get the permalinks to work, but I’m just not sure what?

    This is my .htaccess right now:

    Options +FollowSymLinks
    RewriteEngine on
    RewriteBase /~abckid/

    RewriteRule ^blog/(.*)$ index\.php?main_page=blog$1 [L]

    I would really appreciate any tips on how to get this working.

    Thank you!


    1. Hi all.

      Well, after spending yesterday scouring the net for the most reliable way of implementing Zencart and WordPress. I am torn between linking the sites together or this method by incorporating WordPress into Zencart.
      I have not quite successfully implemented this method.
      The only problem I have is that I am unable to login to wordpress so I can add/edit my posts. Otherwise it’s great.
      Any ideas peeps?
      Or am I gonna have to link my sites instead. 🙁

      Thanks in advance.


      1. Keep in mind that under this integration your blog is accessible under /blog/ and your blog admin is accessible under /wordpress/wp-admin/.


  19. Will this work on the latest version of wordpress or does it only work with a specific version? This is just what I have been looking for, but wanted to verify which wordpress to use before I begin.



  20. I just wondered if this integration is affected by css loader? I set up all fine, just that the css from wordpress theme directory is overriding the one in zencart template. I renamed to blog.css, I can see some CSS loader code when I tinker around with themes in wordpress.

    Other than that, it works perfect!


    1. This integration works with CSS JS Loader. If you named the file to blog.css, it should only be loading on your page named “blog”. If the header and footer of your store are getting affected, you will need to adjust the CSS in blog.css to not affect elements outside of the content area. One way of doing this is to use the container ID for your content area and put it in front of all of the general rules in the blog.css. This will restrict the styles to only your content area.


  21. When I initially commented I clicked the “Notify me when new comments are added”
    checkbox and now each time a comment is added I get
    three emails with the same comment. Is there any way you
    can remove people from that service? Cheers!




  22. Our webhost (Yahoo) doesn’t allow .htaccess files (or any other file beginning with special character)
    Is there s way to integrate wordpress using your method

    Thanks


    1. The .htaccess edit is required since our integration requires loading the blog through a virtually created URL. Without the .htaccess you cannot support URL rewrites. Contact your host for an alternative way to rewrite /index.php?main_page=blog as /blog/.


  23. I need help and dont know what to do. I thought i ask cause its getting late. i cant figure out the redirect url part.i seen #7 but 200 and some change comments i made it to like 85. i dont know how to write codes or none of that. i know i have to edit the css but thats not doing nothing for my font size. will somebody please just help me.
    http://earwaxent.net/?main_page=blog/
    i just routed that to a ezpage just to link to it in my footer links.



  24. You installed this for us and we are having some trouble with it. Specifically, the sitemap. I see that you have the Google Sitemap Generator Plugin on your blog (https://www.numinix.com/sitemap_blog.xml). However, when we installed the plugin and tried to build the sitemap it gave us this error: “There was a problem writing your sitemap file. Make sure the file exists and is writable.” We created the sitemap in the root and gave it full permissions and pointed the location to the plugin via custom location, but we are still having this problem. Did you change the .htaccess for your sitemap or put it in a different folder? Thanks for your help.


    1. This has nothing to do with the integration. The plugin will still work as normal. Make sure you put the full path to your sitemap from your hosting root in the configuration as well as the full URL from your domain. The mod will try and use the virtual location /blog/ but you should point it to a location that actually exists such as /public_html/wordpress/ or in your /public_html/ root.





  25. have zen cart and word press both installed and working properly but they are not integrated with each other. I have Zencart at the root and wordpress in /wordpress. I know its a .htaccess problem but I cant get it to work…..I have tried so many combinations…..Im not good with code and it seems Im missing some thing……I use Ceon URI Mapping to rewrite my URLs but I also tried the code given above (on page6) and that breaks my site but if I use the code supplied I get two separate installs……. now somehow I managed to get the http://www.mysite.com/wordpress to show my zencart template but in the mainpage area I get page not found and now I cant access the wordpress admin


  26. I am getting a 404 error when trying to go into the post or comment.

    I have added the:
    Options +FollowSymLinks
    RewriteEngine on
    RewriteBase /
    RewriteRule ^blog(.*)$ /index.php?main_page=blog$1 [L]

    I also did some investigating and bluehost does not allow Options +FollowSymLinks but it changes it to
    Options +SymLinksIfOwnerMatch

    I am using ultimate seo urls if i need to change anything there. Thank you again for your help.



    1. Our integration won’t work with regular dynamic PHP URLs because we’re using a URL rewrite to make the blog appear under /blog/ even though this location doesn’t exist. So, you MUST set the permalinks to something other than the PHP default. This will be better for SEO anyways.


  27. I am having an issues of not being able to leave comments on my blog. When I mouse over the comment link I see the url mydomain.com/blog/?p=11/#respond . Is there something I can do to fix this? Thank you for your help



  28. is there an easier way of viewing all 15 pages (almost 300 comments) in a larger format that in the side bar here?


  29. I have been looking through the comments but may have missed something with there being so many comments to look through.

    What if any solution can be implemented to add wordpress sidebar content into the zencart sidebox area. One solution I was looking at was the simple addition of get_sidebar() within my zencart template but I have to put an IF WORDPRESS statement around the code because otherwise it breaks zencart. The wordpress categories and search are the primary pieces that I would like to have access to on zen pages.


    1. It’s possible the only problem is that there are some global variables shared by Zen Cart and WordPress which is why we had to to that one edit in tpl_main_page.php. Someone on Zen-Cart.com did WordPress on Zen Cart Sideboxes Only with our method. You could try their modification (they posted a link in one of the earlier comments to this article).


  30. I’m not sure what I’ve done, or if it’s supposed to be like this when I’m finished, but my WordPress pages aren’t loading any css. I’ll have another look in the morning in case my post-pregnant brain has missed something.


  31. I get confused at this part…. when I log into WP my URL is set already to: mydomain.com/blog and the change blog address is also set to mydomain.com/blog. Can I just leave it like that? Because when I change the first URL… it messes everything up and gives me 404 errors

    Open http://www.domain.com/blog/wp-admin/ and go to SETTINGS

    Change WordPress address (URL) to http://www.domain.com/folder_name_of_your_choice

    Change Blog address (URL) http://www.domain.com/blog


    1. No, you can’t use the same name for both. The WordPress Address needs to be a different folder. You should change it in your WP admin and then change the name to match via your FTP. Then load up the admin using the new URL.




  32. thanks for your reply, sorry about the delay in getting back, i have followed the instructions exactly. however when i click on anything within the blog page (inside zencart) it takes me to the blog page without frames however the url is correct.

    i.e http://www.livvylougifts.co.uk/index.php?main_page=blog/ displays correctly within my site template but if i click on the Hello World title link it takes me to http://www.livvylougifts.co.uk/blog/2011/10/03/hello-world/ which displays without the template frame but still within my zen cart url

    any suggestions? thanks


  33. i have all installed fine, and the front page shows inside the zen cart main page, however when i click on a comment or page it shows only the wordpress content on a new page, it is not wrapped in the zencart main page (header / footer). is this meant to be like this?




  34. After upgrading a test site to Zencart 1.5.0 RC, displaying the blog page reults in a blank page. The error log message says:

    PHP Fatal error: Call to undefined function bloginfo() in /home/mysite/public_html/includes/modules/pages/blog/jscript_blog.php on line 1

    Sorry, I’m not coder enough to know how to fix it.



  35. Pingback: Need a quote to install wordpress - The Wholesale Forums


    1. That is exactly what our service, or this tutorial, accomplishes. We make the content area of WordPress appear as the content of a page within Zen Cart. Therefore the header and footer are controlled by Zen Cart and the content area by WordPress. It’s a match made in heaven!

      Our turnaround time for a WordPress/Zen Cart integration is 2-3 days from when we receive the order.



  36. I had the WOZ module installed on this siteand found out that it was what was breaking the fed ex shipping estimator on the shopping cart page. So, I removed it and implemented your solution. It seemed to be working great, but we have some external sources, like Godatafeed.com who are trying to download product data remotely and are now getting 404 errors, trying to query data through passing parameters in the path. Some other developers I’ve been working with believe it is because of WordPress. Has anyone experienced this or have a suggestion to try? Thanks! I will be so grateful for any help as this has been frustrating to solve.


  37. This integration is fantastic and was easy to do.. even for a newbie like me. Thank you so much!

    I’m wondering though if anyone is having an issue with ZC using latin1 charset and wordpress using utf-8?

    All of my TM on the blog page are showing up as diamonds with a question mark. Is there an easy fix for this besides changing the char sets in my databases to be the same?

    Here is my zc http://peaweebaby.com and my blog http://peaweebaby.com/blog/ so you can see what I mean.

    Thanks!


  38. Unable to get Step 8 to work.

    <meta name="description" content="

    <?php if ($_GET['main_page'] != 'blog') { ?>

    <?php echo META_TAG_DESCRIPTION; ?>

    <?php } ?>

    ” />

    Where it’s all in one line, of course (couldn’t figure out how to format this in a response).

    When we “wrap” the provided php code around the existing meta tags and then view the page’s source code, it shows an empty meta tag:

    content=” ”

    Any idea?

    Thanks!


  39. Hello,

    Does WordPress on Zen Cart support Situation no. 3 where

    – Zen Cart installed to the root
    – WordPress installed to the root

    Thanks,
    Tomek




  40. Hello,
    I have problem with charset .. my web working on windows-1250 and datbase utf-8 … the blog working on utf-8 and db utf-8 how I can change blog to w-1250 ? thank you for reply … I try to change in admin/setting from utf to win-1250 but the charset doesnt work 🙁


  41. Excellent ‘mod’. Thanks. Once I got past my file editing errors, it works great.

    One small tip – once you get WordPress working in Zencart, you’ll notice that it messes up your Zencart styling on the blog page. To fix that, in blog.css, remove all the ‘body’ rules and remove ‘body’ from rules which contain that and other elements.


  42. I followed all the instructions all the steps but this no understand

    Now is the part where you will need some experience with CSS and HTML as you have just imported your entire blog into the main page area of your Zen Cart template

    which page need show the blog in zen cart ?





  43. I just had my integration done using your service. how do i find the admin address for my blog. the login does not work.

    I also had the wp sideboxes loaded, that seems to be gone also.

    any help is appreciated


    1. Usually it will be found under /wordpress/wp-admin/.

      Our integration does NOT work with WordPress on Zen Cart. I believe another Zen Cart member (DivaVocals) created a way to show WordPress sideboxes outside of the blog page that is compatible with our integration. You may want to contact that individual or try their version of the WOZ module.

      The reason why WOZ does not work with our integration is because it contains a hard-coded definition for ABS_PATH. This constant is used in WordPress and when we integrate the two, the definition from WOZ will break WordPress. The funny thing is, the path set in the WOZ definitions files seems to be specific to a client or system that WOZ was developed on. Unfortunately, we cannot spend time fixing bugs in other author’s modules.


  44. Has anyone figured out a dirt-simple wordpress template to use for this, with almost no CSS styling, and then add in styling as needed? Because it’s to be integrated into my zencart site, I’d rather start with almost no styling at all besides the necessary stuff to set up the sideboxes, to avoid the nightmare of a whole bunch of wordpress CSS wreaking havoc in my zencart site.


    1. Try googling terms like “barebones wordpress theme”

      The blog.css will only load on the blog page so it shouldn’t cause any issues with your CSS on any other page.


  45. Hello — I got the install to work so far on a zencart 1.3.9 -multisite – with ulimate seo – the only thing not working is all the photos in the post are not showing up – but they do show the correct path on the wordpress admin ??

    any ideas???

    thanks



  46. Numinix

    If you can please email me privately…I’d like to see what it would cost for you take a look at my set up? I feel like I’ve tried everything and am getting the same results. I look forward to hearing from you.


  47. I am having one final problem. All is installed and the basics are working, I can post and see it but when I click on the title of the blog it takes me right back to my blog page. Same thing for leaving a comment. The edit does work and allows me to edit the post. here is my htaccess

    Options +FollowSymLinks
    RewriteEngine on
    RewriteBase /
    RewriteRule ^blog(.*)$ /index.php?main_page=blog$1 [L]

    I am using the default links in wordpress. I also tried chaning my permalnks but all I get is a 404 error so I changed it all back to default.

    Any help would be appreciated.



  48. Thank you Numinix. I did not install WOZ so I don’t have the extra_configure file. I did set up permalinks in WordPress and tried all the options…the URL shows up correctly as it should – http://www.domain.com/blog/2011/07/02/test/ and the page is still blank. I viewed the source on the blank page and it loads up all the css files (inlcuding blog.css) and then in red this line is displayed ” <link rel="pingback" href= ". The file is blank beyond that. I think it's the same fatal error for bloginfo() that's being generated and I'm not sure how/what to do to fix it. I removed all the files, deleted the wordpress database and reinstalled it and uploaded the files again, and still have the same problem.

    What do you think?


  49. Hello Numinix – Thank you for the guide and way to put WP within ZC.

    I’ve gone through all the pages of comments several times and am not able to figure out what I am doing wrong –

    When I try to view a post made in WP – the url reads exactly as it should – “http://www.domain.com/blog/hello-world/” however, the page is blank. Based on the comments here, I looked at my cache folder and noted a PHP Fatal error: Call to undefined function: bloginfo() in /home/public_html/zencart/includes/modules/pages/blog/jscript_blog.php on line 1. I noticed that a few others had this problem but a solution was not posted. I reviewed the files and it uploaded correctly…Any ideas? I feel like I’m close but now sure how to proceed…Can someone please be kind enough to point me to the right direction?

    Thank you


    1. Have you ever used WordPress on ZenCart (WOZ)? There is an extra_configures file for that module which needs to be deleted in order to use our integration method.



  50. I have ZC1.3.9h installed in a subdirectory.
    I have WordPress’s latest version installed in a directory within ZC called blog. Steps 1 and 2 for WP preparation has been followed.

    In WordPress’s setting I have the wordpress url pointing to http://www.domain.com/zencart/blog, and the site URL pointing to http://www.domain.com/zencart.

    I’ve followed the steps over and over again, installed, re-installed to see if I was missing something but can’t seem to figure this out.

    Every time I create a “test” post from wordpress admin and view it, the page opens to the default zencart installation.
    I can’t see any blog posts, the CSS is exaclty like it should be for an out of the box install from ZC.

    My .htacess is the following:
    Options +FollowSymLinks
    RewriteEngine on
    RewriteBase /
    RewriteRule ^blog(.*)$ /zencart/blog/index.php?main_page=blog&$1 [L]

    Any advise that someone can share with my would be appreciated…Thank you!!





  51. A new version has just been posted which fixes a bug in the search results. This was caused by forcing the URL to end with “/”. The script now checks for the “?s=” parameter and adds the ending “/” only if the parameter is not present in the URL. If you encounter other URLs that require no ending slash, please let us know and we’ll also add checks for those situations.



    1. You need to edit your WordPress theme files. You have the same class or id in your wordpress theme so the CSS is applying the same styles to the element.


  52. OK I got that figured out, I kinda figured. I did it all and now my main page comes up as blog you can see it at http://www.jpsbears.com I have rechecked everything many times. I renamed my blog folder wordpress and I can not get to the admin page anymore.


  53. I am in the middle of making the needed changes and I have a question:

    When I get the download wordpress_pages do I upload that directly as is to the root, so its www/wordpress_pages or do I need to upload the files separately and follow the paths in the folder?

    I ask because I uploaded it as is right to the root and made all the file changes. Now when I put in the changed application_top.php my whole site goes blank.


    1. Not quite. /wordpress_page/ is just the folder that the package is contained. Therefore its contents should be uploaded to your Zen Cart store root.


  54. I already have a zen cart site set up and want to add a integrated blog. Using these instructions will it use my current Zen Cart template for the wp blog? By looking at these instructions it looks to me like I would be using wp template on my zen cart? Before I do this I just want to make sure my Zen template will be used.

    Thanks,


    1. Yes, your Zen Cart content area would be populated with your WordPress content. So, you’d have the same Zen Cart header and footer (and even sideboxes if you want) with WordPress showing up in between (minus the header and footer).


  55. Pingback: Integrating Wordpress with Zen Cart | Webshop Buzz


  56. Greetings,

    Have a first time problem.

    The blog search widget tries to serve results from the root level, ie:

    /index.php?s=searchterm

    Instead of:

    /blog/?s=searchterm

    Have used this mod integration numerous times, first I’ve ever seen this happen.

    Any ideas?

    Thanks!


    1. You’ll need to look at the code your theme is using to create the form’s action. It must be using a different method than the other themes you’ve worked with.


  57. Hi, I have a small query. Does anybody detect a slight lag using this forum every time they login? It normally takes a minimum several seconds approximately for me to see the home web page.

    Appreciate it


  58. Do you know if it’s possible to have two separate wordpress installs running within my Zen Cart site? For example, I would like to have one in the subfolder /blog and another in the subfolder /video.

    Is it possible? Any idea how it can be done?


  59. I am just starting to modofy the CSS to sort the format.
    The only 2 files which seem to make an impact are the wordpress file style.css and the zencart file stylesheet.css
    I am trying to modify the zencart store around the blog which has been changed but am not sure how to do this without modiying the whole store!!!!
    Can anyone point me in the right direction?


  60. I’ve followed the integration steps and all seems to work reasonably so far!
    One thing puzzled me that in the zencart download files there were no files marked YOUR_TEMPLATE that needed overwriting!!!
    Any ideas why or have I missed somthing?



  61. My zencart footer doesnt load on my blog page, but loads fine on all the other pages.

    Anyone run into this problem? Works perfect otherwise.



  62. I must be having a dim moment sorry, I dont get far enough into the installation to be able to do step 4 and rename my folders. I cannot login to my wp admin area it simply takes me to my zen cart store index page once I enter my user & password but with the URL of my blog admin page.


  63. Hi Numinix,

    I have started to install your brilliant wordpress work, I get to…

    Step 3:
    Open http://www.domain.com/blog/wp-admin/ and go to SETTINGS

    Change WordPress address (URL) to http://www.domain.com/folder_name_of_your_choice

    Change Blog address (URL) http://www.domain.com/blog

    but when I go to http://www.domain.com/blog/wp-admin/ it simply takes me to my sites home/index page, therefore I cannot change the addresses or move onto step 4. if I go to http://www.domain.com/blog/wp-login.php I am able to enter my user & pass but it again takes me to my index page but with the browser address http://www.mydoman./blog/wp-admin/

    (It is an untouched WP pack as up to now I had used Blogger.)
    All hints, tips, info and answers gratefully received.
    Many thanks in advance





  64. Hi Numinix,

    I have just upgraded to the latest version (March 2nd) everything looks good apart from one thing.

    When I go to mysite.com/blog it loads both stylesheets: includes/templates/my_template/blog.css (first in the head) and then /wordpress/wp-content/themes/my_wp_theme/style.css (second further down the page roughly 6 lines after the — START WordPress — part.)

    The blog is still using the default /wordpress/wp-content/themes/my_wp_theme/style.css stylesheet and images, despite me completing Zen Cart Installation steps 1 and 2 of your guide above correctly.


  65. i would like wordpress integrated with zen cart.. but i have followed instructions and all i get is page not found..The only page i can access after insulation is the instal page which confirms installation is complete i have tried to using separate database for wordpress , not sure which is the better solution. any advice would be great


  66. Ryan – yes… just use the WordPress API just as used in the method I’ve demonstrated in the comments… change the_excerpt(); to the_post();

    Easy peasy. Check out a wordpress api reference for some other useful commands.





  67. Also, the OLD rss feed link still works only if you go to blog?feed=rss2 (aka the link prior to changing to permalinks)… If that makes any sense… The links update in wordpress/zencart, but it doesn’t update the rules properly for the feed. Hmm..


  68. I do have a question for you – if you can help figure this one out I’ll be forever thankful… After installing the blog to my zencarts, and only after enabling custom permalinks (of any kind), the RSS feed will not work properly using safari in the blog sections. If you disable the permalinks, then it works just as it’s supposed to.

    Two examples:
    bongoflashers.com/blog
    litebrightraves.com/raveblog

    Any thoughts? I’m assuming it’s an .htaccess issue..


  69. A new version has just been posted which will automatically add the trailing slash to the end of your URL. This resolves issues with a lot of modules. However, please be cautious and check that all of your URLs work. If anyone encounters an infinite redirect loop because of these changes, report back right away and we’ll look into this further.


  70. Being in the spirit of helpfulness and open source, here’s my solution: AFTER you have successfully integrated numinix’s solution for wordpress blog, paste this code into a brand new file, save it as: wordpress_posts.php and save it at: includes/modules/sideboxes/YOUR_TEMPLATE/wordpress_posts.php

    Then, enable the box from your layout boxes controller… style the box appropriately, notice the width is coded into the style. Change that to match your page. Also change the link to match your blog’s URI. It may not be the best solution, but it works great. 🙂

    <?php
    //Wordpress SideBox

    // Display sidebox if TRUE
    $show_wordpress_posts = true;
    if ($show_wordpress_posts == true) {
    ?>

    <div class=”leftBoxContainer” id=”wordpress-blog” style=”width: 195px;”>
    <h3 class=”leftBoxHeading” id=”blog-heading”><a href=”http://litebrightraves.com/raveblog” title=”Blog”>Blog [more]</a></h3>
    <div class=”categoriesContent centeredContent”>
    <?php
    if ($_GET[‘main_page’] != ‘blog’) {
    // Include WordPress
    define(‘WP_USE_THEMES’, false);
    require(‘./wordpress/wp-load.php’);
    query_posts(‘showposts=5’);}
    while (have_posts()): the_post(); ?>
    <h2><a href=”<?php the_permalink(); ?>”><?php the_title(); ?></a></h2>
    <?php the_excerpt(); ?>
    <?php endwhile;

    ?>
    </div>
    </div>

    <?php }
    ?>

    From the helpful folks at http://www.newcorporateimage.com
    🙂


  71. Thank you so much for taking the time to show us your integration method – it’s been very helpful!! I have even taken this a step further, and (as of 1.3.9h) developed a custom side box that integrates with WordPress, and your module, and CEON. You can see it live at http://www.litebrightraves.com, her blog is at http://www.litebrightraves.com/raveblog – I’ve located the box at the bottom left of the page for reference. Currently, I have it displaying the most recent posts, but I can easily switch it to the “wordpress version” of the sidebox with recent posts and archives.

    If you would like me to show you my method, feel free to contact me. 🙂





  72. Great tutorial Numinix. Ive got wordpress integrated but i want to put a few posts on my home page but i dont know how. Could you help?
    Thanks


    1. The best way to do this is to parse your RSS feed for the blog and display the top X number of items. The summaries and titles can be used. See our static rss sidebox for the method on how to do this including a bunch of rss parsers to choose from.




  73. I have the integration into zencart basically how I want it, but am getting a security error if I am logged in to “my account and then go to the blog from a secure page. Is there any way to fix this?


    1. Link to your blog with http:// instead of http:// and you won’t have this problem. The PHP code would be:
      zen_href_link(FILENAME_BLOG, '', 'NONSSL');


  74. K one last question then I think I’m done. When you say

    “Change all selectors in your css file to be specific to only the main area of the blog page.”

    do you mean to go through the css and add blog# to every single selector, or is there some quick and easy way to do this?


    1. Yes, basically what this means is you need to adjust the CSS so it doesn’t affect the common areas of the Zen Cart template. One way is to add #blog to anything general (i.e. h1,h2,h3). Anything that already uses a WordPress selector can remain untouched.


  75. K, so I think I have kind of figured out how to do this, but I’m sure there is an even better solution.

    Currently, I have changed the blog.css file in the zencart folder to @import my child theme css file. This is working great, so I’ll leave it this way if I have to.

    But… I am wondering, where does the blog.css file get included in the zencart header? I’m wondering if I can replace this code with some php code that gets the theme css from the bloginfo( ‘stylesheet_url’ ) function.

    Any thoughts?


  76. I’ve done the integration, worked great! Thanks for the instructions!

    I’m now fiddling around with the blog headers/footers/css etc and I am wondering how does this system work with the child theme idea of wordpress?

    I did as you suggested, move the blog.css stylesheet into my zencart template folder and this is working great, but now I want to go ahead with normal wordpress development and make a child theme based on the twenty-ten theme, and so I make my css and other modifications in my child theme folder and not in the blog.css file that I uploaded to zencart template folder. Will this child-theme method work, or will I need to make my css changed to the blog.css file?


    1. I haven’t tested this with child themes but since the CSS is loading through Zen Cart now, that’s where you should be editing that file. You can still use the child theme feature for your template files.


  77. Thanks for this it worked like a dream. The only problem I had was with my FTP program not uploading the files correctly. If you have followed the tutorial word for word and it is still not working check the files you have uploaded and compare them to the zip. Oh and one other thing, read the tutorial very carefully and do not rush. I did and missed one of the small notes( made all the difference). Thanks again Numinix


  78. Just as a follow on from my previous question dated Jan 18th, I figured out the issue. It seems that WordPress surprisingly comes as standard WITHOUT any meta coding. I simply installed the “Add Meta Tags” plugin through WordPress admin and (using the Facebook linter http://developers.facebook.com/tools/lint/ ) and everything is now being transferred as it should. Niiiiiiice.


  79. We are coming up with a white page when we install this. Of course when we take the blank index.html out the blog site comes back. Any idea what we missed? We are using 1.3.8a and SSU.
    thanks! I hope this works!!!


    1. The site loading inside your Zen Cart store as a defined page shouldn’t be affected by the existence of the index.html file located in your wordpress directory. Most likely you are trying to load your site through the old URL, or you haven’t renamed your wordpress directory to something other than blog.


  80. This is awesome. I followed your steps and it all works fine!! Full integration and no severe problems.

    Now that ive got it all working I want to let everyone know about it via Facebook and use the Facebook Plugin to let people share my new blog (and keep track of the “shares”).

    As per your instructions, I’ve altered the meta tags so that on a post’s page (single.php) the name of the post appears in the title at the top, but when I click share, this meta data doesn’t transfer to Facebook. It shows the full URL for the blog post, but doesn’t show the blog post’s name, instead it just shows the blog’s root meta data.

    Any hints as to why this is happening??!!

    Thanks for an AWESOME tutorial and solid work.

    Tony



  81. So, what does a girl have to do to get someone to do this for her on a strict budget? I love my zencart admin and its features, but I have a wordpress template that I purchased awhile ago & I’d like to intergrate them together. I have fudged up my site 20x over and it has been suggested I stop trying to do this on my own. As a new business starting up with no loan, I”m having a hard time finding someone who can offer me the quality help that I need. Want to do an install? <3


    1. We do offer custom services, but not for free, if that’s what you are asking :). If anyone is interested in having us do this integration, please contact [email protected]. Note that we recommend you install WordPress yourself and select a free template in advance as these are simple steps and not worth paying someone to do.


  82. Is there a category sidebox that currently works with your version of this? We have tried everything to make the sidebar to appear and or the categories but everything we do fails. Any insight would be appreciated.


  83. This sounds interesting, will try it out in a test installation, thanks for the tutorial, how about future conflicts with future upgrades any thoughts on this.

    Still sounds exciting.. or have you created a monster dr frankenstein hhoooo


    1. We’ve done upgrades on sites that have used this integration. If using the overrides folders properly, all you’d need to do is reinclude the wordpress_page.php in application_top.php after you’ve performed your upgrade and it should all still work. This is of course referring to similar upgrades like going from 1.3.8 to 1.3.9. Going from 1.x to 2.x may be another story… We’ll have to wait and see.


  84. Fisrt of all, thanks for such a complete guide. I am almost done, but something does not work properly…

    My site is http://www.abedulart.com

    The blog can be found under the sidebox “Participación”. If you enter in the categories, that is fine, but if you enter into a particular post, then it does not appear in the center of the site, but in a new page, completely unformatted…

    Can you help with that? Thanks in advance


  85. Hi, I’ve followed your instruction and got most of everything works with the integration. However, when trying to test my website I found that when index.php?main_page=checkout_shipping I then only see a blank page.
    Here is the error (which is in fact just a warning) Could you help me with this?

    [01-Jan-2011 04:38:53] PHP Warning: Cannot modify header information – headers already sent by (output started at /home/content/69/7165069/html/shop/includes/wordpress_page.php:2) in /home/content/69/7165069/html/shop/includes/functions/functions_general.php on line 45

    THank you.


    1. This can often be caused by a space before the opening <?php tag or after the closing ?> tag. Most common files with this issue are located in the languages folder and other files loaded site-wide.


  86. Ahhh – thanks for the tip 😉

    This is apparently my issue :

    Call to undefined function bloginfo() in /home/xxxxxxxxxx/public_html/includes/modules/pages/blog/jscript_blog.php on line 1

    I know very little php – might you give me another lil nudge as to how I correct the error ?

    Thanks again 🙂


  87. Hi Numinix!

    I have successfully used your tutorial to link a zen version 1.3.9d and a word press version 3.0 and everything went smooth as silk.

    Now I am attempting to use Zen v1.3.9h and word press 3.0.3. I have compared every single step on the older one to the newer one and I see no differences whatsoever. Yet when I go to the page http://www.wheelwizardplus.com/index.php?main_page=blog I get a blank page. What’;s very interesting is that when I view source on this page it only has a few lines of code and ends at a broken :

    <link rel="pingback" href="

    can anyone tell me what might be the problem here ?

    Thank You!




  88. The sub folder created for wordpress is \root\blog\ Zen being installed \root\ If I rename the .htaccess file I can access the wordpress admin at \root\blog\wp-admin\ is there a way I can exempt this location from any rewrite rules?

    The full contents of the .htaccess file is:

    Options +FollowSymLinks
    RewriteEngine On
    RewriteBase /

    RewriteRule ^blog(.*)$ /index.php?main_page=blog&$1 [E=VAR1:$1,QSA,L]

    # From Ultimate SEO URLs
    RewriteRule ^(.*)-p-(.*).html$ index\.php?main_page=product_info&products_id=$2&%{QUERY_STRING} [L]
    RewriteRule ^(.*)-c-(.*).html$ index\.php?main_page=index&cPath=$2&%{QUERY_STRING} [L]
    RewriteRule ^(.*)-m-([0-9]+).html$ index\.php?main_page=index&manufacturers_id=$2&%{QUERY_STRING} [L]
    RewriteRule ^(.*)-pi-([0-9]+).html$ index\.php?main_page=popup_image&pID=$2&%{QUERY_STRING} [L]
    RewriteRule ^(.*)-pr-([0-9]+).html$ index\.php?main_page=product_reviews&products_id=$2&%{QUERY_STRING} [L]
    RewriteRule ^(.*)-pri-([0-9]+).html$ index\.php?main_page=product_reviews_info&products_id=$2&%{QUERY_STRING} [L]
    RewriteRule ^(.*)-ezp-([0-9]+).html$ index\.php?main_page=page&id=$2&%{QUERY_STRING} [L]

    # For Open Operations Info Manager
    RewriteRule ^(.*)-i-([0-9]+).html$ index\.php?main_page=info_manager&pages_id=$2&%{QUERY_STRING} [L]

    # For dreamscape’s News & Articles Manager
    RewriteRule ^news/?$ index\.php?main_page=news&%{QUERY_STRING} [L]
    RewriteRule ^news/rss.xml$ index\.php?main_page=news_rss&%{QUERY_STRING} [L]
    RewriteRule ^news/archive/?$ index\.php?main_page=news_archive&%{QUERY_STRING} [L]
    RewriteRule ^news/([0-9]{4})-([0-9]{2})-([0-9]{2}).html$ index\.php?main_page=news&date=$1-$2-$3&%{QUERY_STRING} [L]
    RewriteRule ^news/archive/([0-9]{4})-([0-9]{2}).html$ index\.php?main_page=news_archive&date=$1-$2&%{QUERY_STRING} [L]
    RewriteRule ^news/(.*)-a-([0-9]+)-comments.html$ index\.php?main_page=news_comments&article_id=$2&%{QUERY_STRING} [L]
    RewriteRule ^news/(.*)-a-([0-9]+).html$ index\.php?main_page=news_article&article_id=$2&%{QUERY_STRING} [L]

    # All other pages
    # Don’t rewrite real files or directories
    RewriteCond %{REQUEST_FILENAME} !-f [NC]
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*).html$ index\.php?main_page=$1&%{QUERY_STRING} [L]


  89. I have patched this together with my install of Zen and removed 80% of the formatting / comments etc so it fits in quite well. the issue that I have now is that it bolcks me from accessing the Admin part of WordPress. It just redirects me to the blog page within Zen ??

    I guess it’s the .htaccess that needs modifying.

    RewriteRule ^blog(.*)$ /index.php?main_page=blog&$1 [E=VAR1:$1,QSA,L]


    1. No, you would not be accessing your admin through /blog/ anymore. You’d use /wordpress/wp-admin/ or another folder that you’ve defined. If you are trying to access the admin through a link either that link is hard-coded or using the incorrect function to create the link.


  90. Hi,

    I tried to use your module on my website that is currently sitting on my localhost. I follow the guideline and has managed to get the main page of the wordpress within the zencart container. However, when I press the comment button or the title of the blog, the website redirected to the blog website (currently I don’t put the empty index.html page on the blog).

    I thought the the .htaccess redirect was not working. My .htaccess file is currently sitting in the /catalog/ folder (I use WAMP server) instead of sitting on the root folder or my zencart folder (my zencart is sitting on zenporject/ folder). So I tried to move the .htaccess to the root folder and receive the 500 internal server error message. I tried to change the .htaccess redirection to the second recommendation that you gave on the tutorial and it does nothing, still get the internal server error message.

    Is there anything that I did wrong here? Or the .htaccess redirect just does not work on the localhost?

    Thanks in advance.

    Yudianto



  91. Hi there,

    I’m still confused. Everything is set up now, the site is in the root and the redirects are turned on. The blog loads perfectly within the site:

    http://www.babyonboardapparel.com/blog

    If I hover over any link in the blog, it displays the link correctly (e.g. http://www.babyonboardapparel.com/blog/?cat=10) and when I click it, it does go to that page, but the text displayed is still just the blog home page text. The correct link URL does show in the address bar. It is just so odd.

    How can I fix this?

    Thanks!



  92. Thanks so much for this tutorial. I have successfully integrated but I am having trouble with my plugins. 1. When I activate “any plugins” the blog turns to a blank page and nothing shows. 2. How do I remove the zencart side bar on the right and instead just have my plugins show there if I can get help and have those working? please see what I mean, http://www.tatapc.com/blog thanks for an assistance. I have been at this for hours.



  93. Danielle, all links to the blog should be /blog/. There is probably a way to force the ending slash to be added but all of the known methods I’ve tried throw the server into an infinite redirect loop. If anyone has a solution, it would be appreciated.


  94. Yes I had to turn off the redirects for now as it was affecting the main site, sorry. I will be turning it back on once the site is live.

    Where do I need to change the “/blog” to “/blog/”?





    1. That is the link created by Zen Cart so you’ll need to apply the check as shown in the last step of the tutorial to not create that element. WordPress will create it’s own canonical links.




  95. I had a near-flawless integration thanks to your guide, however I am having a hum-dinger of a time trying to get my meta tags to work dynamically.

    I’m trying to call wp_title() from /includes/languages/english/My_Template/meta_tags.php and it simply isn’t working. “PHP Fatal error: Call to undefined function wp_title()”

    Thoughts?

    http://nelsontactical.com/blog


    1. That function should be getting included when the file /wordpress/wp-blog-header.php gets included. Something may be different with your WordPress installation.





  96. Ignore my last; fixed it.

    Just to note, if you use the 2nd code (which I did when I initially couldn’t get things working)

    RewriteRule ^blog(.*)$ /catalog/index.php?main_page=blog$1 [L]

    It will rewrite everything with “blog” in the name.



  97. OK, i’m having alot of problems with what I think is the .htaccess file. This is what originally caused my blank screen. Having fixed this up, I’ve managed to more or less integrate a WP blog into my webpage. However, I had additional problems, and i’m sure it’s the source of my ongoing problems. To explain;

    Originally I had my blog installed into a folder called Blogfolder. Once I uploaded the .htaccess file, I was unable to access the admin panel; it just redirected me to the blog page. I figured that it was redirecting based off the ‘blog’ in blogfolder, so I renamed it WordPress and changed the paths to match. Sure enough, it fixed the issue. However, whenever I try and click into an article, click on the comments section or likewise, it just redirects me back to the main blog page. Again, what I figure is happening is the .htaccess file is reading the ‘blog’ in

    /blog/?p=1#comments

    and redirecting it to the main blog page. How to fix this?



  98. It’s funny you mention that. I am trying to integrate WordPress and a forum within my store. I’ve installed phpBB and used the bridge – but even this combo requires a separate login to the forum.

    A store that beautifully integrates Zen Cart, WordPress and a forum (SMF I think) is altestore.com
    When a shopper creates an account within Zen Cart, they are automatically logged into the blog and forum also.

    I currently have a store that I am building, with a blog and forum that I want integrated with a single login – just like the altestore.com

    Is this something you could tackle? Please contact me.


  99. Will logging into Zen Cart create a logged in condition with WordPress? Or will the user have to log into WordPress separately?

    I tried installing this mod and it doesn’t seem to act like a bridge – just want a clarification.

    Thanks!


    1. This is not a bridge, but you could certainly create one using the same methodology as the phpBB bridge. Now if only we could get phpBB integrated inside Zen Cart, wouldn’t that be cool?


  100. @TJ – I know this response is LATE as heck, but as I stated the sideboxes I use with the Numinix embedding solution are custom sideboxes I had a friend assist me with creating. As a result they are not “available” anywhere..


  101. I am still trying to get my blog to show up inside of zen cart. Right now when you go to mysite.com/blog it goes to my wordpress page all alone. If you go to mysite.com/wordpress it goes to the same page. If you go to http://mysite.com/index.php?main_page=blog it goes to a completely blank page. I would REALLY love to get this working since my blog has been out of commision since “upgrading”. Any help would be soooo appreciated.



  102. I just downloaded a wp 3.0, in the style.css(blog.css) where do I change the instances where the image files are being called.. I did not see any folder address just the image section of the sheet.

    thanks in advance


    1. I’m not entirely understanding your question. If your CSS has image references, you’ll need to make sure the url() is correct relative to the stylesheet’s location. If there aren’t any, you need not worry.





  103. OK I changed that on my wordpress_page.php to that. I am still only getting the wordpress page on

    http://grunionfabrication.com/blog

    if you go to http://grunionfabrication.com/index.php?main_page=blog
    I get the warning: Warning: require_once(/home/***/public_html//wp-includes/classes.php) [function.require-once]: failed to open stream: No such file or directory in /***/***public_html/wordpress/wp-load.php on line 46
    I saw on someone elses post that “class.rlwp.php” should be removed but I checked and dont have that file anywhere.

    Also, on the instructions when it says to replace your index.php in wordpress with a blank index.html page are you supposed to change it back later or just leave it disabled?


  104. My set up is the same and I have
    require('./wordpress/wp-blog-header.php');
    with one dot instead of two before /wordpress. See if that works.

    I also use Ultimate SEO, but I’ve restricted it to certain pages, so I don’t know if that makes a difference..


  105. My zen cart install is in my root and my wordpress is a folder called “wordpress”.
    in my includes/wordpress_page.php I have the following.

    require(‘/wordpress/wp-blog-header.php’);

    And I have tried it with every combination I can think of. I am using Ultimate SEO urls and I dont know if that is making a difference….


  106. Elaine, this sounds like you need to alter this line in your includes/wordpress_page.php
    require('../wordpress/wp-blog-header.php');

    It all depends on where your wordpress is located in relation to your zen cart shop. Are both your shop and wordpress in sub-folders or is your wordpress a sub-folder of the shop?


  107. I have installed this mod and wordpress and wordpress works fine but I am not understanding how it integrates into zen cart. I can see my site, and i can see wordpress but i do not see them together…. I know this is vague but i really just dont know where to go from here….


  108. Many thanks for this mod. The only problem I had was with getting index.php?main_page=blog to redirect to /blog/ (a WordPress issue I think). I fixed it by installing a WordPress plugin called Redirection (http://urbangiraffe.com/plugins/redirection/). Using this tool, you can set the url redirects from WordPress admin without altering the rewrite rule in the htaccess file – worked for me, anyway!




  109. Thanks for the reply about integrating two installations of WordPress. Could you be more specific about what page I need to clone? I haven’t attempted to integrate the second installation yet. How could I get the second to go to domain.com/resources ?


  110. I just wanted to thank you for this tutorial Numinix. I have successfully used it twice now on a 1.3.9c cart and all is well except the meta-tags edit. I did that and the cart broke so I just took it back out.

    Great – HELPFUL – Tutorial!



  111. Is it possible to integrate two installations of WordPress (in two different sub-folders)? I have a client that would like to have more than one blog integrated with her Zen Cart store. I’ve successfully integrated one blog using the above method. She wants to use the same blog template for the second instance of WordPress, so that should simplify things.



  112. @TJ – Yes I do have a set of sideboxes working with the Numinix solution. My sideboxes will work standalone or with the Numinix solution. The best part os that I now have the ability to offer my clients a wider variety of blog embedding combinations/solutions. I can’t take full credit for these sideboxes.. I had a friend assist me with creating these sideboxes, but they are completely solid..

    They make use of WordPress’ “The Loop” codex. So like the Numinix blog embedding solution my WP sideboxes for Zen work inside of Zen Cart without ANY interference with other modules.This is in stark contrast to WOZ and the WOZ Sideboxes Only solution (which is a HACKED up version of WOZ I came up with). WOZ IMO is poorly written, poorly supported, and requires hacks to other modules so that other modules will work with it. (Most notably a HUGE hack is required for WOZ to work with Ceon URI module)


  113. sorry, but i am still confuse with the procedure of install. What the index.html you refer before. Should it change back. Will there be a side box for WordPress to display the CAT and tag etc. Do you have a preview image.


    1. You are in an integration right now. Notice the wordpress sidebar displays unless you remove it from your wordpress template. We’ve disabled the Zen Cart side columns. If you need to display Zen Cart sideboxes as well as the wordpress sidebar, you can easily customize something in PHP since all of the Zen Cart code is loading and accessible on that page.



  114. I do have problems with wp-plugins after setting up wp and zen-cart the numix-way.

    Ex: I do install and activate a plugin (ex.: http://www.jenst.se/2008/03/29/wp-page-numbers) and integrateing the needed php-code into the template-files (ex.: wp_page_numbers()-function-call in comments.php to produce the menu-items).

    Now, the plugin works fine in the wp-admin-area. Also, the function is present while processing the comments.php. But the function itself doesn’t produce any output.

    I tried this with other plugins like http://wordpress.org/extend/plugins/pagebar/ with the same result.

    What could be the problem for this?


    1. Try the plugin wp-paginate which is what we used on this blog. If that doesn’t work, there must be something different about your installation, integration, or template.


  115. hey folks, I have the original woz loaded and working, except for the Simple SEO issue. can i just make the changes above to the existing files or do i have to reupload everything.. if I can just change the existing files, do I just following the instructions above..


  116. Just wanted to pick up on an older question I had asked – Has anyone managed to integrate the WordPress sidebar (blog categories,search ect) into a Zen Cart sidebar/sidebox?

    Thanks.


  117. First….huge thanks for the new release of Fast and Easy Checkout. It totally saved my can and prevented me from pulling out any more hair. The new release fixed everything I was having issues with – shipping method retention, address edits, etc. THANKS!

    I have now integrated your WP+ZC solution and after a few pots of coffee its wired in successfully. Reading all the threads, I must suggest to folks – Look over your .htaccess VERY carefully. If your locals have specific setups (like mine) or your host webroots are wacked, this will cause people grief. Other then that…its plug and play. Great work and it seems to be quite flexible with pathing if you choose to use something other then “blog” as you WP base…which I always do. WP is too extensive to just use as a blog!

    I really don’t like using Zen Cart and feel it is kinda rubbish (legacy!) as far as carts go, but when I am forced to, I now have a solution that can allow me to integrate a decent CMS, blog, social networking tool, etc. I am reworking your code a little to wire into a 500 blog WPMU install and will pass along my findings when I am done. I will credit you guys where applicable. Cheers!


  118. Ah ha!!! So glad I decided to pester you just a little.. 🙂 I will implement in my test store and update my install files accordingly.. Thanks for the response!


  119. Unfortunately, for some reason I cannot make it work. I have uninstalled WOZ and WOZ sidebox and also the integration pack and followed every step for 3 times…and it doesn’t work.

    I have installed wordpress 2.9.2 in Spanish and then followed every step. I wonder if this integration only work with the english version of wordpress… I do not know what else could it be…

    If I can provide any further information, please let me know.

    Thank you,

    vimad







    1. I’m glad you brought this up as I have forgotten to mention this. If you look at the source, you’ll see HTML has been added by Zen Cart after the XML. When there is a “feed” parameter available ($_GET[‘feed’]), we can stop the HTML from being loaded.

      You will need to make sure your template links to the PHP URL:
      /blog/?feed=rss2

      Always use this URL for your feed submissions, etc.



  120. XminD was kind enough to share how he setup his .htaccess to work with the Ceon URI Mapping (SEO) module and THIS blogging solution. There is one more small change required for those using the the Ceon URI Mapping (SEO) module as follows:

    # Don’t rewrite blog directory
    RewriteCond %{REQUEST_URI} !^/blog.* [NC]
    RewriteCond %{REQUEST_URI} !^/wordpress.* [NC]

    # Handle all other URIs using Zen Cart (index.php)
    RewriteRule (.*) /index.php?%{QUERY_STRING} [L]

    # Do rewrite blog directory
    RewriteRule ^blog(.*)$ /index.php?main_page=blog&$1 [E=VAR1:$1,QSA,L]

    Pleas note that not only do I exclude the “blog” directory, but also the actual directory where the WordPress files are physically located otherwise you will find yourself unable to access your WordPress admin:
    http://www.yoursite.com/wordpress/wp-admin


  121. @Everybody

    If you read through the comments on this blog post and on the WOZ support thread, you will see that it has been established and CONFIRMED that the WOZ Sideboxes Only solution DOES NOT work with Numnix’s blog embedding solution.



  122. Yes I would be very interested in displaying the wordpress sidebar. Apparently there is a WOZ sidebar only solution but I’m not too sure how well supported that is – it would be great if there was a Numinix embedded blog + wordpress sidebar solution.


  123. I have sucessfully implemented this mod so a big thanks to Numinix 🙂

    I did have a problem initially due to a prob with the Tabbed Products Pro ‘class.rlwp.php’ file but that was sorted by simply deleting the file (thanks DivaVocals).

    I was wondering if their was a way to display the WordPress sidebar (blog categories,search ect) in my Zen Carts sidebar/sidebox??

    Thanks.


  124. I have 2 questions regarding this mod,

    #1 – “Step 3: “Open http://www.domain.com/blog/wp-admin/ and go to SETTINGS > Change WordPress address (URL) to http://www.domain.com/folder_name_of_your_choice&gt; Change Blog address (URL) http://www.domain.com/blog

    These are both currently ‘http://www.domain.com/blog’ in my WP admin so am I correct in thinking that I should change WordPress address (URL) to something other than ‘/blog’ and leave ‘Blog address (URL)’ as is (currently http://www.domain.com/blog) ??

    #2 – I currently don’t have a ‘includes/template/YOUR_TEMPLATE/common/tpl_main_page.php’ or ‘includes/modules/YOUR_TEMPLATE/meta_tags.php’ file in my custom template. Do I just create one using the overrides system??

    Thanks



  125. Forgot to include this in my previous posting.. WOZ Sideboxes Only also works JUST FINE with Ceon URI and/or Simple SEO (you will need to exclude blog directory in your .htaccess)


  126. @Darlene – I now see the issue.. You did NOT say when you posted in the WOZ support thread that what you ACTUALLY installed was the Numinix blog embedding solution. You stated that you installed both WOZ and WOZ Sideboxes Only.. So let me start by saying this, If you read through the comments on this blog post, you will see that it has been established and confirmed that the WOZ Sideboxes Only solution DOES NOT work with Numnix’s blog embedding solution.

    If you read through the WOZ support thread you will see that it has already been established that WOZ DOES NOT WORK with at least two of the popular SEO solutions (Ceon URI, and Simple SEO). This fact has been ACKNOWLEDGED in this support thread by the mod author, Hira.

    All that said, it is hard to determine what you’ve actually installed and done to your site. So I will suggest the following:

    You can install WOZ Sideboxes Only OR the Numinix Blog Embedding solution, you cannot install BOTH.
    IF you really did install the full WOZ, WOZ Sideboxes AND the Numinix Blog Embedding solution, you will need to uninstall EVERYTHING you’ve done, and decide between WOZ Sideboxes Only OR the Numinix Blog Embedding solution. Once you decide reinstall ONLY ONE of these solutions. The Numinix Blog Embedding solution works JUST FINE with Ceon URI and/or Simple SEO. (Again, read through the comments for this blog post for suggested .htaccess setups for either of these SEO mods)

    Good luck..






  127. Thanks numinix
    i followed your instructions and it seems that
    http://www.replicahandbags168.com/index.php?main_page=blog
    and
    http://www.replicahandbags168.com/blog
    are all blank ,BTW i am using Ultimate SEO URLs
    Here is the part of the .htaccess file

    ##### NOTE: Replace /shop/ with the relative web path of your catalog in the “Rewrite Base” line below:

    Options +FollowSymLinks
    RewriteEngine On
    RewriteBase /
    RewriteRule ^blog(.*)$ /index.php?main_page=blog&$1 [E=VAR1:$1,QSA,L]

    # From Ultimate SEO URLs
    RewriteRule ^(.*)-p-(.*).html$ index\.php?main_page=product_info&products_id=$2&%{QUERY_STRING} ….
    ….

    could you help?


    1. As a general rule with Zen Cart, if you encounter a blank screen, enable strict error reporting and look for the fatal error that is causing the page not to load.



    1. Because you are going to add a page to your Zen Cart at index.php?main_page=blog that needs to be rewritten as /blog/. If /blog/ exists on the server, then this will not work. Therefore your wordpress installation needs to be in another folder other than /blog/. To make things easy we suggest using the default /wordpress/ folder.


  128. Got it.. My concern was the duplication of the all the tags above the “body” tag.. Those kinds of things will fail validation.. So I just removed EVERYTHING from the “body” tag and above. I removed the closing “body” and “html” tags from the footer.. No issues at all with the blog.. What a cool solution!! It works very well.. and best of all it does not have any quirky weirdness going on.. Thank you for sharing your solution!!


  129. Got it.. My concern was the duplication of the all the tags above the tag.. Those kinds of things will fail validation.. So I just removed EVERYTHING from the tag and above. I removed the closing and tags from the footer.. No issues at all with the blog.. What a cool solution!! It works very well.. and best of all it does not have any quirky weirdness going on.. Thank you for sharing your solution!!


  130. One last thing.. You stated in the last part of the instructions “Remove the header and footer code that you no longer need from header.php and footer.php in your WordPress theme folder.” What code in the header file do you suggest/recommend be deleted in GENERAL??



  131. Hi there.. You can delete all the comments I posted yesterday and today.. (including this one) I found my issue.. It was a really DUMB error in retrospect.. I can’t believe I overlooked it MULTIPLE times.. 🙂 Sorry to be a PITA.. 🙂



  132. Dear all,

    I used zencart v1.3.8 setup on my server: http://www.shopsinhvien.vn/vi
    I used wordpress 2.8 and setup on my server: http://www.shopsinhvien.vn/blogs

    when I intergation zencart with wordpress, RSS Feed wordpress run well, but Rss feed on zencart error.

    for example:
    This random RSS link of article of wordpress run: http://shopsinhvien.vn/vi/?feed=rss2
    But random Rss link of Products or Categories of zencart error: http://shopsinhvien.vn/vi/?main_page…ories&cPath=67 ;When connect this link I see a error message of wordpress.

    Please help me fix my error.
    Thank You very much.





  133. Re: “check with the author of the WOZ sidebox module for the correct method of integrating.”

    I’m afraid I don’t know the answer.. That sidebox only edition of WOZ is mod I created from the original WOZ install files. I removed all of the blog embedding code of the add-on so that only what was needed for the sideboxes to work was left..

    That said, I do need to make sure I say (again) that my THEORY that these two could work together was a THEORY.. As of yet I personally have not tested it, and so I don’t have a real clue what the issue is.. It is HIGHLY possible that these two will not work together.. When I finally get some time to really test this I will post my findings.. In the meantime I am looking into other means to create/add WordPress content sideboxes for Zen Cart so that I can use them with Numinix’s excellent embedding solution..


  134. Hello,
    numinix, I use the Simple Seo Url, I can visit the blog like index.php?main_page=blog. when i disable the SSU, but the Archives also can’t open ,it’s steering to the home page of the site.

    Does the any method can slove it

    the blew it the .htaccess

    #### BOF SSU
    Options +FollowSymLinks -MultiViews
    RewriteEngine On
    # Make sure to change “zencart” to the subfolder you install ZC. If you use root folder, change to: RewriteBase /
    RewriteBase /

    # Deny access from .htaccess
    RewriteRule ^\.htaccess$ – [F]

    RewriteCond %{SCRIPT_FILENAME} !-f
    RewriteCond %{SCRIPT_FILENAME} !-d
    # Don’t rewrite blog directory
    RewriteCond %{REQUEST_URI} !^/blog.* [NC]
    # Handle all other URIs using Zen Cart (index.php)
    RewriteRule (.*) index.php?%{QUERY_STRING} [L]
    # Do rewrite blog directory
    RewriteRule ^blog(.*)$ /index.php?main_page=blog&$1 [E=VAR1:$1,QSA,L]
    #### EOF SSU



  135. Numinix,

    First, thank you for this great addition to Zen Cart. I have one minor problem that I would like your help with.

    My site, http://www.ourcollegetown.net/blog/

    My problem is that the navigation bar says, “Home :: NAVBAR_TITLE ” I am having difficulty tracking down why I am getting NAVBAR_TITLE instead of the correct title. Do you have any suggestions?


    1. You are missing the languages file:
      includes/languages/english/YOUR_TEMPLATE/blog.php

      Or, you forgot to rename YOUR_TEMPLATE to your template folder name 🙂




  136. Thanks, it’s now working fine. However, I then loaded the wordpress sidebox only edition addon. The sideboxes seem to work fine but now the blog just returns “Not Found Sorry, but you are looking for something that isn’t here.” I rechecked the installation several times and everything is loaded per the instructions. The website is located at http://classwebsitebuilder.com/blog

    Do you have any experience with this setup? Any help would be appreciated.

    Thanks









  137. Ah, I got it.

    # Don’t rewrite blog directory
    RewriteCond %{REQUEST_URI} !^/blog.* [NC]
    # Handle all other URIs using Zen Cart (index.php)
    RewriteRule (.*) index.php?%{QUERY_STRING} [L]
    # Do rewrite blog directory
    RewriteRule ^blog(.*)$ /index.php?main_page=blog&$1 [E=VAR1:$1,QSA,L]

    at least, it works.


  138. I tried to integrate the module Ceon URI Mapping (SEO). But I do not figure out how to combine the two rewrite-statments:

    RewriteRule ^blog(.*)$ /index.php?main_page=blog&$1 [E=VAR1:$1,QSA,L]

    RewriteRule (.*) index.php?%{QUERY_STRING} [L]

    Do you have a hint?





  139. @ numinix

    You get rid off this by commenting out the “return;”s in tpl_blog_default.php.

    ex: // return;

    For me it works. This way I get the closing div-tag. What means, that tpl_blog_default.php will be processed until the last line.

    Why the returns?



  140. Cool work. Very good performance. Congrats 😀

    But 1 bug, i guess.

    The opening div-tag in tpl_blog_default.php never gets closed. The parser quits on return; bevor echoing the end-div

    At least on my system.


  141. Cool work. Very good performance. Congrats 😀

    But 1 bug, i guess.

    The opening -tag in tpl_blog_default.php never gets closed. The parser quits on return; bevor echoing the end

    At least on my system.


  142. I have bookmarked this, and have plans to test it later this weekend.. I believe I have practically memorized your instructions.. This looks like a much nicer (and less troublesome) solution than the current WOZ offering..

    However for aesthetic reasons, I do like the WOZ sideboxes, and I have been using the WOZ sideboxes sans the embedded blog for a while now. I’d like to combine best of both worlds so to speak (your solution + WOZ sideboxes), and wanted to get your feedback.. Please bear with me as I lay out my case. 🙂

    I posted this on the WOZ support thread: http://www.zen-cart.com/forum/showpost.php?p=693495&postcount=655. These are down and dirty instructions I came up with for using only the WOZ sideboxes. I have since tweaked this to include removing quite a bit of the code from the wp-configure.php file included with WOZ which interferes with other Zen mods and was not needed for the WOZ sideboxes to work.. (Google feeds and other SEO mods in particular) I’ve also removed any files that were only used for the WOZ blog embedding, and not by the sideboxes.

    I believe that combining this with your embedding solution should work with minimal issues. However, in order to make this look aesthetically pleasing, I will probably disable the display of the blog sidebar to eliminate the duplicate content display. I believe some variation of this would work:

    I will be editing the following files within my blog’s theme:
    ~ index.php
    ~ page.php
    ~ single.php
    ~ archive.php
    ~ search.php

    Within these files I’ll find and delete the following line:

    This should prevent the sidebar from displaying within the embedded blog, and the WOZ sideboxes should continue to display. Do you see any conflict between combining these two methods?? I’ll be testing this over the weekend of course, but I wanted to get your take on this as well..


  143. I have fixed the issue in # 7 above. Now my issue is that when I go to login to my blog admin, it keeps going to the actual blog and not the login page! I will double check my steps and report back.


  144. Hi numinix,

    I just went thru this tutorial and now my blog AND blog admin pages come up blank – nothing but white. Please help. Thanks





  145. M23perrault, this could happen because you have installed a module for Zen Cart whcih defines ABS_PATH. Try searching for this constant in the Developer’s Toolkit and then disable that module which has the incorrect path hard-coded into the module.


  146. here is the erro i get.. any ideas?

    [09-Nov-2009 17:45:10] PHP Warning: require_once(/var/www/zc138/wordpress/wp-includes/classes.php) [function.require-once]: failed to open stream: No such file or directory in /home2/mtphsoft/public_html/wordpress/wp-load.php on line 46







  147. It’s all running good now. Couple questions… if i install the WordPress on Zen Cart addon will it mess with this integration? Is there anyway to display products on blog posts and anyway to display recent blog posts in a sidebox or content area?



  148. Ok so I have it integrated and working. I had to place only RewriteRule ^blog(.*)$ /index.php?main_page=blog&$1 [E=VAR1:$1,QSA,L] above the 2 Rewrite Conditions from SSU.

    Now my question is… on my /blog page it pulls in the whole word press template… meaning inside my centerColumn there are HTML tags, head tags and extra body tags. How do I get it to just load the WP content and add the head stuff to the main template head and not inline?





  149. M23, your rule should be above the conditions. If your page is coming up blank even when you go to index.php?main_page=blog, then you could possible have a fatal PHP error causing the issue. In this case I would try turning on strict error reporting.


  150. ok, after following this i can not seem to get my blog to pull up so it is integrated in my site. I have tried : http://www.mtphsoftware.com/index.php?main_page=blog and it is just blank. any ideas? I am am using ssu, but i have it ignoring blog and wordpress. here is a copy of my htaccess as well:

    # Use PHP5 as default
    AddHandler application/x-httpd-php5 .php
    #### BOF SSU
    Options +FollowSymLinks -MultiViews
    RewriteEngine On
    # Make sure to change “test_site” to the subfolder you install ZC. If you use root folder, change to: RewriteBase /
    RewriteBase /

    # Deny access from .htaccess
    RewriteRule ^\.htaccess$ – [F]

    RewriteCond %{SCRIPT_FILENAME} !-f
    RewriteCond %{SCRIPT_FILENAME} !-d
    RewriteRule ^(.*) index.php?/$1 [E=VAR1:$1,QSA,L]
    RewriteRule ^blog(.*)$ /index.php?main_page=blog&$1 [E=VAR1:$1,QSA,L]
    #### EOF SSU

    order allow,deny
    allow from all

    deny from 213.194.173.90

    mp


  151. ok I set the folder name and the setting in admin back to wordpress and did everything else. I added blog to SSU exclude. and added to my .htaccess
    Options +FollowSymLinks
    RewriteEngine on
    RewriteBase /
    RewriteRule ^blog(.*)$ index.php?main_page=blog&$1 [E=VAR1:$1,QSA,L].

    now /blog redirects to my main page. If I go to index.php?main_page=blog the blog comes up but all the links that point to /blog… redirect to the main page.

    Any other suggestions?




  152. If you want your blog to be accessible via /wordpress/ then you can have your blog in /blog/. But, then you will need to create your own defined page for “wordpress” as the one included in the package is for “blog”.


  153. I renamed wordpress to blog
    Step 4:

    Rename your WordPress folder to the folder name you chose in step 3 above.

    Should I rename it to something else?


  154. Cliff, there shouldn’t be a folder called /blog/ on your server. The first couple of steps in this tutorial are in preparation to rename your blog to a new folder, such as /wordpress/


  155. I have everything installed. shop at root, blog at /blog. I am using SSU. .htaccess at root. Going to /blog doesnot rewrite but goes to the blank index.html I uploaded. going to index.php?main_page=blog pulls up the blog but every link in the blog goes to /blog/…. which then goes back to the blank index.html.
    I have tried with SSU on, off and get the same results. I have ‘blog’ excluded from rewriting in the SSU config, also tried it without it being excluded which made the index.php?mainpage=blog automatically redirect to /blog which pulled up the blank index.html. Any help would be greatly appreciated.


  156. Sorry for the delay in responding. I moved on to setting up other aspects of the store and didn’t get back to this until now. Below is the Rewrite section of my .htaccess file. I’ve tried numerous variations of the RewriteRule to no effect.

    Options +FollowSymLinks
    RewriteEngine on
    RewriteBase /
    RewriteRule ^blog(.*)$ /store/index.php?main_page=blog&$1 [E=VAR1:$1,QSA,L]

    I’ve begun using the Ceon URI Remapping module since I first tried integrating the blog into my store. It doesn’t seem to interfere with anything though, as it doesn’t rewrite the main_page=blog address and doesn’t rewrite any EZ pages, etc. My blog problem is still the same after as before I installed the module.

    My .htaccess file is in my root folder. My store is in “store” for the moment. The blog is in “blog,” and WordPress is in “wordpress.”

    I haven’t yet been able to find where to insert the $_SERVER variable. I’m still looking though, but everything in comments.php seems to be done through variables that reside elsewhere, and I don’t have enough experience with WordPress to find them quickly.

    For reference, the blog page of my store is here: http://earlyautumnvintage.com/store/index.php?main_page=blog


  157. eclectica, yes, Numinix can look into these issues for you.

    Mac10, you will now need to access your admin through /wordpress/wp-admin/ or whatever folder you renamed your old wordpress folder to.


  158. I tried all the htaccess you posted. this one worked for mine:

    RewriteRule ^blog(.*)$ /index.php?main_page=blog&$1 [E=VAR1:$1,QSA,L]

    I can’t access admin, it keeps redirecting to the blog that is now integrated.


  159. Well WordPress won’t even show up now. Integrated or not. Perhaps I will email you and you can quote me a price to do it? I’m at my wits end 😛


  160. Hmmm….well I guess I mis-understood. I did fresh installs of both ZC and WP and wanted then to reside in /shop/ and /blog/…so I will try again and rename the wordpress folder. 😀



  161. Hmmm..I guess I’m confused then because at the top of the tutorial here it says

    ‘Situation 2
    * Zen Cart installed to a sub-folder such as /shop/
    * WordPress installed to a sub-folder such as /blog/

    I did fresh installs of both Zencart and WordPress, then imported my WordPress posts from the old blog.

    you can email me at info (at) eclecticaclothing (dot) com and I can give you the dev address if you’d like?


  162. Also, after messing with the urls in addy bar I found that it needs to be

    …/code/ss/shop/blog?p=165

    and it’s putting out

    /code/ss/blog?p=165

    I’ve also tried variations of the path for the rewrite rule with no luck :/



  163. So nothing you suggested seems to work? I’m wondering if I have the htaccess rule down wrong?

    All links within the wordpress blog come out as

    …./code/ss/shop/index.php?main_page=blog?p=165#respond

    …./code/ss/blog/?p=136#comments

    They are all redirecting to the directory WordPress is installed in, except nothing shows because of the blank index.html file I put there. Which is correct.

    here’s my rewrite rule:

    RewriteRule ^blog(.*)$ /code/ss/shop/index.php?main_page=blog&$1 [E=VAR1:$1,QSA,L]

    I’m also wondering if it’s trickier for me since this is just a dev server..it’s an addon domain on another domain…


  164. I will try what you’ve suggested. At the moment I turned SSU off because the cache file keeps magically disappearing from the directory. 😀 I wanted to make sure that didn’t have anything to do with it as when SSU is on…at the moment anyway…it’s redirecting the My Account link into a weird directory on my server as well.


  165. Hmm, yellow1912, the author of SSU was supposed to post his fix that he did for Numinix.com, but hasn’t yet. So, I’ll post the file in a moment.

    I see that you aren’t using permalinks with wordpress? In that case, you may be able to get away with not using the htaccess rewrite rule at all, or change your permalinks to use SEF URLs instead of PHP URLs.

    For the comments links being redirected to the store root, if that is your issue, you’ll need to read my post from October 17th, 2009.

    Lastly, you may want to try moving the .htaccess RULE ONLY into the .htaccess file above your store root (in /public_html/)

    Edit: The wordpress page package has been updated with the modified file for SSU.



  166. I am using Simple Seo Urls

    Directory structure is

    Shop [Zencart]
    ../code/ss/dev/shop
    Blog [Worpress]
    ../code/ss/dev/blog

    .htaccess is in root of Shop directory

    I love the integration though. It’s perfect!


  167. I am having the same problem as Autumn…all links to posts/comments/page are getting redirected weird.

    Also I just wanted to mention that for me I had to leave the theme style.css in the theme folder, but deleted everything except the template info comments.

    Then I moved all the css to blog.css in zencart.


    1. To be helpful when you post, please include the important information that is relevant to the procedure. For example, what SEO URLs module are you using? What is your folder structure? In which folder did you put the .htaccess file?


  168. In includes/template/YOUR_TEMPLATE/common/html_header.php, you may want to add the following code around any meta tags that you want to be overridden by the tags created by WordPress:

    <?php if ($_GET['main_page'] != 'blog') { ?>
    ... meta tags here ...
    <?php } ?>


  169. Autumn: can you please provide the contents of your .htaccess file and also state where it is located relative to your domain? Resolving this should resolve most of the issues for you.

    Often the comments will end up linking relative to the store rather than the blog due to the base href being defined to the store. To get around this, open up the appropriate template file (usually comments.php) and find where the link is being created and add your blog address using the $_SERVER variable:

    <a href="<?php echo $_SERVER['REQUEST_URI']; ?>......">


  170. I’ve been attempting this on fresh installs of Zen Cart and WordPress for the past two days, following your instructions, but it isn’t working. I’ve tripled checked everything, and I have a feeling that either some step has been left out or that this isn’t universal. I did manage to get my blog to appear within Zen Cart, but only the main page. It appears at /store/index.php?main_page=blog. All links to the actual posts and comments go to the blog directory, i.e. /blog/?p=1, and clicking on them produces a blank page.

    I had to make a few deviations from your instructions to make it work as much as I did. Here are some issues I noted:

    WordPress preparation:
    Step 1: Uploading a blank index.html file does not disable my blog. However, a blank index.php does.
    Step 2 (and Step 1 of Zen Cart preparation): Downloading the css file, changing its name and loading it to my Zen Cart template does nothing. Checking the page source, blog.css isn’t being read, and even if it was, bringing the WP page into the middle of the ZC page also brings a link to the WP theme’s stylesheet, so changes made to blog.css can be negated by WP’s theme. Making changes to the layout involves editing the WP theme stylesheet. wordress_page.php supposedly turns off WP themes, but it isn’t doing so for me.

    Zen Cart preparation:
    Step 1: As stated above, this step accomplished nothing.
    Step 6: This did nothing also. I tried various permutations of it, and no rewrite occurs. Mod_rewrite is activated on my server, and rewriting works fine otherwise, but it’s not doing anything here. You also state that it “will rewrite your blog page url to domain.com/blog/,” when it appears to be rewriting blog page urls to store/index.php?main_page=.

    Any thoughts on my problems would be appreciated. This is a wonderful idea, and I’d like to see it work. Thanks!


  171. A new file has been added to the wordpress_page.zip package.

    The new file is:
    includes/modules/pages/blog/jscript_blog.php

    This file is used to load any JavaScript and CSS files that are required by WordPress or WordPress plugins.


  172. I’ve modified the htaccess RewriteRule to the following:
    RewriteRule ^blog(.*)$ /index.php?main_page=blog&$1 [E=VAR1:$1,QSA,L]

    If this causes errors, you can try:

    RewriteRule ^blog(.*)$ /store/index.php?main_page=blog$1 [L]


  173. I’ve been in contact with the author of Magic SEO URLs and he is going to get back to me next week with either providing a rewrite rule that will allow the module to work properly with MSU (currently nothing passed the homepage will work) or to add the ability to disable MSU on a per page basis.

    I’ve also contacted the author of SSU who has modified his code to work better with the method described in this article. His changes are live on the Numinix Blog and at the moment all of the URLs that we’ve checked are working properly. Once he has a solid solution, he is going to either include this in future releases of the SSU module, or provide us with the necessary changes. For those using SSU, the current issue is that the comment links, such as those in the footer of this blog, will redirect to the store root and are therefore inaccessible. As you can see, the SSU author resolved this issue for us, and will post his update soon.




  174. Have you had a look at the WordPress plugin for ZenMagick?

    Not only does that work without any filechanges (ignoring the filechanges required to use ZenMagick itself), but allows you to chose between modifying WP links to point back to the original blog or, alternatively, to post/category/etc pages within the store (using plain WP theme files).

    The plugin also supports permalink URLs for store WP pages.


    1. No I haven’t had a chance. As mentioned in the blog post, integrating Zen Cart and WordPress is a lot of work and has a lot of room for error for the regular person. Anyone looking to try out ZenMagick, an official fork of Zen Cart, may want to try out this plugin as an easier alternative.

      Note: I’ve just updated the steps above to include a method for displaying the blog title as part of your page titles. Additionally, you can display the title anywhere you’d like on the page itself by using the following function:
      wp_title(SEPARATOR, true, SEPARATOR_LOCATION);
      In the above code “SEPARATOR” is a character to display before or after the title. The second parameter tells the function to either echo or return the value, and SEPARATOR_LOCATION refers to whether the separator should be displayed to the “left”, “right”, or not at all “none”.


Leave a Reply

Your email address will not be published. Required fields are marked *

Contact Account Cart Search Cart Open Menu Arrow Link Arrow Chat Close Close Popup Facebook Twitter Google Plus linkedin2