Home
›
iPhone 12 mini Mod NX (MagSafe 兼容) Incrediville 怪奇事物所 所長的聖地巡禮
$product = {"id":7919946989667,"title":"iPhone 12 mini Mod NX (MagSafe 兼容) Incrediville 怪奇事物所 所長的聖地巡禮","handle":"iphone-12-mini-mod-nx-magsafe-hd65","description":null,"published_at":"2025-11-13T10:07:44+08:00","created_at":"2025-11-10T09:50:25+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":110000,"price_min":110000,"price_max":110000,"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":43827506413667,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"MPB0118424-HD65","requires_shipping":true,"taxable":true,"featured_image":{"id":34786202615907,"product_id":7919946989667,"position":22,"created_at":"2025-11-11T09:47:24+08:00","updated_at":"2025-11-11T09:47:26+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/554ddad8afa54bdeceb49c6af6b8377f8b76b122_f8761530-912f-4b58-94f2-6b2b2dc5e31c.webp?v=1762825646","variant_ids":[43827506413667]},"available":true,"name":"iPhone 12 mini Mod NX (MagSafe 兼容) Incrediville 怪奇事物所 所長的聖地巡禮 - Black","public_title":"Black","options":["Black"],"price":110000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"MPB0118424-HD65","featured_media":{"alt":null,"id":26351659712611,"position":22,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/554ddad8afa54bdeceb49c6af6b8377f8b76b122_f8761530-912f-4b58-94f2-6b2b2dc5e31c.webp?v=1762825646"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6688e0a60499f426e702d5f28febf4efab198ee0.webp?v=1762739432","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/443a503c866ad0801bcde8a05d7fa515cec5cb37.webp?v=1762739432","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cc71fc51a751e70106135cc894165cb508fd662f.webp?v=1762739433","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/554ddad8afa54bdeceb49c6af6b8377f8b76b122.webp?v=1762739434","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/63f319d20e4438a7764ccdc9511f449f8121b54b.webp?v=1762739435","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c23685cf2ed69f23fc8754e0027210d4821f7475.webp?v=1762739437","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/af3cf50e34f669432ba72814ff7b6092f5a44684.webp?v=1762739437","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/691ae842f75037c32a0fcd7380b1d02b215cfd0e.webp?v=1762739437","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/db208d5b687b3cb4c5b9a226e965e7aaa5339928.webp?v=1762739438","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1745105f0e4d5c7e140c88c6d13b533e89fdf443.webp?v=1762739439","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0778f86cb3c15a7d6538fe48c916bef148710c14.webp?v=1762739440","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/db208d5b687b3cb4c5b9a226e965e7aaa5339928_f3e09d05-33ee-4a56-84ad-166939fb3430.webp?v=1762825638","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0778f86cb3c15a7d6538fe48c916bef148710c14_fe841fbf-d78e-409e-8cb7-de5f8ba66cfa.webp?v=1762825639","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/443a503c866ad0801bcde8a05d7fa515cec5cb37_95a3df6e-5bc4-452d-9e85-696caf6dc088.webp?v=1762825640","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cc71fc51a751e70106135cc894165cb508fd662f_fe9a05dc-f1af-4293-a36a-3f2459ca4d72.webp?v=1762825641","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c23685cf2ed69f23fc8754e0027210d4821f7475_1cca0e48-b265-4520-a1d2-69a334abff3d.webp?v=1762825641","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/af3cf50e34f669432ba72814ff7b6092f5a44684_f251fd18-bf4f-417f-8de8-6fbf6418b16b.webp?v=1762825642","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6688e0a60499f426e702d5f28febf4efab198ee0_e62fa2b8-899f-460f-8abb-47d07a1a0e4c.webp?v=1762825643","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/691ae842f75037c32a0fcd7380b1d02b215cfd0e_075943d4-137c-4ee7-b99f-69894a83876e.webp?v=1762825644","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1745105f0e4d5c7e140c88c6d13b533e89fdf443_a39a84cb-b872-477f-bbf0-c5d3236fb494.webp?v=1762825645","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/63f319d20e4438a7764ccdc9511f449f8121b54b_13087894-8cb7-40a5-aa60-398cbab40e91.webp?v=1762825645","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/554ddad8afa54bdeceb49c6af6b8377f8b76b122_f8761530-912f-4b58-94f2-6b2b2dc5e31c.webp?v=1762825646"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6688e0a60499f426e702d5f28febf4efab198ee0.webp?v=1762739432","options":["color"],"media":[{"alt":null,"id":26345415442531,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6688e0a60499f426e702d5f28febf4efab198ee0.webp?v=1762739432"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6688e0a60499f426e702d5f28febf4efab198ee0.webp?v=1762739432","width":2000},{"alt":null,"id":26345415671907,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/443a503c866ad0801bcde8a05d7fa515cec5cb37.webp?v=1762739432"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/443a503c866ad0801bcde8a05d7fa515cec5cb37.webp?v=1762739432","width":2000},{"alt":null,"id":26345415770211,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cc71fc51a751e70106135cc894165cb508fd662f.webp?v=1762739433"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cc71fc51a751e70106135cc894165cb508fd662f.webp?v=1762739433","width":2000},{"alt":null,"id":26345415802979,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/554ddad8afa54bdeceb49c6af6b8377f8b76b122.webp?v=1762739434"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/554ddad8afa54bdeceb49c6af6b8377f8b76b122.webp?v=1762739434","width":2000},{"alt":null,"id":26345415934051,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/63f319d20e4438a7764ccdc9511f449f8121b54b.webp?v=1762739435"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/63f319d20e4438a7764ccdc9511f449f8121b54b.webp?v=1762739435","width":2000},{"alt":null,"id":26345415999587,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c23685cf2ed69f23fc8754e0027210d4821f7475.webp?v=1762739437"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c23685cf2ed69f23fc8754e0027210d4821f7475.webp?v=1762739437","width":2000},{"alt":null,"id":26345416163427,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/af3cf50e34f669432ba72814ff7b6092f5a44684.webp?v=1762739437"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/af3cf50e34f669432ba72814ff7b6092f5a44684.webp?v=1762739437","width":2000},{"alt":null,"id":26345416261731,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/691ae842f75037c32a0fcd7380b1d02b215cfd0e.webp?v=1762739437"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/691ae842f75037c32a0fcd7380b1d02b215cfd0e.webp?v=1762739437","width":2000},{"alt":null,"id":26345416360035,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/db208d5b687b3cb4c5b9a226e965e7aaa5339928.webp?v=1762739438"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/db208d5b687b3cb4c5b9a226e965e7aaa5339928.webp?v=1762739438","width":2000},{"alt":null,"id":26345416687715,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1745105f0e4d5c7e140c88c6d13b533e89fdf443.webp?v=1762739439"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1745105f0e4d5c7e140c88c6d13b533e89fdf443.webp?v=1762739439","width":2000},{"alt":null,"id":26345416851555,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0778f86cb3c15a7d6538fe48c916bef148710c14.webp?v=1762739440"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0778f86cb3c15a7d6538fe48c916bef148710c14.webp?v=1762739440","width":2000},{"alt":null,"id":26351657058403,"position":12,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/db208d5b687b3cb4c5b9a226e965e7aaa5339928_f3e09d05-33ee-4a56-84ad-166939fb3430.webp?v=1762825638"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/db208d5b687b3cb4c5b9a226e965e7aaa5339928_f3e09d05-33ee-4a56-84ad-166939fb3430.webp?v=1762825638","width":2000},{"alt":null,"id":26351657517155,"position":13,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0778f86cb3c15a7d6538fe48c916bef148710c14_fe841fbf-d78e-409e-8cb7-de5f8ba66cfa.webp?v=1762825639"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0778f86cb3c15a7d6538fe48c916bef148710c14_fe841fbf-d78e-409e-8cb7-de5f8ba66cfa.webp?v=1762825639","width":2000},{"alt":null,"id":26351657877603,"position":14,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/443a503c866ad0801bcde8a05d7fa515cec5cb37_95a3df6e-5bc4-452d-9e85-696caf6dc088.webp?v=1762825640"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/443a503c866ad0801bcde8a05d7fa515cec5cb37_95a3df6e-5bc4-452d-9e85-696caf6dc088.webp?v=1762825640","width":2000},{"alt":null,"id":26351658074211,"position":15,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cc71fc51a751e70106135cc894165cb508fd662f_fe9a05dc-f1af-4293-a36a-3f2459ca4d72.webp?v=1762825641"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cc71fc51a751e70106135cc894165cb508fd662f_fe9a05dc-f1af-4293-a36a-3f2459ca4d72.webp?v=1762825641","width":2000},{"alt":null,"id":26351658369123,"position":16,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c23685cf2ed69f23fc8754e0027210d4821f7475_1cca0e48-b265-4520-a1d2-69a334abff3d.webp?v=1762825641"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c23685cf2ed69f23fc8754e0027210d4821f7475_1cca0e48-b265-4520-a1d2-69a334abff3d.webp?v=1762825641","width":2000},{"alt":null,"id":26351658598499,"position":17,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/af3cf50e34f669432ba72814ff7b6092f5a44684_f251fd18-bf4f-417f-8de8-6fbf6418b16b.webp?v=1762825642"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/af3cf50e34f669432ba72814ff7b6092f5a44684_f251fd18-bf4f-417f-8de8-6fbf6418b16b.webp?v=1762825642","width":2000},{"alt":null,"id":26351658860643,"position":18,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6688e0a60499f426e702d5f28febf4efab198ee0_e62fa2b8-899f-460f-8abb-47d07a1a0e4c.webp?v=1762825643"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6688e0a60499f426e702d5f28febf4efab198ee0_e62fa2b8-899f-460f-8abb-47d07a1a0e4c.webp?v=1762825643","width":2000},{"alt":null,"id":26351659155555,"position":19,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/691ae842f75037c32a0fcd7380b1d02b215cfd0e_075943d4-137c-4ee7-b99f-69894a83876e.webp?v=1762825644"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/691ae842f75037c32a0fcd7380b1d02b215cfd0e_075943d4-137c-4ee7-b99f-69894a83876e.webp?v=1762825644","width":2000},{"alt":null,"id":26351659319395,"position":20,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1745105f0e4d5c7e140c88c6d13b533e89fdf443_a39a84cb-b872-477f-bbf0-c5d3236fb494.webp?v=1762825645"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1745105f0e4d5c7e140c88c6d13b533e89fdf443_a39a84cb-b872-477f-bbf0-c5d3236fb494.webp?v=1762825645","width":2000},{"alt":null,"id":26351659450467,"position":21,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/63f319d20e4438a7764ccdc9511f449f8121b54b_13087894-8cb7-40a5-aa60-398cbab40e91.webp?v=1762825645"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/63f319d20e4438a7764ccdc9511f449f8121b54b_13087894-8cb7-40a5-aa60-398cbab40e91.webp?v=1762825645","width":2000},{"alt":null,"id":26351659712611,"position":22,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/554ddad8afa54bdeceb49c6af6b8377f8b76b122_f8761530-912f-4b58-94f2-6b2b2dc5e31c.webp?v=1762825646"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/554ddad8afa54bdeceb49c6af6b8377f8b76b122_f8761530-912f-4b58-94f2-6b2b2dc5e31c.webp?v=1762825646","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null};
$isMerge = null;
$variants = [{"id":43827506413667,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"MPB0118424-HD65","requires_shipping":true,"taxable":true,"featured_image":{"id":34786202615907,"product_id":7919946989667,"position":22,"created_at":"2025-11-11T09:47:24+08:00","updated_at":"2025-11-11T09:47:26+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/554ddad8afa54bdeceb49c6af6b8377f8b76b122_f8761530-912f-4b58-94f2-6b2b2dc5e31c.webp?v=1762825646","variant_ids":[43827506413667]},"available":true,"name":"iPhone 12 mini Mod NX (MagSafe 兼容) Incrediville 怪奇事物所 所長的聖地巡禮 - Black","public_title":"Black","options":["Black"],"price":110000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"MPB0118424-HD65","featured_media":{"alt":null,"id":26351659712611,"position":22,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/554ddad8afa54bdeceb49c6af6b8377f8b76b122_f8761530-912f-4b58-94f2-6b2b2dc5e31c.webp?v=1762825646"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}];
$defaultVariant = {"id":43827506413667,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"MPB0118424-HD65","requires_shipping":true,"taxable":true,"featured_image":{"id":34786202615907,"product_id":7919946989667,"position":22,"created_at":"2025-11-11T09:47:24+08:00","updated_at":"2025-11-11T09:47:26+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/554ddad8afa54bdeceb49c6af6b8377f8b76b122_f8761530-912f-4b58-94f2-6b2b2dc5e31c.webp?v=1762825646","variant_ids":[43827506413667]},"available":true,"name":"iPhone 12 mini Mod NX (MagSafe 兼容) Incrediville 怪奇事物所 所長的聖地巡禮 - Black","public_title":"Black","options":["Black"],"price":110000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"MPB0118424-HD65","featured_media":{"alt":null,"id":26351659712611,"position":22,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/554ddad8afa54bdeceb49c6af6b8377f8b76b122_f8761530-912f-4b58-94f2-6b2b2dc5e31c.webp?v=1762825646"}},"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: "停產"
}