Home
›
iPhone 15 Plus SolidX (MagSafe 兼容) 大人の図鑑 藝術編_星月夜
$product = {"id":7981856030819,"title":"iPhone 15 Plus SolidX (MagSafe 兼容) 大人の図鑑 藝術編_星月夜","handle":"iphone-15-plus-solidx-magsafe-lnw66","description":null,"published_at":"2026-03-18T16:53:38+08:00","created_at":"2026-03-18T15:14:30+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"","tags":["10%","20%","30%","40%","50%","brand-Apple","designer","designer-kamio","device-iPhone 15 Plus","merge","reseller-kamio"],"price":145000,"price_min":145000,"price_max":145000,"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":44067207479395,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"MNS0129652-LNW66","requires_shipping":true,"taxable":true,"featured_image":{"id":36146462916707,"product_id":7981856030819,"position":10,"created_at":"2026-07-01T15:57:09+08:00","updated_at":"2026-07-01T15:57:11+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f9b5e671e3a3555bc25f2d66d97bcaef55745344_89e45330-67c1-4872-80d9-346c0f248146.webp?v=1782892631","variant_ids":[44067207479395]},"available":true,"name":"iPhone 15 Plus SolidX (MagSafe 兼容) 大人の図鑑 藝術編_星月夜 - Black","public_title":"Black","options":["Black"],"price":145000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"MNS0129652-LNW66","featured_media":{"alt":null,"id":27651349053539,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f9b5e671e3a3555bc25f2d66d97bcaef55745344_89e45330-67c1-4872-80d9-346c0f248146.webp?v=1782892631"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":44067214098531,"title":"Ocean Blue","option1":"Ocean Blue","option2":null,"option3":null,"sku":"MNS012960A-LNW66","requires_shipping":true,"taxable":true,"featured_image":{"id":36146463047779,"product_id":7981856030819,"position":11,"created_at":"2026-07-01T15:57:10+08:00","updated_at":"2026-07-01T15:57:12+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4fb38331c2a6b88f6874d418e5beb880e84fa918_d726fdc2-3ac9-4a1c-b395-87512d3e17f3.webp?v=1782892632","variant_ids":[44067214098531]},"available":true,"name":"iPhone 15 Plus SolidX (MagSafe 兼容) 大人の図鑑 藝術編_星月夜 - Ocean Blue","public_title":"Ocean Blue","options":["Ocean Blue"],"price":145000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"MNS012960A-LNW66","featured_media":{"alt":null,"id":27651349151843,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4fb38331c2a6b88f6874d418e5beb880e84fa918_d726fdc2-3ac9-4a1c-b395-87512d3e17f3.webp?v=1782892632"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":44067214655587,"title":"Glacier Blue","option1":"Glacier Blue","option2":null,"option3":null,"sku":"MNS01296Z7-LNW66","requires_shipping":true,"taxable":true,"featured_image":{"id":36146462752867,"product_id":7981856030819,"position":9,"created_at":"2026-07-01T15:57:09+08:00","updated_at":"2026-07-01T15:57:11+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/87c7207c3ec7fd48d000777e233879c04aa4927c_c927dbd0-9a2a-4cfb-afa5-645bae6fa638.webp?v=1782892631","variant_ids":[44067214655587]},"available":true,"name":"iPhone 15 Plus SolidX (MagSafe 兼容) 大人の図鑑 藝術編_星月夜 - Glacier Blue","public_title":"Glacier Blue","options":["Glacier Blue"],"price":145000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"MNS01296Z7-LNW66","featured_media":{"alt":null,"id":27651348889699,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/87c7207c3ec7fd48d000777e233879c04aa4927c_c927dbd0-9a2a-4cfb-afa5-645bae6fa638.webp?v=1782892631"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":44067215638627,"title":"Ash Grey","option1":"Ash Grey","option2":null,"option3":null,"sku":"MNS01296O8-LNW66","requires_shipping":true,"taxable":true,"featured_image":{"id":36146462556259,"product_id":7981856030819,"position":8,"created_at":"2026-07-01T15:57:08+08:00","updated_at":"2026-07-01T15:57:10+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d8fd4198def65c609852b90441cea1cfabe340ed_21dca1e6-b2b7-4a10-9cdd-126ac146fe2d.webp?v=1782892630","variant_ids":[44067215638627]},"available":true,"name":"iPhone 15 Plus SolidX (MagSafe 兼容) 大人の図鑑 藝術編_星月夜 - Ash Grey","public_title":"Ash Grey","options":["Ash Grey"],"price":145000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"MNS01296O8-LNW66","featured_media":{"alt":null,"id":27651348693091,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d8fd4198def65c609852b90441cea1cfabe340ed_21dca1e6-b2b7-4a10-9cdd-126ac146fe2d.webp?v=1782892630"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/93dd9448cbb237586bc552569817ed6efac24975.webp?v=1773818095","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d1e2d824c438cc9dd2fd37976e1ec325a0451c1d.webp?v=1773818095","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ca8102233fe4a74ab528b45e088044cb5830852c.webp?v=1773818096","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d8fd4198def65c609852b90441cea1cfabe340ed.webp?v=1773818097","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f9b5e671e3a3555bc25f2d66d97bcaef55745344.webp?v=1773818097","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/87c7207c3ec7fd48d000777e233879c04aa4927c.webp?v=1773818097","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4fb38331c2a6b88f6874d418e5beb880e84fa918.webp?v=1773818098","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d8fd4198def65c609852b90441cea1cfabe340ed_21dca1e6-b2b7-4a10-9cdd-126ac146fe2d.webp?v=1782892630","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/87c7207c3ec7fd48d000777e233879c04aa4927c_c927dbd0-9a2a-4cfb-afa5-645bae6fa638.webp?v=1782892631","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f9b5e671e3a3555bc25f2d66d97bcaef55745344_89e45330-67c1-4872-80d9-346c0f248146.webp?v=1782892631","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4fb38331c2a6b88f6874d418e5beb880e84fa918_d726fdc2-3ac9-4a1c-b395-87512d3e17f3.webp?v=1782892632"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/93dd9448cbb237586bc552569817ed6efac24975.webp?v=1773818095","options":["color"],"media":[{"alt":null,"id":27035179548771,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/93dd9448cbb237586bc552569817ed6efac24975.webp?v=1773818095"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/93dd9448cbb237586bc552569817ed6efac24975.webp?v=1773818095","width":2000},{"alt":null,"id":27035179941987,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d1e2d824c438cc9dd2fd37976e1ec325a0451c1d.webp?v=1773818095"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d1e2d824c438cc9dd2fd37976e1ec325a0451c1d.webp?v=1773818095","width":2000},{"alt":null,"id":27035180400739,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ca8102233fe4a74ab528b45e088044cb5830852c.webp?v=1773818096"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ca8102233fe4a74ab528b45e088044cb5830852c.webp?v=1773818096","width":2000},{"alt":null,"id":27035180826723,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d8fd4198def65c609852b90441cea1cfabe340ed.webp?v=1773818097"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d8fd4198def65c609852b90441cea1cfabe340ed.webp?v=1773818097","width":2000},{"alt":null,"id":27035181252707,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f9b5e671e3a3555bc25f2d66d97bcaef55745344.webp?v=1773818097"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f9b5e671e3a3555bc25f2d66d97bcaef55745344.webp?v=1773818097","width":2000},{"alt":null,"id":27035181678691,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/87c7207c3ec7fd48d000777e233879c04aa4927c.webp?v=1773818097"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/87c7207c3ec7fd48d000777e233879c04aa4927c.webp?v=1773818097","width":2000},{"alt":null,"id":27035182137443,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4fb38331c2a6b88f6874d418e5beb880e84fa918.webp?v=1773818098"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4fb38331c2a6b88f6874d418e5beb880e84fa918.webp?v=1773818098","width":2000},{"alt":null,"id":27651348693091,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d8fd4198def65c609852b90441cea1cfabe340ed_21dca1e6-b2b7-4a10-9cdd-126ac146fe2d.webp?v=1782892630"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d8fd4198def65c609852b90441cea1cfabe340ed_21dca1e6-b2b7-4a10-9cdd-126ac146fe2d.webp?v=1782892630","width":2000},{"alt":null,"id":27651348889699,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/87c7207c3ec7fd48d000777e233879c04aa4927c_c927dbd0-9a2a-4cfb-afa5-645bae6fa638.webp?v=1782892631"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/87c7207c3ec7fd48d000777e233879c04aa4927c_c927dbd0-9a2a-4cfb-afa5-645bae6fa638.webp?v=1782892631","width":2000},{"alt":null,"id":27651349053539,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f9b5e671e3a3555bc25f2d66d97bcaef55745344_89e45330-67c1-4872-80d9-346c0f248146.webp?v=1782892631"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f9b5e671e3a3555bc25f2d66d97bcaef55745344_89e45330-67c1-4872-80d9-346c0f248146.webp?v=1782892631","width":2000},{"alt":null,"id":27651349151843,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4fb38331c2a6b88f6874d418e5beb880e84fa918_d726fdc2-3ac9-4a1c-b395-87512d3e17f3.webp?v=1782892632"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4fb38331c2a6b88f6874d418e5beb880e84fa918_d726fdc2-3ac9-4a1c-b395-87512d3e17f3.webp?v=1782892632","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null};
$isMerge = null;
$variants = [{"id":44067207479395,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"MNS0129652-LNW66","requires_shipping":true,"taxable":true,"featured_image":{"id":36146462916707,"product_id":7981856030819,"position":10,"created_at":"2026-07-01T15:57:09+08:00","updated_at":"2026-07-01T15:57:11+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f9b5e671e3a3555bc25f2d66d97bcaef55745344_89e45330-67c1-4872-80d9-346c0f248146.webp?v=1782892631","variant_ids":[44067207479395]},"available":true,"name":"iPhone 15 Plus SolidX (MagSafe 兼容) 大人の図鑑 藝術編_星月夜 - Black","public_title":"Black","options":["Black"],"price":145000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"MNS0129652-LNW66","featured_media":{"alt":null,"id":27651349053539,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f9b5e671e3a3555bc25f2d66d97bcaef55745344_89e45330-67c1-4872-80d9-346c0f248146.webp?v=1782892631"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":44067214098531,"title":"Ocean Blue","option1":"Ocean Blue","option2":null,"option3":null,"sku":"MNS012960A-LNW66","requires_shipping":true,"taxable":true,"featured_image":{"id":36146463047779,"product_id":7981856030819,"position":11,"created_at":"2026-07-01T15:57:10+08:00","updated_at":"2026-07-01T15:57:12+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4fb38331c2a6b88f6874d418e5beb880e84fa918_d726fdc2-3ac9-4a1c-b395-87512d3e17f3.webp?v=1782892632","variant_ids":[44067214098531]},"available":true,"name":"iPhone 15 Plus SolidX (MagSafe 兼容) 大人の図鑑 藝術編_星月夜 - Ocean Blue","public_title":"Ocean Blue","options":["Ocean Blue"],"price":145000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"MNS012960A-LNW66","featured_media":{"alt":null,"id":27651349151843,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4fb38331c2a6b88f6874d418e5beb880e84fa918_d726fdc2-3ac9-4a1c-b395-87512d3e17f3.webp?v=1782892632"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":44067214655587,"title":"Glacier Blue","option1":"Glacier Blue","option2":null,"option3":null,"sku":"MNS01296Z7-LNW66","requires_shipping":true,"taxable":true,"featured_image":{"id":36146462752867,"product_id":7981856030819,"position":9,"created_at":"2026-07-01T15:57:09+08:00","updated_at":"2026-07-01T15:57:11+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/87c7207c3ec7fd48d000777e233879c04aa4927c_c927dbd0-9a2a-4cfb-afa5-645bae6fa638.webp?v=1782892631","variant_ids":[44067214655587]},"available":true,"name":"iPhone 15 Plus SolidX (MagSafe 兼容) 大人の図鑑 藝術編_星月夜 - Glacier Blue","public_title":"Glacier Blue","options":["Glacier Blue"],"price":145000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"MNS01296Z7-LNW66","featured_media":{"alt":null,"id":27651348889699,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/87c7207c3ec7fd48d000777e233879c04aa4927c_c927dbd0-9a2a-4cfb-afa5-645bae6fa638.webp?v=1782892631"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":44067215638627,"title":"Ash Grey","option1":"Ash Grey","option2":null,"option3":null,"sku":"MNS01296O8-LNW66","requires_shipping":true,"taxable":true,"featured_image":{"id":36146462556259,"product_id":7981856030819,"position":8,"created_at":"2026-07-01T15:57:08+08:00","updated_at":"2026-07-01T15:57:10+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d8fd4198def65c609852b90441cea1cfabe340ed_21dca1e6-b2b7-4a10-9cdd-126ac146fe2d.webp?v=1782892630","variant_ids":[44067215638627]},"available":true,"name":"iPhone 15 Plus SolidX (MagSafe 兼容) 大人の図鑑 藝術編_星月夜 - Ash Grey","public_title":"Ash Grey","options":["Ash Grey"],"price":145000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"MNS01296O8-LNW66","featured_media":{"alt":null,"id":27651348693091,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d8fd4198def65c609852b90441cea1cfabe340ed_21dca1e6-b2b7-4a10-9cdd-126ac146fe2d.webp?v=1782892630"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}];
$defaultVariant = {"id":44067207479395,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"MNS0129652-LNW66","requires_shipping":true,"taxable":true,"featured_image":{"id":36146462916707,"product_id":7981856030819,"position":10,"created_at":"2026-07-01T15:57:09+08:00","updated_at":"2026-07-01T15:57:11+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f9b5e671e3a3555bc25f2d66d97bcaef55745344_89e45330-67c1-4872-80d9-346c0f248146.webp?v=1782892631","variant_ids":[44067207479395]},"available":true,"name":"iPhone 15 Plus SolidX (MagSafe 兼容) 大人の図鑑 藝術編_星月夜 - Black","public_title":"Black","options":["Black"],"price":145000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"MNS0129652-LNW66","featured_media":{"alt":null,"id":27651349053539,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f9b5e671e3a3555bc25f2d66d97bcaef55745344_89e45330-67c1-4872-80d9-346c0f248146.webp?v=1782892631"}},"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: "停產"
}