Authored by 周少峰

shop filter

... ... @@ -74,14 +74,16 @@ class NewsaleData
* @param integer $limit 查询返回的最大限制数, 默认为50
* @param integer $page 分页第几页, 默认第1页
* @param string $order 排序方式,默认s_t_desc表示按照时间倒序排列
*
* @param string $shop 店铺
*
* @return array 根据指定条件筛选出来的商品
*/
public static function selectNewSaleProducts($gender, $brand, $sort, $color, $size, $price, $p_d, $channel, $dayLimit = null, $limit = 60, $page = 1, $order = 's_t_desc')
public static function selectNewSaleProducts($gender, $brand, $sort, $color, $size, $price, $p_d, $channel, $dayLimit = null, $limit = 60, $page = 1, $order = 's_t_desc', $shop)
{
$selectItems = array(
'gender' => $gender,
'brand' => $brand,
'shop_id' => $shop,
'sort' => $sort,
'color' => $color,
'size' => $size,
... ...
... ... @@ -174,6 +174,7 @@ class NewsaleController extends AbstractAction
if ($this->isAjax()) {
$gender = $this->get('gender', null);
$brand = $this->get('brand', null);
$shop = $this->get('shop_id', null);
$sort = $this->get('sort', null);
$color = $this->get('color', null);
$size = $this->get('size', null);
... ... @@ -190,7 +191,7 @@ class NewsaleController extends AbstractAction
$channel = Helpers::getChannelByCookie();
$data = NewsaleData::selectNewSaleProducts(
$gender, $brand, $sort, $color, $size, $price, $p_d, $channel, $dayLimit, $limit, $page, $order
$gender, $brand, $sort, $color, $size, $price, $p_d, $channel, $dayLimit, $limit, $page, $order, $shop
);
$result = \Product\NewsaleModel::filterData($data, $gender);
}
... ...