Version 5.1.5

{ openzc:list }

list:当前分类产品列表调用,只能在分类页面使用

字段名称 说明
[field:products_id/]产品ID
[field:products_name/]产品名称
[field:products_image/]产品主图
[field:products_image_flip/]产品副图(翻转图)
[field:products_price/]产品价格
[field:products_type/]产品类别
[field:products_quantity/]产品数量
[field:products_model/]产品模型编号
[field:sort_index/]产品序号
[field:sort_index_type/]产品排序奇偶数(odd/even)
[field:categories_name/]产品所属分类名称
[field:categories_link/]产品所属分类连接
[field:products_normal_price/]产品价格
[field:productPriceDiscount/]产品折扣内容
[field:products_original_price/]产品原价
[field:products_flag/]产品标识,sale(热销)、featured(特色)、specials(特价)
[field:products_image_full/]产品原图,当使用imgsizer缩略图参数时,用到原图字段
[field:products_image_flip_full/]产品副图原图
[field:sku_price_class/]产品SKU 前端DIV class名称,用于ajax sku 价格变化
[field:products_description_preview/]产品描述简介,只保留描述文本,已过滤掉图片以及其他html标签
参数名称 参数值 说明
pagesize12产品列表页每页展示的数量
flagspecials(特价)|sale(热销)|featured(推荐)产品标签
type
imgsizer100,100图片裁剪参数,(宽,高)
bgcolor#000000图片裁剪背景颜色
titlelen100产品名称字数限制,100代表100个字符
desclen200产品描述字数限制,200代表200个字符
① 当前分类列表调用,当前分类产品数量()

产品列表,按分页(12/每页)每页数量可自定义


           
<!-- 说明:pagesize='12'(每页显示数量)  imgsizer="190,245"(裁剪图片大小为:宽190px,高245px)
		变量:$listCount(判断当前分类是否有产品)
-->
<div class="row mb-5">
{openzc:if $listCount>0}
<div class="tt-product-listing tt-col-six row">
	{openzc:list pagesize="12" imgsizer="430,538" ajax="listLoad" autodiv="false"}
	<div class="col-6 col-md-4 tt-col-item">
		<div class="tt-product thumbprod-center">
			<div class="tt-image-box">
				<a href="javascript:void(0);" class="tt-btn-quickview" data-toggle="modal" data-target="#ModalquickView" data-tooltip="Quick View" data-tposition="left"></a>
				<a href="javascript:void(0);" class="tt-btn-wishlist openzc-btn" data-action="addWishlist" data-id="[field:products_id/]" data-tooltip="Add to Wishlist" data-tposition="left"></a>
				<a href="javascript:void(0);" class="tt-btn-compare openzc-btn" data-action="addCompare" data-id="[field:products_id/]" data-tooltip="Add to Compare" data-tposition="left"></a>
				<a href="[field:products_link/]">
				<span class="tt-img"><img src="{openzc:field.template/}style/images/loader.svg" data-src="[field:products_image/]" alt=""></span>
				<span class="tt-img-roll-over"><img src="{openzc:field.template/}style/images/loader.svg" data-src="[field:products_image_flip/]" alt=""></span>
				</a>
			</div>
			<div class="tt-description">
				<div class="tt-row">
					<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-text-info">[field:products_description_preview/]</div>
				<div class="tt-price">
					{openzc:if $field['productPriceDiscount']}
					<span class="new-price">[field:products_price/]</span>
					<span class="old-price">[field:products_original_price/]</span>
					{else}
					[field:products_price/]
					{/openzc:if}
				</div>
				<div class="tt-option-block">
					<ul class="tt-options-swatch">
						{openzc:proattr options_id="1"}
						{openzc:loopson}
						<li><a class="options-color" style="background:[field:products_options_values_color/]" href="javascript:void(0);"></a></li>
						{/openzc:loopson}
						{/openzc:proattr}
					</ul>
				</div>
				<div class="tt-product-inside-hover">
					<div class="tt-row-btn">
						<a href="javascript:void(0);" class="tt-btn-addtocart thumbprod-button-bg openzc-btn" data-action="buyNow" data-id="[field:products_id/]" data-reload-group="cart">ADD TO CART</a>
					</div>
					<div class="tt-row-btn">
						<a href="javascript:void(0);" class="tt-btn-quickview" data-toggle="modal" data-target="#ModalquickView"></a>
						<a href="javascript:void(0);" data-action="addWishlist" data-id="[field:products_id/]" class="tt-btn-wishlist openzc-btn"></a>
						<a href="javascript:void(0);" data-action="addCompare" data-id="[field:products_id/]" class="tt-btn-compare openzc-btn"></a>
					</div>
				</div>
			</div>
		</div>
	</div>
	{/openzc:list}
</div>
{/openzc:if}
</div>

<!--分页调用--详细参考pagelist标签的使用教程-->
{openzc:if $listCount>0}
<nav aria-label="Page navigation example">
	<ul class="pagination justify-content-center pagination-circle">
		{openzc:pagelist listitem="prev,list,next" listsize="5"/}
	</ul>
</nav>
{else}
<nav aria-label="Page navigation example">
	<p class="pagination justify-content-center ">
	The current category is empty.
	</p>
</nav>
{/openzc:if}