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.
I am trying to do something similar to this, where I control content based on whether I'm on the home page or not.
Is there some similar code that will do this:
I know the above isn't accurate, but can someone help with the call I should use??PHP Code:<?php if($current_page_base == 'index'){
//Do one thing
} else {
//Do another thing
} ?>
$this_is_home_page will tell you if you are on the Home page of the site ...
Code:if ($this_is_home_page == true) {
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!