$product = {"id":7415119642723,"title":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - 迪士尼-星際大戰 Star Wars - 星戰Logo黑武士款","handle":"iphone-12-mini-mod-nx-magsafe-printable-pb45","description":null,"published_at":"2024-06-11T17:58:29+08:00","created_at":"2024-05-05T20:26:25+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"設計師MOD NX MagSafe專區迪士尼-星際大戰 Star Wars","tags":["20%","25%","30%","35%","40%","45%","50%","b2b","brand-Apple","designer","designer-starwars","device-iPhone 12 mini","merge","mod-nx-magsafe-printable","new-modnx-sku","reseller-modnx-magsafe-star-wars","Top50","type-Mod NX Printable MagSafe Printable"],"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":41912076173411,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118424-PB45","requires_shipping":true,"taxable":true,"featured_image":{"id":31488206831715,"product_id":7415119642723,"position":1,"created_at":"2024-05-05T20:26:27+08:00","updated_at":"2024-05-05T20:26:27+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f08671e0d078591bd344aeca300c715debc0e1b4_7870abbe-c288-44bf-a120-047e4fec3dba.webp?v=1714911987","variant_ids":[41912076173411]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - 迪士尼-星際大戰 Star Wars - 星戰Logo黑武士款 - Mod NX-黑色邊框","public_title":"Mod NX-黑色邊框","options":["Mod NX-黑色邊框"],"price":110000,"weight":1500,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"MPB0118424-PB45","featured_media":{"alt":null,"id":23893551513699,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f08671e0d078591bd344aeca300c715debc0e1b4_7870abbe-c288-44bf-a120-047e4fec3dba.webp?v=1714911987"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f08671e0d078591bd344aeca300c715debc0e1b4_7870abbe-c288-44bf-a120-047e4fec3dba.webp?v=1714911987","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e8421d7d6d20cfab60a2b7e21a330ee6a973b52b_1b3c6590-79e0-4994-baee-6d31ffa0f831.webp?v=1714911989","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5f014e9e34568a9b8d91e0b865aa99e0eed2fd95_7797eac8-d0de-4627-ab3a-aad7cfdff24f.webp?v=1714911992","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1783e560a608ac15d11b888a050eb2e9b8409b94_d3106d07-11c1-45c4-97ff-696cb18fa8df.webp?v=1714911994","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8c02d853593e93c6ec97cea5deeb5c5914e404dc_f027f981-9d89-40de-9914-de8c68b3d646.webp?v=1714911996","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b6fe2922bd504b8bca56cdc8ed02340cebc779bf_a993c963-5b5c-4f02-81ef-59f9e9f3d97f.webp?v=1714911998","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/49066508371a00bbb580392df2367db0c2240c64_fa0eebfc-2b85-4302-b7d0-3331d35971a2.webp?v=1714912001","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/56f9e92dbb0a50a4c1032ca25c16179b0163d5b5_67d13763-6d29-4c32-bf7b-277f9218ef84.webp?v=1714912003","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/17564a1f59405bc76296d4f95caaf53af9abe1e4_ecc55c2e-a613-40a6-a3df-e44f3d03b0e3.webp?v=1714912005","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cbf2486384032f5e88994741094ccbce93dc15e6_27738d0b-9d73-46e0-9c51-68db40bf0745.webp?v=1714912007","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6690a8abc3d95fceb8afe170dbb89b93295c5ab0_a042afa0-16aa-4a0a-9c65-a9f22cad614d.webp?v=1714912009"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f08671e0d078591bd344aeca300c715debc0e1b4_7870abbe-c288-44bf-a120-047e4fec3dba.webp?v=1714911987","options":["color"],"media":[{"alt":null,"id":23893551513699,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f08671e0d078591bd344aeca300c715debc0e1b4_7870abbe-c288-44bf-a120-047e4fec3dba.webp?v=1714911987"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f08671e0d078591bd344aeca300c715debc0e1b4_7870abbe-c288-44bf-a120-047e4fec3dba.webp?v=1714911987","width":2000},{"alt":null,"id":23893552201827,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e8421d7d6d20cfab60a2b7e21a330ee6a973b52b_1b3c6590-79e0-4994-baee-6d31ffa0f831.webp?v=1714911989"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e8421d7d6d20cfab60a2b7e21a330ee6a973b52b_1b3c6590-79e0-4994-baee-6d31ffa0f831.webp?v=1714911989","width":2000},{"alt":null,"id":23893552627811,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5f014e9e34568a9b8d91e0b865aa99e0eed2fd95_7797eac8-d0de-4627-ab3a-aad7cfdff24f.webp?v=1714911992"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5f014e9e34568a9b8d91e0b865aa99e0eed2fd95_7797eac8-d0de-4627-ab3a-aad7cfdff24f.webp?v=1714911992","width":2000},{"alt":null,"id":23893553283171,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1783e560a608ac15d11b888a050eb2e9b8409b94_d3106d07-11c1-45c4-97ff-696cb18fa8df.webp?v=1714911994"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1783e560a608ac15d11b888a050eb2e9b8409b94_d3106d07-11c1-45c4-97ff-696cb18fa8df.webp?v=1714911994","width":2000},{"alt":null,"id":23893553643619,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8c02d853593e93c6ec97cea5deeb5c5914e404dc_f027f981-9d89-40de-9914-de8c68b3d646.webp?v=1714911996"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8c02d853593e93c6ec97cea5deeb5c5914e404dc_f027f981-9d89-40de-9914-de8c68b3d646.webp?v=1714911996","width":2000},{"alt":null,"id":23893554266211,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b6fe2922bd504b8bca56cdc8ed02340cebc779bf_a993c963-5b5c-4f02-81ef-59f9e9f3d97f.webp?v=1714911998"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b6fe2922bd504b8bca56cdc8ed02340cebc779bf_a993c963-5b5c-4f02-81ef-59f9e9f3d97f.webp?v=1714911998","width":2000},{"alt":null,"id":23893555019875,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/49066508371a00bbb580392df2367db0c2240c64_fa0eebfc-2b85-4302-b7d0-3331d35971a2.webp?v=1714912001"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/49066508371a00bbb580392df2367db0c2240c64_fa0eebfc-2b85-4302-b7d0-3331d35971a2.webp?v=1714912001","width":2000},{"alt":null,"id":23893555413091,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/56f9e92dbb0a50a4c1032ca25c16179b0163d5b5_67d13763-6d29-4c32-bf7b-277f9218ef84.webp?v=1714912003"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/56f9e92dbb0a50a4c1032ca25c16179b0163d5b5_67d13763-6d29-4c32-bf7b-277f9218ef84.webp?v=1714912003","width":2000},{"alt":null,"id":23893555839075,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/17564a1f59405bc76296d4f95caaf53af9abe1e4_ecc55c2e-a613-40a6-a3df-e44f3d03b0e3.webp?v=1714912005"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/17564a1f59405bc76296d4f95caaf53af9abe1e4_ecc55c2e-a613-40a6-a3df-e44f3d03b0e3.webp?v=1714912005","width":2000},{"alt":null,"id":23893556265059,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cbf2486384032f5e88994741094ccbce93dc15e6_27738d0b-9d73-46e0-9c51-68db40bf0745.webp?v=1714912007"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cbf2486384032f5e88994741094ccbce93dc15e6_27738d0b-9d73-46e0-9c51-68db40bf0745.webp?v=1714912007","width":2000},{"alt":null,"id":23893556428899,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6690a8abc3d95fceb8afe170dbb89b93295c5ab0_a042afa0-16aa-4a0a-9c65-a9f22cad614d.webp?v=1714912009"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6690a8abc3d95fceb8afe170dbb89b93295c5ab0_a042afa0-16aa-4a0a-9c65-a9f22cad614d.webp?v=1714912009","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41912076173411,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118424-PB45","requires_shipping":true,"taxable":true,"featured_image":{"id":31488206831715,"product_id":7415119642723,"position":1,"created_at":"2024-05-05T20:26:27+08:00","updated_at":"2024-05-05T20:26:27+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f08671e0d078591bd344aeca300c715debc0e1b4_7870abbe-c288-44bf-a120-047e4fec3dba.webp?v=1714911987","variant_ids":[41912076173411]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - 迪士尼-星際大戰 Star Wars - 星戰Logo黑武士款 - Mod NX-黑色邊框","public_title":"Mod NX-黑色邊框","options":["Mod NX-黑色邊框"],"price":110000,"weight":1500,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"MPB0118424-PB45","featured_media":{"alt":null,"id":23893551513699,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f08671e0d078591bd344aeca300c715debc0e1b4_7870abbe-c288-44bf-a120-047e4fec3dba.webp?v=1714911987"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41912076173411,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118424-PB45","requires_shipping":true,"taxable":true,"featured_image":{"id":31488206831715,"product_id":7415119642723,"position":1,"created_at":"2024-05-05T20:26:27+08:00","updated_at":"2024-05-05T20:26:27+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f08671e0d078591bd344aeca300c715debc0e1b4_7870abbe-c288-44bf-a120-047e4fec3dba.webp?v=1714911987","variant_ids":[41912076173411]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - 迪士尼-星際大戰 Star Wars - 星戰Logo黑武士款 - Mod NX-黑色邊框","public_title":"Mod NX-黑色邊框","options":["Mod NX-黑色邊框"],"price":110000,"weight":1500,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"MPB0118424-PB45","featured_media":{"alt":null,"id":23893551513699,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f08671e0d078591bd344aeca300c715debc0e1b4_7870abbe-c288-44bf-a120-047e4fec3dba.webp?v=1714911987"}},"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: "停產" }