Authored by hf

fixes bug refs YW-790

... ... @@ -47,7 +47,7 @@ class NewSaleProcess
$productsLi = array();
if (isset($single['product_list'])) {
foreach ($single['product_list'] as $value) {
$productsLi['goods'][] = Helpers::formatProduct($value, true, false);
$productsLi['goods'][] = Helpers::formatProduct($value, true, false, false);
}
}
... ...
... ... @@ -43,9 +43,10 @@ class Helpers
* @param array $productData 需要格式化的商品数据
* @param bool $showTag 控制是否显示标签
* @param bool $showNew 控制是否显示NEW图标
* @param bool $showSale 控制是否显示SALE图标
* @return array | false
*/
public static function formatProduct($productData, $showTags = true, $showNew = true)
public static function formatProduct($productData, $showTags = true, $showNew = true, $showSale = true)
{
// 商品信息有问题,则不显示
if (!isset($productData['product_skn'])) {
... ... @@ -70,7 +71,7 @@ class Helpers
if ($showTags) {
$result['tags'] = array();
$result['tags']['is_new'] = $showNew && isset($productData['is_new']) && $productData['is_new'] === 'Y'; // 新品
$result['tags']['is_discount'] = isset($productData['is_discount']) && $productData['is_discount'] === 'Y'; // 在售
$result['tags']['is_discount'] = $showSale && isset($productData['is_discount']) && $productData['is_discount'] === 'Y'; // 在售
$result['tags']['is_limited'] = isset($productData['is_limited']) && $productData['is_limited'] === 'Y'; // 限量
$result['tags']['is_yohood'] = isset($productData['is_yohood']) && $productData['is_yohood'] === 'Y'; // YOHOOD
$result['tags']['midYear'] = isset($productData['mid-year']) && $productData['mid-year'] === 'Y'; // 年中
... ...
server
{
listen 80;
server_name buy.test.yoho.cn guang.buy.test.yoho.cn;
server_name buy.test.yoho.cn;
#access_log /Data/logs/access.buy.test.yoho.cn.log combined;
error_log /Data/logs/error.buy.test.yoho.cn.log warn;
... ... @@ -13,6 +13,7 @@ server
allow 218.94.75.50;
allow 218.94.75.58;
allow 123.56.138.21;
allow 172.16.0.0/16;
deny all;
location ~* \.html$ {
... ... @@ -22,12 +23,17 @@ server
}
}
location ~* \.(ico|woff)$ {
expires 7d;
location ~* \.(ico|woff|svg|eot|ttf|otf)$ {
expires 30d;
}
location = /crossdomain.xml {
expires 7d;
location =/crossdomain.xml {
expires 30d;
}
location =/sitemap.xml {
expires 1d;
}
location=/robots.txt {
expires 1d;
}
location / {
... ...
{
"name": "yohobuy",
"version": "0.0.1",
"version": "0.0.2",
"description": "yohobuy statics",
"keywords": [],
"homepage": "",
... ...
... ... @@ -50,4 +50,4 @@ application.template.ext = ".phtml"
application.assets.path = ROOT_PATH "/assets"
; 应用的版本号
application.version = "0.0.1"
\ No newline at end of file
application.version = "0.0.2"
\ No newline at end of file
... ...
... ... @@ -50,4 +50,4 @@ application.template.ext = ".phtml"
application.assets.path = ROOT_PATH "/assets"
; 应用的版本号
application.version = "0.0.1"
\ No newline at end of file
application.version = "0.0.2"
\ No newline at end of file
... ...
... ... @@ -50,4 +50,4 @@ application.template.ext = ".phtml"
application.assets.path = ROOT_PATH "/assets"
; 应用的版本号
application.version = "0.0.1"
\ No newline at end of file
application.version = "0.0.2"
\ No newline at end of file
... ...