favoritegoods.phtml 1.89 KB
<style type="text/css">
.yohood-tag {
    left: 0px;
    position: absolute;
    top: 0px;
	position: absolute;
}
.newGoodsList .brandGoods ul li {
    position: relative;
}
</style>
<?php 
$imgSize = '290x388';
$data_list = '';
$field = 'less';
if (!empty($params['match_list'])){//收藏
	$data_list = $params['match_list'];
}
if (!empty($data_list)) {
	foreach ($data_list as $key => $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'];
		$yohood = QINProduct_Models_Activities_Link_Client::getActivitiesBySkn($product['erp_product_id'], 1);
		$showUrl = QLibConfigs_Static::$siteUrl . QINLib_Utils::getProductUrl($key, $showGoods['id'], $cnAlphabet);
		$showProductImg = QINLib_Images::QFSImage($showGoods['color_image'], 'goodsimg', $imgSize, 4);
		?>
	                <li><b>
			            <a href="<?php echo $showUrl;?>" target="_self">
			            <?php if (!empty($yohood)) {?>
			            <div class="yohood-tag"><img src="http://static.yohobuy.com/m/v1/img/weixin/yohood_03.png" width="52"/></div>
			            <?php }?>
			                <img src="<?php echo $showProductImg;?>" alt="<?php echo $product['product_name'];?>" />
			            </a>
			            <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>
	            	</b></li>
	<?php }
	}?>