Forums / Templates, Stylesheets, Page Layout / Banner expire after 1 day

Banner expire after 1 day

Views: 1,117

Results 1 to 7 of 7
7 Oct 2011, 12:05 PM
#1
bladecris avatar

bladecris

New Zenner

Join Date:
Sep 2011
Posts:
40
Plugin Contributions:
0

Banner expire after 1 day

Hy guys, i set up 2 banners 1 to show up today 10/7/2011 and to expire tomorrow 10/8/2011 (sort order 0) and the next one to start on 10/8/2011 and to expire on 10/9/2011 (sort order 1) they work BUT if i refresh the page 1 or 3/4 times the next banner shows up.

What can I do to make a banner today and tomorrow to be another one?

7 Oct 2011, 12:23 PM
#2
bladecris avatar

bladecris

New Zenner

Join Date:
Sep 2011
Posts:
40
Plugin Contributions:
0

Re: Banner expire after 1 day

PS I want the banner to show up only on the main page.

7 Oct 2011, 1:48 PM
#3
ajeh avatar

ajeh

Oba-san

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

Re: Banner expire after 1 day

The Start time is based on Midnight, so 10/07/2011 begins at: 10/07/2011 00:00:00 ...

End times are based on Midnight, so 10/08/2011 ends at:
10/08/2011 00:00:00 ...

If you only want the Banner to show on 10/07/2011 you would use:
Start: 10/07/2011
End: 10/08/2011

If you want the Banner to show on 10/07/2011 and 10/08/2011, you would use:
Start: 10/07/2011
End: 10/09/2011

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

8 Oct 2011, 7:08 AM
#4
bladecris avatar

bladecris

New Zenner

Join Date:
Sep 2011
Posts:
40
Plugin Contributions:
0

Re: Banner expire after 1 day

Ok, thanks a lot.
But how can I have the banner ONLY on the first page?

8 Oct 2011, 1:40 PM
#5
ajeh avatar

ajeh

Oba-san

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

Re: Banner expire after 1 day

You would find the IF for the Banner you want only on the home page, such as for the code for the:
Banner Display Groups - Header Position 1

/includes/templates/template_default/common/tpl_main_page.php

Line #54 : if (SHOW_BANNERS_GROUP_SET1 != '' && $banner = zen_banner_exists('dynamic', SHOW_BANNERS_GROUP_SET1)) { 

and customize that code with your templates and overrides to include what is in RED:

[CODE]
/includes/templates/template_default/common/tpl_main_page.php

Line #54 : if ($this_is_home_page && SHOW_BANNERS_GROUP_SET1 != '' && $banner = zen_banner_exists('dynamic', SHOW_BANNERS_GROUP_SET1)) { 
```\[/CODE]

Now it will only show that Banner Group on the Home Page ...

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

11 Oct 2011, 11:16 AM
#6
bladecris avatar

bladecris

New Zenner

Join Date:
Sep 2011
Posts:
40
Plugin Contributions:
0

Re: Banner expire after 1 day

Thanks for your help, but i still can see my banner on all pages, i copied this ```php
if ($this_is_home_page && SHOW_BANNERS_GROUP_SET1 != '' && $banner = zen_banner_exists('dynamic', SHOW_BANNERS_GROUP_SET1)) {

on my default template BUT the problem is in my crista_violet template because i have this if ```php
(SHOW_BANNERS_GROUP_SET3 != '' && $banner = zen_banner_exists('dynamic', SHOW_BANNERS_GROUP_SET3)) {
``` on line 70
i changed it to ```php
($this_is_home_page && SHOW_BANNERS_GROUP_SET3 != '' && $banner = zen_banner_exists('dynamic', SHOW_BANNERS_GROUP_SET3)) {

What's the problem?

11 Oct 2011, 2:01 PM
#7
ajeh avatar

ajeh

Oba-san

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

Re: Banner expire after 1 day

In the Tools ... Developers Tool Kit ... do a search in the bottom input box for:
SHOW_BANNERS_GROUP_SET3

and select Catalog ... and click search ...

What files come up with that in there and what does the code read?

In the Configuration ... Layout Settings ... do you have a Banner Group defined for the:
Banner Display Groups - Header Position 3

and in the Tools ... Banner Manager ... do you have Banners set up for that Banner Group?

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!