Authored by unknown

Merge branch 'develop' of http://git.dev.yoho.cn/web/yohobuy into develop

... ... @@ -35,6 +35,7 @@ class Cache
*/
public static function set($key, $value, $expire = 3600)
{
if(USE_CACHE) {
try {
// WINDOWS
if (DIRECTORY_SEPARATOR === '\\') {
... ... @@ -50,6 +51,7 @@ class Cache
// do nothing
}
}
}
/**
* 获取缓存
... ... @@ -61,7 +63,7 @@ class Cache
public static function get($key, $node = 'master')
{
$result = array();
if(USE_CACHE) {
try {
// WINDOWS
if (DIRECTORY_SEPARATOR === '\\') {
... ... @@ -74,7 +76,7 @@ class Cache
} catch (Exception $e) {
$result = array();
}
}
return $result;
}
... ... @@ -86,6 +88,7 @@ class Cache
*/
public static function delete($key)
{
if(USE_CACHE) {
// WINDOWS
if (DIRECTORY_SEPARATOR === '\\') {
HoodCache::Memcache('master')->delete(self::makeKey($key, 'master'));
... ... @@ -97,6 +100,7 @@ class Cache
HoodCache::Memcached('slave')->delete(self::makeKey($key, 'slave'));
}
}
}
/**
* 生成键名
... ...
... ... @@ -292,7 +292,7 @@ class HelperSearch
{
$result = array();
$options = self::$options;
if (!isset($options['controller']) || $options['controller'] == 'Search') {
if (!isset($options['controller']) || $options['controller'] != 'Search') {
return $result;
}
$params = self::$params;
... ...
... ... @@ -242,11 +242,14 @@ class DetailModel
++ $i;
}
// 遍历所有颜色, 构建尺码显示数据
$i = 1;
foreach ($colorList as $value) {
// 各个尺码的颜色,每行显示一个颜色的对应尺码
$sizeGroup[]['size'] = $sizeList[ $value['skcId'] ];
$sizeGroup[$i]['size'] = $sizeList[ $value['skcId'] ];
// 默认颜色
$colorGroup[0]['color'][] = $value;
++ $i;
}
// 商品图: 多个
... ... @@ -275,6 +278,8 @@ class DetailModel
$notForSale = $baseInfo['attribute'] == 2;
// 显示加入购物车链接
if (!$soldOut && !$notForSale) {
ksort($colorGroup, SORT_NUMERIC);
$result['cartInfo']['addToCartUrl'] = Helpers::url('/product/buy_' . $productId . '_' . $goodsId . '.html');
$result['cartInfo']['productId'] = $productId;
$result['cartInfo']['thumbs'] = $thumbImageList;
... ...
... ... @@ -150,7 +150,7 @@ class SearchModel
// 组合搜索折扣区间url
$urlList['discount'] = HelperSearch::getDiscountUrl($searchCondition['condition']);
// 组合搜索最新上架url
$urlList['recent'] = HelperSearch::getRecentShelveUrl($searchCondition['condition']);
//$urlList['recent'] = HelperSearch::getRecentShelveUrl($searchCondition['condition']);
//用户浏览记录
//$urlList['reviewUrl'] = HelperSearch::getReviewUrl($searchCondition['condition']);
... ...