Hi Zenners,
I was just wondering if it was possible to put the Banner_Box_all on a specific eZpage, and not all of the pages?
If so, please let me know.
Thanks!!
Hi Zenners,
I was just wondering if it was possible to put the Banner_Box_all on a specific eZpage, and not all of the pages?
If so, please let me know.
Thanks!!
if($current_page_base == 'page' && $_GET['id'] == 19){
// replace 19 with the specific id of the ezpage.
// banner code
}
Last edited by Ajeh; 18 Apr 2009 at 02:42 PM. Reason: fix typo on IF missing ==
I no longer provide installation support on forum for all my modules. However, if there are real bugs with the modules please feel free to contact me
Doh... silly me. ;)
Ok the code for that box is
I'm a little lost... any ideas?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 Group - Side Box banner_box_all', 'SHOW_BANNERS_GROUP_SET_ALL', 'BannersAll', 'The Banner Display Group may only be from one (1) Banner Group for the Banner All sidebox<br /><br />Default Group is BannersAll<br /><br />What Banner Group do you want to use in the Side Box - banner_box_all?<br />Leave blank for none', '19', '72', '', '', now());
// ALTER TABLE `banners` ADD `banners_sort_order` INT( 11 ) DEFAULT '0' NOT NULL;
// test if box should display
$show_banner_box_all = true;
if (SHOW_BANNERS_GROUP_SET_ALL == '') {
$show_banner_box_all = false;
}
if ($show_banner_box_all == true) {
$banner_box[] = TEXT_BANNER_BOX_ALL;
$banner_box_group= SHOW_BANNERS_GROUP_SET_ALL;
require($template->get_template_dir('tpl_banner_box_all.php',DIR_WS_TEMPLATE, $current_page_base,'sideboxes'). '/tpl_banner_box_all.php');
// if no active banner in the specified banner group then the box will not show
// uses banners in the defined group $banner_box_group
if ($banners_all->RecordCount() > 0) {
$title = BOX_HEADING_BANNER_BOX_ALL;
$title_link = false;
require($template->get_template_dir($column_box_default, DIR_WS_TEMPLATE, $current_page_base,'common') . '/' . $column_box_default);
}
}
?>
![]()
Ok, My code is now
The problem is that when I change the number 2 inPHP Code:<?php
/**
* banner_box_all sidebox - used to display "square" banners in sideboxes
*
* @package templateSystem
* @copyright Copyright 2003-2005 Zen Cart Development Team
* @copyright Portions Copyright 2003 osCommerce
* @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
* @version $Id: banner_box_all.php 3133 2006-03-07 23:39:02Z ajeh $
*/
// 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 Group - Side Box banner_box_all', 'SHOW_BANNERS_GROUP_SET_ALL', 'BannersAll', 'The Banner Display Group may only be from one (1) Banner Group for the Banner All sidebox<br /><br />Default Group is BannersAll<br /><br />What Banner Group do you want to use in the Side Box - banner_box_all?<br />Leave blank for none', '19', '72', '', '', now());
// ALTER TABLE `banners` ADD `banners_sort_order` INT( 11 ) DEFAULT '0' NOT NULL;
if($current_page_base == 'page' && $_GET['id'] = 2){
// replace 19 with the specific id of the ezpage.
// banner code
// test if box should display
$show_banner_box_all = true;
if (SHOW_BANNERS_GROUP_SET_ALL == '') {
$show_banner_box_all = false;
}
if ($show_banner_box_all == true) {
$banner_box[] = TEXT_BANNER_BOX_ALL;
$banner_box_group= SHOW_BANNERS_GROUP_SET_ALL;
require($template->get_template_dir('tpl_banner_box_all.php',DIR_WS_TEMPLATE, $current_page_base,'sideboxes'). '/tpl_banner_box_all.php');
// if no active banner in the specified banner group then the box will not show
// uses banners in the defined group $banner_box_group
if ($banners_all->RecordCount() > 0) {
$title = BOX_HEADING_BANNER_BOX_ALL;
$title_link = false;
require($template->get_template_dir($column_box_default, DIR_WS_TEMPLATE, $current_page_base,'common') . '/' . $column_box_default);
}
}
}
?>
The banners don't move to another page.PHP Code:if($current_page_base == 'page' && $_GET['id'] = 2){
so when my EzPages tell me that the Ezpage is number 2, how can I verify that?
In case you want to look at, my site , i am looking for my Order ..... , to have the sidebox banners all....
The Order page is the link to the right of Home.
I look forward to your help.
This one https://smartmow.com/index.php?main_...&products_id=1 ?
This is not an ezpage tho?
Or this one?
http://smartmow.com/index.php?main_page=page&id=2
Also, your site has some problem, zenid is attached to all links even after the 2nd page load.
I no longer provide installation support on forum for all my modules. However, if there are real bugs with the modules please feel free to contact me
Can't someone help me?
You have a typo that you are working with, where you have a single equal ( = ) vs a double equal ( == ) in the IF statement that will break things ...
So, let's make the code a bit easier ...
This method allows the original code to be there, then your new condition to happen in the middle and then the main IF test follows to see whether or not the code should even be run ...Code:// test if box should display $show_banner_box_all = true; if (SHOW_BANNERS_GROUP_SET_ALL == '') { $show_banner_box_all = false; } if ($current_page_base == 'page' && $_GET['id'] == 2) { // only show on one ez_page id 2 $show_banner_box_all = true; } else { // do not show $show_banner_box_all = false; } if ($show_banner_box_all == true) {
You can do this code either way ... I just like to keep the code small and easy to spot on the changes ...
See if this helps you out ...
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!