Hi,
I would like to add additional "have you seen" sideboxes. I am using these to advertise products on my site. Could someone point me in the direction of how to add an extra box, I'm sure it can be done but not sure how.
Thanks
Pete
Printable View
Hi,
I would like to add additional "have you seen" sideboxes. I am using these to advertise products on my site. Could someone point me in the direction of how to add an extra box, I'm sure it can be done but not sure how.
Thanks
Pete
Wouldnt this be great if someone would reply?
Wouldn't this be great if some of us had a few cups of coffee while others waited patiently for a response or perhaps searched the forums while waiting ... :smile:
Or perhaps posting what kind of additional sideboxes you need and their purpose ...
More details result in better responses ... as does a tad more patiences ... :cool:
Not to sound picky...but that post was from more than a yr ago.
I already found the information I was looking for regarding it.
Its just there are usually two types of posts on these boards, people who ask for information thats easily found, or complex questions that entitles too much messing around with code. Not sure how you guys have the patience....
If you found the information that is being requested ... then perhaps you could post the link to it to be helpful ...
The banner sideboxes can be cloned once you understand a bit more about what they do ...
For example ...
are clones of:Quote:
/includes/modules/sideboxes/banner_box2.php
/includes/templates/template_default/sideboxes/tpl_banner_box2.php
The differences that allow them to pull their own set of Banner Group banners are the settings in the Layout Settings where the Banner Groups are defined for each banner sidebox ...Quote:
/includes/modules/sideboxes/banner_box.php
/includes/templates/template_default/sideboxes/tpl_banner_box.php
The banners_box uses the Banner Group names defined in:
SHOW_BANNERS_GROUP_SET7
To know which banners to look for to be displayed ...
The banners_box2 uses the Banner Group names defined in:
SHOW_BANNERS_GROUP_SET8
To know which banners to look for to be displayed ...
To clone this for another banner sidebox, you would need to create copies for the 2 files for banners_box2 and modify them by copying to:
This would require its own unique setting for which Banner Groups to include, such as creating a new configuration_key for:Quote:
/includes/modules/sideboxes/banners_box3.php
/includes/templates/template_default/sideboxes/tpl_banner_box3.php
SHOW_BANNERS_GROUP_SET10
Why use SHOW_BANNERS_GROUP_SET10? Because it is unique and has not been used before ...
This could be added to the configuration table like the other Banner Group definitions, or it could be added to a define statement ...
Extra define statements are best added to the directory in a file that has meaning to you such as:
/includes/languages/english/extra_definitions/my_banners_box3.php
<?php
define('SHOW_BANNERS_GROUP_SET10', 'BANNER GROUP NAMES GO HERE');
?>
This would load at the same time as the english.php file ...
Or, you could add it to the configuration table in the same way all the other settings are added:
Then, you customize the new files for banners_box3 to use the changes described above ...PHP Code:
INSERT INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, use_function, set_function, date_added) VALUES ('Banner Display Groups - Side Box banner_box3', 'SHOW_BANNERS_GROUP_SET10', 'SideBox-Banners', 'The Banner Display Groups can be from 1 Banner Group or Multiple Banner Groups<br /><br />For Multiple Banner Groups enter the Banner Group Name separated by a colon <strong>:</strong><br /><br />Example: Wide-Banners:SideBox-Banners<br />Default Group is SideBox-Banners<br /><br />What Banner Group(s) do you want to use in the Side Box - banner_box3?<br />Leave blank for none', '19', '73', '', '', now());
Example:
SHOW_BANNERS_GROUP_SET8
would become:
SHOW_BANNERS_GROUP_SET10
TEXT_BANNER_BOX2
would become:
TEXT_BANNER_BOX3
would become:PHP Code:
require($template->get_template_dir('tpl_banner_box2.php',DIR_WS_TEMPLATE, $current_page_base,'sideboxes'). '/tpl_banner_box2.php');
etc. etc. etc.PHP Code:
require($template->get_template_dir('tpl_banner_box3.php',DIR_WS_TEMPLATE, $current_page_base,'sideboxes'). '/tpl_banner_box3.php');
NOTE: The new defines can also be included in your new file:
/includes/languages/english/extra_definitions/my_banners_box3.php
to keep everything related together ...
Hope this can help give you a start on making new banner boxes ...
Thanks for the info Ajeh...Did I miss something, what were the previous messages about? Kinda lost track with what was going on there for a sec
Pete
Lack of coffee ... hope this worked for you ... :cool:
How do I create an additional categories sidebox. I don't know if I am to follow the instructions provided here about additional sideboxes. Thanks!
same concept applies.
I'm curious. What would you put in an additional categories box? Wouldn't it just repeat what was already in your categories box?Quote:
Originally Posted by jfuller
Ajeh -
Is the sidebox technique you posted a generic method regardless of Zencart versions? i.e. can be used on 1.27d and 1.3.0.2?
Also since the reply to the use for additional categories question was affirmative, I assume this box can be used for anything and not just banners?
Thanks Much,
b
I showed how to clone a banner box ...
But the concept is the same ...
Each sidebox needs the 2 files ...
You need to customize what's inside ... :smile:
Hate to be dense, but in light of the information provided, I used the blank sidebox mod. It shows up in the admin, and I followed the directions exactly (at least 3 times) and get the following errors, when I turn on the box:
Warning: main(includes/templates/Series_12_Paper/sideboxes/tpl_zazachat_sidebox.php): failed to open stream: No such file or directory in /home/handmad/public_html/includes/modules/sideboxes/Series_12_Paper/zaza_sidebox.php on line 31
Warning: main(includes/templates/Series_12_Paper/sideboxes/tpl_zazachat_sidebox.php): failed to open stream: No such file or directory in /home/handmad/public_html/includes/modules/sideboxes/Series_12_Paper/zaza_sidebox.php on line 31
Warning: main(includes/templates/Series_12_Paper/sideboxes/tpl_zazachat_sidebox.php): failed to open stream: No such file or directory in /home/handmad/public_html/includes/modules/sideboxes/Series_12_Paper/zaza_sidebox.php on line 31
Fatal error: main(): Failed opening required 'includes/templates/Series_12_Paper/sideboxes/tpl_zazachat_sidebox.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/handmad/public_html/includes/modules/sideboxes/Series_12_Paper/zaza_sidebox.php on line 31
Just in case - I putcopies of the files in the main dirs.
What am I not seeing?
Thanks
Laura
I'm puzzled as the blank sidebox mod installs files called blank_sidebox.php in modules and and tpl_blank_sidebox.php in template_default/sideboxes, not the files or locations to which your warnings/errors refer. So either it is not the source of your problem, or you have made some significant changes to it.
BTW I don't recommend this mod. It appears to simply create a layout table (bad practise) in a the left or right column without any of the normal Zen Cart sidebox heading hooks used for styling. If you wanted an image with link (such as for zaza chat graphic), I'd personally do this as an always on banner sizebox banner without the need for an external mod.
Anyway, if you prefer the route you've already started, then I'd suggest that your problem is probably linked to the different naming conventions between zaza_sidebox and tpl_zazachat_sidebox.
Okay Kuroi, I rolled back all the changes and am starting fresh your way. So - I can use an existing banner sidebox (once I figure out the names of the files) andjust pop my zazachat code & image in there?Quote:
Originally Posted by kuroi
Many Thanx,
Laura
I've been using this GREAT tutorial to add sideboxes to 1.2.7 ( i added a bunch)... Now that I'm in the process of upgrading, will this work with 1.3.2
Extra Sideboxes:
Designed for: Zen Cart v1.2 Release
Create by: Jason LeBaron <[email protected]>
If you use the new version for 1.3, from the downloads section, then ... yes.
I assume that Dr Byte is referring to the blank sidebox mod which he tidied up earlier this month. My earlier recommendation not to use this is now out-of-date and reversed as the new version conforms to v1.3 sidebox structure (I still don't like the table it inserts as an example, but it's a user choice whether to retain this example or replace it with something better :smile:)
I added sidebox with the Blank Sidebox mod... However, I added text links the first few are okay but the last two doubled up on the last line--how do I seperate them...
I added links as such:
(file: inlcudes/templates/template_default/sideboxes/tpl_extra_box.php )
<!-- EDIT BELOW THIS LINE -->
<a href="http://versamaeluxe.com/index.phpmain_page=page&id=7&chapter=0">Designer Spotlight</a>
<a href="http://versamaeluxe.com/index.phpmain_page=page&id=10&chapter=0">Designer Programs</a>
<a href="http://versamaeluxe.com/index.phpmain_page=page&id=8&chapter=0">Press</a>
<a href="http://versameluxe.com/index.phpmain_page=page&id=9&chapter=0">Media Kit</a>
<!-- EDIT ABOVE THIS LINE -->
Is this correct or should I be adding links in a different manner?
Three comments here (one of which will answer your question).
These look like EZ-Pages links and so would have been easiest added by simply turning them on the EZ-Pages sidebox and then positioning that where you have put your sidebox. Maybe you're using that for something else.
Inserting EZ-Page links into code is best done by using the zen_ez_pages_link function.
This would turn your block intoIf you were using a chapter other than 0 you would need to add this as a 2nd parameter. The information displaying in each link would be the EZ-Page title. This solution is best because it automatically handles any changes to your site structure. For example if you wanted to change URL, re-use on a different site, or set up a test shop in a different directory on the same server, you would not need to change the code.Quote:
zen_ez_pages_link(7);
zen_ez_pages_link(10);
zen_ez_pages_link(8);
zen_ez_pages_link(9);
To stop the links coming up onto the same line (whether you have used your method or the zen_ez_page_link function, in your stylesheet either float them left or display as block to change them from inline to block elements and then give them width wide enough that one one can fit on a line.
"To stop the links coming up onto the same line (whether you have used your method or the zen_ez_page_link function, in your stylesheet either float them left"
I tried this & it didn't work....
"or display as block to change them from inline to block elements and then give them width wide enough that one one can fit on a line."
How exactly do I do this? I have a longer text link of "Designer Spotlight" then the smaller one of "Press"...What would the width be to allow both to show up properly?
English is such an ambiguous language at times and I suspect that you have broken up the instructions in a different way to that intended. Here they are again with a bit more structure (and a corrected typo):
To stop the links coming up onto the same line (whether you have used your method or the zen_ez_page_link function), in your stylesheet:
1. either float them left OR display as block to change them from inline to block elements and then
2. give them width wide enough that only one can fit on a line.
How do you display them as a block? add display:block to their styling
What width should you make them? The width of the content in your sidebox would normally be: sidebox width - (left border width + right border width + left padding + right padding) and therefore a fairly good value to start with, though if you have used em as your unit for any of these settings, I would recommnd changing it to px first.
I just modified the blank sidebox template - thanks for that. I used just an image which is a link. There is a lot of empty space over it though, which confuses me as the sidebox below doesn't have that. Here is the source code for my side box - anything obvious for why there is empty space above the image?
Code:<!--// bof: mysidebox //-->
<div class="rightBoxContainer" id="mysidebox" style="width: 151px">
<h3 class="rightBoxHeading" id="nmysideboxHeading">Stuff</h3>
<div id="mysideboxContent" class="sideBoxContent"><p><div style="text-align: center;"><a target="_blank" href="http://link/"><img
alt="stuff"
title="stuff"
src="http://www.thingy.com/foo.gif""></a><br>
</p></div></div>
<!--// eof: mysidebox //-->
Impossible to say for sure without seeing it in context as we need to see how the HTML and CSS interact, but there does does seem to be an awful lot of unnecessary HTML in that arrangement and if it's coming with its own padding and margins (particularly the <p> tag) that might explain the problem.
It's sobebabies.com. The box in question is the newsletter one - look at the source and search for "newsletter".
LOL. Turns out that it is the HTML after all. Some of that extra code is invalid. The paragraph and div inside it aren't nested properly and so the browsers are closing the paragraph tag themselves, creating an empty paragraph that nevertheless has height. This is the space that you don't want.
Here's what I'd recommend changing your code to produceand then add the following to your stylesheetCode:<!--// bof: mysidebox //-->
<div class="rightBoxContainer" id="mysidebox" style="width: 151px">
<h3 class="rightBoxHeading" id="mysideboxHeading">Stuff</h3>
<div id="mysideboxContent" class="sideBoxContent">
<a target="_blank" href="http://link/">
<img alt="stuff" title="stuff" src="http://www.thingy.com/foo.gif" />
</a>
</div>
<!--// eof: mysidebox //-->
Code:#mysideboxContent {text-align:center}
Kuroi, thanks for your response. I played around with it and I made it worse and worse! Well for now, I have to go a little bit of a different route; now I have a cute little flash animation there (and yet even more white space above) and I can't work on it 'cause my designer's daughter just dropped her computer and there is no backup. Once she gets that figured out, perhaps I can come back to this. For now, it's gonna have to stay how it is; I can't be spending all my time on the little fun stuff when there are serious pressing issues to address. But I will be back when she gets me a clickable flash image! :D
Ellen
Hi,
I wanted to create a new banner/sidebox and followed your instrutions. The sidebox appeared under the layour boxes controller and I had set it to what I want but it didn't appear under the configurations.
Did I miss something?
Thanks
Hi
ME TOO!!!! - Lets hope someone can help us out - I really searched all the files I created but couldn't see anything wrong - this zen cart is driving me mad - I feel that whilst trying to get my site up and running and looking ok I am taking 1 step forward and 4 backwards!!! :frusty:
Helen
Why is this so hard?
I've been struggling for days trying to get this right.
Why can't the admin section just have an option to "Create New Sidebox"?
Because the Admin has no way of knowing what to put in the sidebox.
Most additional sideboxes are used to add functionality that is new to Zen Cart, so for which there is no programming available.
That's not always the case, extra category and banner boxes (for example) could re-use code already written. However this would need to be built into the structure of Zen Cart ... and has been for the forthcoming 2.0 release.
So If I understand correctly I create a php file (called my_banner_box3) containing:
<?php
define('SHOW_BANNERS_GROUP_SET10', 'MY BANNER NAME');
?>
OR I can change the codei n "tpl_banner_box3.php"
and enter the code into the "Configuration table"?
Where can I find the Configuration table? :unsure:PHP Code:
INSERT INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, use_function, set_function, date_added) VALUES ('Banner Display Groups - Side Box banner_box3', 'SHOW_BANNERS_GROUP_SET10', 'SideBox-Banners', 'The Banner Display Groups can be from 1 Banner Group or Multiple Banner Groups<br /><br />For Multiple Banner Groups enter the Banner Group Name separated by a colon <strong>:</strong><br /><br />Example: Wide-Banners:SideBox-Banners<br />Default Group is SideBox-Banners<br /><br />What Banner Group(s) do you want to use in the Side Box - banner_box3?<br />Leave blank for none', '19', '73', '', '', now());
The INSERT statement can be run in either Tools ... Install SQL Patches ... or you can run it in your phpMyAdmin for your database ...
You can use an add on or make your own based on an existing sidebox as a model to make your new one ... :smile:
O.k I'm struggling to understand this. I'm completely new to php, zen cart and coding in general.
All I want to do is add an additional 2 sideboxes to my main page below the existing two. I've followed the guide up untill;
And now I'm lost. I don't know where that code should go or what my banner group name is. Could someone break it down a bit more for us beginners please?
I'm using Zen Cart 1.3.8a and my site is http://www.nmfurniture.com/
I am confused ...
You say you want to add new "sideboxes" ...
You show code for "banners" ...
What is it that you "really" want to do here ... :unsure:
I'm curious. What would you put in an additional categories box? Wouldn't it just repeat what was already in your categories box??
You can do anything you like ...
Some want multiple categories sidebox with different conditions on them for when the show or don't show or what categories they include or don't include ...
They would not be "idenitcal" to one another ... they would have differences to them that make them unique in some manner ...
I think i'm adding to my own confusion.
At the moment I have banners in both Side Box banner_box and Side Box banner_box2 which are on the right of my site. I want to add 2 more banner boxes for 2 more banners.
Here what I like to do I have 2 banner side boxes that was setup with the rustic template. One called Sponsors and the other Have you seen. What I would like to do and please I am not a programer and having a very hard time with all this zen cart template. All I will like to do is the banner side box that said "Sponsors" How do I change that box so only one Ad's will display at all time wtih out changing to display other banners ad's
Here my site http://collectibleslimited.com/zenca...or_maintenance
Thank you
Steve
How do you add a regular custom sidebox ? i.e. not a banner sidebox. Just a plain sidebox that I can put some html code in.
For example take the Information side box. How would I duplicate it and then customise it.
I've tried to install this: https://www.zen-cart.com/downloads.php?do=file&id=2066 (Banner Manager Controlled Sideboxes) in three fresh 1.5,7d installs and can't get it to work. The extra sideboxes show up in Layout Boxes Controller, but the Banner Manager page is blank (totally blank - nothing in View Source). My fault, or some version problem?