2/3
${data.index + 1}/${data.total}
Description
Recently Viewed
${data.starNum}/${data.starTotal}
${data.starNum}/${data.starTotal}
${!isPercentage ? `${data.count}` : `${data.count / data.total * 100}%`}
${data.count > 99 ? '99+' : data.count < 1 ? '' : data.count}
${function() {
if(data.imgCover) {
if(media.videosrc) {
let src = '';
if (media.videosrc) {
src = media.videosrc + '.' + media.ext;
}
const videoDom = `
`;
if(!isPC){
return `
`;
if(!isPC){
return `
`
}else{
return `
`
}
}
} else {
if (media.videosrc) {
let src = '';
if (media.videosrc) {
src = media.videosrc + '.' + media.ext;
}
return `
`
} else if(media.mp4 || media.hls) {
return `
`
} else {
return `
`
}
}
}()}
${videoDom}
`
}
return `
${videoDom}
`
} else if(media.mp4 || media.hls) {
const videoDom = `
${videoDom}
`
}
return `
${videoDom}
`
} else {
if(!isPC){
return `
Newest
Newest
Most liked
Highest ratings
Lowest ratings
Newest
Most liked
Highest ratings
Lowest ratings
All
All(${list.count})
With Photos(${list.image_count})
All(${list.count})
With Photos(${list.image_count})
${arrow}
`);
for (let i = startNumber; i <= endNumber; i++) {
if (i === pageNum) {
nums.push(
`${i}
`
);
} else {
// 第一段:不大于3
if (pageNum <= 3) {
if (i < pageNum + 2 || i > Math.max(endNumber - 4, 0)) {
nums.push(`${i}
`);
}
if (i === pageNum + 2 && i < endNumber - 3) {
nums.push(`...
`);
}
}
// 第二段:大于3 到 倒数第三个
if (pageNum > 3 && pageNum < endNumber - 3) {
if (i < 3 || i > endNumber - 3 || (pageNum - 2 < i && i < pageNum + 2)) {
nums.push(`${i}
`);
}
if (i === 3 && pageNum - 1 !== 3) {
nums.push(`...
`);
}
if (i === endNumber - 4) {
nums.push(`...
`);
}
}
// 第三段: 倒数4个
if (pageNum >= Math.max(endNumber - 3, 4)) {
if (i < 3 || i > endNumber - 3 || i == pageNum - 1) {
nums.push(`${i}
`);
}
if (i === 3 && pageNum > 4 && endNumber > 5) {
nums.push(`...
`);
}
}
}
}
nums.push(`
${arrow}
`);
return `${nums.join(' ')}
`;
}()}
${data.starNum}/${data.starTotal}
${data.starNum}/${data.starTotal}
Write a Review
${data.title}
Customer Reviews
(${data.comment_count > 500 ? '500+' : (data.comment_count || 0)})
Write a Review
View all
${item.username}
Verified
${item.content}
${data.shop_name} reply:
${item.reply && item.reply.length && item.reply[0].content}
${formatDate(item.created_at)}
View more
Wow you reached the bottom
View all
Write a Review
${data.comment_avg_star}
Total reviews: ${data.comment_count > 999 ? '999+' : data.comment_count}
${level}
Reviews
- All(${list.count})
- With Photos(${list.image_count})
Wow you reached the bottom
`;
} else {
return ``;
}
}()}
${function(){
return `
${function(){
if (media.videosrc) {
let src = '';
if (media.videosrc) {
src = media.videosrc + '.' + media.ext;
}
return `
`
} else if(media.mp4 || media.hls) {
return `
`
} else {
return `
`
}
}()}
No reviews available. The product reviews component has been hidden
Product Detail Reviews
Cart
Your shopping bag is empty
-
${item.product_title}
- ${item.options.map(option => option.value).join('/')}
- ${propertie.name}/${propertie.isImage ? `View image` : propertie.value}
Free giftMixed Lot*${item.quantity}${item.item_text}(-${discount_item.title} )
${textArrayHtml}
You've got free shipping
${rate}%
Total:
${function() {
const textArray = ("Save {{save_amount}}").split(/\{\{\s*save_amount\}\}/);
if (textArray.length > 0 && textArray.length < 2) {
textArray.push('');
}
return textArray.map((text, index) => {
if (index == 0) {
return `${text}`;
}
return `
${text}
`;
}).join('');
}()}
${function() {
const textArray = ("Save {{save_amount}}").split(/\{\{\s*save_amount\}\}/);
if (textArray.length > 0 && textArray.length < 2) {
textArray.push('');
}
return textArray.map((text, index) => {
if (index == 0) {
return `${text}`;
}
return `
${text}
`;
}).join('');
}()}
-
${discount_application.title}:
-
${data.invalid_msg}
Taxes and shipping calculated at checkout
${(function(){
var total_price = data.total_price;
var postageFreeAmount = 69;
var freeAmount = postageFreeAmount - total_price;
var isFreeShipping = freeAmount <= 0;
var rate = Math.min(total_price / postageFreeAmount * 100, 100).toFixed(2);
const textArray = ("Spend {{ amount }} more and get free shipping!").split(/\{\{\s*amount\s*\}\}/);
const textArrayHtml = textArray.map((text, index) => {
if (index == 0) {
return `${text}`;
}
return ` ${text}`;
}).join('');
return `
`
})()}
const summaryStickyRender = document.querySelector('#cart-drawer-summary-sticky-render');
if (summaryStickyRender) {
document.body.style.setProperty('--cart-drawer-summary-sticky-height', summaryStickyRender.clientHeight + 'px');
}
${textArrayHtml}
You've got free shipping
${rate}%
${data.invalid_msg}
Total:
${function() {
const textArray = ("Save {{save_amount}}").split(/\{\{\s*save_amount\}\}/);
if (textArray.length > 0 && textArray.length < 2) {
textArray.push('');
}
return textArray.map((text, index) => {
if (index == 0) {
return `${text}`;
}
return `
${text}
`;
}).join('');
}()}
${function() {
const textArray = ("Save {{save_amount}}").split(/\{\{\s*save_amount\}\}/);
if (textArray.length > 0 && textArray.length < 2) {
textArray.push('');
}
return textArray.map((text, index) => {
if (index == 0) {
return `${text}`;
}
return `
${text}
`;
}).join('');
}()}
${function() {
const textArray = ("Save {{save_amount}}").split(/\{\{\s*save_amount\}\}/);
if (textArray.length > 0 && textArray.length < 2) {
textArray.push('');
}
return textArray.map((text, index) => {
if (index == 0) {
return `${text}`;
}
return `
${text}
`;
}).join('');
}()}
-
${discount_application.title}:
-
${data.invalid_msg}
Taxes and shipping calculated at checkout
-
Subtotal:
-
${discount_application.title}:
-
Total:
Taxes and shipping calculated at checkout
Retail
${function() {
let variantImageShowed = false;
const currentProduct = data.product;
return (currentProduct.options || []).map((option, index) => {
const optionName = option.name || '';
const position = `option${index + 1}`;
let isThumbImage = false;
if (currentProduct.need_variant_image && !variantImageShowed) {
const variantNames = ["color"] || [];
for (let i = 0, len = variantNames.length; i < len; i++) {
const name = variantNames[i].toLowerCase();
if (name === optionName.toLowerCase()) {
isThumbImage = true;
variantImageShowed = true;
}
}
}
const variantType = "button";
const thumbStyle = "image";
return `
`
}).join('');
}()}
${data.originData && data.originData.value || data.value}
${optionName}
