Home
›
iPhone 12 mini Mod NX (MagSafe 兼容) Incrediville 怪奇事物所 所長的瑜珈時間
$product = {"id":7919984574563,"title":"iPhone 12 mini Mod NX (MagSafe 兼容) Incrediville 怪奇事物所 所長的瑜珈時間","handle":"iphone-12-mini-mod-nx-magsafe-hd66","description":null,"published_at":"2025-11-13T10:03:11+08:00","created_at":"2025-11-10T09:57:55+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":43827601506403,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"MPB0118424-HD66","requires_shipping":true,"taxable":true,"featured_image":{"id":34785903018083,"product_id":7919984574563,"position":21,"created_at":"2025-11-11T09:33:26+08:00","updated_at":"2025-11-11T09:33:28+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/17a829f0ac73d27089c53094439a9c2eba37a664_79685461-d582-4d02-b64f-afd090bedba0.webp?v=1762824808","variant_ids":[43827601506403]},"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-HD66","featured_media":{"alt":null,"id":26351360180323,"position":21,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/17a829f0ac73d27089c53094439a9c2eba37a664_79685461-d582-4d02-b64f-afd090bedba0.webp?v=1762824808"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/753004a04d2f0cb51dde5cbdea156a9815b90aa7.webp?v=1762739881","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e6fde1a51a79cf79a7144204bf83ef1ba57d4a05.webp?v=1762739882","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/58d3ae693d4c45f36c725928d725fa80bb9916c5.webp?v=1762739883","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ef1db53c6c7f6d632ab88a43279eba5cdac28e22.webp?v=1762739883","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c4454f05dced9e3795654a9cc54cfc004b983e53.webp?v=1762739884","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/83b2b27b8011f11e6beb2cfbf1bf36e9d0413d7f.webp?v=1762739885","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/608dfb159f408b6a0a1b099c74bd893803d716c0.webp?v=1762739885","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/38f7376bfecd2b6d1450941861a1970b1f0492a2.webp?v=1762739886","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b6108e294ae70945b3b5154f6a67024992027fb2.webp?v=1762739887","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2f849b6399c53070e4608e8442226fc1e707a561.webp?v=1762739888","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/17a829f0ac73d27089c53094439a9c2eba37a664.webp?v=1762739888","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b6108e294ae70945b3b5154f6a67024992027fb2_8c320070-bcd1-420f-b37b-540e08caf0d3.webp?v=1762824802","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/608dfb159f408b6a0a1b099c74bd893803d716c0_ddd418f2-4d72-4017-bde5-7becc7fe4f2b.webp?v=1762824803","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/58d3ae693d4c45f36c725928d725fa80bb9916c5_92da5ad6-2086-4380-b414-bb3958194dd0.webp?v=1762824803","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/753004a04d2f0cb51dde5cbdea156a9815b90aa7_ae39e4b6-f83b-420f-b60b-bf1abd232df5.webp?v=1762824804","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e6fde1a51a79cf79a7144204bf83ef1ba57d4a05_31ddeb63-d638-42d4-802e-1d355768bd90.webp?v=1762824805","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2f849b6399c53070e4608e8442226fc1e707a561_3e48e01b-568d-407a-99d5-3944c25de101.webp?v=1762824805","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c4454f05dced9e3795654a9cc54cfc004b983e53_92f82544-f7d0-401a-b9c0-24aea8290636.webp?v=1762824806","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/38f7376bfecd2b6d1450941861a1970b1f0492a2_4207cd16-bf02-410f-9963-14549923e001.webp?v=1762824807","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ef1db53c6c7f6d632ab88a43279eba5cdac28e22_f6d3bafa-e0b5-4cfd-9480-ea24226a5660.webp?v=1762824807","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/17a829f0ac73d27089c53094439a9c2eba37a664_79685461-d582-4d02-b64f-afd090bedba0.webp?v=1762824808","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/83b2b27b8011f11e6beb2cfbf1bf36e9d0413d7f_d2cb32b4-8b97-4958-9c6e-1cfa30a945e6.webp?v=1762824809"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/753004a04d2f0cb51dde5cbdea156a9815b90aa7.webp?v=1762739881","options":["color"],"media":[{"alt":null,"id":26345504604259,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/753004a04d2f0cb51dde5cbdea156a9815b90aa7.webp?v=1762739881"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/753004a04d2f0cb51dde5cbdea156a9815b90aa7.webp?v=1762739881","width":2000},{"alt":null,"id":26345504735331,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e6fde1a51a79cf79a7144204bf83ef1ba57d4a05.webp?v=1762739882"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e6fde1a51a79cf79a7144204bf83ef1ba57d4a05.webp?v=1762739882","width":2000},{"alt":null,"id":26345504833635,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/58d3ae693d4c45f36c725928d725fa80bb9916c5.webp?v=1762739883"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/58d3ae693d4c45f36c725928d725fa80bb9916c5.webp?v=1762739883","width":2000},{"alt":null,"id":26345504899171,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ef1db53c6c7f6d632ab88a43279eba5cdac28e22.webp?v=1762739883"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ef1db53c6c7f6d632ab88a43279eba5cdac28e22.webp?v=1762739883","width":2000},{"alt":null,"id":26345505030243,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c4454f05dced9e3795654a9cc54cfc004b983e53.webp?v=1762739884"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c4454f05dced9e3795654a9cc54cfc004b983e53.webp?v=1762739884","width":2000},{"alt":null,"id":26345505128547,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/83b2b27b8011f11e6beb2cfbf1bf36e9d0413d7f.webp?v=1762739885"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/83b2b27b8011f11e6beb2cfbf1bf36e9d0413d7f.webp?v=1762739885","width":2000},{"alt":null,"id":26345505226851,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/608dfb159f408b6a0a1b099c74bd893803d716c0.webp?v=1762739885"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/608dfb159f408b6a0a1b099c74bd893803d716c0.webp?v=1762739885","width":2000},{"alt":null,"id":26345505325155,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/38f7376bfecd2b6d1450941861a1970b1f0492a2.webp?v=1762739886"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/38f7376bfecd2b6d1450941861a1970b1f0492a2.webp?v=1762739886","width":2000},{"alt":null,"id":26345506340963,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b6108e294ae70945b3b5154f6a67024992027fb2.webp?v=1762739887"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b6108e294ae70945b3b5154f6a67024992027fb2.webp?v=1762739887","width":2000},{"alt":null,"id":26345507225699,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2f849b6399c53070e4608e8442226fc1e707a561.webp?v=1762739888"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2f849b6399c53070e4608e8442226fc1e707a561.webp?v=1762739888","width":2000},{"alt":null,"id":26345508208739,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/17a829f0ac73d27089c53094439a9c2eba37a664.webp?v=1762739888"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/17a829f0ac73d27089c53094439a9c2eba37a664.webp?v=1762739888","width":2000},{"alt":null,"id":26351358378083,"position":12,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b6108e294ae70945b3b5154f6a67024992027fb2_8c320070-bcd1-420f-b37b-540e08caf0d3.webp?v=1762824802"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b6108e294ae70945b3b5154f6a67024992027fb2_8c320070-bcd1-420f-b37b-540e08caf0d3.webp?v=1762824802","width":2000},{"alt":null,"id":26351358705763,"position":13,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/608dfb159f408b6a0a1b099c74bd893803d716c0_ddd418f2-4d72-4017-bde5-7becc7fe4f2b.webp?v=1762824803"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/608dfb159f408b6a0a1b099c74bd893803d716c0_ddd418f2-4d72-4017-bde5-7becc7fe4f2b.webp?v=1762824803","width":2000},{"alt":null,"id":26351358902371,"position":14,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/58d3ae693d4c45f36c725928d725fa80bb9916c5_92da5ad6-2086-4380-b414-bb3958194dd0.webp?v=1762824803"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/58d3ae693d4c45f36c725928d725fa80bb9916c5_92da5ad6-2086-4380-b414-bb3958194dd0.webp?v=1762824803","width":2000},{"alt":null,"id":26351359033443,"position":15,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/753004a04d2f0cb51dde5cbdea156a9815b90aa7_ae39e4b6-f83b-420f-b60b-bf1abd232df5.webp?v=1762824804"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/753004a04d2f0cb51dde5cbdea156a9815b90aa7_ae39e4b6-f83b-420f-b60b-bf1abd232df5.webp?v=1762824804","width":2000},{"alt":null,"id":26351359164515,"position":16,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e6fde1a51a79cf79a7144204bf83ef1ba57d4a05_31ddeb63-d638-42d4-802e-1d355768bd90.webp?v=1762824805"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e6fde1a51a79cf79a7144204bf83ef1ba57d4a05_31ddeb63-d638-42d4-802e-1d355768bd90.webp?v=1762824805","width":2000},{"alt":null,"id":26351359393891,"position":17,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2f849b6399c53070e4608e8442226fc1e707a561_3e48e01b-568d-407a-99d5-3944c25de101.webp?v=1762824805"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2f849b6399c53070e4608e8442226fc1e707a561_3e48e01b-568d-407a-99d5-3944c25de101.webp?v=1762824805","width":2000},{"alt":null,"id":26351359557731,"position":18,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c4454f05dced9e3795654a9cc54cfc004b983e53_92f82544-f7d0-401a-b9c0-24aea8290636.webp?v=1762824806"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c4454f05dced9e3795654a9cc54cfc004b983e53_92f82544-f7d0-401a-b9c0-24aea8290636.webp?v=1762824806","width":2000},{"alt":null,"id":26351359754339,"position":19,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/38f7376bfecd2b6d1450941861a1970b1f0492a2_4207cd16-bf02-410f-9963-14549923e001.webp?v=1762824807"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/38f7376bfecd2b6d1450941861a1970b1f0492a2_4207cd16-bf02-410f-9963-14549923e001.webp?v=1762824807","width":2000},{"alt":null,"id":26351359950947,"position":20,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ef1db53c6c7f6d632ab88a43279eba5cdac28e22_f6d3bafa-e0b5-4cfd-9480-ea24226a5660.webp?v=1762824807"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ef1db53c6c7f6d632ab88a43279eba5cdac28e22_f6d3bafa-e0b5-4cfd-9480-ea24226a5660.webp?v=1762824807","width":2000},{"alt":null,"id":26351360180323,"position":21,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/17a829f0ac73d27089c53094439a9c2eba37a664_79685461-d582-4d02-b64f-afd090bedba0.webp?v=1762824808"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/17a829f0ac73d27089c53094439a9c2eba37a664_79685461-d582-4d02-b64f-afd090bedba0.webp?v=1762824808","width":2000},{"alt":null,"id":26351360606307,"position":22,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/83b2b27b8011f11e6beb2cfbf1bf36e9d0413d7f_d2cb32b4-8b97-4958-9c6e-1cfa30a945e6.webp?v=1762824809"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/83b2b27b8011f11e6beb2cfbf1bf36e9d0413d7f_d2cb32b4-8b97-4958-9c6e-1cfa30a945e6.webp?v=1762824809","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null};
$isMerge = null;
$variants = [{"id":43827601506403,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"MPB0118424-HD66","requires_shipping":true,"taxable":true,"featured_image":{"id":34785903018083,"product_id":7919984574563,"position":21,"created_at":"2025-11-11T09:33:26+08:00","updated_at":"2025-11-11T09:33:28+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/17a829f0ac73d27089c53094439a9c2eba37a664_79685461-d582-4d02-b64f-afd090bedba0.webp?v=1762824808","variant_ids":[43827601506403]},"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-HD66","featured_media":{"alt":null,"id":26351360180323,"position":21,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/17a829f0ac73d27089c53094439a9c2eba37a664_79685461-d582-4d02-b64f-afd090bedba0.webp?v=1762824808"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}];
$defaultVariant = {"id":43827601506403,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"MPB0118424-HD66","requires_shipping":true,"taxable":true,"featured_image":{"id":34785903018083,"product_id":7919984574563,"position":21,"created_at":"2025-11-11T09:33:26+08:00","updated_at":"2025-11-11T09:33:28+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/17a829f0ac73d27089c53094439a9c2eba37a664_79685461-d582-4d02-b64f-afd090bedba0.webp?v=1762824808","variant_ids":[43827601506403]},"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-HD66","featured_media":{"alt":null,"id":26351360180323,"position":21,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/17a829f0ac73d27089c53094439a9c2eba37a664_79685461-d582-4d02-b64f-afd090bedba0.webp?v=1762824808"}},"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: "停產"
}