Zen Cart Logo
Forums / Addon Sideboxes / Sidebox Anywhere mod - Please Help

Sidebox Anywhere mod - Please Help

Views: 13,781

Results 41 to 60 of 64
16 May 2008, 1:29 PM
#41
splieg avatar

splieg

New Zenner

Join Date:
Jul 2005
Location:
Newfoundland, Canada
Posts:
59
Plugin Contributions:
0

Sidebox Anywhere mod - Please Help

I'd like to be able to place multiple sideboxes on a page outside of my cart. I've tried one sidebox and it works great. When I try two boxes the second one doesn't appear.

Code sample:

<table width="540" id="main_bottom"> <tr> <td valign="top" id="main_bottom_td"><div align="center"> <?php $zcSBmodule = 'whats_new.php'; $zcSBlayout = 'left'; require ("cart/single_sidebox.php"); ?> </div></td> <td valign="top" id="main_bottom_td"><div align="center"> <?php $zcSBmodule = 'featured.php'; $zcSBlayout = 'left'; require ("cart/single_featured.php"); ?> </div></td> <td valign="top" id="main_bottom_td"><div align="center"> <?php $zcSBmodule = 'featured.php'; $zcSBlayout = 'left'; require ("cart/single_featured.php"); ?> </div></td> </tr> </table>

I tried using all three boxes named single_sidebox.php and then tried using ones named differently like single_featured.php but still can't seem to get more then one to appear.

Also, is it possible for the single_sidebox.php to have a setting that overrides the max value set in Zen Cart? Say I have the max value for featured set at 3 inside Zen to display 3 items within the box in the cart but I only what 1 item to appear in the box outside the cart. Is there a variable I can set within single_sidebox.php??

Thanks in advance.

28 Jul 2008, 10:14 AM
#42
splieg avatar

splieg

New Zenner

Join Date:
Jul 2005
Location:
Newfoundland, Canada
Posts:
59
Plugin Contributions:
0

Re: Sidebox Anywhere mod - Please Help

Does anyone have insight on my last post regarding multiple sidebox anywhere modules on one page? One works great but 2 or more doesn't display.

Regards,

2 Dec 2008, 8:01 PM
#43
mdegrandis avatar

mdegrandis

New Zenner

Join Date:
Jun 2008
Location:
Oregon
Posts:
60
Plugin Contributions:
0

Re: Sidebox Anywhere mod - Please Help

Trying to do the same thing...can't seem to get it to work either. Any ideas? Did you ever figure it out?

I got the mod to do my zen header links so that the login shopping cart links are outside of ZC(in the directory above zc).

Wanted the shopping cart to follow the customer in and out of zen cart as well.

Do able?

17 Feb 2009, 12:36 PM
#44
tekkjeskj avatar

tekkjeskj

New Zenner

Join Date:
Sep 2006
Posts:
8
Plugin Contributions:
0

Re: Sidebox Anywhere mod - Please Help

New Window,
I have installed de Sidebox Anywhere, with the sidebox "specials"
My question is how do i make the code so when you click on a item a "new window" opens, the problem is when i click on a item, its opens the product inside the smal sidebox.:lookaroun

It's just local now fore test, so i have no ref.

12 Jan 2010, 2:26 AM
#45
joeguy44 avatar

joeguy44

New Zenner

Join Date:
Mar 2009
Posts:
15
Plugin Contributions:
0

Re: Sidebox Anywhere mod - Please Help

I hacked out a way to get it to work, but I am not sure if it is the right way. I am not a php guru by any means, not even a novice. I will share what I did using the SIDEBOX ANYWHERE mod...

Basically, I first created a .php page that calls the mod (in the code below its the one named ezpage_sidebox_include.php). Then on another page, the one that I want the multiply side boxes to show, I use a basic php include statement to call the first page I created and then the additional sideboxs straight from the modules folder. It looks like so...

<div> <?php include("../zencart/ezpage_sidebox_include.php"); ?> </div> <div> <?php include("../zencart/includes/modules/sideboxes/categories.php"); ?> </div> <div> <?php include("../zencart/includes/modules/sideboxes/search.php"); ?> </div>

What I found was the CSS used for all of the includes came from the SIDEBOX ANYWHERE mod page. Which is okay for me since I use a custom CSS template that I created to override the look, but it will probably not be good others.

Could someone with coding experience please tell me if this is "good form." Are there problems a newbie like me is not aware of that are created by doing this? Is this a fluke that it works?

thanks!

27 Jan 2010, 3:06 PM
#46
mipavluk avatar

mipavluk

Zen Follower

Join Date:
Jun 2007
Location:
Posadas, Misiones, Argentina
Posts:
221
Plugin Contributions:
0

Re: Sidebox Anywhere mod - Please Help

is there a way to have this, for example, in a blog? I mean... is there a way to have this on html?

would be wonderful!

thanks in advance...

27 Jan 2010, 3:10 PM
#47
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Sidebox Anywhere mod - Please Help

Not at the present time.
That would require writing a whole different addon for that purpose.

27 Jan 2010, 3:15 PM
#48
mipavluk avatar

mipavluk

Zen Follower

Join Date:
Jun 2007
Location:
Posadas, Misiones, Argentina
Posts:
221
Plugin Contributions:
0

Re: Sidebox Anywhere mod - Please Help

:(:(:(
could you please keep in mind this request for future work?
thanks in advance...

9 Feb 2010, 12:36 PM
#49
echexxxxxxxx10 avatar

echexxxxxxxx10

New Zenner

Join Date:
Feb 2010
Posts:
58
Plugin Contributions:
0

Re: Sidebox Anywhere mod - Please Help

Hello everyone,

I created two sites,
an institutional php
and one with ZenCart ecommerce

two different domains, independent ...

now I have the need to put the home site of a normal box that displays the latest products published sull'ecommerce ...

possible? and if so, how?

I read the manual, but I can not find me ...
I tried searching the forum but nothing ...

ps. sorry for my english, made in google traslator :smartalec:

9 Feb 2010, 1:24 PM
#51
echexxxxxxxx10 avatar

echexxxxxxxx10

New Zenner

Join Date:
Feb 2010
Posts:
58
Plugin Contributions:
0

Re: Sidebox Anywhere mod - Please Help

stevesh:

Maybe this:

http://www.zen-cart.com/index.php?main_page=product_contrib_info&products_id=79

hello, thanks for the answer ...

I tested the module that I've mentioned, but I can not get to work on another domain. :no:

I wanted to know if anyone has had this problem and how I solved it!

thanks a lot for the availability

9 Feb 2010, 3:29 PM
#52
echexxxxxxxx10 avatar

echexxxxxxxx10

New Zenner

Join Date:
Feb 2010
Posts:
58
Plugin Contributions:
0

Re: Sidebox Anywhere mod - Please Help

Hello everyone, I can not run this code!:no:

which folder should I put the file: single_sidebox.php?
in /includes/modules/sideboxes ?
or in /includes/templates/MY_TEMPLATE/sideboxes ?

thanks

9 Feb 2010, 3:49 PM
#53
echexxxxxxxx10 avatar

echexxxxxxxx10

New Zenner

Join Date:
Feb 2010
Posts:
58
Plugin Contributions:
0

Re: Sidebox Anywhere mod - Please Help

me explain what I did, so you can help:

  1. I uploaded the file single_sidebox.php
    in http://www.mysitezencart.com/shop/single_sidebox.php

  2. I created the file test.php with the following code:

<?php $zcSBmodule = 'whats_new.php'; $zcSBlayout = 'left'; define('DIR_WS_IMAGES', 'http://www.mysitezencart.com/shop/images/'); require ("http://www.mysitezencart.com/shop/single_sidebox.php"); ?>

3.I uploaded the file test.php in the
http://www.othersite.com/test.php

but I see a blank page

What did I do wrong?

thanks

9 Feb 2010, 3:50 PM
#54
echexxxxxxxx10 avatar

echexxxxxxxx10

New Zenner

Join Date:
Feb 2010
Posts:
58
Plugin Contributions:
0

Re: Sidebox Anywhere mod - Please Help

Hello everyone, I can not run this code!:no:

me explain what I did, so you can help:

  1. I uploaded the file single_sidebox.php
    in http://www.mysitezencart.com/shop/single_sidebox.php

  2. I created the file test.php with the following code:

<?php $zcSBmodule = 'whats_new.php'; $zcSBlayout = 'left'; define('DIR_WS_IMAGES', 'http://www.mysitezencart.com/shop/images/'); require ("http://www.mysitezencart.com/shop/single_sidebox.php"); ?>

3.I uploaded the file test.php in the
http://www.othersite.com/test.php

but I see a blank page

What did I do wrong?

thanks

17 Jun 2011, 5:30 AM
#55
zerogravity avatar

zerogravity

New Zenner

Join Date:
Jun 2011
Location:
Colorado, USA
Posts:
46
Plugin Contributions:
0

Re: Sidebox Anywhere mod - Please Help

Sorry I know this is an old thread but I can't get this working.

joeguy44:

<div> <?php include("../zencart/ezpage_sidebox_include.php"); ?> </div> <div> <?php include("../zencart/includes/modules/sideboxes/categories.php"); ?> </div> <div> <?php include("../zencart/includes/modules/sideboxes/search.php"); ?> </div>

I copied the code from the Sidebox Anywhere mod and placed it in ezpage_sidebox_include.php. The sidebox I have defined in said include displays correctly but then processing stops. The second <div> is in the code of the page but nothing further.

Can anyone suggest what may be going wrong, especially as it seemed to work for joeguy44.
zencart 1.3.9h

15 Oct 2011, 1:42 PM
#56
breauxlg avatar

breauxlg

New Zenner

Join Date:
Jun 2010
Location:
New Iberia, LA
Posts:
50
Plugin Contributions:
0

Re: Sidebox Anywhere mod - Please Help

tekkjeskj:

New Window,
I have installed de Sidebox Anywhere, with the sidebox "specials"
My question is how do i make the code so when you click on a item a "new window" opens, the problem is when i click on a item, its opens the product inside the smal sidebox.:lookaroun

It's just local now fore test, so i have no ref.

Has anyone found the solution to this? New Window instead of in the external sidebox window?

21 Dec 2011, 7:52 PM
#57
divavocals avatar

divavocals

Totally Zenned

Join Date:
Jan 2007
Location:
Los Angeles, California, United States
Posts:
10,011
Plugin Contributions:
3

Re: Sidebox Anywhere mod - Please Help

These are the only two posts in this thread which covers this..

Does anyone have a solution for how to use this mod to display more than one sidebox?? DrByte?? anyone??? :frusty:

splieg:

I'd like to be able to place multiple sideboxes on a page outside of my cart. I've tried one sidebox and it works great. When I try two boxes the second one doesn't appear.

Code sample:

<table width="540" id="main_bottom"> <tr> <td valign="top" id="main_bottom_td"><div align="center"> <?php $zcSBmodule = 'whats_new.php'; $zcSBlayout = 'left'; require ("cart/single_sidebox.php"); ?> </div></td> <td valign="top" id="main_bottom_td"><div align="center"> <?php $zcSBmodule = 'featured.php'; $zcSBlayout = 'left'; require ("cart/single_featured.php"); ?> </div></td> <td valign="top" id="main_bottom_td"><div align="center"> <?php $zcSBmodule = 'featured.php'; $zcSBlayout = 'left'; require ("cart/single_featured.php"); ?> </div></td> </tr> </table>

I tried using all three boxes named single_sidebox.php and then tried using ones named differently like single_featured.php but still can't seem to get more then one to appear.

Also, is it possible for the single_sidebox.php to have a setting that overrides the max value set in Zen Cart? Say I have the max value for featured set at 3 inside Zen to display 3 items within the box in the cart but I only what 1 item to appear in the box outside the cart. Is there a variable I can set within single_sidebox.php??

Thanks in advance.

joeguy44:

I hacked out a way to get it to work, but I am not sure if it is the right way. I am not a php guru by any means, not even a novice. I will share what I did using the SIDEBOX ANYWHERE mod...

Basically, I first created a .php page that calls the mod (in the code below its the one named ezpage_sidebox_include.php). Then on another page, the one that I want the multiply side boxes to show, I use a basic php include statement to call the first page I created and then the additional sideboxs straight from the modules folder. It looks like so...

<div> <?php include("../zencart/ezpage_sidebox_include.php"); ?> </div> <div> <?php include("../zencart/includes/modules/sideboxes/categories.php"); ?> </div> <div> <?php include("../zencart/includes/modules/sideboxes/search.php"); ?> </div>

What I found was the CSS used for all of the includes came from the SIDEBOX ANYWHERE mod page. Which is okay for me since I use a custom CSS template that I created to override the look, but it will probably not be good others.

Could someone with coding experience please tell me if this is "good form." Are there problems a newbie like me is not aware of that are created by doing this? Is this a fluke that it works?

thanks!

27 Dec 2011, 7:52 PM
#58
divavocals avatar

divavocals

Totally Zenned

Join Date:
Jan 2007
Location:
Los Angeles, California, United States
Posts:
10,011
Plugin Contributions:
3

Re: Sidebox Anywhere mod - Please Help

DivaVocals:

These are the only two posts in this thread which covers this..

Does anyone have a solution for how to use this mod to display more than one sidebox?? DrByte?? anyone??? :frusty:

Answering my own question:

Following these instructions I was successfully able to display the categories sidebox by creating a file called external-displayed-categories.php which contained this code:

<?php
 $zcSBmodule = 'categories.php';
 $zcSBlayout = 'left';
 require ("/path/to/zencart/single_sidebox.php");
?>
```I created a second file to display new products called **external-displayed-whatsnew.php** which contained this code:
<?php $zcSBmodule = 'whats_new.php'; $zcSBlayout = 'left'; require ("/path/to/zencart/single_sidebox.php"); ?>

BUT, my externally called sideboxes didn't look like they do in the shop.. Soooooooo...

I needed to add some code to get my sideboxes looking like they do in the shop. To do this I simply linked the stylesheet with the declarations which affect my sideboxes in my **single_sidebox.php** file.. 

Now in the name of being a stickler for detail, 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: ```
<!DOCTYPE html>
<html>
<head>
<link rel="profile" href="http://gmpg.org/xfn/11" />
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title></title>
</head>
``` Just before the <title> opening and closing tags, you will need to add a link to the stylesheet which styles the sideboxes.
 
You add this to the **single_sidebox.php** file because that is the file the individual sidebox files call. They will inheirit the stylesheet settings from this file.



For the site I'm working on, instead of linking to the Zen Cart stylesheets in my **single_sidebox.php** file, I created a "mini"  Zen Cart "external sideboxes only" stylesheet. This "mini" stylesheet contains only the declarations I  needed to style the externally called sideboxes to match the ones in the store. 


 
 I also created the "external sideboxes only" stylesheet so that I  could use CSS to hide the Zen Cart sidebox titles of my externally called sideboxes without affecting the  rest of the Zen Cart shop. 



 That's it really..


 I got it working with more than one sidebox. (It's been  reported on this support thread that this was not  possible - i wanted to confirm that I had no issue getting more than one  sidebox to display using the Sideboxes Anywhere add-on)
 

I have not tested this with the shopping cart or login  sideboxes yet. However, I am fairly certain that cookies and session settings may render some fairly gnarly results with these two particular sideboxes.. I will be testing this over the weekend, and report  back my findings.
 

Once I finish testing, I'll post a link to the site I am working on  so folks can see my end result.. :) (FYI, I'm using iframes to display my externally called sideboxes for a variety of reasons...) Wanted to post this to pass on the  information to others..
28 Dec 2011, 3:51 AM
#59
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Sidebox Anywhere mod - Please Help

VERY IMPORTANT NOTE: your parenthetical last-minute comment about using iframes is VERY important when coupled with your suggestion of embedding yet another DOCTYPE and opening <HTML> tag on the page. In fact, INSIDE A FRAME is the ONLY time you should do that.
So, if you're not using frames (and they're generally not something one would use, for a myriad of reasons), then YOU SHOULD NOT use the added HTML suggested above.

28 Dec 2011, 4:13 PM
#60
divavocals avatar

divavocals

Totally Zenned

Join Date:
Jan 2007
Location:
Los Angeles, California, United States
Posts:
10,011
Plugin Contributions:
3

Re: Sidebox Anywhere mod - Please Help

DrByte:

VERY IMPORTANT NOTE: your parenthetical last-minute comment about using iframes is VERY important when coupled with your suggestion of embedding yet another DOCTYPE and opening <HTML> tag on the page. In fact, INSIDE A FRAME is the ONLY time you should do that.
So, if you're not using frames (and they're generally not something one would use, for a myriad of reasons), then YOU SHOULD NOT use the added HTML suggested above.
Thanks DrByte.. My apologies.. I should have been MUCH clearer in my post (it was a copy and paste from another forum where the context of my writing would have been clearer -- I should have cleaned it up a bit more before posting it here raw/uncut)..

Yes, the reason I had to do this at all was because the sidebox is being called from inside an iframe. This all started because I was trying to get the sideboxes to look like the rest of the site and the store. Initially based on the an older post in this thread I added the following to the very bottom of the single_sidebox.php file (after the closing ?> line).

<style type="text/css"> @import "/includes/templates/MY_TEMPLATE/css/stylesheet.css"; </style>

You may have to even make that an entire URL:

<style type="text/css"> @import "http://yourdomain.com/includes/templates/MY_TEMPLATE/css/stylesheet.css"; </style>

<head> <link rel="stylesheet" type="text/css" href="http://yourdomain.com/includes/templates/MY_TEMPLATE/css/sidebox_stylesheet.css" /> <title></title> </head> ```That worked, but I was concerned that the sidebox "pages" wouldn't validate. So I went to <http://validator.w3.org/> to validate the sidebox page, and used the "HTML-Tidy" tool to get the "clean" HTML I previously posted.

To further clarify my previous statements, I'm truly not advocating the use (or rather overuse) of iframes at all for all the reasons most often cited (accessibility, page loading times, SEO, etc). However, for this particular site, the use of an iframe was the ONLY way I could get the externally called sideboxes to show/behave.

In this case I believe this limited use of an iframe will probably be okay.. I am using a notice of external content for screenreaders to resolve any accessibility issues, there are no serious SEO concerns from displaying 1 or 2 sideboxes, and I do not plan to load more than two iframed sideboxes to ensure that I don't create any performance issues.

All this to say that I'm still testing this implementation and as of this writing I am cautiously optimistic that they will not be problematic down the road. I will of course update my findings if this turns out to NOT be the case..

Again, my apologies for not being clearer in my earlier post..:blush: Dr Byte is absolutely correct. The information I shared yesterday is only to be used if the sideboxes are called from inside an iframe..