Exemplo n.º 1
0
    </div>
  </div>
  <div class="blank"></div>
  <div class="blank"></div>
  <div class="w"> <?php 
echo $this->fetch('library/goods_best.lbi');
?>
    <div class="left">
      <div id="related-sorts" class="m m2">
        <div class="mt">
          <h2>相关分类</h2>
        </div>
        <div class="mc">
          <ul class="lh">
            <?php 
$parent_cat_id = get_parent_cat_id($GLOBALS['smarty']->_var['goods']['cat_id']);
$GLOBALS['smarty']->assign('child_cat', get_child_cat($parent_cat_id));
?>
            <?php 
$_from = $this->_var['child_cat'];
if (!is_array($_from) && !is_object($_from)) {
    settype($_from, 'array');
}
$this->push_vars('', 'cat');
$this->_foreach['child_cat'] = array('total' => count($_from), 'iteration' => 0);
if ($this->_foreach['child_cat']['total'] > 0) {
    foreach ($_from as $this->_var['cat']) {
        $this->_foreach['child_cat']['iteration']++;
        ?>
            <li><a href="<?php 
        echo $this->_var['cat']['url'];
Exemplo n.º 2
0
 }
 assign_template('c', array($cat_id));
 $position = assign_ur_here($cat_id, $brand_name);
 $smarty->assign('page_title', $position['title']);
 // 页面标题
 $smarty->assign('ur_here', $position['ur_here']);
 // 当前位置
 $smarty->assign('categories', get_categories_tree($cat_id));
 // 分类树
 $smarty->assign('helps', get_shop_help());
 // 网店帮助
 $smarty->assign('top_goods', get_top10());
 // 销售排行
 $smarty->assign('show_marketprice', $_CFG['show_marketprice']);
 $smarty->assign('category', $cat_id);
 $smarty->assign('p_id', get_parent_cat_id($cat_id));
 //888
 $smarty->assign('top_id', get_top_cat_id($cat_id));
 //888
 $smarty->assign('brand_id', $brand);
 $smarty->assign('price_max', $price_max);
 $smarty->assign('price_min', $price_min);
 $smarty->assign('filter_attr', $filter_attr_str);
 $smarty->assign('feed_url', $_CFG['rewrite'] == 1 ? "feed-c{$cat_id}.xml" : 'feed.php?cat=' . $cat_id);
 // RSS URL
 if ($brand > 0) {
     $arr['all'] = array('brand_id' => 0, 'brand_name' => $GLOBALS['_LANG']['all_goods'], 'brand_logo' => '', 'goods_num' => '', 'url' => build_uri('category', array('cid' => $cat_id), $cat['cat_name']));
 } else {
     $arr = array();
 }
 $brand_list = array_merge($arr, get_brands($cat_id, 'category'));