I also really wanted to be able to display all of the banners from a group in a single location, and have ended up with quite a useful solution if anyone's interested. This could help with all sorts of customisations:
1. Apply DrByte's excellent contribution that allows you to display any centrebox or sidebox in a PHP file outside of Zen Cart [http://www.zen-cart.com/index.php?ma...roducts_id=79]
2. Delete line 41 of single_sidebox.php as we're using this within ZC and it will cause a fatal error if you leave it in:
PHP Code:
require('includes/application_top.php');
3. Insert the appropriate code in whatever template file you want it. In my case it was tpl_main_page.php and I inserted the following, just after the banner 3 code:
PHP Code:
$zcSBmodule = 'banner_box_all.php'; // name of sidebox or centerbox to be displayed (see filenames in the /includes/modules/sideboxes folder) (if not set, uses "whats_new.php")
$zcSBlayout = 'right'; // 'left' or 'right' sidebox template style (if not specified, uses 'left')
require $_SERVER['DOCUMENT_ROOT'] . '/new/single_sidebox.php';
Note that the final line is a bit different from DrByte's instructions as the server I'm working with doesn't allow direct URL calling.
Bookmarks