Home
›
iPhone 12 mini Mod NX (MagSafe 兼容) Incrediville 怪奇事物所 所長的星際迷航
$product = {"id":7920218177635,"title":"iPhone 12 mini Mod NX (MagSafe 兼容) Incrediville 怪奇事物所 所長的星際迷航","handle":"iphone-12-mini-mod-nx-magsafe-hd71","description":null,"published_at":"2025-11-13T09:53:39+08:00","created_at":"2025-11-10T10:13:17+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":43827956383843,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"MPB0118424-HD71","requires_shipping":true,"taxable":true,"featured_image":{"id":34786229289059,"product_id":7920218177635,"position":21,"created_at":"2025-11-11T09:48:38+08:00","updated_at":"2025-11-11T09:48:40+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4bcc5bf4a3589cb42721637b8ac835dbe43e28eb_fa080735-51f5-457e-8a49-3d4e62da51df.webp?v=1762825720","variant_ids":[43827956383843]},"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-HD71","featured_media":{"alt":null,"id":26351686287459,"position":21,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4bcc5bf4a3589cb42721637b8ac835dbe43e28eb_fa080735-51f5-457e-8a49-3d4e62da51df.webp?v=1762825720"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6c9bf3101a7c6f550c5688a67cb7f1b43ff4f2fc.webp?v=1762740804","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4bcc5bf4a3589cb42721637b8ac835dbe43e28eb.webp?v=1762740805","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6d6780a69405891fc8795319e3cf3298cecda862.webp?v=1762740805","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c008df6023be861ccfdcf08ee54caf55512f352b.webp?v=1762740806","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/474051a326bf70ce569adf56b72b85a16d537509.webp?v=1762740807","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/025be803d6be10c5a0f1d03865da1d8c27e9b139.webp?v=1762740808","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/84d888f1c42b14b257fcc656c0b8b67a8fb4cb33.webp?v=1762740809","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f5a3f59857da0dae5e4e45cf5edc470bb169fe47.webp?v=1762740809","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/950cebff1f4d5a442a001946e0dcd9de3991ffc3.webp?v=1762740810","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/08a4713a28afb14d3f1094350cb5e821454fe97a.webp?v=1762740811","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a15a179bb68e993d542ed0bcf32deb3567aeaf8e.webp?v=1762740811","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f5a3f59857da0dae5e4e45cf5edc470bb169fe47_b84bfbef-d2d9-4c4c-accc-a68923c0d9e6.webp?v=1762825713","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6d6780a69405891fc8795319e3cf3298cecda862_b2caa317-4fdb-4614-ae04-cfa0b98ab9c5.webp?v=1762825714","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6c9bf3101a7c6f550c5688a67cb7f1b43ff4f2fc_1a6fbc68-87f1-4f6e-8ab3-13c92edd93cf.webp?v=1762825715","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/950cebff1f4d5a442a001946e0dcd9de3991ffc3_9a435186-0a3d-4509-9d67-2624feaf7149.webp?v=1762825716","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/474051a326bf70ce569adf56b72b85a16d537509_5bd239bf-3fba-40f8-a5f9-2f0a535a8423.webp?v=1762825716","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/025be803d6be10c5a0f1d03865da1d8c27e9b139_82e6b1de-77b9-4fcb-9e9f-f6ed0ef24ac5.webp?v=1762825717","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c008df6023be861ccfdcf08ee54caf55512f352b_7729e4fc-7bc8-4593-b5da-dfbab065878c.webp?v=1762825718","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a15a179bb68e993d542ed0bcf32deb3567aeaf8e_0c881ab9-5453-4cb5-9d4d-6b59eab9ee0e.webp?v=1762825718","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/84d888f1c42b14b257fcc656c0b8b67a8fb4cb33_b1bd561f-15ad-4f44-9881-a5112d55a723.webp?v=1762825719","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4bcc5bf4a3589cb42721637b8ac835dbe43e28eb_fa080735-51f5-457e-8a49-3d4e62da51df.webp?v=1762825720","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/08a4713a28afb14d3f1094350cb5e821454fe97a_fa48193b-6e41-4dd0-ba26-95f5ad5e72e8.webp?v=1762825721"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6c9bf3101a7c6f550c5688a67cb7f1b43ff4f2fc.webp?v=1762740804","options":["color"],"media":[{"alt":null,"id":26346455433315,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6c9bf3101a7c6f550c5688a67cb7f1b43ff4f2fc.webp?v=1762740804"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6c9bf3101a7c6f550c5688a67cb7f1b43ff4f2fc.webp?v=1762740804","width":2000},{"alt":null,"id":26346455564387,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4bcc5bf4a3589cb42721637b8ac835dbe43e28eb.webp?v=1762740805"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4bcc5bf4a3589cb42721637b8ac835dbe43e28eb.webp?v=1762740805","width":2000},{"alt":null,"id":26346455629923,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6d6780a69405891fc8795319e3cf3298cecda862.webp?v=1762740805"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6d6780a69405891fc8795319e3cf3298cecda862.webp?v=1762740805","width":2000},{"alt":null,"id":26346455695459,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c008df6023be861ccfdcf08ee54caf55512f352b.webp?v=1762740806"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c008df6023be861ccfdcf08ee54caf55512f352b.webp?v=1762740806","width":2000},{"alt":null,"id":26346455826531,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/474051a326bf70ce569adf56b72b85a16d537509.webp?v=1762740807"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/474051a326bf70ce569adf56b72b85a16d537509.webp?v=1762740807","width":2000},{"alt":null,"id":26346456023139,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/025be803d6be10c5a0f1d03865da1d8c27e9b139.webp?v=1762740808"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/025be803d6be10c5a0f1d03865da1d8c27e9b139.webp?v=1762740808","width":2000},{"alt":null,"id":26346456154211,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/84d888f1c42b14b257fcc656c0b8b67a8fb4cb33.webp?v=1762740809"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/84d888f1c42b14b257fcc656c0b8b67a8fb4cb33.webp?v=1762740809","width":2000},{"alt":null,"id":26346456318051,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f5a3f59857da0dae5e4e45cf5edc470bb169fe47.webp?v=1762740809"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f5a3f59857da0dae5e4e45cf5edc470bb169fe47.webp?v=1762740809","width":2000},{"alt":null,"id":26346456449123,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/950cebff1f4d5a442a001946e0dcd9de3991ffc3.webp?v=1762740810"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/950cebff1f4d5a442a001946e0dcd9de3991ffc3.webp?v=1762740810","width":2000},{"alt":null,"id":26346456580195,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/08a4713a28afb14d3f1094350cb5e821454fe97a.webp?v=1762740811"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/08a4713a28afb14d3f1094350cb5e821454fe97a.webp?v=1762740811","width":2000},{"alt":null,"id":26346456711267,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a15a179bb68e993d542ed0bcf32deb3567aeaf8e.webp?v=1762740811"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a15a179bb68e993d542ed0bcf32deb3567aeaf8e.webp?v=1762740811","width":2000},{"alt":null,"id":26351684124771,"position":12,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f5a3f59857da0dae5e4e45cf5edc470bb169fe47_b84bfbef-d2d9-4c4c-accc-a68923c0d9e6.webp?v=1762825713"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f5a3f59857da0dae5e4e45cf5edc470bb169fe47_b84bfbef-d2d9-4c4c-accc-a68923c0d9e6.webp?v=1762825713","width":2000},{"alt":null,"id":26351684321379,"position":13,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6d6780a69405891fc8795319e3cf3298cecda862_b2caa317-4fdb-4614-ae04-cfa0b98ab9c5.webp?v=1762825714"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6d6780a69405891fc8795319e3cf3298cecda862_b2caa317-4fdb-4614-ae04-cfa0b98ab9c5.webp?v=1762825714","width":2000},{"alt":null,"id":26351684649059,"position":14,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6c9bf3101a7c6f550c5688a67cb7f1b43ff4f2fc_1a6fbc68-87f1-4f6e-8ab3-13c92edd93cf.webp?v=1762825715"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6c9bf3101a7c6f550c5688a67cb7f1b43ff4f2fc_1a6fbc68-87f1-4f6e-8ab3-13c92edd93cf.webp?v=1762825715","width":2000},{"alt":null,"id":26351684976739,"position":15,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/950cebff1f4d5a442a001946e0dcd9de3991ffc3_9a435186-0a3d-4509-9d67-2624feaf7149.webp?v=1762825716"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/950cebff1f4d5a442a001946e0dcd9de3991ffc3_9a435186-0a3d-4509-9d67-2624feaf7149.webp?v=1762825716","width":2000},{"alt":null,"id":26351685271651,"position":16,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/474051a326bf70ce569adf56b72b85a16d537509_5bd239bf-3fba-40f8-a5f9-2f0a535a8423.webp?v=1762825716"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/474051a326bf70ce569adf56b72b85a16d537509_5bd239bf-3fba-40f8-a5f9-2f0a535a8423.webp?v=1762825716","width":2000},{"alt":null,"id":26351685435491,"position":17,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/025be803d6be10c5a0f1d03865da1d8c27e9b139_82e6b1de-77b9-4fcb-9e9f-f6ed0ef24ac5.webp?v=1762825717"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/025be803d6be10c5a0f1d03865da1d8c27e9b139_82e6b1de-77b9-4fcb-9e9f-f6ed0ef24ac5.webp?v=1762825717","width":2000},{"alt":null,"id":26351685697635,"position":18,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c008df6023be861ccfdcf08ee54caf55512f352b_7729e4fc-7bc8-4593-b5da-dfbab065878c.webp?v=1762825718"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c008df6023be861ccfdcf08ee54caf55512f352b_7729e4fc-7bc8-4593-b5da-dfbab065878c.webp?v=1762825718","width":2000},{"alt":null,"id":26351685927011,"position":19,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a15a179bb68e993d542ed0bcf32deb3567aeaf8e_0c881ab9-5453-4cb5-9d4d-6b59eab9ee0e.webp?v=1762825718"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a15a179bb68e993d542ed0bcf32deb3567aeaf8e_0c881ab9-5453-4cb5-9d4d-6b59eab9ee0e.webp?v=1762825718","width":2000},{"alt":null,"id":26351686123619,"position":20,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/84d888f1c42b14b257fcc656c0b8b67a8fb4cb33_b1bd561f-15ad-4f44-9881-a5112d55a723.webp?v=1762825719"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/84d888f1c42b14b257fcc656c0b8b67a8fb4cb33_b1bd561f-15ad-4f44-9881-a5112d55a723.webp?v=1762825719","width":2000},{"alt":null,"id":26351686287459,"position":21,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4bcc5bf4a3589cb42721637b8ac835dbe43e28eb_fa080735-51f5-457e-8a49-3d4e62da51df.webp?v=1762825720"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4bcc5bf4a3589cb42721637b8ac835dbe43e28eb_fa080735-51f5-457e-8a49-3d4e62da51df.webp?v=1762825720","width":2000},{"alt":null,"id":26351686418531,"position":22,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/08a4713a28afb14d3f1094350cb5e821454fe97a_fa48193b-6e41-4dd0-ba26-95f5ad5e72e8.webp?v=1762825721"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/08a4713a28afb14d3f1094350cb5e821454fe97a_fa48193b-6e41-4dd0-ba26-95f5ad5e72e8.webp?v=1762825721","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null};
$isMerge = null;
$variants = [{"id":43827956383843,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"MPB0118424-HD71","requires_shipping":true,"taxable":true,"featured_image":{"id":34786229289059,"product_id":7920218177635,"position":21,"created_at":"2025-11-11T09:48:38+08:00","updated_at":"2025-11-11T09:48:40+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4bcc5bf4a3589cb42721637b8ac835dbe43e28eb_fa080735-51f5-457e-8a49-3d4e62da51df.webp?v=1762825720","variant_ids":[43827956383843]},"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-HD71","featured_media":{"alt":null,"id":26351686287459,"position":21,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4bcc5bf4a3589cb42721637b8ac835dbe43e28eb_fa080735-51f5-457e-8a49-3d4e62da51df.webp?v=1762825720"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}];
$defaultVariant = {"id":43827956383843,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"MPB0118424-HD71","requires_shipping":true,"taxable":true,"featured_image":{"id":34786229289059,"product_id":7920218177635,"position":21,"created_at":"2025-11-11T09:48:38+08:00","updated_at":"2025-11-11T09:48:40+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4bcc5bf4a3589cb42721637b8ac835dbe43e28eb_fa080735-51f5-457e-8a49-3d4e62da51df.webp?v=1762825720","variant_ids":[43827956383843]},"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-HD71","featured_media":{"alt":null,"id":26351686287459,"position":21,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4bcc5bf4a3589cb42721637b8ac835dbe43e28eb_fa080735-51f5-457e-8a49-3d4e62da51df.webp?v=1762825720"}},"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: "停產"
}