...
|
...
|
@@ -79,11 +79,11 @@ class NewsaleController extends AbstractAction |
|
|
$this->setTitle('热销排行榜');
|
|
|
$this->setNavHeader('热销排行榜');
|
|
|
|
|
|
$channel = Helpers::getChannelByCookie();
|
|
|
$channel = Helpers::getChannelByCookie();
|
|
|
// 设置一些默认参数
|
|
|
$data = array(
|
|
|
'hotrankPage' => true,
|
|
|
'headerBanner' => \Product\NewsaleModel::getNewFocus($channel),
|
|
|
'headerBanner' => \Product\NewsaleModel::getNewFocus($channel),
|
|
|
'showDownloadApp' => true,
|
|
|
'pageFooter' => true,
|
|
|
'cartUrl' => Helpers::url('/product/newsale/selectHotrank', null),
|
...
|
...
|
@@ -92,32 +92,32 @@ class NewsaleController extends AbstractAction |
|
|
$this->_view->display('hotrank', $data);
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* Ajax方式获取热销排行榜商品
|
|
|
*
|
|
|
* @return array 根据指定条件筛选之后的商品
|
|
|
*/
|
|
|
public function selectHotrankAction()
|
|
|
{
|
|
|
$result = array();
|
|
|
|
|
|
if ($this->isAjax()) {
|
|
|
$sort = $this->get('sort', null);
|
|
|
$tab_id = $this->get('tab_id', null);
|
|
|
$limit = $this->get('limit', 50);
|
|
|
$page = $this->get('page', 1);
|
|
|
$notab = (boolean)$this->get('notab', false);
|
|
|
|
|
|
// 获取性别
|
|
|
$gender = Helpers::getGenderByCookie();
|
|
|
$result = \Product\NewsaleModel::selectTopData($gender, $sort, $tab_id, $notab, $limit, $page);
|
|
|
}
|
|
|
if (empty($result)) {
|
|
|
echo ' ';
|
|
|
} else {
|
|
|
$this->_view->display('hotlist', $result);
|
|
|
}
|
|
|
}
|
|
|
/**
|
|
|
* Ajax方式获取热销排行榜商品
|
|
|
*
|
|
|
* @return array 根据指定条件筛选之后的商品
|
|
|
*/
|
|
|
public function selectHotrankAction()
|
|
|
{
|
|
|
$result = array();
|
|
|
|
|
|
if ($this->isAjax()) {
|
|
|
$sort = $this->get('sort', null);
|
|
|
$tab_id = $this->get('tab_id', null);
|
|
|
$limit = $this->get('limit', 50);
|
|
|
$page = $this->get('page', 1);
|
|
|
$notab = (boolean) $this->get('notab', false);
|
|
|
|
|
|
// 获取性别
|
|
|
$gender = Helpers::getGenderByCookie();
|
|
|
$result = \Product\NewsaleModel::selectTopData($gender, $sort, $tab_id, $notab, $limit, $page);
|
|
|
}
|
|
|
if (empty($result)) {
|
|
|
echo ' ';
|
|
|
} else {
|
|
|
$this->_view->display('hotlist', $result);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* Ajax方式筛选新品到着、折扣专区商品
|
...
|
...
|
@@ -127,7 +127,7 @@ class NewsaleController extends AbstractAction |
|
|
public function selectNewSaleAction()
|
|
|
{
|
|
|
$result = array();
|
|
|
|
|
|
|
|
|
if ($this->isAjax()) {
|
|
|
$gender = $this->get('gender', null);
|
|
|
$brand = $this->get('brand', null);
|
...
|
...
|
@@ -149,7 +149,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
|
|
|
);
|
|
|
$result = \Product\NewsaleModel::selectData($data);
|
|
|
}
|
...
|
...
|
|