Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / Header Banner - Choosing how to display

Header Banner - Choosing how to display

Views: 1,523

Results 1 to 12 of 12
14 Mar 2013, 2:20 AM
#1
renz avatar

renz

Zen Follower

Join Date:
Jun 2006
Posts:
439
Plugin Contributions:
0

Header Banner - Choosing how to display

Hi All

I have a question about the banner known as SHOW_BANNERS_GROUP_SET2 which appears on all the pages in the centre,

I have tried to change the way it appears and as such I added this variable

if ($this_is_home_page && (SHOW_BANNERS_GROUP_SET2 != '' && $banner = zen_banner_exists('dynamic', SHOW_BANNERS_GROUP_SET2))) {

to html/includes/templates/MYTEMPLATE/common/tpl_main_page I achieved the fact that it shows only on the home page as I originally set out...

1.However now I feel it would be much better if my banners also appeared on to the Product Category pages as well, and basically the only place I don't want it is the product pages, can anyone help me achieve this?
(I also have a problem that by removing the above banner width 685 the centre area that supports the text etc shrinks to around half it's size, so I need to lock this area to that width (685) at all times.

2.I would also like to move the product price from the top of the page above the description of the product to just above where it says EG:

Model: BSBWA0019
Manufactured by: B Swish

Thanks for any advice.
Regards
Renz

14 Mar 2013, 2:38 AM
#2
rbarbour avatar

rbarbour

Totally Zenned

Join Date:
Feb 2010
Posts:
2,159
Plugin Contributions:
10

Re: Header Banner - Choosing how to display

have a link to website in question?

14 Mar 2013, 2:52 AM
#3
renz avatar

renz

Zen Follower

Join Date:
Jun 2006
Posts:
439
Plugin Contributions:
0

Re: Header Banner - Choosing how to display

Yes I do...
Pls Note it is an Adult Novelty Site.. http://www.adulttoys4u.com.au/?main_page

Over 18's Pls

Also I attached a screen shot of what happens when removing the header banner BANNERS_GROUP_SET2 to the rest of the site.

And of course for my price issue, click on any product and you will see pricing is above anything else..

14 Mar 2013, 3:16 AM
#4
rbarbour avatar

rbarbour

Totally Zenned

Join Date:
Feb 2010
Posts:
2,159
Plugin Contributions:
10

Re: Header Banner - Choosing how to display

as far as the price, goto /includes/templates/YOUR_TEMPLATE_NAME/templates/tpl_product_info_display.php

find:

<!--bof Product Price block -->

CONTENT WITHIN

<!--eof Product Price block -->

and move it as desired

above the

<!--bof Product details list -->

As far as the banner issue you could try this, this way you can add additional pages that you may want to remove that banner on like the condition or privacy pages

<?php if (in_array($current_page_base,explode(",",'product_info')) ) { // do nothing } else { ?>

BANNER CODE*

<?php } ?>
14 Mar 2013, 3:28 AM
#5
renz avatar

renz

Zen Follower

Join Date:
Jun 2006
Posts:
439
Plugin Contributions:
0

Re: Header Banner - Choosing how to display

Thanks rbarbour

I'll try the price right now..

What file should I edit for the template (an example would be great, as I am not brilliant with any of this) ....and any Idea how I lock the centre box from becoming smaller when the banner is turned off as per the image I sent.
Thanks
Renz

14 Mar 2013, 3:41 AM
#6
rbarbour avatar

rbarbour

Totally Zenned

Join Date:
Feb 2010
Posts:
2,159
Plugin Contributions:
10

Re: Header Banner - Choosing how to display

in your stylesheet find #bannerTwo

add !important after the width

like so

width:685px!important;

the code for the banner would be placed in the same file you edited before
html/includes/templates/MYTEMPLATE/common/tpl_main_page

14 Mar 2013, 4:33 AM
#7
renz avatar

renz

Zen Follower

Join Date:
Jun 2006
Posts:
439
Plugin Contributions:
0

Re: Header Banner - Choosing how to display

Hi Ya

the price worked great, thanks...

This one I am afraid made no difference, so I put it back as it was.

#bannerTwo { width:685px!important; padding:0 0; height:285px; background:#000000;}
.display-banner { /margin:-6px -6px 0 -6px; position:absolute;/}

14 Mar 2013, 4:45 AM
#8
rbarbour avatar

rbarbour

Totally Zenned

Join Date:
Feb 2010
Posts:
2,159
Plugin Contributions:
10

Re: Header Banner - Choosing how to display

did you apply code from post #4 to remove banner from product_info page

then try the same !important rule to

.center_indent

14 Mar 2013, 5:25 AM
#9
renz avatar

renz

Zen Follower

Join Date:
Jun 2006
Posts:
439
Plugin Contributions:
0

Re: Header Banner - Choosing how to display

rbarbour:

did you apply code from post #4 to remove banner from product_info page

then try the same !important rule to

.center_indent

Hi, to be honest I didn't fully understand that there was an importance of the order to this, I believed that the matter of the centre becoming smaller was a separate issue and also I didn't fully comprehend were the code you suggested should go..

I understand that you want me to do the following but again unsure of the code for the product information pages.

so step 1 is to put this code on a page, can you pls tell me which and around what line.

<?php if (in_array($current_page_base,explode(",",'product_info')) ) { // do nothing } else { ?>

if ($this_is_home_page && (SHOW_BANNERS_GROUP_SET2 != '' && $banner = zen_banner_exists('dynamic', SHOW_BANNERS_GROUP_SET2))) {

<?php } ?>

and step 2 is again to put this:

width:685px!important;

in my stylesheet_tm

Thanks for your help
Regards
Renz

14 Mar 2013, 5:44 AM
#10
rbarbour avatar

rbarbour

Totally Zenned

Join Date:
Feb 2010
Posts:
2,159
Plugin Contributions:
10

Re: Header Banner - Choosing how to display

Renz:

<?php if (in_array($current_page_base,explode(",",'product_info')) ) { // do nothing } else { ?>

if ($this_is_home_page && (SHOW_BANNERS_GROUP_SET2 != '' && $banner = zen_banner_exists('dynamic', SHOW_BANNERS_GROUP_SET2))) {

<?php } ?>

first remove the code in red - its not needed, the code I provided will allow you to show banner2 on any page except the product_info page per post #1 bolow

Renz:

1.However now I feel it would be much better if my banners also appeared on to the Product Category pages as well, and basically the only place I don't want it is the product pages, can anyone help me achieve this?

second because it is a TM template I am not sure where the code would be located: using the proper over rides, it should be located in the /includes/templates/YOUR_TEMPLATE_NAME/common/tpl_header.php

third: no importance to order in which you do this, you may or may not have to add !important to both

#bannerTwo
.center_indent

Renz:

and step 2 is again to put this:

width:685px!important;

in my stylesheet_tm

14 Mar 2013, 6:45 PM
#11
rbarbour avatar

rbarbour

Totally Zenned

Join Date:
Feb 2010
Posts:
2,159
Plugin Contributions:
10

Re: Header Banner - Choosing how to display

I see this is working. looks good :-)

15 Mar 2013, 4:34 AM
#12
renz avatar

renz

Zen Follower

Join Date:
Jun 2006
Posts:
439
Plugin Contributions:
0

Re: Header Banner - Choosing how to display

rbarbour:

I see this is working. looks good :-)

Well, thanks to someone's good advice..........

Cheers
RR