Authored by 周少峰

商品参数from

... ... @@ -161,12 +161,13 @@ class HelperSearch
if (!empty($val['default_images'])) {
$val['default_images'] = Images::getImageUrl($val['default_images'],$imgSize[0],$imgSize[1]);
}
$good = array(
'tags' => array(
'isNew' => $isNew,
'isLimit' => $isLimit
),
'url' => $goods_list[0]['url'],
'url' => sprintf('%s?channel=%s&from=%s-n_%s', $goods_list[0]['url'], 'product' , 'product', ++$key),
'thumb' => $val['default_images'],
'name' => $val['product_name'],
'salePrice' => $val['sales_price'],
... ... @@ -175,6 +176,8 @@ class HelperSearch
'showColBtn' => true,
'coled' => true
);
print_r($_COOKIE);
print_r($good); exit;
//市场价不等于售价时显示
if ($val['market_price'] != $val['sales_price']) {
$good['marketPrice'] = $val['market_price'];
... ... @@ -1366,4 +1369,15 @@ class HelperSearch
$result['nextHref'] = ($next = self::next(self::$pageTotal, self::$filter)) ? $next['href'] : '';
return $result;
}
/**
* 商品链接from参数
*/
public static function fromPram($url, $abEnabled = false)
{
$options = self::$options;
$ab = (isset($_COOKIE['ab_5']) && $abEnabled == true) ? '_'.$_COOKIE['ab_5'] : '';
$url .= "?from={$domain}-{$module}-{$module_id}_{$page}_{$position}{$ab}";
}
}
... ...