I am hoping someone will be able to help, I have tryed for hours using code snippents and all sorts but am not making any progress /
I use zencart 1.5.0 as my online store and I need to edit the main header on the main page. This is set to display one flash file in perticular. I want it to randomly select and display one. (i.e. there are 5 flash files in my online folder, when the screen is refreshed/ loaded it will randomly pick one and display it)
Here is the code currently (to save you reading the main bit is at the bottem):
[php]
======START======
* example: to override the privacy page
* make a directory /templates/my_template/privacy
* copy /templates/templates_defaults/common/tpl_footer.php to /templates/my_template/privacy/tpl_header.php
* to override the global settings and turn off the footer un-comment the following line:
*
* $flag_disable_header = true;
* * @package templateSystem * @copyright Copyright 2003-2006 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: tpl_header.php 4813 2006-10-23 02:13:53Z drbyte $ */ ?> <?php // Display all header alerts via messageStack: if ($messageStack->size('header') > 0) { echo $messageStack->output('header'); } if (isset($_GET['error_message']) && zen_not_null($_GET['error_message'])) { echo htmlspecialchars(urldecode($_GET['error_message'])); } if (isset($_GET['info_message']) && zen_not_null($_GET['info_message'])) { echo htmlspecialchars($_GET['info_message']); } else { } ?> <?php if (!isset($flag_disable_header) || !$flag_disable_header) { ?>
| <?php echo HEADER_TITLE_LOGOFF; ?>
| <?php echo HEADER_TITLE_MY_ACCOUNT; ?>
| <?php echo HEADER_TITLE_LOGIN; ?>
<?php } } ?> <?php if ($_SESSION['cart']->count_contents() != 0) { ?> | <?php echo HEADER_TITLE_CART_CONTENTS; ?>
| <?php echo HEADER_TITLE_CHECKOUT; ?>
}
?>
<?php echo BOX_HEADING_SHOPPING_CART;?>: <?php echo $cart_text ?>
[/php]
======END======
The file that is currently displayed is [php]<?php echo DIR_WS_TEMPLATE ?>flash/header_v8.swf" />[/php] this is the one that I need/ want to randomly change (header_v7.swf)
Any help would be appreciated. )