1.速科模板直接替换下面代码目录:/public/themes/cart/server/product_content.tpl
{if $Cart.products}
<div class="sky-productList">
{foreach $Cart.products as $list}
<div class="product-card">
<div>
<div class="product-card-header">
<div class="header-title">
<h5>{$list.name}</h5>
{if $list.stock_control==1 && $cartregion.inventory}
<p class="stock-info">{$Lang.stock}{$list.qty}</p>
{/if}
</div>
</div>
<div class="product-card-body">
<div class="product-description">
{if $cartregion.optimizationDescription}
{:convertToContentItem($list.description)}
{else}
{$list.description}
{/if}
</div>
</div>
</div>
<div class="product-Parameters">
{php}
$approx_daily_price = round(floatval($list['has_bates'] ? $list['sale_price'] : $list['product_price']) / 30, 2);
{/php}
{if $list.has_bates}
<div class="pricing-info">
<span class="sale-price">
<span class="currency">{$Cart.currency.prefix}</span>
<span class="amount">{$list.sale_price}</span>
<span class="period">/ {$list.billingcycle_zh} | 约 <span style="color: red;">{$approx_daily_price}</span> 元/天</span>
</span>
{if $list.ontrial==1}
<span class="trial-info">
<span class="currency">{$Cart.currency.prefix}</span>
<span class="amount">{$list.ontrial_setup_fee+$list.ontrial_price}</span>
<span class="period">/ {$list.ontrial_cycle} {$list.ontrial_cycle_type == 'day' ? $Lang.day : $Lang.hour}</span>
</span>
{/if}
<span class="original-price">
<div class="discount">({:discountRate($list.product_price,$list.sale_price)}折)</div>
{$Lang.original_price}
<span class="currency">{$Cart.currency.prefix}</span>
<span class="amount">{$list.product_price}</span>
</span>
</div>
{else}
<div class="pricing-info">
<span class="price">
<span class="currency">{$Cart.currency.prefix}</span>
<span class="amount">{$list.product_price}</span>
<span class="period">{$Lang.rise}/ {$list.billingcycle_zh} | 约 <span style="color: red;">{$approx_daily_price}</span> 元/天</span>
</span>
{if $list.ontrial==1}
<span class="trial-info">
<span class="currency">{$Cart.currency.prefix}</span>
<span class="amount">{$list.ontrial_setup_fee+$list.ontrial_price}</span>
<span class="period">/ {$Lang.on_trial} {$list.ontrial_cycle} {$list.ontrial_cycle_type == 'day' ? $Lang.day : $Lang.hour}</span>
</span>
{/if}
</div>
{/if}
{if $list.stock_control==1 && $list.qty<1}
<a class="buy-now-button SellOut">产品已售罄</a>
{else}
<a href="/cart?action=configureproduct&pid={$list.id}{if $Get.site}&site={$Get.site}{/if}"
class="buy-now-button">{$Lang.buy_now}</a>
{/if}
</div>
</div>
{/foreach}
</div>
{else}
<div class="d-flex align-items-center justify-content-center" style="height: 600px">
<div class="no-data">
{$Lang.no_data_available}
</div>
</div>
{/if}
2.其他模板目录:public/themes/cart/模板目录/product.tpl
{php}
$price= $list['product_price'];
$product_price = floatval($price);
if ($list['sale_price'] > 0) {
$display_price = floatval($list['sale_price']);
} else {
$display_price = $product_price;
}
$approx_daily_price = round($display_price / 30, 2);
{/php}{$product_pricedl} <span class="price-detaily">元/月起</span>
<div class="desc"><span>| 约 <span style="color: red;">{$approx_daily_price}</span> 元/天</span></div>{$product_price}
<div class="desc">
<span>元/月起</span>
</div>
<div class="desc"><span>| 约 <span style="color: red;">{$approx_daily_price}</span> 元/天</span></div>下面是整个文件的代码可以和上面对比方便找到位置:
{include file="cart/shopping-cart/topbar-categories"}
<link rel="stylesheet" href="{$Setting.web_url}/themes/cart/shopping-cart/assets/fonts/iconfont.css?v={$Ver}">
<div class="config-content-parent product_card">
{if condition="empty($Cart.products) neq true" }
{foreach $Cart.products as $list}
<div class="col-sm-product">
<div class="smc-card card-md">
{if $list.stock_control==1}
<p class="card-tag">{$Lang.stock}: {$list.qty}</p>
{/if}
<div class="card-top">
<h3 class="title">{$list.name}</h3></div>
<div class="card-content">
{$list.description}
<!-- {if $list.ontrial==1}
<div class="ky-form-item ">
<div class="ky-form-label">
<div class="ky-form-label-inner">是否试用</div></div>
<div class="ky-form-value">
<div class="ky-form-value-inner">
<div class="ky-select ky-select-item-badge">
<div class="ky-select-btn">{$list.ontrial_setup_fee+$list.ontrial_price}
<span class="ky-badge">
<span class="ky-badge-text">{$list.ontrial_cycle} {$list.ontrial_cycle_type == 'day' ? $Lang.day : $Lang.hour}</span></span>
<i class="ky-select-btn-caret"></i>
</div>
</div>
</div>
</div>
</div>
{/if} -->
</div>
{php}
$price= $list['product_price'];
$product_price = floatval($price);
if ($list['sale_price'] > 0) {
$display_price = floatval($list['sale_price']);
} else {
$display_price = $product_price;
}
$approx_daily_price = round($display_price / 30, 2);
{/php}
<div class="card-bottom">
<div class="bottom-wrap label-tags">
<div class="price-detail">
<span class="font-num en3">
{if $list.sale_price>0}
{php}
$pricedl= $list['sale_price'];
$product_pricedl = floatval($pricedl);
{/php}
{$product_pricedl} <span class="price-detaily">元/月起</span>
<div class="desc"><span>| 约 <span style="color: red;">{$approx_daily_price}</span> 元/天</span></div>
<s class="original_price"> {$Lang.original_price}:{$Cart.currency.prefix}{$product_price}</s>
{else}
{$product_price}
<div class="list_nome">
{if $list.ontrial==1}
{$Cart.currency.prefix}
{$list.ontrial_setup_fee+$list.ontrial_price} / {$Lang.on_trial} {$list.ontrial_cycle} {$list.ontrial_cycle_type == 'day' ? $Lang.day : $Lang.hour}
{/if}
</div>
</span>
<div class="desc">
<span>元/月起</span></div>
<div class="desc"><span>| 约 <span style="color: red;">{$approx_daily_price}</span> 元/天</span></div> {/if}
</div>
{if $list.stock_control==1 && $list.qty<1}
<a href="javescript:;" class="button-base button-yellowgradient h34 no" style="cursor: not-allowed">产品已售罄</a>
{else}
<a class="button-base button-yellowgradient h34" href="/cart?action=configureproduct&pid={$list.id}{if $Get.site}&site={$Get.site}{/if}">{$Lang.buy_now}</a>
{/if}
</div>
</div>
</div>
</div>
{/foreach}
{else/}
<div class="no-data">
<div class="empty">
<img src="/themes/clientarea/user/static/images/empty.svg">
<p>未查询到该区域下的相关产品</p>
</div>
</div>
{/if}
<div class="layui-elem-quote red-theme alert-icon icon-error">
<p>机房禁止用于以下业务及服务:无支付牌照的第三方及第四方支付,易支付,发卡,卡盟,影视,代刷,代挂,刷信誉,买号,卖号,商城,钓鱼网站,虚拟充值,外挂辅助相关网,CC网页端,DDOS网页端,短信轰炸,赌博网站,云免网,诈骗网,赌博网,色情网,小说网,等等相关违法违规站点。禁止搭建VPN服务、禁止搭建DNS服务、禁止搭建NTP服务 以上业务及服务一经发现,立即永久关闭。</p> </div>
</div>
</div>
<script>
$(function () {
$('.cartitem').on('mouseover', function () {
$(this).addClass('active')
})
$('.cartitem').on('mouseleave', function () {
$(this).removeClass('active')
})
})
</script>
<style>
.product_card>div:nth-child(3n+3){
margin-right: 0px;
}
.layui-elem-quote.red-theme {
background: rgba(255, 52, 52, 0.1);
border: 1px solid rgba(255, 52, 52, 0.3);
color: #B22222;
}
.layui-elem-quote.alert-icon {
position: relative;
padding-left: 52px;
}
.layui-elem-quote {
margin-bottom: 12px;
padding: 10px 20px 12px;
-webkit-text-size-adjust: none;
background: rgba(52, 100, 255, 0.1);
border: 1px solid rgba(52, 100, 255, 0.3);
color: #0D236D;
}
</style>
