Version 5.1.5

{ openzc:rating }

rating: 产品评分样式模板实现
rating 实例

应用于产品评分样式模板的实现


用法:根据实际评分结果循环调用评分样式模板
{openzc:rating star='整分' half='半分' empty='空分'/}

示例:评分3.5
模板:{openzc:rating star='★' half='✧' empty='☆'/}
效果:★★★✧☆	
	
rating 应用于产品实例演示,{ openzc:prolist }嵌套使用

在产品列表中调用产品评分


          
 <div class="row">
 	{openzc:prolist cid="1" row="6" imgsizer="230,230"}
 	<div class="col-6 col-md-3 col-lg-2">
 		<div class="tt-product thumbprod-center product-nohover">
 			<div class="tt-image-box">
 				<a href="#" class="tt-btn-quickview" data-toggle="modal" data-target="#ModalquickView" data-tooltip="Quick View" data-tposition="left"></a>
 				<a href="#" class="tt-btn-wishlist" data-tooltip="Add to Wishlist" data-tposition="left"></a>
 				<a href="#" class="tt-btn-compare" data-tooltip="Add to Compare" data-tposition="left"></a>
 				<a href="[field:products_link/]">
 					<span class="tt-img">
 						<img src="[field:products_image/]" alt="" class="loaded" data-was-processed="true">
 					</span>
 					<span class="tt-img-roll-over">
 						<img src="[field:products_image_flip/]" alt="" class="loaded" data-was-processed="true"></span>
 				</a>
 			</div>
 			<div class="tt-description">
 				<div class="tt-row">
 					<ul class="tt-add-info">
 						<li><a href="[field:categories_link/]">[field:categories_name/]</a></li>
 					</ul>
 					<div class="tt-rating">
 						<!--评分样式模板调用-->
 						{openzc:rating star='<i class="icon-star"></i>' half='<i class="icon-star-half"></i>' empty='<i class="icon-star-empty"></i>'/}
 					</div>
 				</div>
 				<h2 class="tt-title"><a href="[field:products_link/]">[field:products_name/]</a></h2>
 				<div class="tt-price">[field:products_price/]</div>
 				
 				<div class="tt-product-inside-hover">
 					<div class="tt-row-btn">
 						<a href="[field:buy_now/]" class="tt-btn-addtocart thumbprod-button-bg" >ADD TO CART</a>
 					</div>
 					<div class="tt-row-btn"><a href="#" class="tt-btn-quickview" data-toggle="modal" data-target="#ModalquickView"></a><a href="#" class="tt-btn-wishlist"></a><a href="#" class="tt-btn-compare"></a></div>
 				</div>
 			</div>
 		</div>
 	</div>
 	{/openzc:prolist}
</div>