本文整理汇总了PHP中obj::getGoodsList方法的典型用法代码示例。如果您正苦于以下问题:PHP obj::getGoodsList方法的具体用法?PHP obj::getGoodsList怎么用?PHP obj::getGoodsList使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类obj
的用法示例。
在下文中一共展示了obj::getGoodsList方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: listGoodsClass
/**
* 商品分类列表
*
*/
private function listGoodsClass()
{
/*权限检查*/
$this->checkAdmin('check_nologin');
$productClassArray = $this->obj_goods_class->listClassDetail("");
//分类下拉菜单
$selectClassArray = $this->obj_goods_class->listClassDetail();
$class_array = array();
foreach ($productClassArray as $productClass) {
$goods_class_array = array();
//得到商品分类信息
$goods_class_array = $this->obj_goods_class->getGoodsClassInfo(array("class_id" => $productClass['id']));
//查出所有子集分类
$sub_class = $this->obj_goods_class->getArrayById($productClassArray, $result, $productClass['id']);
$productClass['sub_class'] = @implode(",", $sub_class);
//查出下一级分类
$sub_one_class = $this->obj_goods_class->getOneArrayById($productClassArray, $result, $productClass['id']);
$productClass['sub_one_class'] = @implode(",", $sub_one_class);
$productClass['class_state'] = $goods_class_array['class_state'];
$productClass['class_sort'] = $goods_class_array['class_sort'];
$productClass['class_menu'] = $goods_class_array['class_menu'];
$goods_array = $this->obj_goods->getGoodsList(array("class_id" => $productClass['id']), '');
$productClass['goods_count'] = count($goods_array);
$productClass['header'] = "";
for ($i = 0; $i < $productClass[4]; $i++) {
$productClass['header'] .= " ";
}
$productClass['class_top_id'] = Common::showForm_Select2("txt_class_top_id" . $productClass['id'], "", "", $selectClassArray, "");
$productClass['class_top_id_2'] = Common::showForm_Select2("txt_class_top_id" . $productClass['id'] . "_2", "", "", $selectClassArray, "");
$class_array[] = $productClass;
$i++;
}
$this->output("class_array", $class_array);
$this->showpage('goods_class');
}
示例2: showSubjectList
/**
* 主题商品列表
*
*/
private function showSubjectList()
{
/*主题信息*/
$subject_id = intval($this->_input['subject_id']);
$subject_array = $this->obj_subject->getSubjectInfo(array('subject_id' => $subject_id));
$this->output("subject_array", $subject_array);
/*主题商品*/
$conditon_array = array('subject_id' => $subject_id, 'state' => 1);
$product_array = $this->obj_goods->getGoodsList($conditon_array, '');
$this->output("product_array", $product_array);
$this->showpage('product_subject_list');
}