Authored by hf

modify search list msort to sort

@@ -33,7 +33,7 @@ class NewsaleController extends AbstractAction @@ -33,7 +33,7 @@ class NewsaleController extends AbstractAction
33 // 设置一些筛选的默认参数 33 // 设置一些筛选的默认参数
34 $data += array( 34 $data += array(
35 'brand' => 0, 35 'brand' => 0,
36 - 'msort' => 0, 36 + 'sort' => 0,
37 'gender' => Helpers::getGenderByCookie(), 37 'gender' => Helpers::getGenderByCookie(),
38 'price' => 0, 38 'price' => 0,
39 'size' => 0, 39 'size' => 0,
@@ -55,7 +55,7 @@ class NewsaleController extends AbstractAction @@ -55,7 +55,7 @@ class NewsaleController extends AbstractAction
55 $this->setNavHeader('Sale'); 55 $this->setNavHeader('Sale');
56 56
57 $channel = Helpers::getChannelByCookie(); 57 $channel = Helpers::getChannelByCookie();
58 - 58 +
59 $data = array(); 59 $data = array();
60 $data['discountPage'] = true; 60 $data['discountPage'] = true;
61 $data['headerBanner'] = \Product\NewsaleModel::getNewFocus($channel); 61 $data['headerBanner'] = \Product\NewsaleModel::getNewFocus($channel);
@@ -66,13 +66,13 @@ class NewsaleController extends AbstractAction @@ -66,13 +66,13 @@ class NewsaleController extends AbstractAction
66 // 设置一些筛选的默认参数 66 // 设置一些筛选的默认参数
67 $data += array( 67 $data += array(
68 'brand' => 0, 68 'brand' => 0,
69 - 'msort' => 0, 69 + 'sort' => 0,
70 'gender' => Helpers::getGenderByCookie(), 70 'gender' => Helpers::getGenderByCookie(),
71 'price' => 0, 71 'price' => 0,
72 'size' => 0, 72 'size' => 0,
73 'discount' => '0.1,0.9' 73 'discount' => '0.1,0.9'
74 ); 74 );
75 -//var_dump($data);exit; 75 +
76 $this->_view->display('sale', $data); 76 $this->_view->display('sale', $data);
77 } 77 }
78 78
@@ -86,7 +86,7 @@ class NewsaleController extends AbstractAction @@ -86,7 +86,7 @@ class NewsaleController extends AbstractAction
86 if ($this->isAjax()) { 86 if ($this->isAjax()) {
87 $gender = $this->get('gender', 'boys'); 87 $gender = $this->get('gender', 'boys');
88 $brand = $this->get('brand', null); 88 $brand = $this->get('brand', null);
89 - $sort = $this->get('msort', null); 89 + $sort = $this->get('sort', null);
90 $color = $this->get('color', null); 90 $color = $this->get('color', null);
91 $size = $this->get('size', null); 91 $size = $this->get('size', null);
92 $price = $this->get('price', null); 92 $price = $this->get('price', null);
@@ -96,16 +96,11 @@ class NewsaleController extends AbstractAction @@ -96,16 +96,11 @@ class NewsaleController extends AbstractAction
96 $page = $this->get('page', 1); 96 $page = $this->get('page', 1);
97 97
98 // 转换性别 98 // 转换性别
99 - if($gender === 'boys')  
100 - { 99 + if ($gender === 'boys') {
101 $gender = '1,3'; 100 $gender = '1,3';
102 - }  
103 - elseif($gender === 'girls')  
104 - { 101 + } elseif ($gender === 'girls') {
105 $gender = '2,3'; 102 $gender = '2,3';
106 - }  
107 - else  
108 - { 103 + } else {
109 $gender = '1,2,3'; 104 $gender = '1,2,3';
110 } 105 }
111 106
@@ -129,17 +124,13 @@ class NewsaleController extends AbstractAction @@ -129,17 +124,13 @@ class NewsaleController extends AbstractAction
129 $channel = Helpers::getChannelByCookie(); 124 $channel = Helpers::getChannelByCookie();
130 125
131 $data = NewsaleData::selectNewSaleProducts( 126 $data = NewsaleData::selectNewSaleProducts(
132 - $gender, $brand, $sort, $color,  
133 - $size, $price, $p_d, $channel, $dayLimit, $limit, $page, $order 127 + $gender, $brand, $sort, $color, $size, $price, $p_d, $channel, $dayLimit, $limit, $page, $order
134 ); 128 );
135 $result = \Product\NewsaleModel::selectData($data); 129 $result = \Product\NewsaleModel::selectData($data);
136 130
137 - if(empty($result))  
138 - { 131 + if (empty($result)) {
139 echo ' '; 132 echo ' ';
140 - }  
141 - else  
142 - { 133 + } else {
143 $this->_view->display('product', $result); 134 $this->_view->display('product', $result);
144 } 135 }
145 } else { 136 } else {