fixes bug to product list show tags
Showing
1 changed file
with
15 additions
and
0 deletions
@@ -223,6 +223,21 @@ class Helpers | @@ -223,6 +223,21 @@ class Helpers | ||
223 | $result['tags']['midYear'] = isset($productData['mid-year']) && $productData['mid-year'] === 'Y'; // 年中 | 223 | $result['tags']['midYear'] = isset($productData['mid-year']) && $productData['mid-year'] === 'Y'; // 年中 |
224 | $result['tags']['yearEnd'] = isset($productData['year-end']) && $productData['year-end'] === 'Y'; // 年末 | 224 | $result['tags']['yearEnd'] = isset($productData['year-end']) && $productData['year-end'] === 'Y'; // 年末 |
225 | $result['tags']['is_advance'] = isset($productData['is_advance']) && $productData['is_advance'] === 'Y'; // 再到着 | 225 | $result['tags']['is_advance'] = isset($productData['is_advance']) && $productData['is_advance'] === 'Y'; // 再到着 |
226 | + | ||
227 | + // 打折与即将售完组合显示打折 | ||
228 | + if ($result['is_soon_sold_out'] && $result['tags']['is_discount']) { | ||
229 | + $result['tags']['is_new'] = false; | ||
230 | + } | ||
231 | + // 打折与其它组合则隐藏打折 | ||
232 | + elseif ($result['tags']['is_discount'] && | ||
233 | + ($result['tags']['is_new'] || $result['tags']['is_limited'] || $result['tags']['is_yohood'] || $result['tags']['is_advance']) ) { | ||
234 | + $result['tags']['is_discount'] = false; | ||
235 | + } | ||
236 | + // YOHOOD和新品组合显示YOHOOD | ||
237 | + elseif ($result['tags']['is_yohood'] && $result['tags']['is_new']) { | ||
238 | + $result['tags']['is_new'] = false; | ||
239 | + } | ||
240 | + | ||
226 | } | 241 | } |
227 | 242 | ||
228 | return $result; | 243 | return $result; |
-
Please register or login to post a comment