$product = {"id":7415949131875,"title":"犀牛盾Mod NX手機殼 - iPhone XS Max - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - 黑武士\u0026風暴兵-剪紙系列","handle":"iphone-xs-max-mod-nx-printable-pb55","description":null,"published_at":"2024-06-11T16:48:42+08:00","created_at":"2024-05-06T12:30:16+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"設計師MOD NX專區-迪士尼-星際大戰 Star Wars","tags":["20%","25%","30%","35%","40%","45%","50%","b2b","brand-Apple","designer","designer-starwars","device-iPhone XS Max","merge","mod-nx-printable","new-modnx-sku","reseller-modnx-star-wars","Top50","type-Mod NX Printable"],"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":41915839053923,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0108624-PB55","requires_shipping":true,"taxable":true,"featured_image":{"id":31490814541923,"product_id":7415949131875,"position":7,"created_at":"2024-05-06T12:30:36+08:00","updated_at":"2024-05-06T12:30:36+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f2a4842670fc1ec49ab3a6abd7282dd35b3d18f9_ef5a341c-c9e4-4745-bcb7-37f172d90f18.webp?v=1714969836","variant_ids":[41915839053923]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone XS Max - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - 黑武士\u0026風暴兵-剪紙系列 - Mod NX-黑色邊框","public_title":"Mod NX-黑色邊框","options":["Mod NX-黑色邊框"],"price":90000,"weight":980,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"NPB0108624-PB55","featured_media":{"alt":null,"id":23896221352035,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f2a4842670fc1ec49ab3a6abd7282dd35b3d18f9_ef5a341c-c9e4-4745-bcb7-37f172d90f18.webp?v=1714969836"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2d557bba652de713cd0e97f20bef5e1aab3359d4_7d292450-3edf-4511-8fb9-3d3349dba981.webp?v=1714969818","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f12bc46e12945326625d901f12fdb78c732d3031_a6aef658-d140-45bb-bb2e-8770df4572aa.webp?v=1714969821","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/adc0d246dd82a4feed87948a038059e44188e395_7ce81be1-61d6-4f85-b365-604dc884187d.webp?v=1714969826","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ac4b9229908fd863699b71728c3c3e146c9d7ca8_cc07fba1-45cb-42dc-93e3-088200cd98f5.webp?v=1714969828","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d904a8f255caa0d5c97857879af55e1281674466_79cac9a7-4084-4af5-8081-173e4c5b4de1.webp?v=1714969831","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1816f03efd766867a456dbed7655aba89620af3e_fba4447e-a8d7-4626-8295-63226d4e4d67.webp?v=1714969834","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f2a4842670fc1ec49ab3a6abd7282dd35b3d18f9_ef5a341c-c9e4-4745-bcb7-37f172d90f18.webp?v=1714969836","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/84a44628e09fb2e05171d51404a0acba4861d4d7_79435ff7-eb0f-46f1-841e-e20ab551e9b8.webp?v=1714969838","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d8c57332d823c5305ce63f1e6f585ffaae80af69_5da3cc60-3313-45f4-9d2d-f7560dc588d4.webp?v=1714969840"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2d557bba652de713cd0e97f20bef5e1aab3359d4_7d292450-3edf-4511-8fb9-3d3349dba981.webp?v=1714969818","options":["color"],"media":[{"alt":null,"id":23896217321571,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2d557bba652de713cd0e97f20bef5e1aab3359d4_7d292450-3edf-4511-8fb9-3d3349dba981.webp?v=1714969818"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2d557bba652de713cd0e97f20bef5e1aab3359d4_7d292450-3edf-4511-8fb9-3d3349dba981.webp?v=1714969818","width":2000},{"alt":null,"id":23896217944163,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f12bc46e12945326625d901f12fdb78c732d3031_a6aef658-d140-45bb-bb2e-8770df4572aa.webp?v=1714969821"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f12bc46e12945326625d901f12fdb78c732d3031_a6aef658-d140-45bb-bb2e-8770df4572aa.webp?v=1714969821","width":2000},{"alt":null,"id":23896218959971,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/adc0d246dd82a4feed87948a038059e44188e395_7ce81be1-61d6-4f85-b365-604dc884187d.webp?v=1714969826"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/adc0d246dd82a4feed87948a038059e44188e395_7ce81be1-61d6-4f85-b365-604dc884187d.webp?v=1714969826","width":2000},{"alt":null,"id":23896219582563,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ac4b9229908fd863699b71728c3c3e146c9d7ca8_cc07fba1-45cb-42dc-93e3-088200cd98f5.webp?v=1714969828"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ac4b9229908fd863699b71728c3c3e146c9d7ca8_cc07fba1-45cb-42dc-93e3-088200cd98f5.webp?v=1714969828","width":2000},{"alt":null,"id":23896220074083,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d904a8f255caa0d5c97857879af55e1281674466_79cac9a7-4084-4af5-8081-173e4c5b4de1.webp?v=1714969831"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d904a8f255caa0d5c97857879af55e1281674466_79cac9a7-4084-4af5-8081-173e4c5b4de1.webp?v=1714969831","width":2000},{"alt":null,"id":23896220762211,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1816f03efd766867a456dbed7655aba89620af3e_fba4447e-a8d7-4626-8295-63226d4e4d67.webp?v=1714969834"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1816f03efd766867a456dbed7655aba89620af3e_fba4447e-a8d7-4626-8295-63226d4e4d67.webp?v=1714969834","width":2000},{"alt":null,"id":23896221352035,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f2a4842670fc1ec49ab3a6abd7282dd35b3d18f9_ef5a341c-c9e4-4745-bcb7-37f172d90f18.webp?v=1714969836"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f2a4842670fc1ec49ab3a6abd7282dd35b3d18f9_ef5a341c-c9e4-4745-bcb7-37f172d90f18.webp?v=1714969836","width":2000},{"alt":null,"id":23896221712483,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/84a44628e09fb2e05171d51404a0acba4861d4d7_79435ff7-eb0f-46f1-841e-e20ab551e9b8.webp?v=1714969838"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/84a44628e09fb2e05171d51404a0acba4861d4d7_79435ff7-eb0f-46f1-841e-e20ab551e9b8.webp?v=1714969838","width":2000},{"alt":null,"id":23896222433379,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d8c57332d823c5305ce63f1e6f585ffaae80af69_5da3cc60-3313-45f4-9d2d-f7560dc588d4.webp?v=1714969840"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d8c57332d823c5305ce63f1e6f585ffaae80af69_5da3cc60-3313-45f4-9d2d-f7560dc588d4.webp?v=1714969840","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41915839053923,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0108624-PB55","requires_shipping":true,"taxable":true,"featured_image":{"id":31490814541923,"product_id":7415949131875,"position":7,"created_at":"2024-05-06T12:30:36+08:00","updated_at":"2024-05-06T12:30:36+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f2a4842670fc1ec49ab3a6abd7282dd35b3d18f9_ef5a341c-c9e4-4745-bcb7-37f172d90f18.webp?v=1714969836","variant_ids":[41915839053923]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone XS Max - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - 黑武士\u0026風暴兵-剪紙系列 - Mod NX-黑色邊框","public_title":"Mod NX-黑色邊框","options":["Mod NX-黑色邊框"],"price":90000,"weight":980,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"NPB0108624-PB55","featured_media":{"alt":null,"id":23896221352035,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f2a4842670fc1ec49ab3a6abd7282dd35b3d18f9_ef5a341c-c9e4-4745-bcb7-37f172d90f18.webp?v=1714969836"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41915839053923,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0108624-PB55","requires_shipping":true,"taxable":true,"featured_image":{"id":31490814541923,"product_id":7415949131875,"position":7,"created_at":"2024-05-06T12:30:36+08:00","updated_at":"2024-05-06T12:30:36+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f2a4842670fc1ec49ab3a6abd7282dd35b3d18f9_ef5a341c-c9e4-4745-bcb7-37f172d90f18.webp?v=1714969836","variant_ids":[41915839053923]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone XS Max - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - 黑武士\u0026風暴兵-剪紙系列 - Mod NX-黑色邊框","public_title":"Mod NX-黑色邊框","options":["Mod NX-黑色邊框"],"price":90000,"weight":980,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"NPB0108624-PB55","featured_media":{"alt":null,"id":23896221352035,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f2a4842670fc1ec49ab3a6abd7282dd35b3d18f9_ef5a341c-c9e4-4745-bcb7-37f172d90f18.webp?v=1714969836"}},"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: "停產" }