collocationgoods.phtml
1.89 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
<?php
$field = 'less';
if (!empty($params['skn_list'])){//穿搭
$data_list = $params['skn_list'];
$imgSize = '90x120';
$brand = QINProduct_Models_Brand_Client::getAllBrand('all');
$field = 'max';
}
if (!empty($data_list)) {
foreach ($data_list as $key => $val) {
$key = QINProduct_Models_Product_Client::getProductIdByProductSkn($val);
$price = QINProduct_Models_Price_Client::getPrice($key);
if(empty($price)){
continue;
}
$goodsList = QINProduct_Models_Goods_Client::getValidGoodsByProduct($key);
if(empty($goodsList)){
continue;
}
$selectColor = 0;
$showGoods = QLibView_Sidebar::selectGoodsByColor($goodsList,$selectColor);
$product = QINProduct_Models_Product_Client::getOneProduct($key,$field);
$cnAlphabet = $product['cn_alphabet'];
$showUrl = QLibConfigs_Static::$siteUrl . QINLib_Utils::getProductUrl($key, $showGoods['id'], $cnAlphabet);
$showProductImg = QINLib_Images::QFSImage($showGoods['color_image'], 'goodsimg', $imgSize, 4);
?>
<li class="clearfix"><b>
<dl>
<dt><a href="<?php echo $showUrl;?>">
<img src="<?php echo $showProductImg;?>" alt="<?php echo $product['product_name'];?>" /></a></dt>
<dd><p><?php print Q_Utils_String::format()->mbSubstr( $product['product_name'],15);?></p><p style="color:#999999"><?php print $brand[$product['brand_id']]['brand_name'];?></p> <p class="price"><?php if ($price['market_price'] == $price['sales_price']) {?>
¥<?php echo number_format($price['sales_price'],2);} else {?><a class="line">¥<?php echo number_format($price['market_price'], 2);?></a> <a class="red">¥<?php echo number_format($price['sales_price'], 2);?></a><?php }?></p></dd>
<dd><a class="go" href="<?php echo $showUrl;?>"></a></dd>
</dl></b>
</li>
<?php }
}?>