Version 5.1.5

{ openzc:cart }

cart:当前购物车列表调用

Order By可调用字段 说明
[field:id/]购物车产品ID
[field:products_id/]产品ID
[field:products_name/]产品名称
[field:products_image/]产品主图
[field:products_price/]产品价格
[field:products_original_price/]产品原价
[field:products_qty/]产品数量
[field:products_price_discount/]产品折扣内容
参数名称 参数值 说明
itemattr购物车产品SKU属性
newcarttrue刚添加购物车的产品
imgsizer100,100"products_image"图片裁剪尺寸
bgcolor#000000图片裁剪后的背景颜色
separator#产品图片分隔符,默认为“|||”
① 调用多级分类

常用竖向、横向多级分类调用,这里演示三个级别调用,理论上级别不限

SHOPPING CART IS EMPTY

You have no items in your shopping cart.

CONTINUE SHOPPING

          
<!--判断购物车是否为空-->
{openzc:if $cartCount>0}
<div class="row">
{openzc:msg name="shopping_cart" type="error"}
	<div class="alert alert-danger alert-dismissible mg-b-0 fade show mg-b-15" role="alert">
    	[field:text/]
        <button type="button" class="close" data-dismiss="alert" aria-label="Close">
        	<span aria-hidden="true">×</span>
        </button>
    </div>
{/openzc:msg}
<div class="tt-shopcart-table-02 col-sm-12 col-xl-8">
	<!--购物车列表以及表单-->
	<form action="{openzc:link name='FILENAME_SHOPPING_CART' parameter='[action=>update_product]'/}" method="post">
	<table>
		<tbody>
		<input type="hidden" name="securityToken" value="{openzc:field.securityToken/}"/>
		{openzc:cart imgsizer="100,125"}
		<input type="hidden" name="products_id[]" value="[field:id/]"/>
		<tr>
			<td>
			<div class="tt-product-img"><img src="[field:products_image/]" alt=""></div>
			</td>
			<td>
				<h2 class="tt-title"><a href="[field:products_link/]">[field:products_name/]</a></h2>
				<ul class="tt-list-description">
					{openzc:loopson item="attr"}
					<input type="hidden" name="id[[field:id/]][[field:options_id/]]" value="[field:options_values_id/]"/>
					<li>[field:products_options_name/]: [field:products_options_values_name/]</li>
					{/openzc:loopson}
				</ul>
				<ul class="tt-list-parameters">
					<li><div class="tt-price">[field:products_price/]</div></li>
					{openzc:if IS_MOBILE==true}
					<li>
						<div class="detach-quantity-mobile">
						<div class="tt-input-counter style-01">
							<span class="minus-btn"></span>
							<input type="text" name="cart_quantity[]" value="[field:products_qty/]" size="[field:products_quantity/]">
							<span class="plus-btn"></span>
						</div>
						</div>
					</li>
					{/openzc:if}
					<li><div class="tt-price subtotal">[field:products_price_total/]</div></li>
				</ul>
			</td>
			<td>
				<div class="tt-price">[field:products_price/]</div>
			</td>
			{openzc:if IS_MOBILE==false}
			<td>
				<div class="detach-quantity-desctope">
					<div class="tt-input-counter style-01">
						<span class="minus-btn"></span>
						<input type="text" value="[field:products_qty/]" name="cart_quantity[]" size="[field:products_quantity/]">
						
						<span class="plus-btn"></span>
					</div>
				</div>
			</td>
			{/openzc:if}
			<td>
				<div class="tt-price subtotal">[field:products_price_total/]</div>
			</td>
			<td>
				<a href="[field:remove_link/]" class="tt-btn-close"></a>
			</td>
		</tr>
		{/openzc:cart}
	</tbody>
</table>
<div class="tt-shopcart-btn">
	<div class="col-left"><a class="btn-link" href="/"><i class="icon-e-19"></i>CONTINUE SHOPPING</a></div>
	<div class="col-right">
		<a class="btn-link" href="{openzc:link name='FILENAME_SHOPPING_CART' parameter='[action=>empty_cart]'/}"><i class="icon-h-02"></i>CLEAR SHOPPING CART</a>
		<button type="submit" class="btn-link bd-0"><i class="icon-h-48"></i>UPDATE CART</button>
	</div>
</div>
</form>
</div>
<!--国际运费估算表单-->
<div class="col-sm-12 col-xl-4">
	<div class="tt-shopcart-wrapper">
		<div class="tt-shopcart-box">
			<h4 class="tt-title">ESTIMATE SHIPPING AND TAX</h4>
			<p>Enter your destination to get a shipping estimate.</p>
			<form class="form-default" action="{openzc:link name='FILENAME_SHOPPING_CART'/}" method="post">
				<input type="hidden" name="securityToken" value="{openzc:field.securityToken/}"/>
				<div class="form-group">
					<label for="address_country">COUNTRY <sup>*</sup></label>
					<select id="address_country" name="zone_country_id" class="form-control">
						{openzc:var name="countries"}
						<option value="[field:id/]" {openzc:if $field['status']}selected=""{/openzc:if}>[field:text/]</option>
						{/openzc:var}
					</select>
				</div>
				<div class="form-group">
					<label for="address_province">STATE/PROVINCE <sup>*</sup></label>
					{openzc:if count($states)>1}
					<select id="address_province" name="zone_id" class="form-control">
						{openzc:var name="states"}
						<option value="[field:id/]">[field:text/]</option>
						{/openzc:var}
					</select>
					{else}
					<input type="text" name="state" class="form-control" placeholder="" size="33"/>
					{/openzc:if}
				</div>
				<div class="form-group">
					<label for="address_zip">ZIP/POSTAL CODE <sup>*</sup></label>
					<input type="text" name="zip_code" class="form-control" id="address_zip" placeholder="Zip/Postal Code">
				</div>
				<button  type="submit" class="btn btn-border">CALCULATE SHIPPING</button>
			</form>
		</div>
		<div class="tt-shopcart-box">
			<p>
				{openzc:define.CART_SHIPPING_QUOTE_CRITERIA/}<br/>
				{openzc:php}echo '<span class="font-weight-bold">' . zen_get_zone_name($selected_country, $state_zone_id, '') . ($selectedState != '' ? ' ' . $selectedState : '') . ' ' . $order->delivery['postcode'] . ' ' . zen_get_country_name($order->delivery['country_id']) . '</span>';{/openzc:php}
			</p>
			<table class="table">
				<thead><tr><th>{openzc:define.CART_SHIPPING_METHOD_TEXT/}</th><th>{openzc:define.CART_SHIPPING_METHOD_RATES/}</th></tr></thead>
				<tbody>
					{openzc:modules item="shipping"}
					{openzc:loopson}
					<tr {openzc:if $field['status']=="active"}class="font-weight-bold"{/openzc:if}><td>[field:module/] ([field:title/])</td><td>[field:cost/]</td></tr>
					{/openzc:loopson}
					{/openzc:modules}
				</tbody>
			</table>
		</div>
		<div class="tt-shopcart-box tt-boredr-large">
			<table class="tt-shopcart-table01">
				<tfoot>
					<tr><th>SUBTOTAL</th><td>{openzc:var name="cartTotal"/}</td></tr>
				</tfoot>
			</table>
			<a href="{openzc:link name='FILENAME_CHECKOUT_SHIPPING'/}" class="btn btn-border d-block"><span class="icon icon-check_circle"></span>PROCEED TO CHECKOUT</a>
		</div>
	</div>
</div>
</div>
{else}
<!--购物车为空-->
<div id="tt-pageContent">
	<div class="container-indent nomargin">
		<div class="tt-empty-cart">
			<span class="tt-icon icon-f-39"></span>
			<h1 class="tt-title">SHOPPING CART IS EMPTY</h1>
			<p>You have no items in your shopping cart.</p>
			<a href="/" class="btn btn-primary">CONTINUE SHOPPING</a>
		</div>
	</div>
</div>
{/openzc:if}