当前位置: 首页>>代码示例>>PHP>>正文


PHP obj::getShopListType方法代码示例

本文整理汇总了PHP中obj::getShopListType方法的典型用法代码示例。如果您正苦于以下问题:PHP obj::getShopListType方法的具体用法?PHP obj::getShopListType怎么用?PHP obj::getShopListType使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在obj的用法示例。


在下文中一共展示了obj::getShopListType方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: showArticleContent

 /**
  * 文章内容
  *
  */
 private function showArticleContent()
 {
     /*右侧文章列表*/
     include "shopArticleClass.class.php";
     $article_class = new ShopArticleClassClass();
     $class_array = $article_class->getArticleClassList();
     $article_array = $this->obj_article->getArticleList('', '');
     foreach ($class_array as $k => $v) {
         foreach ($article_array as $v1) {
             if ($v['cid'] == $v1['arc_class']) {
                 if (count($class_array[$k]['body']) < 5) {
                     $class_array[$k]['body'][] = $v1;
                 }
             }
         }
     }
     $this->output('artclass_array', $class_array);
     /*文章内容信息*/
     $content_array = $this->obj_article->getArticleContent(array('aid' => intval($this->_input['id'])));
     $this->output('article_array', $content_array[0]);
     /*相关内容*/
     /*热门店铺*/
     $hot_shops_array = $this->obj_shopuser->getShopListType(array('shop_type' => 'hot_shop'), 5);
     $this->output('hot_shops_array', $hot_shops_array);
     $this->shopshowpage('article');
 }
开发者ID:jn7163,项目名称:ShopNC,代码行数:30,代码来源:shop_article.php

示例2: showSearchShopList

 /**
  * 分类下的商店列表
  *
  */
 private function showSearchShopList()
 {
     $condition_array = array();
     if (intval($this->_input['txt_class_top_id']) != 0) {
         //店铺分类
         $tid = intval($this->_input['txt_class_top_id']);
     }
     if (trim($this->_input['txt_keywords']) != '') {
         //关键字
         $condition_array['shopname'] = trim($this->_input['txt_keywords']);
     }
     if (trim($this->_input['txtProvince']) != '') {
         //商品在地
         $condition_array['txt_address'] = trim($this->_input['txtProvince']);
     }
     $condition_array['shopstate'] = 1;
     //状态
     /*得到网店类别信息*/
     if ($tid != '') {
         $class_info = $this->obj_shop_class->getShopClassInfo(array('class_id' => $tid));
         $this->output('class_info', $class_info);
     }
     if ($tid != '') {
         /*查找下一级分类*/
         include BasePath . "/share/shop_class_show.php";
         $node_str = "";
         foreach ($node_cache as $node) {
             if ($node['parentId'] == $tid and $node['iffb'] == 1) {
                 $node_str .= $node['id'] . ",";
             }
         }
         $node_str .= $tid;
         $condition_array['class_id_str'] = trim($node_str, ',');
     }
     /*创建分页对象*/
     require_once "commonpage.class.php";
     $obj_page = new CommonPage();
     $obj_page->pagebarnum(10);
     $obj_page->pagesize = 3;
     $shop_array = $this->obj_shopuser->getShopList($condition_array, $obj_page);
     /*取得店铺发布商品数量*/
     $shop_id_str = '';
     foreach ($shop_array as $v) {
         $shop_id_str .= $v['userid'] . ',';
     }
     if ($shop_id_str != '') {
         $shop_id_str = trim($shop_id_str, ',');
         $shop_array_count = $this->obj_shopuser->getShopGoodsCount($shop_id_str);
         foreach ($shop_array as $k => $v) {
             foreach ($shop_array_count as $v1) {
                 if ($v['userid'] == $v1['shop_id']) {
                     $shop_array[$k]['goods_count'] = $v1['goods_count'];
                 }
             }
         }
     }
     $show_page = $obj_page->show(8);
     $this->output('shop_array', $shop_array);
     $this->output('shop_count', count($shop_array));
     $this->output('page_list', $show_page);
     /*新开网店*/
     $new_shops_array = $this->obj_shopuser->getShopListType(array('shop_type' => 'new_shop'), 6);
     $this->output('new_shops_array', $new_shops_array);
     $this->output('query_string', $_SERVER["QUERY_STRING"]);
     $this->shopshowpage("shop_search_list");
 }
开发者ID:jn7163,项目名称:ShopNC,代码行数:70,代码来源:shop_list.php

示例3: productSearchList

 /**
  * 商品搜索结果列表
  *
  */
 private function productSearchList()
 {
     $input_param = array();
     $input_param['txt_start_price'] = intval($this->_input['txt_start_price']);
     //开始价格
     $input_param['txt_end_price'] = intval($this->_input['txt_end_price']);
     //结束价格
     $input_param['txt_class_top_id'] = intval($this->_input['txt_class_top_id']);
     //店铺分类
     $input_param['txt_address'] = trim($this->_input['txtProvince']);
     //商品在地
     $input_param['state'] = 1;
     //发布状态
     $input_param['shop_goods_state'] = 1;
     /*店铺下拉列表*/
     include BasePath . "/share/shop_class_show.php";
     $parent_array = array();
     foreach ($node_cache as $node) {
         if ($node['parentId'] == 0 && $node['iffb'] == 1) {
             $parent_array[] = $node;
         }
     }
     $i = 0;
     $node_array = array();
     foreach ($parent_array as $parent) {
         $node_array[$i] = $parent;
         foreach ($node_cache as $node) {
             if ($parent['id'] == $node['parentId'] && $node['iffb'] == 1) {
                 $node_array[$i]['sub_array'][] = $node;
             }
         }
         $i++;
     }
     $this->output('node_array', $node_array);
     /*热门店铺*/
     $hot_shops_array = $this->obj_shop_user->getShopListType(array('shop_type' => 'hot_shop'), 5);
     $this->output('hot_shops_array', $hot_shops_array);
     require_once "commonpage.class.php";
     $obj_page = new CommonPage();
     if (in_array($this->_input['num'], array(12, 24, 36))) {
         $obj_page->pagebarnum(intval($this->_input['num']));
         //每页显示商品数
     } else {
         $obj_page->pagebarnum(12);
         //每页显示商品数
     }
     $obj_page->pagesize = 3;
     if ($this->_configinfo['websit']['pay_receive_type'] == 1) {
         //搜索子店发布的商品
         $input_param['goods_name'] = trim($this->_input['txt_keywords']);
         //关键字
         if ($this->_input['sort'] == 'pricedesc') {
             $order_array = array('goods_pricedesc desc', '');
         } else {
             $order_array = array('goods_pricedesc', '');
         }
         $search_array = $this->obj_product->searchShopGoods($input_param, $obj_page, '*');
     } else {
         //搜索子店领取的主店商品
         if ($this->_input['sort'] == 'pricedesc') {
             $order_array = array('', 'goods_pricedesc desc');
         } else {
             $order_array = array('', 'goods_pricedesc');
         }
         $input_param['shop_goods_name'] = trim($this->_input['txt_keywords']);
         //关键字
         $search_array = $this->obj_goods->getChooseGoodsList($input_param, $obj_page, $order_array);
     }
     $search_page = $obj_page->show(8);
     $this->output('search_count', $obj_page->total_num);
     $this->output('product_class_page', $search_page);
     $this->output('product_array', $search_array);
     $this->output('query_string', $_SERVER["QUERY_STRING"]);
     $this->shopshowpage("product_search_list");
 }
开发者ID:jn7163,项目名称:ShopNC,代码行数:79,代码来源:shop_search.php

示例4: showIndex

 /**
  * 聚合首页
  *
  */
 private function showIndex()
 {
     /*右侧店铺分类*/
     include BasePath . "/share/shop_class_show.php";
     if (is_array($node_cache)) {
         $array = array();
         foreach ($node_cache as $v) {
             if ($v['parentId'] == 0) {
                 $array[$v['id']] = $v;
             } else {
                 if (count($array[$v['parentId']]['child']) < 7) {
                     $array[$v['parentId']]['child'][] = $v;
                 }
             }
         }
         $shop_class_array = array();
         foreach ($array as $v) {
             if (count($shop_class_array) < 5) {
                 $shop_class_array[] = $v;
             }
         }
     }
     $this->output('shop_class_array', $shop_class_array);
     /*电子商务资讯中心*/
     $condition = array();
     $condition['astate'] = 1;
     $condition['ashow'] = 1;
     $condition['arc_class'] = 2;
     $article_array = $this->obj_article->getArticleType($condition, 10);
     $this->output('article_array_zx', $article_array);
     /*电商学院*/
     $condition = array();
     $condition['astate'] = 1;
     $condition['ashow'] = 1;
     $condition['arc_class'] = 3;
     $article_array = $this->obj_article->getArticleType($condition, 10);
     $this->output('article_array_xy', $article_array);
     /*网店公告*/
     $condition = array();
     $condition['astate'] = 1;
     $condition['ashow'] = 1;
     $condition['arc_class'] = 1;
     $article_array = $this->obj_article->getArticleType($condition, 6);
     $this->output('article_array_gg', $article_array);
     /*热门专区*/
     /*新品上市*/
     //		$product_array = $this->obj_product->getShopProductSpecific(array('goods_state'=>1),6);
     //		$this->output('new_product',$product_array);
     /*疯狂抢购,暂按点击量*/
     //		$product_array = $this->obj_product->getShopProductSpecific('',6,'goods_click desc');
     //		$this->output('click_product',$product_array);
     /*推荐商品*/
     $product_array = $this->obj_product->getShopProductSpecific(array('goods_state' => 1, 'goods_commend' => 1), 12);
     $this->output('commend_product', $product_array);
     /*热卖商品*/
     //		$product_array = $this->obj_product->getShopProductSpecific(array('goods_state'=>1,'goods_hot'=>1),6);
     //		$this->output('hot_product',$product_array);
     /*特价商品*/
     //		$product_array = $this->obj_product->getShopProductSpecific(array('goods_state'=>1,'goods_special'=>1),6);
     //		$this->output('spe_product',$product_array);
     /*明星店铺*/
     $super_shops_array = $this->obj_shop_user->getShopListType(array('shop_type' => 'super_shop'), 6);
     $this->output('index_shops_array', $super_shops_array);
     /*时尚潮流*/
     /*新品上市*/
     //		$product_array = $this->obj_product->getShopProductSpecific(array('goods_state'=>1),3);
     //		$this->output('new_product_s',$product_array);
     /*疯狂抢购,暂按点击量*/
     //		$product_array = $this->obj_product->getShopProductSpecific('',6,'goods_click desc');
     //		$this->output('click_product_s',$product_array);
     /*新品速递*/
     /*新品上市*/
     //		$product_array = $this->obj_product->getShopProductSpecific(array('goods_state'=>1),3);
     //		$this->output('new_product_x',$product_array);
     /*疯狂抢购,暂按点击量*/
     //		$product_array = $this->obj_product->getShopProductSpecific('',3,'goods_click desc');
     //		$this->output('click_product_x',$product_array);
     /*热卖商品*/
     //		$product_array = $this->obj_product->getShopProductSpecific(array('goods_state'=>1,'goods_hot'=>1),3);
     //		$this->output('hot_product_x',$product_array);
     /*热门店铺*/
     $hot_shops_array = $this->obj_shop_user->getShopListType(array('shop_type' => 'hot_shop'), 5);
     $this->output('hot_shops_array', $hot_shops_array);
     /*新开网店*/
     $new_shops_array = $this->obj_shop_user->getShopListType(array('shop_type' => 'new_shop'), 6);
     $this->output('new_shops_array', $new_shops_array);
     /*热卖品牌*/
     //		$brand_array	= $this->obj_brand->getShopBrandList(array('brand_state'=>'1'),10);
     //		$this->output('brand_array',$brand_array);
     /*友情链接*/
     $link_image = $this->obj_shop_link->getLinkList(array('logo' => 1), '');
     $this->output('link_image', $link_image);
     //		$link_text	= $this->obj_shop_link->getLinkList(array('logo'=>2),'');
     //		$this->output('text_link_num',count($link_text));
     //		$this->output('link_text',$link_text);
     /*首页广告*/
//.........这里部分代码省略.........
开发者ID:jn7163,项目名称:ShopNC,代码行数:101,代码来源:shop_index.php


注:本文中的obj::getShopListType方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。