Support » Fixing WordPress » Zen Cart and WordPress

  • Resolved Doodlebee


    Just for the record, I’m also asking this over on the Zen Cart forum as well. I’m hoping that, between the two areas, I can get some ideas for an answer (I’m not sure if *either* place can give an actual, straightforward *working* answer, but pointing me in the right direction may work.)

    So I’m installing ZenCart for my brother. ZenCart comes with a “WordPress Contribution”. He already uses a blog, but wanted to move from MT to WP – which I can do just fine.

    For the record, WordPress *must* reside *within* ZenCart. I could easily fix the issue I’m having if I could just place WordPress outside the ZenCart directory, and not use it as a contribution from within. But, unfortunately, if I do this, then when someone leaves the cart area to view blog posts, if they’ve placed anything within the shopping cart, they lose it by leaving the “shopping” area. This is why WordPress has to be within the ZenCart (unless someone knows how I can add php code to carry a ZenCart cookie throughout the WordPress area!, then I could totally do this.)

    Anyway, I was hoping someone here had an idea about using the two together. I’m required to have the Blog URI changed to an unusual format to make it work with ZenCart. The installation files are in, but to get ZenCart to pull it in properly (and use the ZenCart templates for the layout), I had to change the Blog URI to

    Now, WordPress comes up fine with this format. *However*…when you try to go to *any* link through WordPress (post title, archive link, comments link, categories – anything), I get a 404 page.

    However, if I change the URL in the address bar of the browser from “?” to “&” (in other words: then everything comes up just fine.

    I find this to be really strange.

    I was thinking that I *might* be able to use .htaccess to edit the “?” to a “&”, but the .htaccess file is required to be in the Blog URI directory – which happens to be the same directory that all the ZenCart pages are at. I’m afraid if I edit the .htaccess to fix the issue with the WordPress pages that it’ll screw up the ZenCart installation. (Oh, and even more fun, after I do this, I’ll be installing another contribution for ZenCart called “SEO URLs” which will rewrite all URLs to make them “Pretty” – much the same way “pretty permalinks” work for WordPress, but it goes for the entire cart.)

    I know, it seems like a HUGE mess. I was wondering if anyone has had any experience with this type of setup, and if you do, how did you manage this issue? Or did you even have it?

    For the record – before I get chewed out for asking a “pro” question on a “free” support area, no, I’m not getting paid for this. This is a collaboration of my family to give something to my brother, who is a college student. He wants to sell photographs to help pay for books/tuition/pizza and beer (get real, we all know it’s for the last option!) – and this is my part in the whole scheme. Just thought I’d toss that out there, because I know how certain people on this forum feel about free support if you’re getting pad to do the site (no names mentioned, but you know who you are 😉 )

    So if anyone has any ideas on how to go about handling this, that’d be great. *Including* the line of thought on how to carry the ZenCart cookie throughout the blog area (and Gallery2, actually – we’ll be using that as well) – is there some PHP code I can just place in the header.php file? I can find the code, I just need to know the right place to put it (wp-blog-header.php or just header.php?)

    I think *that* would be the simplest route. Of course, then I’d have to figure out how to get the ZenCart template to get associated with the WordPress theme system…

    Anyway, sorry for the novel – but I’d appreciate any info anyone could pass along 🙂

Viewing 2 replies - 1 through 2 (of 2 total)
  • Whoa no responses yet? Well I just wanted to point out that you could use mod redirect to map urls to page you need for your blog and others that you need for your shop in your .htaccess file. Or you could also use a subdomain for your shop… and have it point to your zencart directory, and use another subdomain or the main domain to point to your wordpress.

    Thanks 1mil.

    Catually, I found out my thinking on this was all wrong. I *don’t* have to have WordPress installed within ZenCart. Turns out that ZenCart has a cookie that, by default, is set for 24 minutes. So you can leave the cart and go anywhere else on the ‘net you like, and as long as you return within the 24-minute window, you can come back and nothing is lost (you can change the time on the cookie, by the way – I just can’t remember which file it’s in at the moment).

    I also found someone else who has figured out how to modify *ZenCart* to use the *WordPress* theme files – rather than the other way around – which is even cooler because the WP themes are MUCH easier to work with than the ZenCart ones.

    Thanks for bringing this to my attention though – I totally forgot I had asked this question here – but maybe the info provided can help someone else 🙂

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Zen Cart and WordPress’ is closed to new replies.