You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

530 lines
25 KiB

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

<!DOCTYPE html>
<html lang="zh-TW">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="Keywords" content="{$keywords}" />
<meta name="Description" content="{$description}" />
<!-- TemplateBeginEditable name="doctitle" -->
<title>{$page_title}</title>
<!-- TemplateEndEditable -->
<!-- TemplateBeginEditable name="head" -->
<!-- TemplateEndEditable -->
<link rel="shortcut icon" href="favicon.ico" />
<link rel="icon" href="animated_favicon.gif" type="image/gif" />
<link href="{$ecs_css_path}" rel="stylesheet" type="text/css" />
<!--<link href="goods.css" rel="stylesheet" type="text/css" />-->
<link href="magiczoomplus.css" rel="stylesheet" type="text/css" />
<link href="css/bootstrap.css" rel="stylesheet" type="text/css" />
<link href="css/templatemo.css" rel="stylesheet" type="text/css" />
<link href="css/custom.css" rel="stylesheet" type="text/css" />
<!-- Load fonts style after rendering the layout styles -->
<link href="css/css2.css" rel="stylesheet" type="text/css" />
<link href="css/fontawesome.css" rel="stylesheet" type="text/css" />
{* 包含腳本文件 *}
<script src="https://cdn.jsdelivr.net/npm/less" ></script>
<script type="text/javascript" src="js/magiczoom_plus.js"></script>
<script type="text/javascript" src="js/common.js?v=2"></script>
<script src="https://unpkg.com/vue@3/dist/vue.global.js"></script>
<script language="javascript">
function shows_number(result)
{
if(result.product_number !=undefined){
document.getElementById('shows_number').innerHTML = result.product_number+'{if $goods.measure_unit}{$goods.measure_unit}{else}件{/if}';
}else{
document.getElementById('shows_number').innerHTML = '無庫存';
}
}
//默認就顯示第一個屬性庫存
function changeKucun()
{
var frm=document.forms['ECS_FORMBUY'];
spec_arr = getSelectedAttributes(frm);
if(spec_arr==''){
document.getElementById('shows_number').innerHTML = '{$goods.goods_number}{if $goods.measure_unit}{$goods.measure_unit}{else}件{/if}';
}else{
Ajax.call('goods.php?act=get_products_info', 'id=' + spec_arr+ '&goods_id=' + goods_id, shows_number, 'GET', 'JSON');
}
}
</script>
<script type="text/javascript">
function $id(element) {
return document.getElementById(element);
}
</script>
<script type="text/javascript" src="js/quick_buy1.js"></script>
</head>
<body>
<!-- #BeginLibraryItem "/library/page_header.lbi" --><!-- #EndLibraryItem -->
<script type="text/javascript" src="js/magiczoomplus.js"></script>
<script type="text/javascript" src="js/easydialog.min.js"></script>
<script type="text/javascript" src="js/lizi_goods.js"></script>
<div class="bg-light" id="app">
<div class="container pb-5">
<div class="row">
<div class="col-lg-5 mt-5">
<!-- 圖片 -->
<!-- #BeginLibraryItem "/library/goods_gallery.lbi" --><!-- #EndLibraryItem -->
</div>
<div class="col-lg-7 mt-5">
<form action="javascript:addToCart({$goods.goods_id})" method="post" name="ECS_FORMBUY" id="ECS_FORMBUY" >
<!-- 產品內容 -->
<div class="card">
<div class="card-body">
<h1 class="h4">{$goods.goods_style_name}</h1>
<p>
{$goods.goods_brief}
</p>
<p class="py-2">
<i class="fa fa-star text-warning"></i>
<i class="fa fa-star text-warning"></i>
<i class="fa fa-star text-warning"></i>
<i class="fa fa-star text-warning"></i>
<i class="fa fa-star text-secondary"></i>
<span class="list-inline-item text-dark"> 4.8星 | {$goods.comments_number }人 評價 | 已售出 ({$sales_count})</span>
</p>
<div>
<div class="property">
<!--{if $volume_price_list } 優惠價格-->
<div id="mod-detail-price" class="mod-detail-price">
<div class="d-content">
<table class=" ">
<tbody>
<tr class="price">
<td class="price-title ladder-3">{$lang.preferences_price}</td>
<!-- {foreach from=$volume_price_list item=price_list key=price_key} -->
<td class="ladder-3-1"><span
class="value price-length-5">{$price_list.format_price}</span></td>
<!-- {/foreach} -->
</tr>
<tr class="amount">
<td class="amount-title ladder-3">{$lang.number_to}</td>
<!-- {foreach from=$volume_price_list item=price_list key=price_key} -->
<td class="ladder-3-1"><span class="value">{$price_list.number_format}</span> <span
class="unit">{if $goods.measure_unit}{$goods.measure_unit}{else}件{/if}</span>
</td>
<!-- {/foreach} -->
</tr>
</tbody>
</table>
</div>
</div>
<!--{/if}-->
<div class="itemPanel">
<!--{if $goods.is_sale and $goods.sale_end_time } 限時秒殺-->
{insert_scripts files='jquery.countdown-2.5.3.min.js'}
<h2>秒殺價:<i id="ECS_SHOPPRICE">{$goods.sale_price_formated}</i></h2>
<div class="market_price"><span class="timedown" id="timedown"><i class="iconfont">&#xe607;</i>
<font id="ps_labels_{$goods.goods_id}" over="false"></font><strong id="ps_cd_{$goods.goods_id}"
class="font_w">{$lang.please_waiting}</strong>
<font id="ps_labele_{$goods.goods_id}" over="false"></font>
</span></div>
<script type="text/javascript">
$().ready(function () {
countdown.setLabels(
'毫秒|秒|分|小時|天| 周| 月| 年| 十年| 世紀| 千年',
'毫秒|秒|分|小時|天| 周| 月| 年| 十年| 世紀| 千年',
'',//秒連接符
'',//其他時間連接符
'End',
function (n) {
return n.toString()
});
<!-- {if $goods.sale_start_time > $goods.gmtime && $goods.sale_end_time > $goods.gmtime} -->
var endDate = new Date({ $goods.sale_start_time });
var status = "0";
$("#ps_labels_{$goods.goods_id}").html("還有");
$("#ps_labele_{$goods.goods_id}").html("開始");
< !--{ else} -->
var endDate = new Date({ $goods.sale_end_time });
var status = "1";
$("#ps_labels_{$goods.goods_id}").html("還剩");
$("#ps_labele_{$goods.goods_id}").html("結束");
< !--{/if} -- >
//if({$goods.goods_id} == 62){
// endDate = new Date(2015, 6, 29, 12, 09);
//}
var timerId = null;
function countdown_callback(ts) {
//alert(ts);
$("#ps_cd_{$goods.goods_id}").html(ts.toString());
//alert($("#ps_cd_{$goods.goods_id}").html());
if (status == 0) {
//預熱中-&gt;秒殺中
if (ts == "End") {
Ajax.call('index.php?act=clear_cache', 'POST', 'JSON');
window.clearInterval(timerId);
$("#ps_cd_{$goods.goods_id}").html("");
//$("#ps_label_{$goods.goods_id}").html("銷售中");
$("#zhuangtai{$goods.goods_id}").removeClass("weikaishi");
$("#zhuangtai{$goods.goods_id}").addClass("jinxinzhong");
$("#ps_labels_{$goods.goods_id}").attr("over", true);
$("#ps_labele_{$goods.goods_id}").attr("over", true);
$("#ps_labels_{$goods.goods_id}").html("還剩");
$("#ps_labele_{$goods.goods_id}").html("結束");
status = 1;
endDate = new Date({ $goods.sale_end_time });
timerId = countdown(countdown_callback, endDate, countdown.DAYS | countdown.HOURS | countdown.MINUTES | countdown.SECONDS);
}
} else {
//秒殺中-&gt;活動已結束
if (ts == "End" || new Date().getTime() > endDate.getTime()) {
window.clearInterval(timerId);
$("#ps_cd_{$goods.goods_id}").html("");
$("#ps_labels_{$goods.goods_id}").html("活動已結束");
Ajax.call('index.php?act=clear_cache', 'POST', 'JSON');
$("#nowbuy").html("活動已結束");
$('#buy_btn').attr('href', 'javascript:void(0);');
$("#ps_labele_{$goods.goods_id}").html("");
$("#ps_labels_{$goods.goods_id}").attr("over", true);
$("#ps_labele_{$goods.goods_id}").attr("over", true);
}
}
}
timerId = countdown(countdown_callback, endDate, countdown.DAYS | countdown.HOURS | countdown.MINUTES | countdown.SECONDS);
});
</script>
<!--{elseif $goods.is_promote and $goods.gmt_end_time } 促銷-->
<script type="text/javascript" src="js/lefttime.js"></script>
<h2>{$lang.promote_price}<i id="ECS_SHOPPRICE">{$goods.promote_price}</i></h2>
<div class="market_price"><span class="timedown" id="timedown"><i
class="iconfont">&#xe607;</i>剩餘時間:<strong id="leftTime"
class="font_w">{$lang.please_waiting}</strong></span></div>
<!--{else}-->
<div class="h3">{$lang.shop_price}<i id="ECS_SHOPPRICE">{$goods.shop_price_formated}</i></div>
<!-- {if $cfg.show_marketprice} 市場價格-->
<div class="market_price">{$lang.market_price}<s>{$goods.market_price}</s></div>
<!-- {/if} -->
<!--{/if}-->
<!-- <div class="itemStore">
<!--{if $rank_prices}-->
<a href="javascript:;" id="membership" data-type="normal" class="membership">高級客戶購買享有折扣<i
class="iconfont">&#xe60b;</i></a>
<div class="membership_con">
<div class="how-bd">
<h3>客戶價格</h3>
<table width="100%">
<tbody>
<tr>
<td width="50%">客戶等級</td>
<td width="50%">客戶價格</td>
</tr>
<!-- {foreach from=$rank_prices item=rank_price key=key name=rank_price} 客戶等級對應的價格-->
<tr id="ECS_RANKPRICE_{$key}">
<td>{$rank_price.rank_name}</td>
<td>{$rank_price.price}</td>
</tr>
<!--{/foreach}-->
</tbody>
</table>
</div>
</div>
<!--{/if}-->
</div> -->
<!-- {if $goods.is_shipping} 為免運費產品則顯示-->
<span class="mianyou">免郵</span>
<!-- {/if} -->
</div>
<div>
<!-- {if $cfg.show_goodssn} 顯示產品貨號-->
<div> <span class="lbl">{$lang.goods_sn}</span> <em>{$goods.goods_sn}</em> </div>
<!-- {/if} -->
<!-- {if $cfg.show_addtime} 上架時間-->
<div> <span class="lbl">{$lang.add_time}</span> <em>{$goods.add_time}</em> </div>
<!-- {/if} -->
<!-- {if $cfg.show_goodsweight} 產品重量-->
<div> <span class="lbl">{$lang.goods_weight}</span> <em>{$goods.goods_weight}</em> </div>
<!-- {/if} -->
<!-- {if $goods.goods_brand neq "" and $cfg.show_brand} 顯示產品品牌-->
<div><span class="lbl">&nbsp;&nbsp;&nbsp;</span><a href="{$goods.goods_brand_url}"
target="_blank">進入&nbsp;<font style="color:#1ac14b;">{$goods.goods_brand}</font>&nbsp;品牌館</a>
</div>
<!-- {/if} -->
<!-- {if $goods.give_integral > 0} 購買此產品贈送積分-->
<div><span>{$lang.goods_give_integral}可獲<em class="red">{$goods.give_integral}</em>{$points_name}</span>
</div>
<!-- {/if} -->
<!-- {if $cfg.use_integral} 購買此產品可使用積分-->
<div><span>{$lang.goods_integral}<em class="red">{$goods.integral}</em>{$points_name}</span></div>
<!-- {/if} -->
<!-- {if $promotion} -->
<div style="color:#666;">
<!-- {foreach from=$promotion item=item key=key} 優惠活動-->
<span class="lbl">{$lang.activity}</span>
<!-- {if $item.type eq "snatch"} -->
<a href="snatch.php" title="{$lang.snatch}"
style="font-weight:100; color:#1ac14b; text-decoration:none;">[{$lang.snatch}]</a>
<!-- {elseif $item.type eq "group_buy"} -->
<a href="group_buy.php" title="{$lang.group_buy}"
style="font-weight:100; color:#1ac14b; text-decoration:none;">[{$lang.group_buy}]</a>
<!-- {elseif $item.type eq "auction"} -->
<a href="auction.php" title="{$lang.auction}"
style="font-weight:100; color:#1ac14b; text-decoration:none;">[{$lang.auction}]</a>
<!-- {elseif $item.type eq "favourable"} -->
<a href="activity.php" title="{$lang.favourable}"
style="font-weight:100; color:#1ac14b; text-decoration:none;">[{$lang.favourable}]</a>
<!-- {/if} -->
<a href="{$item.url}" title="{$lang.$item.type} {$item.act_name}{$item.time}"
style="font-weight:100; color:#1ac14b;">{$item.act_name}</a><br />
<!-- {/foreach} -->
</div>
<!-- {/if} -->
</div>
</div>
<!-- vue : start-->
<div class="tobuy-box cle">
<div class="sku">
<div v-for="(property,index) in properties.spe" :key="index">
<h6>{{property.name}}:</h6>
<ul class="list-inline pb-3">
<li class="list-inline-item" v-for="(v,i) in property.values" :key="i">
<span class="btn btn-success btn-size">{{ v.label }}</span>
</li>
</ul>
</div>
</div>
</div>
<!-- vue : end-->
</div>
{if $goods.brand_id > 0}
<!-- <ul class="list-inline">
<li class="list-inline-item">
<h6>品牌:</h6>
</li>
<li class="list-inline-item">
<p class="text-muted"><strong>UTel</strong></p>
</li>
</ul> -->
{/if}
<!-- <ul class="list-inline">
<li class="list-inline-item">
<h6>顏色 :</h6>
</li>
<li class="list-inline-item">
<p class="text-muted"><strong>White / Black</strong></p>
</li>
</ul> -->
<!-- <h6>規格:</h6>
<ul class="list-unstyled pb-3">
<li>規格1</li>
<li>規格2</li>
</ul> -->
<form action="" method="GET">
<input type="hidden" name="product-title" value="Activewear">
<div class="row">
<div class="col-auto">
<ul class="list-inline pb-3">
<li class="list-inline-item text-right">
數量
<input type="hidden" name="product-quanity" id="product-quanity" value="1">
</li>
<li class="list-inline-item"><span class="btn btn-success" id="btn-minus">-</span></li>
<li class="list-inline-item"><span class="badge bg-secondary" id="var-value">1</span></li>
<li class="list-inline-item"><span class="btn btn-success" id="btn-plus">+</span></li>
</ul>
</div>
</div>
<div class="row pb-3">
<div class="col d-grid">
<button type="submit" class="btn btn-success btn-lg" name="submit" value="buy">立即購買</button>
</div>
<div class="col d-grid">
<button type="submit" class="btn btn-success btn-lg" name="submit" value="addtocard">加入購物車</button>
</div>
</div>
</form>
</div>
</div>
</form>
</div>
</div>
</div>
</div>
<!-- Start Article -->
<!-- <section class="py-5">
<div class="container">
<div class="row text-left p-2 pb-3">
<h4>Related Products</h4>
</div>
<!--Start Carousel Wrapper-->
<div id="carousel-related-product">
<div class="p-2 pb-3">
<div class="product-wap card rounded-0">
<div class="card rounded-0">
<img class="card-img rounded-0 img-fluid" src="assets/img/shop_08.jpg">
<div class="card-img-overlay rounded-0 product-overlay d-flex align-items-center justify-content-center">
<ul class="list-unstyled">
<li><a class="btn btn-success text-white" href="shop-single.html"><i class="far fa-heart"></i></a></li>
<li><a class="btn btn-success text-white mt-2" href="shop-single.html"><i class="far fa-eye"></i></a></li>
<li><a class="btn btn-success text-white mt-2" href="shop-single.html"><i class="fas fa-cart-plus"></i></a></li>
</ul>
</div>
</div>
<div class="card-body">
<a href="shop-single.html" class="h3 text-decoration-none">Red Clothing</a>
<ul class="w-100 list-unstyled d-flex justify-content-between mb-0">
<li>M/L/X/XL</li>
<li class="pt-2">
<span class="product-color-dot color-dot-red float-left rounded-circle ml-1"></span>
<span class="product-color-dot color-dot-blue float-left rounded-circle ml-1"></span>
<span class="product-color-dot color-dot-black float-left rounded-circle ml-1"></span>
<span class="product-color-dot color-dot-light float-left rounded-circle ml-1"></span>
<span class="product-color-dot color-dot-green float-left rounded-circle ml-1"></span>
</li>
</ul>
<ul class="list-unstyled d-flex justify-content-center mb-1">
<li>
<i class="text-warning fa fa-star"></i>
<i class="text-warning fa fa-star"></i>
<i class="text-warning fa fa-star"></i>
<i class="text-warning fa fa-star"></i>
<i class="text-muted fa fa-star"></i>
</li>
</ul>
<p class="text-center mb-0">$20.00</p>
</div>
</div>
</div>
</div>
</div>
</section> -->
<!-- End Article -->
<!-- <div class="itemBar" style="">
<div class="wrapper">
<div class="itemBuy"><a href="javascript:addToCart({$goods.goods_id})" class="itemAddCart">加入購物車</a></div>
<div class="itemMin" title="{$goods.goods_style_name}">
<span><img src="{$goods.goods_thumb}"></span>
<p>{$goods.goods_style_name}</p>
</div>
<ul class="itemContentHead" id="iteamBarHead">
<li id="H1" data-position="D1" class="itemContentHeadFocus"><a href="javascript:void(0);">產品介紹</a></li>
<li id="H2" data-position="D2"><a href="javascript:void(0);">規格參數</a></li>
<li id="H3" data-position="D3"><a href="javascript:void(0);">評價 <em>({$goods.comments_number})</em></a></li>
</ul>
</div>
</div> -->
<div class="add_ok" id="cart_show">
<div class="tip">
<i class="iconfont">&#xe60c;</i>產品已成功加入購物車
</div>
<div class="go">
<a href="javascript:easyDialog.close();" class="back">&lt;&lt;繼續購物</a>
<a href="flow.php" class="btn">去結算</a>
</div>
</div>
<!-- #BeginLibraryItem "/library/page_footer.lbi" --><!-- #EndLibraryItem -->
</body>
<script type="text/javascript">
var goods_id = {$goods_id};
var goodsattr_style = {$cfg.goodsattr_style|default:1};
var gmt_end_time = {$promote_end_time|default:0};
{foreach from=$lang.goods_js item=item key=key}
var {$key} = "{$item}";
{/foreach}
var goodsId = {$goods_id};
var now_time = {$now_time};
<!-- {literal} -->
onload = function(){
changePrice();
changeKucun();//這裏是添加的
fixpng();
try { onload_leftTime(); }
catch (e) {}
}
/**
* 點選可選屬性或改變數量時修改產品價格的函數
*/
function changePrice()
{
var attr = getSelectedAttributes(document.forms['ECS_FORMBUY']);
var qty = document.forms['ECS_FORMBUY'].elements['number'].value;
Ajax.call('goods.php', 'act=price&id=' + goodsId + '&attr=' + attr + '&number=' + qty, changePriceResponse, 'GET', 'JSON');
}
/**
* 接收返回的信息
*/
function changePriceResponse(res)
{
if (res.err_msg.length > 0)
{
alert(res.err_msg);
}
else
{
if (document.getElementById('ECS_SHOPPRICE'))
document.getElementById('ECS_SHOPPRICE').innerHTML = res.shop_price;
if (document.getElementById('ECS_GOODS_AMOUNT'))
document.getElementById('ECS_GOODS_AMOUNT').innerHTML = res.result;
}
}
<!-- {/literal} -->
</script>
<script>
const { createApp, onMounted, ref } = Vue
createApp({
setup(){
const properties = ref({})
onMounted(async () => {
let res = await axios.get('https://shop.h888.fun/goods.php?id={$goods.goods_id}&act=getattr','get')
if(res.data.code === 200){
properties.value = res.data.data
}
})
return {
properties
}
}
}).mount('#app')
</script>
</html>