$product = {"id":7408492314723,"title":"犀牛盾Mod NX手機殼 - iPhone 12 mini - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - 眾白風暴兵","handle":"iphone-12-mini-mod-nx-printable-pc01","description":null,"published_at":"2024-06-11T16:38:45+08:00","created_at":"2024-05-03T15:37: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 12 mini","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":41886099275875,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118424-PC01","requires_shipping":true,"taxable":true,"featured_image":{"id":31472416882787,"product_id":7408492314723,"position":6,"created_at":"2024-05-03T15:37:30+08:00","updated_at":"2024-05-03T15:37:30+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/aab9a696ecd2b21d66e94c549fe797fbe78357f7_e740be4f-7ec7-4748-9a8a-4f10852ee20d.webp?v=1714721850","variant_ids":[41886099275875]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 mini - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - 眾白風暴兵 - 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":"NPB0118424-PC01","featured_media":{"alt":null,"id":23877333844067,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/aab9a696ecd2b21d66e94c549fe797fbe78357f7_e740be4f-7ec7-4748-9a8a-4f10852ee20d.webp?v=1714721850"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/765a66531ae0ba09605aad7a1bd19575f1a544dc_13ae1db5-f45e-4a7f-9a98-432d59831604.webp?v=1714721838","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d909561dea79cca369f44cdc1358b67928c2adc3_f4b16b45-751b-437c-886f-82e0d51c0d6d.webp?v=1714721841","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0d681737d2f08f3b2fa2412c6cccd09e2d4d6194_d7e9a43e-d21f-4738-ac37-cf796906976a.webp?v=1714721843","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4b575220a106dc1aaf7008cd332fb93af276f14b_d7f3946c-5fea-4023-8be5-08cc4f92fc33.webp?v=1714721845","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/eda205b2b9ac930601881c6a6aa5825b33f221f4_e8468be9-acef-49f1-8d24-f16be4c48e0d.webp?v=1714721848","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/aab9a696ecd2b21d66e94c549fe797fbe78357f7_e740be4f-7ec7-4748-9a8a-4f10852ee20d.webp?v=1714721850","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d1fd9cf1b8d2ebec776bd374e0f0e543bc4f6089_c057e26f-6145-49fc-9593-cf6044e29c14.webp?v=1714721853","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b21b3d3905977360ef45d3e8866a3db059debfd8_fd41f62b-f622-463f-8658-652250168597.webp?v=1714721855","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c2fdbae66faeb75b2707a8b879aae63346b282bf_87e8b42e-fc93-4588-9b00-061a77953459.webp?v=1714721857","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fcf2d91aa8ed5f05bb9b0437c93a1773ec0f7365_14074656-9b81-4f33-a992-c8302f491f4e.webp?v=1714721860","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e910cc781bda2bdd95621e8d8e349a3281151953_b692599d-2f97-44ea-9466-ed10a574a5bd.webp?v=1714721862"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/765a66531ae0ba09605aad7a1bd19575f1a544dc_13ae1db5-f45e-4a7f-9a98-432d59831604.webp?v=1714721838","options":["color"],"media":[{"alt":null,"id":23877331189859,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/765a66531ae0ba09605aad7a1bd19575f1a544dc_13ae1db5-f45e-4a7f-9a98-432d59831604.webp?v=1714721838"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/765a66531ae0ba09605aad7a1bd19575f1a544dc_13ae1db5-f45e-4a7f-9a98-432d59831604.webp?v=1714721838","width":2000},{"alt":null,"id":23877331943523,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d909561dea79cca369f44cdc1358b67928c2adc3_f4b16b45-751b-437c-886f-82e0d51c0d6d.webp?v=1714721841"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d909561dea79cca369f44cdc1358b67928c2adc3_f4b16b45-751b-437c-886f-82e0d51c0d6d.webp?v=1714721841","width":2000},{"alt":null,"id":23877332303971,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0d681737d2f08f3b2fa2412c6cccd09e2d4d6194_d7e9a43e-d21f-4738-ac37-cf796906976a.webp?v=1714721843"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0d681737d2f08f3b2fa2412c6cccd09e2d4d6194_d7e9a43e-d21f-4738-ac37-cf796906976a.webp?v=1714721843","width":2000},{"alt":null,"id":23877332926563,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4b575220a106dc1aaf7008cd332fb93af276f14b_d7f3946c-5fea-4023-8be5-08cc4f92fc33.webp?v=1714721845"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4b575220a106dc1aaf7008cd332fb93af276f14b_d7f3946c-5fea-4023-8be5-08cc4f92fc33.webp?v=1714721845","width":2000},{"alt":null,"id":23877333287011,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/eda205b2b9ac930601881c6a6aa5825b33f221f4_e8468be9-acef-49f1-8d24-f16be4c48e0d.webp?v=1714721848"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/eda205b2b9ac930601881c6a6aa5825b33f221f4_e8468be9-acef-49f1-8d24-f16be4c48e0d.webp?v=1714721848","width":2000},{"alt":null,"id":23877333844067,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/aab9a696ecd2b21d66e94c549fe797fbe78357f7_e740be4f-7ec7-4748-9a8a-4f10852ee20d.webp?v=1714721850"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/aab9a696ecd2b21d66e94c549fe797fbe78357f7_e740be4f-7ec7-4748-9a8a-4f10852ee20d.webp?v=1714721850","width":2000},{"alt":null,"id":23877334302819,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d1fd9cf1b8d2ebec776bd374e0f0e543bc4f6089_c057e26f-6145-49fc-9593-cf6044e29c14.webp?v=1714721853"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d1fd9cf1b8d2ebec776bd374e0f0e543bc4f6089_c057e26f-6145-49fc-9593-cf6044e29c14.webp?v=1714721853","width":2000},{"alt":null,"id":23877335056483,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b21b3d3905977360ef45d3e8866a3db059debfd8_fd41f62b-f622-463f-8658-652250168597.webp?v=1714721855"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b21b3d3905977360ef45d3e8866a3db059debfd8_fd41f62b-f622-463f-8658-652250168597.webp?v=1714721855","width":2000},{"alt":null,"id":23877335449699,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c2fdbae66faeb75b2707a8b879aae63346b282bf_87e8b42e-fc93-4588-9b00-061a77953459.webp?v=1714721857"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c2fdbae66faeb75b2707a8b879aae63346b282bf_87e8b42e-fc93-4588-9b00-061a77953459.webp?v=1714721857","width":2000},{"alt":null,"id":23877336105059,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fcf2d91aa8ed5f05bb9b0437c93a1773ec0f7365_14074656-9b81-4f33-a992-c8302f491f4e.webp?v=1714721860"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fcf2d91aa8ed5f05bb9b0437c93a1773ec0f7365_14074656-9b81-4f33-a992-c8302f491f4e.webp?v=1714721860","width":2000},{"alt":null,"id":23877336465507,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e910cc781bda2bdd95621e8d8e349a3281151953_b692599d-2f97-44ea-9466-ed10a574a5bd.webp?v=1714721862"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e910cc781bda2bdd95621e8d8e349a3281151953_b692599d-2f97-44ea-9466-ed10a574a5bd.webp?v=1714721862","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $bumper = null; $variants = [{"id":41886099275875,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118424-PC01","requires_shipping":true,"taxable":true,"featured_image":{"id":31472416882787,"product_id":7408492314723,"position":6,"created_at":"2024-05-03T15:37:30+08:00","updated_at":"2024-05-03T15:37:30+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/aab9a696ecd2b21d66e94c549fe797fbe78357f7_e740be4f-7ec7-4748-9a8a-4f10852ee20d.webp?v=1714721850","variant_ids":[41886099275875]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 mini - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - 眾白風暴兵 - 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":"NPB0118424-PC01","featured_media":{"alt":null,"id":23877333844067,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/aab9a696ecd2b21d66e94c549fe797fbe78357f7_e740be4f-7ec7-4748-9a8a-4f10852ee20d.webp?v=1714721850"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41886099275875,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118424-PC01","requires_shipping":true,"taxable":true,"featured_image":{"id":31472416882787,"product_id":7408492314723,"position":6,"created_at":"2024-05-03T15:37:30+08:00","updated_at":"2024-05-03T15:37:30+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/aab9a696ecd2b21d66e94c549fe797fbe78357f7_e740be4f-7ec7-4748-9a8a-4f10852ee20d.webp?v=1714721850","variant_ids":[41886099275875]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 mini - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - 眾白風暴兵 - 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":"NPB0118424-PC01","featured_media":{"alt":null,"id":23877333844067,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/aab9a696ecd2b21d66e94c549fe797fbe78357f7_e740be4f-7ec7-4748-9a8a-4f10852ee20d.webp?v=1714721850"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}; $device_handle = null var sellingStatus if ($bumper) { $(document).ready(function() { var productImg = $product.images[0] var bumperVariants = $bumper.variants; var bumperColors = new Object(); var currentVariant = ''; var productType = ''; bumperVariants.forEach(variant => { bumperColors[`${variant.title.split(' (')[0].toLowerCase()}`] = variant.featured_image.src; }); if (productType === 'mod-nx-backplate' || productType === 'mod-backplate') { mergeImages( [productImg, bumperColors[currentVariant]], { crossOrigin: 'anonymous' } ).then(mergedImg => { $('.merged-img').attr('src', mergedImg); }); } else { mergeImages( [bumperColors[currentVariant], productImg], { crossOrigin: 'anonymous' } ).then(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: "停產" }