Zen Cart Logo
Forums / Addon Sideboxes / how to add an additional sidebox in v1.x.x

how to add an additional sidebox in v1.x.x

Sticky

Views: 72,853

Results 1 to 20 of 44
1 Jul 2006, 8:47 AM
#1
mediathing avatar

mediathing

Zen Follower

Join Date:
Apr 2005
Location:
London
Posts:
405
Plugin Contributions:
0

how to add an additional sidebox in v1.x.x

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

1 Jul 2006, 3:21 PM
#2
buymorecards avatar

buymorecards

New Zenner

Join Date:
May 2006
Posts:
47
Plugin Contributions:
0

Re: how to add an additional sidebox in v1.x.x

Wouldnt this be great if someone would reply?

1 Jul 2006, 3:26 PM
#3
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: how to add an additional sidebox in v1.x.x

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:

1 Jul 2006, 4:02 PM
#4
buymorecards avatar

buymorecards

New Zenner

Join Date:
May 2006
Posts:
47
Plugin Contributions:
0

Re: how to add an additional sidebox in v1.x.x

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....

1 Jul 2006, 4:25 PM
#5
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: how to add an additional sidebox in v1.x.x

If you found the information that is being requested ... then perhaps you could post the link to it to be helpful ...

1 Jul 2006, 4:46 PM
#6
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: how to add an additional sidebox in v1.x.x

The banner sideboxes can be cloned once you understand a bit more about what they do ...

For example ...

/includes/modules/sideboxes/banner_box2.php
/includes/templates/template_default/sideboxes/tpl_banner_box2.php

are clones of:

/includes/modules/sideboxes/banner_box.php
/includes/templates/template_default/sideboxes/tpl_banner_box.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 ...

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:

/includes/modules/sideboxes/banners_box3.php
/includes/templates/template_default/sideboxes/tpl_banner_box3.php

This would require its own unique setting for which Banner Groups to include, such as creating a new configuration_key for:
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:

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());

Then, you customize the new files for banners_box3 to use the changes described above ...

Example:

SHOW_BANNERS_GROUP_SET8

would become:

SHOW_BANNERS_GROUP_SET10

TEXT_BANNER_BOX2

would become:
TEXT_BANNER_BOX3

    require($template->get_template_dir('tpl_banner_box2.php',DIR_WS_TEMPLATE, $current_page_base,'sideboxes'). '/tpl_banner_box2.php');

would become:

    require($template->get_template_dir('tpl_banner_box3.php',DIR_WS_TEMPLATE, $current_page_base,'sideboxes'). '/tpl_banner_box3.php');

etc. etc. etc.

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 ...

3 Jul 2006, 9:50 AM
#7
mediathing avatar

mediathing

Zen Follower

Join Date:
Apr 2005
Location:
London
Posts:
405
Plugin Contributions:
0

Re: how to add an additional sidebox in v1.x.x

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

3 Jul 2006, 7:00 PM
#8
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: how to add an additional sidebox in v1.x.x

Lack of coffee ... hope this worked for you ... :cool:

11 Jul 2006, 3:44 AM
#9
jfuller avatar

jfuller

New Zenner

Join Date:
Aug 2005
Location:
Miramar, FL
Posts:
33
Plugin Contributions:
0

Re: how to add an additional sidebox in v1.x.x

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!

11 Jul 2006, 3:45 AM
#10
drbyte avatar

drbyte

Sensei

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

Re: how to add an additional sidebox in v1.x.x

same concept applies.

13 Jul 2006, 10:51 AM
#11
kuroi avatar

kuroi

Totally Zenned

Join Date:
Apr 2006
Location:
London, UK
Posts:
10,475
Plugin Contributions:
11

Re: how to add an additional sidebox in v1.x.x

jfuller:

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!I'm curious. What would you put in an additional categories box? Wouldn't it just repeat what was already in your categories box?

18 Jul 2006, 11:44 PM
#12
bettysue avatar

bettysue

Inactive

Join Date:
May 2004
Posts:
747
Plugin Contributions:
0

Re: how to add an additional sidebox in v1.x.x

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

19 Jul 2006, 3:34 AM
#13
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: how to add an additional sidebox in v1.x.x

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:

31 Jul 2006, 12:29 AM
#14
designbydemeter avatar

designbydemeter

Zen Follower

Join Date:
Jun 2006
Location:
Taos,NM
Posts:
225
Plugin Contributions:
0

Re: how to add an additional sidebox in v1.x.x

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

31 Jul 2006, 6:37 AM
#15
kuroi avatar

kuroi

Totally Zenned

Join Date:
Apr 2006
Location:
London, UK
Posts:
10,475
Plugin Contributions:
11

Re: how to add an additional sidebox in v1.x.x

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.

31 Jul 2006, 2:06 PM
#16
designbydemeter avatar

designbydemeter

Zen Follower

Join Date:
Jun 2006
Location:
Taos,NM
Posts:
225
Plugin Contributions:
0

Re: how to add an additional sidebox in v1.x.x

kuroi:

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..

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?

Many Thanx,
Laura

23 Aug 2006, 5:59 AM
#17
prellis avatar

prellis

New Zenner

Join Date:
Jul 2005
Posts:
46
Plugin Contributions:
0

Re: how to add an additional sidebox in v1.x.x

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]

23 Aug 2006, 6:47 AM
#18
drbyte avatar

drbyte

Sensei

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

Re: how to add an additional sidebox in v1.x.x

If you use the new version for 1.3, from the downloads section, then ... yes.

23 Aug 2006, 8:00 AM
#19
kuroi avatar

kuroi

Totally Zenned

Join Date:
Apr 2006
Location:
London, UK
Posts:
10,475
Plugin Contributions:
11

Re: how to add an additional sidebox in v1.x.x

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:)

3 Sep 2006, 1:26 AM
#20
prellis avatar

prellis

New Zenner

Join Date:
Jul 2005
Posts:
46
Plugin Contributions:
0

Re: how to add an additional sidebox in v1.x.x

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?