...
|
...
|
@@ -33,7 +33,7 @@ class NewsaleController extends AbstractAction |
|
|
// 设置一些筛选的默认参数
|
|
|
$data += array(
|
|
|
'brand' => 0,
|
|
|
'msort' => 0,
|
|
|
'sort' => 0,
|
|
|
'gender' => Helpers::getGenderByCookie(),
|
|
|
'price' => 0,
|
|
|
'size' => 0,
|
...
|
...
|
@@ -66,13 +66,13 @@ class NewsaleController extends AbstractAction |
|
|
// 设置一些筛选的默认参数
|
|
|
$data += array(
|
|
|
'brand' => 0,
|
|
|
'msort' => 0,
|
|
|
'sort' => 0,
|
|
|
'gender' => Helpers::getGenderByCookie(),
|
|
|
'price' => 0,
|
|
|
'size' => 0,
|
|
|
'discount' => '0.1,0.9'
|
|
|
);
|
|
|
//var_dump($data);exit;
|
|
|
|
|
|
$this->_view->display('sale', $data);
|
|
|
}
|
|
|
|
...
|
...
|
@@ -86,7 +86,7 @@ class NewsaleController extends AbstractAction |
|
|
if ($this->isAjax()) {
|
|
|
$gender = $this->get('gender', 'boys');
|
|
|
$brand = $this->get('brand', null);
|
|
|
$sort = $this->get('msort', null);
|
|
|
$sort = $this->get('sort', null);
|
|
|
$color = $this->get('color', null);
|
|
|
$size = $this->get('size', null);
|
|
|
$price = $this->get('price', null);
|
...
|
...
|
@@ -96,16 +96,11 @@ class NewsaleController extends AbstractAction |
|
|
$page = $this->get('page', 1);
|
|
|
|
|
|
// 转换性别
|
|
|
if($gender === 'boys')
|
|
|
{
|
|
|
if ($gender === 'boys') {
|
|
|
$gender = '1,3';
|
|
|
}
|
|
|
elseif($gender === 'girls')
|
|
|
{
|
|
|
} elseif ($gender === 'girls') {
|
|
|
$gender = '2,3';
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
} else {
|
|
|
$gender = '1,2,3';
|
|
|
}
|
|
|
|
...
|
...
|
@@ -129,17 +124,13 @@ 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);
|
|
|
|
|
|
if(empty($result))
|
|
|
{
|
|
|
if (empty($result)) {
|
|
|
echo ' ';
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
} else {
|
|
|
$this->_view->display('product', $result);
|
|
|
}
|
|
|
} else {
|
...
|
...
|
|