1 Star 0 Fork 1

AITGroup/20181011

forked from maltYumi/20181011 
Create your Gitee Account
Explore and code with more than 12 million developers,Free private repositories !:)
Sign up
文件
This repository doesn't specify license. Please pay attention to the specific project description and its upstream code dependency when using it.
Clone or Download
catalog.php 1.09 KB
Copy Edit Raw Blame History
maltYumi authored 2018-10-11 16:44 . Signed-off-by: malt 423498555@qq.com
<?php
//zend by QQ:123456 商创网络 禁止倒卖 一经发现停止任何服务
function calculate_goods_num($cat_list, $cat_id)
{
$goods_num = 0;
foreach ($cat_list as $cat) {
if (($cat['parent_id'] == $cat_id) && !empty($cat['goods_num'])) {
$goods_num += $cat['goods_num'];
}
}
return $goods_num;
}
define('IN_ECS', true);
require dirname(__FILE__) . '/includes/init.php';
if ((DEBUG_MODE & 2) != 2) {
$smarty->caching = true;
}
require ROOT_PATH . '/includes/lib_area.php';
if (!$smarty->is_cached('catalog.dwt')) {
$cat_list = cat_list(0, 0, false);
foreach ($cat_list as $key => $val) {
if ($val['is_show'] == 0) {
unset($cat_list[$key]);
}
}
assign_template();
assign_dynamic('catalog');
$position = assign_ur_here(0, $_LANG['catalog']);
$smarty->assign('page_title', $position['title']);
$smarty->assign('ur_here', $position['ur_here']);
$smarty->assign('helps', get_shop_help());
$smarty->assign('cat_list', $cat_list);
$smarty->assign('brand_list', get_brands());
$smarty->assign('promotion_info', get_promotion_info());
}
$smarty->display('catalog.dwt');
?>
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
PHP
1
https://gitee.com/aitgroup/20181011.git
git@gitee.com:aitgroup/20181011.git
aitgroup
20181011
20181011
master

Search