Home
›
iPhone 12 mini Mod NX Incrediville 怪奇事物所 所長的聖地巡禮
$product = {"id":7919956885603,"title":"iPhone 12 mini Mod NX Incrediville 怪奇事物所 所長的聖地巡禮","handle":"iphone-12-mini-mod-nx-hd65","description":null,"published_at":"2025-11-13T10:06:29+08:00","created_at":"2025-11-10T09:52:29+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"","tags":["10%","20%","30%","40%","50%","brand-Apple","designer","designer-incrediville","device-iPhone 12 Mini","merge","reseller-incrediville"],"price":90000,"price_min":90000,"price_max":90000,"available":true,"price_varies":false,"compare_at_price":null,"compare_at_price_min":0,"compare_at_price_max":0,"compare_at_price_varies":false,"variants":[{"id":43827532693603,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"NPB0118424-HD65","requires_shipping":true,"taxable":true,"featured_image":{"id":34786050965603,"product_id":7919956885603,"position":22,"created_at":"2025-11-11T09:40:25+08:00","updated_at":"2025-11-11T09:40:27+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/abdad1091350ddfdf4d6d59fda3e4d938b6cdefc_1402ff59-2a0d-4e36-851c-2fa766cb4869.webp?v=1762825227","variant_ids":[43827532693603]},"available":true,"name":"iPhone 12 mini Mod NX Incrediville 怪奇事物所 所長的聖地巡禮 - Black","public_title":"Black","options":["Black"],"price":90000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"NPB0118424-HD65","featured_media":{"alt":null,"id":26351508029539,"position":22,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/abdad1091350ddfdf4d6d59fda3e4d938b6cdefc_1402ff59-2a0d-4e36-851c-2fa766cb4869.webp?v=1762825227"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/51f03aea4c9f58f48b1863f30529afed5e2269f0.webp?v=1762739557","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f0cbdf8d3b6b20d666aa3c834f12d6977bb8afaf.webp?v=1762739557","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/477e305fbdd7afb0b5eb31ceb4ad953d430933ad.webp?v=1762739558","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/10184c008f263c14729f6d2825f2aabb8a18f265.webp?v=1762739559","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/66b84dbec19771cbe925b1b0c35642b82ef61a1a.webp?v=1762739559","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f2fb62024f0a8408e30187d97a293369e404bff4.webp?v=1762739560","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/68e3debfbd60393515e5f0e9dcbb7689935050a6.webp?v=1762739561","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/34c5ce189890616c26bcc82dc4de664867995ed3.webp?v=1762739561","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/92aa5f7bf7d3f6811fdcdf202deba82a89f04636.webp?v=1762739562","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/da323bd4144d94d2258da3003ec104f114ccfb62.webp?v=1762739563","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/abdad1091350ddfdf4d6d59fda3e4d938b6cdefc.webp?v=1762739564","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/34c5ce189890616c26bcc82dc4de664867995ed3_beab0ce5-442b-40d1-954f-05aaf9c14355.webp?v=1762825221","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f0cbdf8d3b6b20d666aa3c834f12d6977bb8afaf_2d8d8cb7-e836-41d0-9551-2b8906641ac8.webp?v=1762825222","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f2fb62024f0a8408e30187d97a293369e404bff4_2afc0c3b-665c-4baf-b8c4-eb4494312524.webp?v=1762825222","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/92aa5f7bf7d3f6811fdcdf202deba82a89f04636_456d207e-caa9-4b3f-a683-518b6911bc31.webp?v=1762825223","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/da323bd4144d94d2258da3003ec104f114ccfb62_50fd4fbf-c5e9-4cb7-ac3d-b77d61ad3718.webp?v=1762825224","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/66b84dbec19771cbe925b1b0c35642b82ef61a1a_0407a401-f367-4dd4-addc-347f9dc33e61.webp?v=1762825224","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/68e3debfbd60393515e5f0e9dcbb7689935050a6_77e8bba9-540e-4f8d-9d2f-22a4cf4efbef.webp?v=1762825225","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/10184c008f263c14729f6d2825f2aabb8a18f265_a3b277f1-5a9c-4507-9a60-3b5036597b6a.webp?v=1762825225","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/477e305fbdd7afb0b5eb31ceb4ad953d430933ad_151a1037-9d7a-4fe2-9c04-b44cc7babae2.webp?v=1762825226","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/51f03aea4c9f58f48b1863f30529afed5e2269f0_292c1111-2909-4d02-b4d9-642c28e30410.webp?v=1762825227","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/abdad1091350ddfdf4d6d59fda3e4d938b6cdefc_1402ff59-2a0d-4e36-851c-2fa766cb4869.webp?v=1762825227"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/51f03aea4c9f58f48b1863f30529afed5e2269f0.webp?v=1762739557","options":["color"],"media":[{"alt":null,"id":26345440673891,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/51f03aea4c9f58f48b1863f30529afed5e2269f0.webp?v=1762739557"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/51f03aea4c9f58f48b1863f30529afed5e2269f0.webp?v=1762739557","width":2000},{"alt":null,"id":26345441001571,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f0cbdf8d3b6b20d666aa3c834f12d6977bb8afaf.webp?v=1762739557"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f0cbdf8d3b6b20d666aa3c834f12d6977bb8afaf.webp?v=1762739557","width":2000},{"alt":null,"id":26345441263715,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/477e305fbdd7afb0b5eb31ceb4ad953d430933ad.webp?v=1762739558"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/477e305fbdd7afb0b5eb31ceb4ad953d430933ad.webp?v=1762739558","width":2000},{"alt":null,"id":26345441558627,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/10184c008f263c14729f6d2825f2aabb8a18f265.webp?v=1762739559"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/10184c008f263c14729f6d2825f2aabb8a18f265.webp?v=1762739559","width":2000},{"alt":null,"id":26345441755235,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/66b84dbec19771cbe925b1b0c35642b82ef61a1a.webp?v=1762739559"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/66b84dbec19771cbe925b1b0c35642b82ef61a1a.webp?v=1762739559","width":2000},{"alt":null,"id":26345441886307,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f2fb62024f0a8408e30187d97a293369e404bff4.webp?v=1762739560"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f2fb62024f0a8408e30187d97a293369e404bff4.webp?v=1762739560","width":2000},{"alt":null,"id":26345441951843,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/68e3debfbd60393515e5f0e9dcbb7689935050a6.webp?v=1762739561"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/68e3debfbd60393515e5f0e9dcbb7689935050a6.webp?v=1762739561","width":2000},{"alt":null,"id":26345442115683,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/34c5ce189890616c26bcc82dc4de664867995ed3.webp?v=1762739561"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/34c5ce189890616c26bcc82dc4de664867995ed3.webp?v=1762739561","width":2000},{"alt":null,"id":26345442246755,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/92aa5f7bf7d3f6811fdcdf202deba82a89f04636.webp?v=1762739562"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/92aa5f7bf7d3f6811fdcdf202deba82a89f04636.webp?v=1762739562","width":2000},{"alt":null,"id":26345442345059,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/da323bd4144d94d2258da3003ec104f114ccfb62.webp?v=1762739563"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/da323bd4144d94d2258da3003ec104f114ccfb62.webp?v=1762739563","width":2000},{"alt":null,"id":26345442541667,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/abdad1091350ddfdf4d6d59fda3e4d938b6cdefc.webp?v=1762739564"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/abdad1091350ddfdf4d6d59fda3e4d938b6cdefc.webp?v=1762739564","width":2000},{"alt":null,"id":26351505932387,"position":12,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/34c5ce189890616c26bcc82dc4de664867995ed3_beab0ce5-442b-40d1-954f-05aaf9c14355.webp?v=1762825221"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/34c5ce189890616c26bcc82dc4de664867995ed3_beab0ce5-442b-40d1-954f-05aaf9c14355.webp?v=1762825221","width":2000},{"alt":null,"id":26351506161763,"position":13,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f0cbdf8d3b6b20d666aa3c834f12d6977bb8afaf_2d8d8cb7-e836-41d0-9551-2b8906641ac8.webp?v=1762825222"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f0cbdf8d3b6b20d666aa3c834f12d6977bb8afaf_2d8d8cb7-e836-41d0-9551-2b8906641ac8.webp?v=1762825222","width":2000},{"alt":null,"id":26351506391139,"position":14,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f2fb62024f0a8408e30187d97a293369e404bff4_2afc0c3b-665c-4baf-b8c4-eb4494312524.webp?v=1762825222"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f2fb62024f0a8408e30187d97a293369e404bff4_2afc0c3b-665c-4baf-b8c4-eb4494312524.webp?v=1762825222","width":2000},{"alt":null,"id":26351506587747,"position":15,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/92aa5f7bf7d3f6811fdcdf202deba82a89f04636_456d207e-caa9-4b3f-a683-518b6911bc31.webp?v=1762825223"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/92aa5f7bf7d3f6811fdcdf202deba82a89f04636_456d207e-caa9-4b3f-a683-518b6911bc31.webp?v=1762825223","width":2000},{"alt":null,"id":26351506784355,"position":16,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/da323bd4144d94d2258da3003ec104f114ccfb62_50fd4fbf-c5e9-4cb7-ac3d-b77d61ad3718.webp?v=1762825224"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/da323bd4144d94d2258da3003ec104f114ccfb62_50fd4fbf-c5e9-4cb7-ac3d-b77d61ad3718.webp?v=1762825224","width":2000},{"alt":null,"id":26351506980963,"position":17,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/66b84dbec19771cbe925b1b0c35642b82ef61a1a_0407a401-f367-4dd4-addc-347f9dc33e61.webp?v=1762825224"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/66b84dbec19771cbe925b1b0c35642b82ef61a1a_0407a401-f367-4dd4-addc-347f9dc33e61.webp?v=1762825224","width":2000},{"alt":null,"id":26351507177571,"position":18,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/68e3debfbd60393515e5f0e9dcbb7689935050a6_77e8bba9-540e-4f8d-9d2f-22a4cf4efbef.webp?v=1762825225"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/68e3debfbd60393515e5f0e9dcbb7689935050a6_77e8bba9-540e-4f8d-9d2f-22a4cf4efbef.webp?v=1762825225","width":2000},{"alt":null,"id":26351507439715,"position":19,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/10184c008f263c14729f6d2825f2aabb8a18f265_a3b277f1-5a9c-4507-9a60-3b5036597b6a.webp?v=1762825225"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/10184c008f263c14729f6d2825f2aabb8a18f265_a3b277f1-5a9c-4507-9a60-3b5036597b6a.webp?v=1762825225","width":2000},{"alt":null,"id":26351507603555,"position":20,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/477e305fbdd7afb0b5eb31ceb4ad953d430933ad_151a1037-9d7a-4fe2-9c04-b44cc7babae2.webp?v=1762825226"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/477e305fbdd7afb0b5eb31ceb4ad953d430933ad_151a1037-9d7a-4fe2-9c04-b44cc7babae2.webp?v=1762825226","width":2000},{"alt":null,"id":26351507800163,"position":21,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/51f03aea4c9f58f48b1863f30529afed5e2269f0_292c1111-2909-4d02-b4d9-642c28e30410.webp?v=1762825227"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/51f03aea4c9f58f48b1863f30529afed5e2269f0_292c1111-2909-4d02-b4d9-642c28e30410.webp?v=1762825227","width":2000},{"alt":null,"id":26351508029539,"position":22,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/abdad1091350ddfdf4d6d59fda3e4d938b6cdefc_1402ff59-2a0d-4e36-851c-2fa766cb4869.webp?v=1762825227"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/abdad1091350ddfdf4d6d59fda3e4d938b6cdefc_1402ff59-2a0d-4e36-851c-2fa766cb4869.webp?v=1762825227","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null};
$isMerge = null;
$variants = [{"id":43827532693603,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"NPB0118424-HD65","requires_shipping":true,"taxable":true,"featured_image":{"id":34786050965603,"product_id":7919956885603,"position":22,"created_at":"2025-11-11T09:40:25+08:00","updated_at":"2025-11-11T09:40:27+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/abdad1091350ddfdf4d6d59fda3e4d938b6cdefc_1402ff59-2a0d-4e36-851c-2fa766cb4869.webp?v=1762825227","variant_ids":[43827532693603]},"available":true,"name":"iPhone 12 mini Mod NX Incrediville 怪奇事物所 所長的聖地巡禮 - Black","public_title":"Black","options":["Black"],"price":90000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"NPB0118424-HD65","featured_media":{"alt":null,"id":26351508029539,"position":22,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/abdad1091350ddfdf4d6d59fda3e4d938b6cdefc_1402ff59-2a0d-4e36-851c-2fa766cb4869.webp?v=1762825227"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}];
$defaultVariant = {"id":43827532693603,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"NPB0118424-HD65","requires_shipping":true,"taxable":true,"featured_image":{"id":34786050965603,"product_id":7919956885603,"position":22,"created_at":"2025-11-11T09:40:25+08:00","updated_at":"2025-11-11T09:40:27+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/abdad1091350ddfdf4d6d59fda3e4d938b6cdefc_1402ff59-2a0d-4e36-851c-2fa766cb4869.webp?v=1762825227","variant_ids":[43827532693603]},"available":true,"name":"iPhone 12 mini Mod NX Incrediville 怪奇事物所 所長的聖地巡禮 - Black","public_title":"Black","options":["Black"],"price":90000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"NPB0118424-HD65","featured_media":{"alt":null,"id":26351508029539,"position":22,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/abdad1091350ddfdf4d6d59fda3e4d938b6cdefc_1402ff59-2a0d-4e36-851c-2fa766cb4869.webp?v=1762825227"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}};
$device_handle = null;
$brand_handle = null;
$type = "";
var sellingStatus
// 只有設計款(SKU 含 '-')才需要合圖
if ($isMerge && $defaultVariant.sku.includes('-')) {
$(document).ready(function() {
var productImg = $product.images[0];
var bumperImg = window.getProductImageUrl($defaultVariant.sku.split('-')[0]);
var layers = ($type === 'mod-nx-backplate' || $type === 'mod-backplate')
? [productImg, bumperImg]
: [bumperImg, productImg];
window.mergeProductImages(layers).then(function (mergedImg) {
$('.merged-img').attr('src', mergedImg);
});
});
};
var sellingStatusData
window.fetchSellingStatus().then(data => {
try {
sellingStatusData = data;
} catch (error) {
sellingStatusData = null
console.error('Unable to parse selling status', error)
}
$(document).ready(function() {
handleSellingStatus($defaultVariant.sku);
});
})
function handleSellingStatus(currentSku) {
if (!sellingStatusData) {
console.error('No selling status available!')
return
}
const sellingStatusElement = document.getElementById('selling-status')
const addToCartButton = document.getElementById('AddToCart-product-template')
const currentProductSku = currentSku.replace(/-(.*)$/, '-')
if ($variants) {
const flattenedSellingStatus = [...sellingStatusData.pending, ...sellingStatusData.preorder]
const matchSellingStatusProduct = flattenedSellingStatus.filter(product => currentProductSku === product.sku)
if (matchSellingStatusProduct.length > 0) {
const isProductPending = matchSellingStatusProduct[0].status === 'pending'
const matchDate = matchSellingStatusProduct[0].date
sellingStatus = isProductPending
? "缺貨中"
: "預購完成出貨日:" + matchDate
sellingStatusElement.textContent = sellingStatus
if (sellingStatus.includes("缺貨中")){
addToCartButton.disabled ='true';
addToCartButton.textContent = "缺貨中無法加入購物車"
} else {
addToCartButton.textContent = "加到購物車"
}
} else {
sellingStatusElement.textContent = ''
addToCartButton.textContent = "加到購物車"
};
};
};
document.addEventListener('DOMContentLoaded', function () {
var currentVariantSelect = document.getElementById('SingleOptionSelector-0')
currentVariantSelect.addEventListener('change', function() {
var currentSku = $('#current_sku').text()
var skuElement = document.getElementById('current-sku')
skuElement.textContent = currentSku
handleSellingStatus(currentSku)
});
});
// Override default values of shop.strings for each template.
// Alternate product templates can change values of
// add to cart button, sold out, and unavailable states here.
theme.productStrings = {
addToCart: "加到購物車",
soldOut: "售完",
unavailable: "停產"
}