Okay.. so for folks following this, using the iframes "appears" to work.. I've more testing to do before I can fully sign off on this which is why I say "appears" (your mileage may vary)..
So let me update this thread with what I've been testing out.
Following the Sideboxes Anywhere instructions (posted above) I created several files (1 for each sidebox I wanted to call) which contain similar code (this one is the categories sidebox zencart_categories.php):
$zcSBmodule = 'categories.php';
$zcSBlayout = 'left';
I wasn't happy with the way iframes looked using the Text/PHP widget so I researched to find a suitable iframe plugin.
IMHO, the iframed sideboxes, behave/look best when using the "Custom IFrame Widget" plugin. The downside of this plugin is that it hardcodes in the iframe border. I resolved this by editing the plugin to remove the iframe border from the plugin code. (removing it from the plugin code versus using CSS to drop the iframe borders will ensure a wider range of cross browser compatibility)
I'm somewhat of a stickler for detail, and I wanted to make sure that sidebox "pages" will properly validate. So I added the following to my single_sidebox.php file at the VERY top of the file:
<link rel="profile" href="http://gmpg.org/xfn/11" />
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
Just before the <title> opening and closing tags, you will need to add at least two more lines to your single_sidebox.php file.
- Some code so that links in the iframed sideboxes open where you would like (new window or same window)
- A link to the stylesheet which styles the sideboxes.
Note: The site I'm building uses the WordPress template to "wrap" around Zen Cart so that Zen Cart and WordPress are styled alike. As a result, most of the store styles come from the WordPress theme's stylesheet. The Zen Cart stylesheet only manages those style declarations which affect store specific IDs and classes.
So for the site I'm working on, instead of linking the WordPress or Zen Cart stylesheets in my single_sidebox.php file, I created a "mini" Zen Cart "sideboxes only" stylesheet just for the Zen Cart iframed sideboxes. This "mini" stylesheet contains only the declarations I needed to style the sideboxes to match the rest of the site and is stored in my WordPress theme's CSS folder. (The stylesheet contains declarations for links and images mostly -- I did not need to use any of the Zen Cart sidebox IDs and classes at all)
Another reason I created the "sideboxes only" stylesheet is so that I could use CSS to hide the Zen Cart sidebox titles without affecting the rest of the Zen Cart shop. (I instead used the WordPress widget title to create my sidebox titles for my iframed sideboxes)
That's it really..
I even have it working with more than one sidebox. (It's been reported on the Sideboxes Anywhere support thread that this was not possible - wanted to confirm that I had no issue getting more than one sidebox to display using the Sideboxes Anywhere method)
Now there is a serious caveat to using iframed sideboxes:
I have not tested iframed sideboxes with the shopping cart or login sideboxes yet. I am fairly certain that cookies and session settings will render some fairly gnarly results if these two particular sideboxes were iframed in.. I will be testing this over the weekend, and report back my findings.
In the meantime if my testing pans out, I will go ahead and use this method to display my Zen Cart sideboxes inside WordPress for the site I am working on. IMHO however, iframed sideboxes feel more like a workaround solution versus a solid perm solution. So longer term, I think I will investigate having a proper Zen Cart sidebox plugin for WordPress developed. (oDesk, vWorker, or Elance are excellent sources for qualified developers and it's where I'll likely go for this work)
Once I finish testing, I'll post a link to the site I am working on so folks can see my end result.. :) Wanted to post this to pass on the information to others..