Forums / Discounts/Coupons, Gift Certificates, Newsletters, Ads / Banner Ad for One Product Page Only

Banner Ad for One Product Page Only

Views: 1,548

Results 1 to 6 of 6
12 Oct 2014, 3:00 AM
#2
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: Banner Ad for One Product Page Only

enchanted1:

I have a jewelry banner ad (footer) that I only want displayed on my Jewelry product page. Is there a way to turn the banner off the Home page and all other products pages??

Thank you!
Gina
http://enchantedcottageshop.com

in your shop/includes/templates/elegancer/css/stylesheet.css file add the following at the end of the file or at least after the last occurrence of #bannerFour:

#bannerFour {
  display: none;
} 

Then create a file that has the name of your product or category for which it is to be displayed...
so for example if category 3 is the category that contains the products to have that banner, then the filename would be:

c_3.css and located in the same directory as above: shop/includes/templates/elegancer/css/c_3.css

A reference for use would be: http://www.zen-cart.com/wiki/index.php/Customisation_-_Templates_-_Stylesheets_-_Per-Page-Rules

and add the following css into it:

#bannerFour {
  display: block;
}

ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...

12 Oct 2014, 2:57 PM
#3
enchanted1 avatar

enchanted1

New Zenner

Join Date:
Aug 2012
Location:
Kitty Hawk, NC
Posts:
70
Plugin Contributions:
0

Re: Banner Ad for One Product Page Only

Thank you so much for helping me...it is greatly appreciated! My only question is how would I know this is bannerFour? I don't see where the banners are numbered when I go into banner manager. Thanks!

12 Oct 2014, 3:41 PM
#4
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: Banner Ad for One Product Page Only

enchanted1:

Thank you so much for helping me...it is greatly appreciated! My only question is how would I know this is bannerFour? I don't see where the banners are numbered when I go into banner manager. Thanks!

Well, it was determined/assumed based on the description that the banner at the bottom of the index page (found one on your site) was not to be displayed. That banner had the html/css tag applicable to bannerfour. So aa method was devised to hide it, but... If there are multiple banners all assigned to the same group or same location(s) as defined through the banner manager and configuration template layout, then the method suggested does not work as it eliminates all banners from being displayed at the page(s) not just a single banner of many. If that is/was the goal to only not show a single banner of many except when in a particular page/condition then the above does not apply.

As to how to identify which banner it is/was from my side? Viewed the source code of the provided page and looked for banners that were displayed. Could take the same tact to identify the other banner position(s) to hide, but understand that hiding a banner could have an impact to the rest of site "advertising" as then the banner position is no longer available for display. Sorry to provide such a drastic approach, I didn't think of the single banner of many aspect when providing a response.

ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...

12 Oct 2014, 7:59 PM
#6
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: Banner Ad for One Product Page Only

enchanted1:

Thanks! Maybe one day Zencart will have the option to post banners to certain pages :D

Certainly something that could be done with custom coding. Add a few fields to the banner portion of the database, and code to track/display/show the banner on the applicable page(s) and away it goes. :)

ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...