$product = {"id":7415019602019,"title":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - 迪士尼-星際大戰 Star Wars - 波巴費特-噴漆黑","handle":"iphone-12-mini-mod-nx-magsafe-printable-pb05","description":null,"published_at":"2024-06-11T17:55:48+08:00","created_at":"2024-05-05T20:07:37+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":41911003709539,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118424-PB05","requires_shipping":true,"taxable":true,"featured_image":{"id":31487945900131,"product_id":7415019602019,"position":11,"created_at":"2024-05-05T20:08:02+08:00","updated_at":"2024-05-05T20:08:02+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2bbb140c482ce95b26a9b3b77f316fddd93d4c21_8a4fff8e-c56b-4f25-bd2f-76f2363955ee.webp?v=1714910882","variant_ids":[41911003709539]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - 迪士尼-星際大戰 Star Wars - 波巴費特-噴漆黑 - 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-PB05","featured_media":{"alt":null,"id":23893290123363,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2bbb140c482ce95b26a9b3b77f316fddd93d4c21_8a4fff8e-c56b-4f25-bd2f-76f2363955ee.webp?v=1714910882"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d730c7cfd3571f8b2135a6587c4389ae795e1a60_629d182c-0cc0-46b3-8f6b-b381f9102902.webp?v=1714910859","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ae92e3c4e2aa7023baad6861b9ff4b3798fd5f6d_6bb4fa66-4e66-4697-bf0f-aa43e68d59a8.webp?v=1714910861","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2a4bba57a2308b35f6ea7098260e8fd691a94879_d5afa1a0-d7cd-4686-9622-8b34072a86b0.webp?v=1714910863","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a6c253d1c005216012cc94c0c595978684702b02_c79cf898-8493-49f3-87fe-789a8d309dde.webp?v=1714910866","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f7c2d9849cdcb2f66203996c57729e9ebf60ea67_2298e1ce-8ac6-46ed-9116-43d810cd51d3.webp?v=1714910868","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3bfd3a9a11c4ad33a1a1f00e9b61a15bca8bcc82_30f5ed43-6951-4faf-bc6e-f6905c4152a5.webp?v=1714910871","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0c13c6cdeaa6c6a7df595b8ae07840ff741328c7_cedd2913-21c3-4c69-9239-c85401189f1f.webp?v=1714910873","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4f39038b29520dd69b120eacb22f00ca6a8b551c_2549ea13-2e60-43b2-b777-00e8b4850187.webp?v=1714910875","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b504b4190c592455236368e7403c5378143b105d_08ec8a57-3812-4c8c-9358-8cb5fbcd967b.webp?v=1714910877","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1686389357ae9340c971840689aada82142d075c_bb669fee-733a-4412-8a3c-42ae4963196b.webp?v=1714910880","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2bbb140c482ce95b26a9b3b77f316fddd93d4c21_8a4fff8e-c56b-4f25-bd2f-76f2363955ee.webp?v=1714910882"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d730c7cfd3571f8b2135a6587c4389ae795e1a60_629d182c-0cc0-46b3-8f6b-b381f9102902.webp?v=1714910859","options":["color"],"media":[{"alt":null,"id":23893284159587,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d730c7cfd3571f8b2135a6587c4389ae795e1a60_629d182c-0cc0-46b3-8f6b-b381f9102902.webp?v=1714910859"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d730c7cfd3571f8b2135a6587c4389ae795e1a60_629d182c-0cc0-46b3-8f6b-b381f9102902.webp?v=1714910859","width":2000},{"alt":null,"id":23893284683875,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ae92e3c4e2aa7023baad6861b9ff4b3798fd5f6d_6bb4fa66-4e66-4697-bf0f-aa43e68d59a8.webp?v=1714910861"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ae92e3c4e2aa7023baad6861b9ff4b3798fd5f6d_6bb4fa66-4e66-4697-bf0f-aa43e68d59a8.webp?v=1714910861","width":2000},{"alt":null,"id":23893285404771,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2a4bba57a2308b35f6ea7098260e8fd691a94879_d5afa1a0-d7cd-4686-9622-8b34072a86b0.webp?v=1714910863"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2a4bba57a2308b35f6ea7098260e8fd691a94879_d5afa1a0-d7cd-4686-9622-8b34072a86b0.webp?v=1714910863","width":2000},{"alt":null,"id":23893286027363,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a6c253d1c005216012cc94c0c595978684702b02_c79cf898-8493-49f3-87fe-789a8d309dde.webp?v=1714910866"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a6c253d1c005216012cc94c0c595978684702b02_c79cf898-8493-49f3-87fe-789a8d309dde.webp?v=1714910866","width":2000},{"alt":null,"id":23893286551651,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f7c2d9849cdcb2f66203996c57729e9ebf60ea67_2298e1ce-8ac6-46ed-9116-43d810cd51d3.webp?v=1714910868"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f7c2d9849cdcb2f66203996c57729e9ebf60ea67_2298e1ce-8ac6-46ed-9116-43d810cd51d3.webp?v=1714910868","width":2000},{"alt":null,"id":23893287338083,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3bfd3a9a11c4ad33a1a1f00e9b61a15bca8bcc82_30f5ed43-6951-4faf-bc6e-f6905c4152a5.webp?v=1714910871"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3bfd3a9a11c4ad33a1a1f00e9b61a15bca8bcc82_30f5ed43-6951-4faf-bc6e-f6905c4152a5.webp?v=1714910871","width":2000},{"alt":null,"id":23893288026211,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0c13c6cdeaa6c6a7df595b8ae07840ff741328c7_cedd2913-21c3-4c69-9239-c85401189f1f.webp?v=1714910873"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0c13c6cdeaa6c6a7df595b8ae07840ff741328c7_cedd2913-21c3-4c69-9239-c85401189f1f.webp?v=1714910873","width":2000},{"alt":null,"id":23893288419427,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4f39038b29520dd69b120eacb22f00ca6a8b551c_2549ea13-2e60-43b2-b777-00e8b4850187.webp?v=1714910875"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4f39038b29520dd69b120eacb22f00ca6a8b551c_2549ea13-2e60-43b2-b777-00e8b4850187.webp?v=1714910875","width":2000},{"alt":null,"id":23893288878179,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b504b4190c592455236368e7403c5378143b105d_08ec8a57-3812-4c8c-9358-8cb5fbcd967b.webp?v=1714910877"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b504b4190c592455236368e7403c5378143b105d_08ec8a57-3812-4c8c-9358-8cb5fbcd967b.webp?v=1714910877","width":2000},{"alt":null,"id":23893289697379,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1686389357ae9340c971840689aada82142d075c_bb669fee-733a-4412-8a3c-42ae4963196b.webp?v=1714910880"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1686389357ae9340c971840689aada82142d075c_bb669fee-733a-4412-8a3c-42ae4963196b.webp?v=1714910880","width":2000},{"alt":null,"id":23893290123363,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2bbb140c482ce95b26a9b3b77f316fddd93d4c21_8a4fff8e-c56b-4f25-bd2f-76f2363955ee.webp?v=1714910882"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2bbb140c482ce95b26a9b3b77f316fddd93d4c21_8a4fff8e-c56b-4f25-bd2f-76f2363955ee.webp?v=1714910882","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41911003709539,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118424-PB05","requires_shipping":true,"taxable":true,"featured_image":{"id":31487945900131,"product_id":7415019602019,"position":11,"created_at":"2024-05-05T20:08:02+08:00","updated_at":"2024-05-05T20:08:02+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2bbb140c482ce95b26a9b3b77f316fddd93d4c21_8a4fff8e-c56b-4f25-bd2f-76f2363955ee.webp?v=1714910882","variant_ids":[41911003709539]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - 迪士尼-星際大戰 Star Wars - 波巴費特-噴漆黑 - 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-PB05","featured_media":{"alt":null,"id":23893290123363,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2bbb140c482ce95b26a9b3b77f316fddd93d4c21_8a4fff8e-c56b-4f25-bd2f-76f2363955ee.webp?v=1714910882"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41911003709539,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118424-PB05","requires_shipping":true,"taxable":true,"featured_image":{"id":31487945900131,"product_id":7415019602019,"position":11,"created_at":"2024-05-05T20:08:02+08:00","updated_at":"2024-05-05T20:08:02+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2bbb140c482ce95b26a9b3b77f316fddd93d4c21_8a4fff8e-c56b-4f25-bd2f-76f2363955ee.webp?v=1714910882","variant_ids":[41911003709539]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - 迪士尼-星際大戰 Star Wars - 波巴費特-噴漆黑 - 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-PB05","featured_media":{"alt":null,"id":23893290123363,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2bbb140c482ce95b26a9b3b77f316fddd93d4c21_8a4fff8e-c56b-4f25-bd2f-76f2363955ee.webp?v=1714910882"}},"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: "停產" }