$product = {"id":7408449519715,"title":"犀牛盾Mod NX手機殼 - iPhone 12 mini - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - 黑武士-黑白條紋","handle":"iphone-12-mini-mod-nx-printable-pb20","description":null,"published_at":"2024-06-11T16:37:32+08:00","created_at":"2024-05-03T15:28:40+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":41885605167203,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118424-PB20","requires_shipping":true,"taxable":true,"featured_image":{"id":31472307208291,"product_id":7408449519715,"position":4,"created_at":"2024-05-03T15:28:49+08:00","updated_at":"2024-05-03T15:28:49+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/28fef178262671fae0d6efb43f17869777585dc1_2b1ef1dc-63d3-43ed-8496-13a8eaece6cd.webp?v=1714721329","variant_ids":[41885605167203]},"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-PB20","featured_media":{"alt":null,"id":23877223579747,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/28fef178262671fae0d6efb43f17869777585dc1_2b1ef1dc-63d3-43ed-8496-13a8eaece6cd.webp?v=1714721329"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/197df38a06a4208f4c26cd16bb509d6e6b0fb5ac_3f217e9e-9220-45a1-8a0d-7199a5e97d5c.webp?v=1714721322","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/16c0184027c7f1411f6dcb400a8700689ff857fa_0a2fc5cd-6de9-44e2-9f2e-c606f2953637.webp?v=1714721325","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7cf473dc75ced465bae62a8a626bf250c8b0fd9f_6c6e77a6-3d20-4444-8158-64e3782319ea.webp?v=1714721327","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/28fef178262671fae0d6efb43f17869777585dc1_2b1ef1dc-63d3-43ed-8496-13a8eaece6cd.webp?v=1714721329","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5b475735f3fe9051a29a0f5da3cc5ade81fc2b20_e3cc9709-4c0b-48b9-acf1-a45998999c00.webp?v=1714721332","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/af9ee9881d84b402028fd332bb53ed5a9e66a799_f6e476aa-776a-4d46-b4af-10db4326f5cc.webp?v=1714721334","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/623949351c6532657057a34fe2d7ac7668a5aacf_2a8d18da-3c1e-4f33-9571-78f8d6021d4c.webp?v=1714721336","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f7a9ebdc2d98b927fefd8e3507ec9eb61aa5f34b_5dac0fd3-6e71-43a5-b68d-e29074ca39f5.webp?v=1714721338","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/799cb3aedc14ff905d90c3ddf7738d25315916c7_4d980c86-30c8-4a0b-9b4c-dc5473d3676d.webp?v=1714721341","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f1d41f3f54a892c36ec9edbec3214b5075423b4a_e96c58cc-608a-4725-97cd-e14556ab682e.webp?v=1714721343","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/84d0f1fb5933d0ef1a84e8a700479528c810011e_5aff271e-3bd9-4a87-95cf-5a857379f2cc.webp?v=1714721345"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/197df38a06a4208f4c26cd16bb509d6e6b0fb5ac_3f217e9e-9220-45a1-8a0d-7199a5e97d5c.webp?v=1714721322","options":["color"],"media":[{"alt":null,"id":23877222367331,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/197df38a06a4208f4c26cd16bb509d6e6b0fb5ac_3f217e9e-9220-45a1-8a0d-7199a5e97d5c.webp?v=1714721322"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/197df38a06a4208f4c26cd16bb509d6e6b0fb5ac_3f217e9e-9220-45a1-8a0d-7199a5e97d5c.webp?v=1714721322","width":2000},{"alt":null,"id":23877222826083,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/16c0184027c7f1411f6dcb400a8700689ff857fa_0a2fc5cd-6de9-44e2-9f2e-c606f2953637.webp?v=1714721325"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/16c0184027c7f1411f6dcb400a8700689ff857fa_0a2fc5cd-6de9-44e2-9f2e-c606f2953637.webp?v=1714721325","width":2000},{"alt":null,"id":23877223219299,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7cf473dc75ced465bae62a8a626bf250c8b0fd9f_6c6e77a6-3d20-4444-8158-64e3782319ea.webp?v=1714721327"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7cf473dc75ced465bae62a8a626bf250c8b0fd9f_6c6e77a6-3d20-4444-8158-64e3782319ea.webp?v=1714721327","width":2000},{"alt":null,"id":23877223579747,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/28fef178262671fae0d6efb43f17869777585dc1_2b1ef1dc-63d3-43ed-8496-13a8eaece6cd.webp?v=1714721329"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/28fef178262671fae0d6efb43f17869777585dc1_2b1ef1dc-63d3-43ed-8496-13a8eaece6cd.webp?v=1714721329","width":2000},{"alt":null,"id":23877223972963,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5b475735f3fe9051a29a0f5da3cc5ade81fc2b20_e3cc9709-4c0b-48b9-acf1-a45998999c00.webp?v=1714721332"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5b475735f3fe9051a29a0f5da3cc5ade81fc2b20_e3cc9709-4c0b-48b9-acf1-a45998999c00.webp?v=1714721332","width":2000},{"alt":null,"id":23877224431715,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/af9ee9881d84b402028fd332bb53ed5a9e66a799_f6e476aa-776a-4d46-b4af-10db4326f5cc.webp?v=1714721334"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/af9ee9881d84b402028fd332bb53ed5a9e66a799_f6e476aa-776a-4d46-b4af-10db4326f5cc.webp?v=1714721334","width":2000},{"alt":null,"id":23877224824931,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/623949351c6532657057a34fe2d7ac7668a5aacf_2a8d18da-3c1e-4f33-9571-78f8d6021d4c.webp?v=1714721336"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/623949351c6532657057a34fe2d7ac7668a5aacf_2a8d18da-3c1e-4f33-9571-78f8d6021d4c.webp?v=1714721336","width":2000},{"alt":null,"id":23877225349219,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f7a9ebdc2d98b927fefd8e3507ec9eb61aa5f34b_5dac0fd3-6e71-43a5-b68d-e29074ca39f5.webp?v=1714721338"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f7a9ebdc2d98b927fefd8e3507ec9eb61aa5f34b_5dac0fd3-6e71-43a5-b68d-e29074ca39f5.webp?v=1714721338","width":2000},{"alt":null,"id":23877225775203,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/799cb3aedc14ff905d90c3ddf7738d25315916c7_4d980c86-30c8-4a0b-9b4c-dc5473d3676d.webp?v=1714721341"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/799cb3aedc14ff905d90c3ddf7738d25315916c7_4d980c86-30c8-4a0b-9b4c-dc5473d3676d.webp?v=1714721341","width":2000},{"alt":null,"id":23877226430563,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f1d41f3f54a892c36ec9edbec3214b5075423b4a_e96c58cc-608a-4725-97cd-e14556ab682e.webp?v=1714721343"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f1d41f3f54a892c36ec9edbec3214b5075423b4a_e96c58cc-608a-4725-97cd-e14556ab682e.webp?v=1714721343","width":2000},{"alt":null,"id":23877226823779,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/84d0f1fb5933d0ef1a84e8a700479528c810011e_5aff271e-3bd9-4a87-95cf-5a857379f2cc.webp?v=1714721345"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/84d0f1fb5933d0ef1a84e8a700479528c810011e_5aff271e-3bd9-4a87-95cf-5a857379f2cc.webp?v=1714721345","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41885605167203,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118424-PB20","requires_shipping":true,"taxable":true,"featured_image":{"id":31472307208291,"product_id":7408449519715,"position":4,"created_at":"2024-05-03T15:28:49+08:00","updated_at":"2024-05-03T15:28:49+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/28fef178262671fae0d6efb43f17869777585dc1_2b1ef1dc-63d3-43ed-8496-13a8eaece6cd.webp?v=1714721329","variant_ids":[41885605167203]},"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-PB20","featured_media":{"alt":null,"id":23877223579747,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/28fef178262671fae0d6efb43f17869777585dc1_2b1ef1dc-63d3-43ed-8496-13a8eaece6cd.webp?v=1714721329"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41885605167203,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118424-PB20","requires_shipping":true,"taxable":true,"featured_image":{"id":31472307208291,"product_id":7408449519715,"position":4,"created_at":"2024-05-03T15:28:49+08:00","updated_at":"2024-05-03T15:28:49+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/28fef178262671fae0d6efb43f17869777585dc1_2b1ef1dc-63d3-43ed-8496-13a8eaece6cd.webp?v=1714721329","variant_ids":[41885605167203]},"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-PB20","featured_media":{"alt":null,"id":23877223579747,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/28fef178262671fae0d6efb43f17869777585dc1_2b1ef1dc-63d3-43ed-8496-13a8eaece6cd.webp?v=1714721329"}},"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: "停產" }