$product = {"id":7408550248547,"title":"犀牛盾Mod NX手機殼 - iPhone 12 mini - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - 鈦戰機-線條黑","handle":"iphone-12-mini-mod-nx-printable-pb17","description":null,"published_at":"2024-06-11T16:40:25+08:00","created_at":"2024-05-03T15:48:43+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":41886762893411,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118424-PB17","requires_shipping":true,"taxable":true,"featured_image":{"id":31472564666467,"product_id":7408550248547,"position":2,"created_at":"2024-05-03T15:48:48+08:00","updated_at":"2024-05-03T15:48:48+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dd6e14d6a0b055b4dda0893c75a6078b89ce510a_529d9851-e9d7-493c-8f3e-4a25f7866ec7.webp?v=1714722528","variant_ids":[41886762893411]},"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-PB17","featured_media":{"alt":null,"id":23877482020963,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dd6e14d6a0b055b4dda0893c75a6078b89ce510a_529d9851-e9d7-493c-8f3e-4a25f7866ec7.webp?v=1714722528"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6645d958c99859bfa3b57dc7f072676096f65b38_11d3576f-bf82-42d6-aca7-eb7d535a23c4.webp?v=1714722526","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dd6e14d6a0b055b4dda0893c75a6078b89ce510a_529d9851-e9d7-493c-8f3e-4a25f7866ec7.webp?v=1714722528","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7839dc624bd617b34c89ec025a69c681a7e4894d_f288bb85-dad2-4919-9765-9997e924788a.webp?v=1714722530","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a059836962f5814117f573796697f7b90fae5f18_2f8b44b3-160a-4d7a-972b-552e4af4d4be.webp?v=1714722533","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/adef9857905a4ed4823ea6feb97d7e76158e019a_a23b0bfd-aed7-4fe8-9ee1-c51528730cc7.webp?v=1714722535","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b4f745b23c780924dfe01e7c953650a804c96026_419d6924-a77f-4cd6-80b9-9c154fb8c3c8.webp?v=1714722538","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3a852eca561675c4ca0a244c57b8db09a7380679_b78028ff-5102-4627-b9f4-de44305f3cf9.webp?v=1714722540","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3263b33a0211390e867985274ba292e4ba491ad6_055cedac-0208-4e20-85be-8f5bb1144cfc.webp?v=1714722542","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0079818023d74c51acdbd48107d94d7f6d9bbb2b_ff1504eb-3504-4964-812d-3b05fcec6d13.webp?v=1714722545","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8b9e252d128b756def766a80233aeb2f12c95450_40607ad4-843b-417f-baf8-218ce6094d57.webp?v=1714722547","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f7b545dea588b68febbbd261a41dd9be994659e3_6a5f929c-9b86-4d20-9e13-4a8552c0d699.webp?v=1714722550"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6645d958c99859bfa3b57dc7f072676096f65b38_11d3576f-bf82-42d6-aca7-eb7d535a23c4.webp?v=1714722526","options":["color"],"media":[{"alt":null,"id":23877481562211,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6645d958c99859bfa3b57dc7f072676096f65b38_11d3576f-bf82-42d6-aca7-eb7d535a23c4.webp?v=1714722526"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6645d958c99859bfa3b57dc7f072676096f65b38_11d3576f-bf82-42d6-aca7-eb7d535a23c4.webp?v=1714722526","width":2000},{"alt":null,"id":23877482020963,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dd6e14d6a0b055b4dda0893c75a6078b89ce510a_529d9851-e9d7-493c-8f3e-4a25f7866ec7.webp?v=1714722528"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dd6e14d6a0b055b4dda0893c75a6078b89ce510a_529d9851-e9d7-493c-8f3e-4a25f7866ec7.webp?v=1714722528","width":2000},{"alt":null,"id":23877482741859,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7839dc624bd617b34c89ec025a69c681a7e4894d_f288bb85-dad2-4919-9765-9997e924788a.webp?v=1714722530"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7839dc624bd617b34c89ec025a69c681a7e4894d_f288bb85-dad2-4919-9765-9997e924788a.webp?v=1714722530","width":2000},{"alt":null,"id":23877483167843,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a059836962f5814117f573796697f7b90fae5f18_2f8b44b3-160a-4d7a-972b-552e4af4d4be.webp?v=1714722533"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a059836962f5814117f573796697f7b90fae5f18_2f8b44b3-160a-4d7a-972b-552e4af4d4be.webp?v=1714722533","width":2000},{"alt":null,"id":23877483659363,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/adef9857905a4ed4823ea6feb97d7e76158e019a_a23b0bfd-aed7-4fe8-9ee1-c51528730cc7.webp?v=1714722535"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/adef9857905a4ed4823ea6feb97d7e76158e019a_a23b0bfd-aed7-4fe8-9ee1-c51528730cc7.webp?v=1714722535","width":2000},{"alt":null,"id":23877484085347,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b4f745b23c780924dfe01e7c953650a804c96026_419d6924-a77f-4cd6-80b9-9c154fb8c3c8.webp?v=1714722538"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b4f745b23c780924dfe01e7c953650a804c96026_419d6924-a77f-4cd6-80b9-9c154fb8c3c8.webp?v=1714722538","width":2000},{"alt":null,"id":23877484576867,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3a852eca561675c4ca0a244c57b8db09a7380679_b78028ff-5102-4627-b9f4-de44305f3cf9.webp?v=1714722540"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3a852eca561675c4ca0a244c57b8db09a7380679_b78028ff-5102-4627-b9f4-de44305f3cf9.webp?v=1714722540","width":2000},{"alt":null,"id":23877485068387,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3263b33a0211390e867985274ba292e4ba491ad6_055cedac-0208-4e20-85be-8f5bb1144cfc.webp?v=1714722542"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3263b33a0211390e867985274ba292e4ba491ad6_055cedac-0208-4e20-85be-8f5bb1144cfc.webp?v=1714722542","width":2000},{"alt":null,"id":23877485494371,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0079818023d74c51acdbd48107d94d7f6d9bbb2b_ff1504eb-3504-4964-812d-3b05fcec6d13.webp?v=1714722545"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0079818023d74c51acdbd48107d94d7f6d9bbb2b_ff1504eb-3504-4964-812d-3b05fcec6d13.webp?v=1714722545","width":2000},{"alt":null,"id":23877486018659,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8b9e252d128b756def766a80233aeb2f12c95450_40607ad4-843b-417f-baf8-218ce6094d57.webp?v=1714722547"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8b9e252d128b756def766a80233aeb2f12c95450_40607ad4-843b-417f-baf8-218ce6094d57.webp?v=1714722547","width":2000},{"alt":null,"id":23877486575715,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f7b545dea588b68febbbd261a41dd9be994659e3_6a5f929c-9b86-4d20-9e13-4a8552c0d699.webp?v=1714722550"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f7b545dea588b68febbbd261a41dd9be994659e3_6a5f929c-9b86-4d20-9e13-4a8552c0d699.webp?v=1714722550","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41886762893411,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118424-PB17","requires_shipping":true,"taxable":true,"featured_image":{"id":31472564666467,"product_id":7408550248547,"position":2,"created_at":"2024-05-03T15:48:48+08:00","updated_at":"2024-05-03T15:48:48+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dd6e14d6a0b055b4dda0893c75a6078b89ce510a_529d9851-e9d7-493c-8f3e-4a25f7866ec7.webp?v=1714722528","variant_ids":[41886762893411]},"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-PB17","featured_media":{"alt":null,"id":23877482020963,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dd6e14d6a0b055b4dda0893c75a6078b89ce510a_529d9851-e9d7-493c-8f3e-4a25f7866ec7.webp?v=1714722528"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41886762893411,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118424-PB17","requires_shipping":true,"taxable":true,"featured_image":{"id":31472564666467,"product_id":7408550248547,"position":2,"created_at":"2024-05-03T15:48:48+08:00","updated_at":"2024-05-03T15:48:48+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dd6e14d6a0b055b4dda0893c75a6078b89ce510a_529d9851-e9d7-493c-8f3e-4a25f7866ec7.webp?v=1714722528","variant_ids":[41886762893411]},"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-PB17","featured_media":{"alt":null,"id":23877482020963,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dd6e14d6a0b055b4dda0893c75a6078b89ce510a_529d9851-e9d7-493c-8f3e-4a25f7866ec7.webp?v=1714722528"}},"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: "停產" }