$product = {"id":7408424386659,"title":"犀牛盾Mod NX手機殼 - iPhone 12 mini - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - R2D2-剪紙系列","handle":"iphone-12-mini-mod-nx-printable-pb57","description":null,"published_at":"2024-06-11T16:36:51+08:00","created_at":"2024-05-03T15:24:04+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":41885327655011,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118424-PB57","requires_shipping":true,"taxable":true,"featured_image":{"id":31472242622563,"product_id":7408424386659,"position":9,"created_at":"2024-05-03T15:24:25+08:00","updated_at":"2024-05-03T15:24:25+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c778cbb34d41aaf1e0ca80eb127c3ec1ad4673d1_e8a49039-5b3b-401b-8714-fecb139e77d4.webp?v=1714721065","variant_ids":[41885327655011]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 mini - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - R2D2-剪紙系列 - 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-PB57","featured_media":{"alt":null,"id":23877158764643,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c778cbb34d41aaf1e0ca80eb127c3ec1ad4673d1_e8a49039-5b3b-401b-8714-fecb139e77d4.webp?v=1714721065"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/38007d3884c2dfdd338dfcf7a324d5f1072510e6_58fb561a-75ab-46b8-b814-282190cc4090.webp?v=1714721047","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9b9323fd710105d60f095f417c4cfc221a3493c8_16b5642e-2a1d-4a26-95f0-7c64964bec66.webp?v=1714721049","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dece74454f463859fa5257acc55accab3c665fae_c5802fe6-0332-4be3-82b0-1f8e73986f9d.webp?v=1714721051","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8973e6eb2d94b5220449b2db61477327833145d0_eaabbdd4-0704-4ba4-8f66-a361a184e25e.webp?v=1714721053","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e9e57bbfa456bd230abe5ec12d5dab3b3a0f07e7_305bb798-1d87-4966-8116-311bb78c8d38.webp?v=1714721056","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/241502be200dd6bc5797a96b5f3e84f4f61811c1_8d8d6049-81d4-4c37-a103-45a410b468b1.webp?v=1714721058","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/94cfcbe7b09de21ec27937ae30e1a1f8bc910aad_92aa5d34-d9f5-483e-b07c-6baf69d2c33d.webp?v=1714721061","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c468802ffbf2c83521d0f6111aefe4690a6e4e48_4fb2c801-cfd1-4d7d-a6da-3c83f3a1ca6e.webp?v=1714721063","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c778cbb34d41aaf1e0ca80eb127c3ec1ad4673d1_e8a49039-5b3b-401b-8714-fecb139e77d4.webp?v=1714721065","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c6beff4b37e8884c11cf859c549ef881cc400a2f_449e113c-801a-451e-8c38-bc0dc19c93bd.webp?v=1714721067","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d1cb3e6b04dcde2ae33e34424d00a01f3503f2ba_1bc01462-1c69-4adb-ab56-75e543dab5c8.webp?v=1714721069"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/38007d3884c2dfdd338dfcf7a324d5f1072510e6_58fb561a-75ab-46b8-b814-282190cc4090.webp?v=1714721047","options":["color"],"media":[{"alt":null,"id":23877154537571,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/38007d3884c2dfdd338dfcf7a324d5f1072510e6_58fb561a-75ab-46b8-b814-282190cc4090.webp?v=1714721047"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/38007d3884c2dfdd338dfcf7a324d5f1072510e6_58fb561a-75ab-46b8-b814-282190cc4090.webp?v=1714721047","width":2000},{"alt":null,"id":23877155094627,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9b9323fd710105d60f095f417c4cfc221a3493c8_16b5642e-2a1d-4a26-95f0-7c64964bec66.webp?v=1714721049"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9b9323fd710105d60f095f417c4cfc221a3493c8_16b5642e-2a1d-4a26-95f0-7c64964bec66.webp?v=1714721049","width":2000},{"alt":null,"id":23877155618915,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dece74454f463859fa5257acc55accab3c665fae_c5802fe6-0332-4be3-82b0-1f8e73986f9d.webp?v=1714721051"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dece74454f463859fa5257acc55accab3c665fae_c5802fe6-0332-4be3-82b0-1f8e73986f9d.webp?v=1714721051","width":2000},{"alt":null,"id":23877156110435,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8973e6eb2d94b5220449b2db61477327833145d0_eaabbdd4-0704-4ba4-8f66-a361a184e25e.webp?v=1714721053"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8973e6eb2d94b5220449b2db61477327833145d0_eaabbdd4-0704-4ba4-8f66-a361a184e25e.webp?v=1714721053","width":2000},{"alt":null,"id":23877156601955,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e9e57bbfa456bd230abe5ec12d5dab3b3a0f07e7_305bb798-1d87-4966-8116-311bb78c8d38.webp?v=1714721056"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e9e57bbfa456bd230abe5ec12d5dab3b3a0f07e7_305bb798-1d87-4966-8116-311bb78c8d38.webp?v=1714721056","width":2000},{"alt":null,"id":23877157159011,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/241502be200dd6bc5797a96b5f3e84f4f61811c1_8d8d6049-81d4-4c37-a103-45a410b468b1.webp?v=1714721058"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/241502be200dd6bc5797a96b5f3e84f4f61811c1_8d8d6049-81d4-4c37-a103-45a410b468b1.webp?v=1714721058","width":2000},{"alt":null,"id":23877157716067,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/94cfcbe7b09de21ec27937ae30e1a1f8bc910aad_92aa5d34-d9f5-483e-b07c-6baf69d2c33d.webp?v=1714721061"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/94cfcbe7b09de21ec27937ae30e1a1f8bc910aad_92aa5d34-d9f5-483e-b07c-6baf69d2c33d.webp?v=1714721061","width":2000},{"alt":null,"id":23877158305891,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c468802ffbf2c83521d0f6111aefe4690a6e4e48_4fb2c801-cfd1-4d7d-a6da-3c83f3a1ca6e.webp?v=1714721063"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c468802ffbf2c83521d0f6111aefe4690a6e4e48_4fb2c801-cfd1-4d7d-a6da-3c83f3a1ca6e.webp?v=1714721063","width":2000},{"alt":null,"id":23877158764643,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c778cbb34d41aaf1e0ca80eb127c3ec1ad4673d1_e8a49039-5b3b-401b-8714-fecb139e77d4.webp?v=1714721065"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c778cbb34d41aaf1e0ca80eb127c3ec1ad4673d1_e8a49039-5b3b-401b-8714-fecb139e77d4.webp?v=1714721065","width":2000},{"alt":null,"id":23877159157859,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c6beff4b37e8884c11cf859c549ef881cc400a2f_449e113c-801a-451e-8c38-bc0dc19c93bd.webp?v=1714721067"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c6beff4b37e8884c11cf859c549ef881cc400a2f_449e113c-801a-451e-8c38-bc0dc19c93bd.webp?v=1714721067","width":2000},{"alt":null,"id":23877159977059,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d1cb3e6b04dcde2ae33e34424d00a01f3503f2ba_1bc01462-1c69-4adb-ab56-75e543dab5c8.webp?v=1714721069"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d1cb3e6b04dcde2ae33e34424d00a01f3503f2ba_1bc01462-1c69-4adb-ab56-75e543dab5c8.webp?v=1714721069","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41885327655011,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118424-PB57","requires_shipping":true,"taxable":true,"featured_image":{"id":31472242622563,"product_id":7408424386659,"position":9,"created_at":"2024-05-03T15:24:25+08:00","updated_at":"2024-05-03T15:24:25+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c778cbb34d41aaf1e0ca80eb127c3ec1ad4673d1_e8a49039-5b3b-401b-8714-fecb139e77d4.webp?v=1714721065","variant_ids":[41885327655011]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 mini - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - R2D2-剪紙系列 - 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-PB57","featured_media":{"alt":null,"id":23877158764643,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c778cbb34d41aaf1e0ca80eb127c3ec1ad4673d1_e8a49039-5b3b-401b-8714-fecb139e77d4.webp?v=1714721065"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41885327655011,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118424-PB57","requires_shipping":true,"taxable":true,"featured_image":{"id":31472242622563,"product_id":7408424386659,"position":9,"created_at":"2024-05-03T15:24:25+08:00","updated_at":"2024-05-03T15:24:25+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c778cbb34d41aaf1e0ca80eb127c3ec1ad4673d1_e8a49039-5b3b-401b-8714-fecb139e77d4.webp?v=1714721065","variant_ids":[41885327655011]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 mini - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - R2D2-剪紙系列 - 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-PB57","featured_media":{"alt":null,"id":23877158764643,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c778cbb34d41aaf1e0ca80eb127c3ec1ad4673d1_e8a49039-5b3b-401b-8714-fecb139e77d4.webp?v=1714721065"}},"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: "停產" }