WordPress – Zen Cart integration


WordPress is an extremely powerful open source blogging package. Not only it is free, it has a vibrant community of users and plug-in developers.

Zen Cart is an open source shopping cart. Due to its flexible template system it is shaping up to overtake most other non-commercial carts.

I use WordPress as a micro-CMS.

Unfortunately, there is no fully functional WordPress shopping cart plug-in. Yes, there are several projects in development, often much friendlier than Zen Cart or OS Commerce, but also buggy and immature.

Since both WordPress and Zen Cart are nicely striuctured and written in PHP, they should work together, right? In fact, there is even an existing Zen Cart module for integrating the two.

If you are just looking for a good general approach / laundry list of issues to consider in a similar project, read this excellent post and download this PDF

Implemented on

  • Zen Cart 1.3.7
  • WordPress 2.0

The Challenge

The existing integration has some important limitations:

  • it is poorly documented (NOT the author’s fault, English is not his native language),
  • it requires Zen Cart and WordPress to be installed into the root of the site in one ugly pile
  • it also seems to see Zen Cart as the main front-end package with WordPress being mostly a back-end bloggin engine.
  • it requires (minor) changes to be made to the core WordPress code

What I want:

  1. avoid changes to application core if at all possible
  2. keep WordPress as the main engine for the site,
  3. seemlessly transfer visitors to Zen Cart when needed
  4. maintain consistent look and feel across these two applications
  5. minimise duplication: any change should be made in one place only. (having to remember to make the same changes in different places on two different packages is a recipe for guaranteed disaster)

Now, this is a tall order, so I am going to relax the rules a bit:

There is no requirement to integrate each and every feature of Zen Cart – just the ones I need. I’ll leave the rest to people with more spare time.

The plan

  1. Install Zen Cart and WordPress into separate directories under root (wordpress is still the site’s main CMS).
  2. Make WordPress built-in functions available in Zen Cart templates.
  3. Integrate WordPress header, footer, and style.css with those of Zen Cart.
  4. There is NO requirement to make Zen Cart functions available inside WordPress.

Hopefully, this will result in a common look and feel: same colors, fonts, header, footer. The header should contain the main menu thus providing seamless navigation across the two applications.

The easy part – installing the module

There is an existing integration module available here and here. Since it comes all the way from Japan, the documentation is a bit sparce and the support is less than perfect. Come on! Give the guy a break! – English is not his native language, and the support is free, so don’t you dare whine! Just be thankful he shared. BTW, Thank you, Hira!

I started by installing (uploading) the module including to the instructions. Sort of. I did less:

  1. My WordPress and my Zen Cart reside in separate directories despite the recommendation in the module readme
  2. I did not make the changes to wp-include/template-loader.php. I do not understand potential impact of this move, but os far nothing broke. If it does, I will post it here.

The hard part: wordpress in its own directory

includes/extra-configures/wordpress.php supplied in the integration package seemed to contain a copy of the standard wordpress configuration files. The problem with having a copy is that when (not if) you change the originals you got to remember to change the copy as well.

You cannot just incude them though – wp-config.php relies on its location to set up ABSPATH. No worries. I defined ABSPATH in wordpress-config.php !

Here is what it boiled down to:

define (‘ABSPATH’,’/var/www/vhosts/staging/wordpress/’);


if (file_exists(ABSPATH.’wp-settings.php’)) {

define(‘WP_USE_THEMES’, true);
$wp_did_header = true;

include (ABSPATH.’wp-config.php’);
define (‘SHOP_URL’,get_bloginfo(‘siteurl’).’/wherever-your-shop-appears-to-be/’);

/* this SHOP_URL definition is NOT strictly necessary, but I found this definition useful when hacking various Zen Cart templates and modules, since my shop’s “front page” is actually a WordPress page. For example, in PayPal Express I changed the Cancel_Url to take the user to the shop’s front page, not to the login page. Once again, you do NOT need this definition */





This is all I have in my wordpress-config.php and it seems to be enough. It’s all php, I am just too lazy to figure out how to mention it in a post without the blog filtering out the invocation. Sorry. I am sure you can figure out what needs to be added at the begining and the end of this file. Or let me know how to put it in here!

Just remember to input your own wordpress location into the ABSPATH definition at the beginning instead of my fictitious one.

The styles

This is probably the easiest part of them all. All I want is to include my WordPress stylesheet inthe pages generated by Zen Cart (and pray the style names do not clash and override each other). Guess what, Zen Cart automatically loads any styleXXXX.css file that you put into your Zen Cart includes/templates/your-template-name/css directory.

No need to copy anything either. Just go there and issues ln command like this: ln full-path-to-your-style.css

There may be a more elegant way of doing this. By putting some smart code into html_header.php you will guarantee that you get the right style.css even when you switch themes. Me, I do not expect to be switching themes any time soon, and if I do more things will break than I can possiby imagine anyway. I know it’s wrong, but given the choice between a perfect implementation and writing al this down… i chose.

The footer

Zen Cart footer is generated by tpl_footer.php template . The original copy resides in Zen Cart’s includes/templates/template_default/common directory. It is strongly recommended that you let it be, and use the template override system. Just create a new template (if you have not done so already) and copy the file into it. THEN edit it.

The original tpl_footer.php contains a lot of code. Most of it deals with features that can be switched on or off via the admin UI, so I’d recommend that you leave them untouched.

The two pices I I chose to comment out are:

  1. A line of code within – it seemed to be a navigation aid not managed by an “if
  2. Zen Cart Copyright notice. Important: according to Zen Cart you can only do this legally if you choose not to use any images that came with your Zen Cart. According to my research, you do not need to display the © symbol for your content to be protected (like we do not put “do not steal” labels on everything). But then I am not a lawyer.

Now, simply including my wordpress footer into Zen Cart footer seemed a bit naive, since, for example, Zen Cart does not generate tag in its template footer. It does it elsewhere. What other useful functions does it perform in the process? – I dunno. So, a bit more finesse is called for.

My WordPress footer contains two kinds of stuff:

  1. footer conent: the things I want to show to the visitors like the copyright notice, some links, some stats, etc.
  2. closing tags for a bunch of styles (opened in my wordpress header), and

So, I created wp-footer-content.php and wp-footer-divs.php in my wordpress theme directory. Footer content went into one,

tags into the other. The new footer.php has two php includes and looks like this:

include 'wp-footer-content.php';
include 'wp-footer-divs.php';

As far as WordPress is concerned, nothing has changed.

Meanwhile, my Zen Cart’s tpl_footer.php now has two more php includes closer to the end:

include TEMPLATEPATH.'/wp-footer-content.php';
include TEMPLATEPATH.'/wp-footer-divs.php';

Note 1: pick the placement of these lines carefully: virtually all of Zen Cart footer is incapsulated in a conditional statement that allows to switch the footer off via the admin UI. You decide if you want to retain that feature or ignore it. Retain? – put your lines inside the conditional. Ignore? – stick them at the very end.

Note 2: since I integrated the footer before the header, I did not want my wp-footer-divs.php to accidentally close the wrong divs, so I commented it out for a while (till I had the header set up). If you are doing this all in one go and have good attention to detail, you may get away with having one wp-footer-xx instead of two. It’s a personal choice.

Note3: notice how wp_footer() ends up not being invoked by Zen Cart. It is a personal choice, but in my case it was important because among other things it calls up Google Analytics for me, thus adding a call to a non-secure site and scaring visitors away from the shopping cart (most people freak out when they get “the site contains a mix of secure and non-secure elements” message). Yes, there is a way to call Google Analytics securely (I wrote apost about it recently), but there are challenges there as well.

The header

Zen Cart header is split between html_header.php and tpl_header.php

html_header.php contains everything your visitors will never see: all the header and meta tags, all stylesheet and javascript references, all the “service” stuff. WordPress does not have an elegant way of including javascrip into the templates. If you have any and it is generated by some plug-in… I have no advice for you.

If you have put some javascript into the header.php yourself… pull it into a separate php file, put an appropriate include into your header.php and then create a link to it in includes/templates/YOURTEMPLATE/jscript directory.

tpl_header.php is where the visible header is generated. Just like in the footer, most functions are controlled via Zen Cart admin interface, so you do not have to delete/comment out much.

If you follow same procedure I suggested for the footer, remember that wp-header-divs.php goes first – we are opening them, right? 😉

I put my includes

include TEMPLATEPATH.'/wp-header-divs.php';
include TEMPLATEPATH.'/wp-header-content.php';

at the very beginning, above all other HTML, for the sake of simplicity. Otherwise there is a danger that you’d miss something and end up with weirdly overlapping styles that will take forever to trace down.

The default template starts with the “header alert” mechanism… Whether your wordpress header goes above or below it is your choice.

Very important! Do use Zen Cart’s template override system. It will save you a suicide when you loose all your changes duting the next upgrade.

Caching ( read this !! )

If you have WP-Cache enabled in Wordpres, you MUST make sure that it does NOT cache your Zen Cart pages.

If you forget, you will notice that when you start changing product quantity in the cart, some times it will change, and other times it won’t. My (and yours) gratitude goes to Ryan (see his comments below) for finding the bug and reporting it.

The fix is simple:

  1. Look up the name of your cart’s directory. It is usually “catalog”, or “shop” (in my case it’s “eshop”). You can often find it in your URL. It is also specified in your includes/configure.php file as ‘DIR_WS_CATALOG’ (ignore the slashes for the next step).
  2. In your WordPress admin menu go to Options -> WP-Cache and input the name of your cart’s directory (in my case “eshop”) into the “Rejected URIs” box.WP-cache screen shot
  3. Click “SAVE” and you are done.

Native Zen Cart caching works fine (I use the ‘file’ option).


eAccelerator works perfectly in my setup and required zero configuration out of the box. It cut my page serve times by about 70%. I love it!

I have not used APC (Advanced PHP Cache) with either WordPress or Zen Cart, so I have no idea how it will behave.

Easy Ordering from WordPress

If you are interested integrating these two wonderful applications, it’s probably because you mention the products from your Zen Cart store in your WordPress blog. Wouldn’t it be nice to be able to put a “Buy Now” button into the relevant blog posts and pages?

An amazingly useful Zen Cart contribution “Quick Order” can be found here. Once you install it (just unzip according to the instructions), you can easily create links that will instantly insert a product (or even several products) into user’s shoppinc cart.

The products are identified by their Zen Cart part numbers (so you do ot want any duplicates there), and the links can be placed anywhere.

I love this! If only now there was a way to easily pull product’s current price and put it next to the link…

OOPS! – “Quick Order” does not handle Zen Cart product attributes. What does it mean? – If you have a product that must be sold with at least some attribute (like, say, color), you got a problem. In my case, I cannot sell downloadable products, since downlads are implemented via attributes.

Now, if you are just selling products (or services), you can probably do without any attributes whatsoever, and everything will be fine.

The site has gone live

My integration efforts have been rolled into production.Most of the site is actually wordpress. To see Zen Cart you hot to travel to one of the product pages (still WordPress) and click “Add To Cart” or “View Cart” and you will be majically transformed into Zen Cart universe. The easiest way to notice the border is by looking at the URLs: wordpress has nice permalinks, while Zen Cart… is necessarily different.

  1. Thank you for an introduction of [WordPress On ZenCart].
    In addition, as for the follow, thank you.
    From pages of a module, I want to link later.

    >I did not make the changes to wp-include/template-loader.php.
    >I do not understand potential impact of this move, but os far nothing broke. If it does, I will post it here.
    In WordPress, is a design normal?
    (I think whether an HTML source breaks off)
    The reason why I comment out [exit;] is that I display the right box, a footer of ZenCart.

  2. Hira,

    I do not display any Zen Cart elements in WordPress.

    In Zen Cart itself I display WordPress header and footer (Zen Cart header and footer are on, but all their elements are either commented out or switched off via admin UI), and Zen Cart boxes in the left column.

    I should be rolling the site into production next week and will post the link here for you to see. Thank you for your kind words 🙂

  3. […] On ZenCart]was introduced here. * A method to install WordPress and ZenCart into separate directory * About a WordPress theme and […]

  4. I see. I understood it.
    I look forward to completion.

  5. What great timing for me to come across this. I’m also using wordpress as a micro CMS for my company’s website.

    It should be interesting to see your site with this implemented, I’ll post another comment here when I get mine up and running.

  6. […] Google Analytics over HTTPS I recently integrated WordPress with Zen Cart. The effort combined two amazingly powerful platforms into what appears to the visitors as a monolyth site with consistent look and feel. The actual effort is described in detail in this little HOWTO. […]

  7. Fantastic article. Will be giving this a go. You mention no cart plugins for WordPress – I did find a couple, but nothing robust and nothing that would be completely free (especially if I were to use this to develop sites for some friends of mine). Again thank you!

  8. Thanks for the article. I’m faced with the challenge on integrating a wordpress site with a zencart store. I checked out your sharpbrains site and noticed some quirks with the shopping cart which don’t seem to happen with pure zen cart sites. for instance, i was having a lot of trouble changing quantities. also, sometimes when i hit the View Cart icon in the left nav, the shopping cart page would say that my cart was empty, but i knew i had some items in it that i had added to it.

    would you know if these quirks are particular to a hybrid wordpress/zencart site like yours? or are there some bugs that you still need to fix?

  9. ryan,

    I would greatly appreciate any information about the quirks you discovered – please, if at all possible, send the screen shots and descriptions to “andrey” at sharpbrains. – think of what you would like to know if someone found a potential bug in your site!

    The View Cart button may show you an empty cart if you have been distracted for over 24 minutes: Zen Cart expires its sessions after 24 minutes of inactivity. This might be different for logged-in shoppers, but I have attempted to eliminate the login functionality from our cart for now (for simplicity sake).

    I want to believe that the quirks are due to my meddling with the theme rather than the wordpress integration.

    Once again, a detailed bug report is the best way of saying “thank you for writing this!” 😉

  10. sure, i’ll send you more details. but it’s hard to make a screen capture of this error. i suggest you try it yourself and see what happens when you try to change a quantity of something in your cart. i just added the brain fitness book to my cart and then changed its quantity from 1 to 2. it seemed to work, but now i can’t change the quantity to anything else; it’s stuck on 2 and i can’t change back to 1. this is happening for me on both firefox and safari on osx. does this happen for you?


  11. Ryan,

    thank you for catching the bug. It is NOT related to the integration – something is messed up in my database (I got a staging environment with an exactly same code and everything is fine there). Weird though… (like all bugs). Thank you again for catching it!

    I will post here as soon as the cart is back to its intended state, so that yu can have a reasonable level of confidence.

  12. Ryan,

    I fixed it! The problem was caused by WordPress caching (wp-cache).
    It is really easy to exclude Zen Cart from wp-cache attention – I have added “Caching (read this !!)” chapter above.

    Thank you for catching this!

  13. Thanks so much for this… I’m just working on getting this going today, using the new WP 2.1.3. I’m concerned about the caching issue, but the new WP admin interface does not include a WP-Cache section within Options. I want to avoid this problem (sounds supremely annoying), and I’ll keep looking for where to set this, but thought I’d ask if you have any suggestions. Thanks!

  14. Kelly,

    I have not deployed WP 2.1.3 yet, so my answer is a bit of a guess, but is it possible that you do not see WP-Cache because you have not installed it yet? It is a separate plug-in after all (found here: http://mnm.uib.es/gallir/wp-cache-2/ )…

  15. So, here’s *my* question. I understand this tutorial is for taking WordPress and using it within ZenCart, but forcing ZenCart to use WordPress’ theme system (correct me if I’m wrong!) and URL system. So you can use “Pretty Permalinks” to fix ZenCart’s URL’s as well?

    I’m just having issues myself, because I’m using WordPress within ZenCart, and I’m using the ZenCart template files to do the WordPress theming for me (I’m fine with that) – BUT my issue is that I can’t get WordPress links to function within ZenCart. The inital WordPress page comes up just fine, but when I click on any WordPress-created link (comments, categories, even post title, etc.) I get Zen Cart’s 404 page.

    If i change the URL to “&” instead of “?”, then I can see the pages just fine. In other words, the *usual* link to a single post (within ZenCart) would be:


    which gives me a 404. But if I change it in the address bar to:


    then I can see the single post page just fine.

    So I’m wondering if it’s possible that the “fix” you’ve applied above will straighten out my issue? But I *want* to use ZenCart’s template files – I don’t want to force ZenCart to use WordPress theme files. So I’m not sure how I would edit the above *if* it would fix my problem.

    Any ideas or suggestions would be appreciated (and I was also wondering if I could post this article on my site? This is really useful information, and follows along with what my own site is about. Credits, of course, would be put in place!) Thanks!

  16. Shelly,

    I would call my approach “a kludge” rather then “a fix”. Granted, it is a rather elegant kludge.

    The original WordPress/Zen Cart integration calls WordPress from within Zen Cart and uses Zen Cart themes to style it (that’s what you are doing now). It was too much for me (I am more proficient with WP than with Zen Cart) hence my method.

    The method I described above puts WordPress *next to* Zen Cart. There is some trickery that makes them *look* same, but I have not tried adding wordpress boxes to Zen Cart Templates. It might work still… I just do not know. In my approach the visitor moves between the two applications rather seamlessly, but in each of the *sides* the URLs retain their unique structure (that’s in fact, the easiest way to tell if you have crossed over – just look at the URL).

    If you want to keep using WP boxes in your Zen Cart theme, I doubt my method will help much. Not unless you are willing to let your visitors follow the links to the *raw* WordPress. But then you would have to find a way to style it to look like your Zen Cart. That would be probably very similar to what I described above, just going in the opposite direction (I hope I have not confused you to death here).

    I wish I was comfortable enough with Zen Cart to advise 😦

    Feel free to share this page as part of your site, just make it clear that the discussion belongs here. After all, the feedback is the most valuable part of this page, and if we split it into two streams each visitor will only see half of the priceless input…

  17. Okay – now I understand. 🙂 I’m the same as you – I’m *much* more familiar with WordPress than I am with ZenCart (but I’m laerning fast!). I *can* offer a small tip though – I’ve never tried it with ZenCart, but I do know you can make static pages (or other dynamic pages that have no styling) recognize the WordPress format. I use the method for the contact page on my site. You just need to add the wp-blog-header.php call to the page (or pages) of whatever part you want to take on WordPress. I would imagine you might be able to do this with ZenCart – just add the include to the top of the ZenCart’s header.php file, and then you can place WordPress stuff pretty much anywhere you want. If you wanted to use the WordPress stylesheet, you could add in the link, WordPress style, and it will be recognized.

    Just thought I’d add that idbit to your discussion – maybe it’ll help someone.

    However, the reason I have not taken WordPress out of ZenCart and placed it next to the installation is a big one. If you are an end user, let’s say you go shopping on the site and place things in your cart. Then you want to check something on the blog, so you click the link to head on over to check it out. As the end user, you may not know you are actually leavingthe ZenCart area. So you check out the blog, then return to your shopping cart to do more shopping – and discover everything you had placed in it prior to going to the blog isnow gone, never to be retrieved again.

    ZenCart sets a cookie so it knows it’s you. The cookie is not carried through anywhere else – it only remains while you’re in the ZenCart area.

    Now, I know you *can* carry a cookie, but I don’t remember how – it’s been so long since I’ve had to do it. If I can figure out how to make WordPress look for a ZenCart issued cookie and carry it through (so when the end user returns to ZenCart, the cookie isn’t lost), then I would *so* implement your method here.

    Or, if your method already has no issues with the cookie thing (meaning, if you’ve done this, and no one has lost heir shopping cart when leaving zZenCart) then I may have to do it anyway 🙂

    Anyhow, thanks! ( and I do not plan to hijack your discussion here – but this is good stuff, and I wanted to be sure it was okay to add you on 🙂 )

    1. nice explanation……….

  18. Shelly,

    you gave me an idea (although I do not know how soon I’ll get to try it): one could also use Zen Cart “pop-up” templates for WordPress integration. The pop-ups seem to be much simpler than the mainstream Zen Cart pages… Just a thought. Maybe it will inspire someone (wink, wink)!

    Meanwhile, I have checked for the “lost cart” syndrome, and my site does not suffer from it. You can easily check by playing with this product: http://www.sharpbrains.com/z/wits/
    It is a live item. If you order it and choose to go through with the order, PayPal will collect $0.01. I will get nothing, and you will hopefully gain some wits in the process.

    The problem with the cookie is that (for cart visitors who are NOT logged in) it disappears in 24 minutes (I stumbled across this number somewhere in Zen Cart forums). I do not know how to make it more persistent, BUT there is a new contrib here: http://www.sharpbrains.com/z/wits/ and it claims to create accounts for all users, and so might solve the cookie problem. I have not tried it, but definitely would love two (as soon as I am done with the twenty “top 10” items on my list).

    Meanwhile, I am too busy with being full of myself today: I have just fixed my “Insensitive” plugin for WordPress and will be putting it up for the world to use within the hour. Weee…! Good karma!

  19. Cool! Thanks!

    I’m going to play – maybe *that* is what the issue is – 24 minutes and things are gone. I’ve just tried it myself, and I could move through WordPress just fine – even outside the ZenCart directory – and move back in. But I *did* notice that if I waited a while, my stuff disappeared, no matter where I was.

    Thanks for the clues! I’ll definitely be playing myself!

  20. For the record, I’ve found where you change the cookie timeout setting. We’re having a dilemma now as to whether or not we want to lengthen the time. Worst case scenario would be that someone’s buying something from a computer at the public library. The timeout setting affects even people who are logged in – so if they were logged in and bought something, then left the library without closing the browser window, someone else could come along and get their information. So we’re trying to figure out what the best option is.

    But anyway, the timeout setting is located in zencart/includes/functions/sessions.php, right towards the top:

    if (!$SESS_LIFE = get_cfg_var(‘session.gc_maxlifetime’)) {
    $SESS_LIFE = 1440;

    “1440” = 24 minutes. (24minutes x 60 seconds = 1440 seconds)

    Hope that helps somehow 🙂

  21. Shelly, this is priceless! I am not sure I will be changing the timeout, but just having the freedome… makes one think totally differently about it.


  22. When I heard the two were integrated, I was expecting a little more (although the first attempt is a nice shot).

    So far, the tough part is the “collision” of the two (caching etc..) as has been mentioned here. With some time, I’d like to see them even more “seamlessly” working together.

    I agree with the initial post. Zen Cart is by far the best open source shopping cart available. WordPress is one of the best “CMS / Blog” systems out there. Both have super communities of contributers and assistance.

    Only time will tell how the two decide to “fuse”.

  23. econcepts,
    you may want to check one more integration option: via XOOPS.
    It is supposed to be a full-blown CMS (although not as feature-rich as Joomla or Mambo), and it has a WordPress Module and a Zen Cart module.

    WordPRess module is a bit behind the official releases, but Zen Cart is up to date.

    I will be looking into it in a few weeks – I need to integrate WordPress with a decent forum (SMF seems to be The One) and XOOPS is probably the way. So stay tuned 🙂

  24. Regarding:
    > No need to copy anything either. Just go there and issues ln command like this:
    > ln full-path-to-your-style.css

    Could I get some instructions on how to do this, or does anyone have another way to do this? I’m not clear on how to execute linux commands on my web server, and don’t even know how to make a connection like that to my web server. I’m just uploading files through a ftp client.

    Any help or pointers would be appreciated! Thanks for this helpful article.

  25. Ah, sorry – it looks like Shelly has probably answered my question already!

    I’ll mess around with adding the wp-blog-header.php call to the html_header.php file.

  26. lance,

    I would recommend the following:

    1) dig around to find out if you have more intimate access to your server than just FTP. You would be looking for words like “command prompt”, “telnet”, or “SSH”. Iit is possible to do without it, but STRONGLY recommended. ( Open Source community is sort of “do-it-yourself with compassionate advice by 100,000 others, so the ability to do things on the server is very helpful. It’s like being able to pop the hood of your car.)

    2) IF you are limited to FTP, you can simply copy style.css instead of linking it (linking is like creating shortcuts in Windows). The downside is: now you will have essentially two copies of the same file, so you may have to update it in both places every time.

    3) beyond that – do not hesitate to ask questions!


  27. Hi andrabr,

    Thanks for the support! I’m going to look into the access possibilities I have.

    Is there anything wrong with commenting out the css link in the zen cart html_header file and putting a link there to the wordpress css? I tried it and it seems to work pretty good.

  28. There is another thing I’m wondering for recording the products.

    With this method, do you have to have each product added as a post in wordpress, as well as in the zen cart system? Or is there a way to not have the same product recorded in two places like that?

  29. lance,

    1) regarding comenting out Zen Cart css… You can go both ways, you just have to understand the consequences. Zen Cart has a bunch of unique styles, and so does WordPress. I believe there are two reasonable alternatives: (a) you create and maintain a single css file that covers both (you’d have to merge css from WordPress and Zen Cart into that file then), or (b) you keep them separate (for performance?, for simplicity ?) but maintain stylistic similarity. If you just stop using Zen Cart’s native css file… you are likely to have something somewhere look very ugly – Zen Cart does rely on css for nice presentation…

    2) “recording the products” – you do not have to have it in two places. Not at all. I did it because such were the business requirements at the time (I used the Quick Order mod of Zen Cart), but you do not have to. Just stick to Zen Cart itself and you will be fine. No need to get WordPress involved, especially if you have many products in your catalog (or if they change often).

  30. I’ve run into an include problem, it seems that TEMPLATEPATH is not defined when I try to include them into the header and footer. TEMPLATEPATH and ABSPATH is usually defined in wp-settings.php in the wordpress directory. I noticed the definition for ABSPATH, but there is no mention of how TEMPLATEPATH gets defined. How exactly is it defined in your example above?

    Great work, thanks!

    1. Such an imrpsesive answer! You’ve beaten us all with that!

  31. found the problem – apparently the encoding was different when I cut and pasted your code. Interestingly enough, the single quotes that I posted looked like single quotes, but they really weren’t. I discovered this when dreamweaver didn’t highlight the code correctly. Basically had to re-write all the code by hand to make sure that wasn’t happening again. Anybody know how to fix the encoding issue so that when you paste code you only paste one type of encoding? Maybe a dreamweaver issue? Works now anyway. Thanks again!

  32. Thanks for your encouragement, Dan!

    BTW, I just read that MediaWiki can be integrated with WordPress. I have not looked into the details yet, but it is so tempting. From what I gathered, the integration definitely allows for consolidated user accounts across the two, and that is usually the hardest part.

    So some day we may have a cart, a blog AND a wiki in a nice package!

  33. We are starting a new project to integrate opensource applications together starting with wordpress, mediawiki and phpbb. Zencart is in the plan.

    Would be nice if you (and anyone interested) could pop by and share your experience with us.


  34. These instructions are outstanding – thanks for writing them up! You’ve saved me hours of work and a ton of frustration.

    Peace –


  35. Great instructions. I used this module before but now we typically install both wordpress and zencart on the same site but separate installations (different subfolder). This removes a lot of hassle when in need to upgrade either one or any template changes.

  36. Great instruction! Thanks

  37. Is there a .htaccess sample for WordPress and Zen cart intergration?

  38. Jack, there was no magic dust in .htaccess whatsoever, just the usual for each product.

  39. I have a customer with a combined Zen Cart and WordPress DB… Anyone had any upgrade issues with WP? Not concerned about ZC as next version will be dropped in new DB

  40. It is fascinating to me that this how-to is still needed in 2009. Whether I try this or not, thank you for taking the time to write this article.

    I am curious though. It’s now 2009, and we’re up to WP 2.7.1 . Your production site is still at 2.0.5 I think?

    I’m curious to know from your or others who might have tried this with the latest versions of one or both.

    I’d like to try this with WP 2.7.1 using the Thesis theme system, and Zen-Cart 1.3.8 — should be interesting times. and if I succeed, I’ll be writing about and linking to this article.

    1. Chris,
      I am no longer in charge of the site that inspired this post, so I cannot comment on the fun with upgrades.

      My only productive contribution at this point is to note that now, in 2009, there is less need to use Zen Cart, since the commercial web-based shopping infrastructure services provided by Homestead, Amazon, and the like, have grown dramatically in their sophistication. We used Zen Cart originally because the business plan had called for features not available in any commercial software or service.

      I am sure Zen Cart has evolved as well, and in 2009 there are still good reasons for deploying it, but those reasons are different from the reasons of 2007.

  41. Hi, I have a couple of questions about this. I’m working on a similar project and I need to know:
    1) Can I integrate zen cart with buddypress
    2) If I use buddypress as my main interface, can I share user login and address information between buddypress and zencart?
    Thanks a ton!

    1. Srijan,

      buddypress is an incarnation of WordPress MU. Since my approach relied on modifying templates, not on hacking the code, I would be surprised if the visual part of the integration gave you trouble.

      While WordPress MU is architectured very similar to WordPress and shares bulk of its code, some plugins have been known to work in one but not another. This creates a fascinating challenge for address/login integration. Two potentially simple solutions are: (a) do not create accounts in Zen Cart (create a new account for each purchase), or (b) try using OpenID.

      You could also use WordPress authentication API to call Zen Cart as the authentication master, but I suspect that in a “social network” environment like buddypress you may want to keep the key info in WordPress – after all everyone is a user, but not everyone is a shopper 😉

  42. Thanks for sharing

  43. Hi, just passing by here, but, I got to admit that this is probably the most refreshing, thought-provoking discussion about the marriage between ZenCart and WordPress.

    Love it. Even though I am only a few days old Zenner, I can tell the combination of two would create a great power for greater good, 1 + 1 > 3 in this case.

    Keep the thought flowing, I am in the middle of integrating the two (actually three, phpBB3 also included).


  44. TANDEM_GURU, you may also want to look at Simple Machine Forum – when I was integrating Zen Cart with WordPress (couple of years ago), SMF was about to come up with a package (?) that would fit nicely with the two (sorry, my memory is a bit blurry, but at the time it looked like potentially the easiest option for a forum).

  45. Great information and also a really useful post.

  46. does anyone have any other sample of the site

    zen cart on wordpress ??


    wordpress or zencart ??

    id like how possible it is

  47. Great information and also a really useful post.

  48. Could I get some instructions on how to do this, or does anyone have another way to do this?

  49. I want to thank you for another fantastic post. I am always on the look-out for fantastic WordPress theme to suggest to my own readers. Thank you for taking the time to write this post. It’s just what I was trying to find.

  50. Hi, nice work by the way.
    After quite a bit of experimenting, I actually find it easier to create two identical templates (in appearance) using wordpress and Zen Cart side by side. It’s not perfect but it keeps the two platforms separate and manageable. All info belongs on the wrdpress side as a nice CMS and blog and all shopping is controlled by zen cart. If you are good with .css and not so strong with .php I’d reccomend this approach.

  51. Nice article.

    Thanks a lot


  52. These instructions are outstanding – thanks for writing them up! You’ve saved me hours of work and a ton of frustration.

  53. […] WordPress – Zen Cart integration « N0T a Blog – Annotated […]

  54. […] WordPress – Zen Cart integration « N0T a Blog – Annotated […]

  55. I wasted months trying to successfully integrate OSC and WP, and here you are presenting a masterfully-done solution using Zen Cart!

    You, sir, are a gentleman and a scholar.

    (or ma’am, and lady… whichever works)

  56. Nice article.

    Thanks a lot


  57. I’m curious to know from your or others who might have tried this with the latest versions of one or both.

  58. All info belongs on the wrdpress side as a nice CMS and blog and all shopping is controlled by zen cart. If you are good with .css and not so strong with .php I’d reccomend this approach.

  59. […] – WordPress On Zencart / Released Article on WordPress – Zencart Integration –  https://n0tablog.wordpress.com/howtos/wordpress-zen-cart-integration/ Article written by Suhreed Sarkaris on how to integrate WordPress and other content management […]

  60. Is there a better way to load wordpress css into zencart? I have wordpress integrated into my zen store but for some reason the blog section breaks the header css. it just does not look professional at all. Throughout the zen cart the store behaves as it should, but as soon as you get to the blog, the header gets messed up. Any ideas how to fix that?

  61. Simply desire to say your article is as surprising. The clearness in your publish is just great and that i can think you are knowledgeable in this subject. Fine together with your permission let me to grab your feed to keep updated with impending post. Thanks 1,000,000 and please carry on the rewarding work.

  62. Great post. It helped me lot. Thanks for sharing.

  63. […] Integrating WordPress into Zen Cart 1.3.8a to 1.5.0 : Numinix Zen Cart BlogReduce Total Cost Of Ownership With Open Source Web Development ServicesWordPress – Zen Cart integrationloveClawOptions.DomainName='bluevoda.info';loveClawOptions.LicenseKey='6Y3-GL3-ZGB';loveClawOptions.ButtonStyle=16;loveClawOptions.HeaderLabel='Share on Facebook ot Twitter';loveClawOptions.SocialSite=3;loveClawOptions.ExitHTML='Thanks for Sharing!';loveClawOptions.API='wp2.20';loveClawOptions.ButtonLabels=['Great Article','Interesting','Good Read']; […]

  64. […] – WordPress On Zencart / Released Article on WordPress – Zencart Integration –  https://n0tablog.wordpress.com/howtos/wordpress-zen-cart-integration/ Article written by Suhreed Sarkaris on how to integrate WordPress and other content management […]

  65. […] – WordPress On Zencart / Released Article on WordPress – Zencart Integration –  https://n0tablog.wordpress.com/howtos/wordpress-zen-cart-integration/ Article written by Suhreed Sarkaris on how to integrate WordPress and other content management […]

  66. Fantastic beat ! I would like to apprentice even as you amend your web site,
    how can i subscribe for a weblog web site? The account helped me a applicable deal.
    I were a little bit familiar of this your broadcast offered shiny clear concept

  67. Hi there to every , since I am truly keen of reading this
    web site’s post to be updated regularly. It includes nice stuff.

  68. euntrepeneur

    WordPress – Zen Cart integration | N0T a Blog

  69. crows feet

    WordPress – Zen Cart integration | N0T a Blog

  70. clinical trials confirm skin care with snail slime

    WordPress – Zen Cart integration | N0T a Blog

  71. visit this backlink

    WordPress – Zen Cart integration | N0T a Blog

  72. crafts that make money

    WordPress – Zen Cart integration | N0T a Blog

  73. hyperlink

    WordPress – Zen Cart integration | N0T a Blog

  74. Нello, I enjoy reading all of your article post. I wanted to write a little
    comment to sսpport you.

  75. best places for family vacations

    WordPress – Zen Cart integration | N0T a Blog

  76. Financial Planning how to

    WordPress – Zen Cart integration | N0T a Blog

  77. nomeatwonders.weebly.com

    WordPress – Zen Cart integration | N0T a Blog

  78. Woon.Or.kr

    WordPress – Zen Cart integration | N0T a Blog

  79. please click the next page

    WordPress – Zen Cart integration | N0T a Blog

  80. vitamins and minerals worksheet

    WordPress – Zen Cart integration | N0T a Blog

  81. Buyprovisions.com

    WordPress – Zen Cart integration | N0T a Blog

  82. For anyone stumbling across this post, you should know that WOZ hasn’t worked in quite some time since Zen Cart v1.5.0.. But ther is another option..

    I finally took matters into my own hands and collaborated on a WordPress plugin which allows me to display Zen Cart content on my WordPress site using a series of widgets and shortcodes. ie: product listings (new, featured, specials, best sellers), reviews, testimonials, categories, manufacturers, shopping cart.. Conversely, I have a set of Zen Cart sideboxes that allow me to display certain WordPress widgets in Zen Cart (no messy embedding solutions for me). All I have to do is style my Zen Cart site to match WordPress and it’s a wrap.. Seemless looking user experience while harnessing the full power of WordPress and Zen Cart.. (See an example of one such site here: http://eyeitalia(dot)com)

  83. navigate to this site

    WordPress – Zen Cart integration | N0T a Blog

  84. search.gobblin.se

    WordPress – Zen Cart integration | N0T a Blog

  85. libanonchat.org

    WordPress – Zen Cart integration | N0T a Blog

  86. how to make money investing

    WordPress – Zen Cart integration | N0T a Blog

  87. super fast reply

    WordPress – Zen Cart integration | N0T a Blog

  88. Rina-karl.com

    WordPress – Zen Cart integration | N0T a Blog

  89. rebelmouse.com

    WordPress – Zen Cart integration | N0T a Blog

  90. ariesvilando.wordpress.com

    WordPress – Zen Cart integration | N0T a Blog

  91. garthtraining.jigsy.com

    WordPress – Zen Cart integration | N0T a Blog

  92. please click the following page

    WordPress – Zen Cart integration | N0T a Blog

  93. Good day! Do you know if they make any plugins to help with SEO?

    I’m trying to get my blog to rank for some targeted keywords but I’m not seeing very
    good gains. If you know of any please share. Thank you!

  94. Our Web Site

    WordPress – Zen Cart integration | N0T a Blog

  95. visit our website

    WordPress – Zen Cart integration | N0T a Blog

  96. Miami heat

    WordPress – Zen Cart integration | N0T a Blog

  97. southern ontario

    WordPress – Zen Cart integration | N0T a Blog

  98. Mikepiriephotography.Com

    WordPress – Zen Cart integration | N0T a Blog

  99. widerlensfilms.com

    WordPress – Zen Cart integration | N0T a Blog

  100. Extermination-Faune-Express.Com

    WordPress – Zen Cart integration | N0T a Blog

  101. Wow! Finally I got a web site from where I be capable of
    genuinely obtain helpful information regarding
    my study and knowledge.

  102. Discover More Here

    WordPress – Zen Cart integration | N0T a Blog

  103. 179.229

    WordPress – Zen Cart integration | N0T a Blog

  104. try this web-site

    WordPress – Zen Cart integration | N0T a Blog

  105. My brother recommended I would possibly like this blog.
    He was entirely right. This publish truly made my day. You
    cann’t imagine just how so much time I had spent for this info!


  106. Good day very nice blog!! Guy .. Beautiful .. Wonderful ..

    I’ll bookmark your site and take the feeds also?

    I am glad to find numerous helpful info right here within the publish,
    we need develop more strategies in this regard, thanks for sharing.
    . . . . .

  107. Hi! This is my first comment here so I just wanted to
    give a quick shout out and say I really enjoy reading your articles.
    Can you recommend any other blogs/websites/forums that go over the same subjects?
    Thank you so much!

  108. Appreciating the commitment you put into your website and detailed information you
    provide. It’s awesome to come across a blog every once
    in a while that isn’t the same out of date rehashed
    material. Great read! I’ve bookmarked your site and I’m adding your RSS feeds to my Google account.

  109. VLL chung cư gemek premium chung cư vinhomes liễu giai z căn hộ 47 nguyễn tuân z sun legacy z goldsilk complex z flc garden city z imperia sky garden 423 minh khai z mandarin garden 2
    z chung cư mon city z chung cư goldmark city z chung cư ecolife z
    chung cư ha noi centerpoint z chung cư season avenue z hà nội paragon z vinata
    tower z green pearl minh khai z vinhomes bắc ninh z
    chung cư park view dương nội z phân phối chung cư hà

  110. Auf
    kannst Du gratis eine Sex Show
    mit der Erotikdarstellerin
    BlondeHexe sehen
    Die Themen der Shows sind
    Dirty Talk

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s


I am sorry you have to see this. Actually, I am not – if you came here, it’s you fault. When we choose our actions we also choose the consequences.

Despite my oversized ego I do NOT believe that anyone out there craves a daily dose of my insight. In fact, I am suspicious of people who think otherwise.

This blog is a tool.

I meddle with many complex computer deployments, and as I go through adding features and learning things, I also tend to forget numerous details and the reasoning behind the many choices I have made in the past. This is the place to document my adventures. And to give something back.

If you stumble upon this and find it useful – …good for you.

%d bloggers like this: