【求助】请问如何调用SIDEBOX的产品目录?

Zen Cart模板模版教程、设计、使用交流,欢迎大家把自创的模版 show 出来

版主: radnows

版面规则
严禁盗版、侵权的模板下载、讨论,违者封ID、IP。

【求助】请问如何调用SIDEBOX的产品目录?

帖子junsz54 » 2011-11-12 22:25

我是PHP小白,因设计需要在首页非SIDEBOX位置安放产品目录,我这么写
<?php require($template->get_template_dir('tpl_categories.php',DIR_WS_TEMPLATE,$current_page_base,'sideboxes'). '/tpl_categories.php');echo $content; ?>
只显示个外框样式出来 没有出分类。
求助啊~~~~~
望 高手提点
junsz54
新手上路
新手上路
 
帖子: 16
注册: 2010-02-01 6:25

Re: 【求助】请问如何调用SIDEBOX的产品目录?

帖子zencarter » 2011-11-13 13:50

首先你应该调用的是这个文件:include(DIR_WS_MODULES . 'sideboxes/categories.php');
然后将categories.php文件改为下面的内容试下,没有调试过,看下能否显示
<?php
$main_category_tree = new category_tree;
$row = 0;
$box_categories_array = array();
// don't build a tree when no categories
$check_categories = $db->Execute("select categories_id from " . TABLE_CATEGORIES . " where categories_status=1 limit 1");
if ($check_categories->RecordCount() > 0) {
$box_categories_array = $main_category_tree->zen_category_tree();
}
require($template->get_template_dir('tpl_categories.php',DIR_WS_TEMPLATE, $current_page_base,'sideboxes'). '/tpl_categories.php');
?>
<div class="BoxContainer" style="width:200px;">
<?php echo $content; ?>
</div>
头像
zencarter
VIP会员
VIP会员
 
帖子: 535
注册: 2011-06-22 15:03
地址: zencart建站 模板 产品采集 支付宝担保交易 http://t.qq.com/wb631992791
QQ 帐号: 631992791


回到 模板美工

在线用户

正在浏览此版面的用户:没有注册用户 和 2 位游客