$product = {"id":7408486285411,"title":"犀牛盾Mod NX手機殼 - iPhone 12 mini - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - 伊沃克人1-塗鴉藝術","handle":"iphone-12-mini-mod-nx-printable-pb37","description":null,"published_at":"2024-06-11T16:38:35+08:00","created_at":"2024-05-03T15:36:05+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":41886030790755,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118424-PB37","requires_shipping":true,"taxable":true,"featured_image":{"id":31472399908963,"product_id":7408486285411,"position":6,"created_at":"2024-05-03T15:36:19+08:00","updated_at":"2024-05-03T15:36:19+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/70ddf29fe7875f0157b9a7f4a800ce542c942ef6_8f5bf858-8b36-4a7a-9ade-e11a9f5a4f50.webp?v=1714721779","variant_ids":[41886030790755]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 mini - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - 伊沃克人1-塗鴉藝術 - 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-PB37","featured_media":{"alt":null,"id":23877316870243,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/70ddf29fe7875f0157b9a7f4a800ce542c942ef6_8f5bf858-8b36-4a7a-9ade-e11a9f5a4f50.webp?v=1714721779"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a313c2f2252a86a94e337ac1ff1bd57974b64c90_e5b60a70-4578-4511-9cc2-94ad1e5b6e86.webp?v=1714721767","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d59abac12acc0c700c9bf5cc631fcbd65b2ed590_7104f642-b9c0-487e-acab-07595ad989dd.webp?v=1714721769","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/67750492d999a2c83acdc68a31038504eeac76d0_a1deb0fe-695d-42da-87eb-b8113a483338.webp?v=1714721772","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c2569f96633153f5d5fa993c8146f4b0126f343c_b1600b65-4325-4870-918f-5ebf9fbae44c.webp?v=1714721774","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/208a9af3c9472ffbdfca38e4dabcc9e20062c704_046ffcd5-6c68-43e1-ab0a-353a2e617ec1.webp?v=1714721776","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/70ddf29fe7875f0157b9a7f4a800ce542c942ef6_8f5bf858-8b36-4a7a-9ade-e11a9f5a4f50.webp?v=1714721779","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4f92f0087fc4585b0f5ab29d7910a67be9f97bc3_cfc24e29-4cc4-497f-8459-0692c5e6ed60.webp?v=1714721781","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8f55056e0b8db36d9c5010e775b5952ced5c8718_2c36c727-6d4a-4fb4-90ad-6e84fc143392.webp?v=1714721784","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f54b380a18ab5a8c5f170085689328c578111389_30e30bdf-8a91-4d55-aa87-b11485935bfd.webp?v=1714721786","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/42f019bbb55f61e9ea421f612dd797680d29898a_f6155201-b4c8-45f8-80df-d7ccc1f164ca.webp?v=1714721788","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1f5a4c035687cdd650e1241e6da3a76055bac5a3_57d39360-65a2-41ea-9343-262590ce218f.webp?v=1714721791"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a313c2f2252a86a94e337ac1ff1bd57974b64c90_e5b60a70-4578-4511-9cc2-94ad1e5b6e86.webp?v=1714721767","options":["color"],"media":[{"alt":null,"id":23877314281571,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a313c2f2252a86a94e337ac1ff1bd57974b64c90_e5b60a70-4578-4511-9cc2-94ad1e5b6e86.webp?v=1714721767"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a313c2f2252a86a94e337ac1ff1bd57974b64c90_e5b60a70-4578-4511-9cc2-94ad1e5b6e86.webp?v=1714721767","width":2000},{"alt":null,"id":23877314740323,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d59abac12acc0c700c9bf5cc631fcbd65b2ed590_7104f642-b9c0-487e-acab-07595ad989dd.webp?v=1714721769"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d59abac12acc0c700c9bf5cc631fcbd65b2ed590_7104f642-b9c0-487e-acab-07595ad989dd.webp?v=1714721769","width":2000},{"alt":null,"id":23877315231843,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/67750492d999a2c83acdc68a31038504eeac76d0_a1deb0fe-695d-42da-87eb-b8113a483338.webp?v=1714721772"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/67750492d999a2c83acdc68a31038504eeac76d0_a1deb0fe-695d-42da-87eb-b8113a483338.webp?v=1714721772","width":2000},{"alt":null,"id":23877315625059,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c2569f96633153f5d5fa993c8146f4b0126f343c_b1600b65-4325-4870-918f-5ebf9fbae44c.webp?v=1714721774"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c2569f96633153f5d5fa993c8146f4b0126f343c_b1600b65-4325-4870-918f-5ebf9fbae44c.webp?v=1714721774","width":2000},{"alt":null,"id":23877316214883,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/208a9af3c9472ffbdfca38e4dabcc9e20062c704_046ffcd5-6c68-43e1-ab0a-353a2e617ec1.webp?v=1714721776"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/208a9af3c9472ffbdfca38e4dabcc9e20062c704_046ffcd5-6c68-43e1-ab0a-353a2e617ec1.webp?v=1714721776","width":2000},{"alt":null,"id":23877316870243,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/70ddf29fe7875f0157b9a7f4a800ce542c942ef6_8f5bf858-8b36-4a7a-9ade-e11a9f5a4f50.webp?v=1714721779"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/70ddf29fe7875f0157b9a7f4a800ce542c942ef6_8f5bf858-8b36-4a7a-9ade-e11a9f5a4f50.webp?v=1714721779","width":2000},{"alt":null,"id":23877317361763,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4f92f0087fc4585b0f5ab29d7910a67be9f97bc3_cfc24e29-4cc4-497f-8459-0692c5e6ed60.webp?v=1714721781"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4f92f0087fc4585b0f5ab29d7910a67be9f97bc3_cfc24e29-4cc4-497f-8459-0692c5e6ed60.webp?v=1714721781","width":2000},{"alt":null,"id":23877318148195,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8f55056e0b8db36d9c5010e775b5952ced5c8718_2c36c727-6d4a-4fb4-90ad-6e84fc143392.webp?v=1714721784"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8f55056e0b8db36d9c5010e775b5952ced5c8718_2c36c727-6d4a-4fb4-90ad-6e84fc143392.webp?v=1714721784","width":2000},{"alt":null,"id":23877319557219,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f54b380a18ab5a8c5f170085689328c578111389_30e30bdf-8a91-4d55-aa87-b11485935bfd.webp?v=1714721786"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f54b380a18ab5a8c5f170085689328c578111389_30e30bdf-8a91-4d55-aa87-b11485935bfd.webp?v=1714721786","width":2000},{"alt":null,"id":23877320015971,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/42f019bbb55f61e9ea421f612dd797680d29898a_f6155201-b4c8-45f8-80df-d7ccc1f164ca.webp?v=1714721788"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/42f019bbb55f61e9ea421f612dd797680d29898a_f6155201-b4c8-45f8-80df-d7ccc1f164ca.webp?v=1714721788","width":2000},{"alt":null,"id":23877320507491,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1f5a4c035687cdd650e1241e6da3a76055bac5a3_57d39360-65a2-41ea-9343-262590ce218f.webp?v=1714721791"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1f5a4c035687cdd650e1241e6da3a76055bac5a3_57d39360-65a2-41ea-9343-262590ce218f.webp?v=1714721791","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41886030790755,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118424-PB37","requires_shipping":true,"taxable":true,"featured_image":{"id":31472399908963,"product_id":7408486285411,"position":6,"created_at":"2024-05-03T15:36:19+08:00","updated_at":"2024-05-03T15:36:19+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/70ddf29fe7875f0157b9a7f4a800ce542c942ef6_8f5bf858-8b36-4a7a-9ade-e11a9f5a4f50.webp?v=1714721779","variant_ids":[41886030790755]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 mini - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - 伊沃克人1-塗鴉藝術 - 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-PB37","featured_media":{"alt":null,"id":23877316870243,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/70ddf29fe7875f0157b9a7f4a800ce542c942ef6_8f5bf858-8b36-4a7a-9ade-e11a9f5a4f50.webp?v=1714721779"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41886030790755,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118424-PB37","requires_shipping":true,"taxable":true,"featured_image":{"id":31472399908963,"product_id":7408486285411,"position":6,"created_at":"2024-05-03T15:36:19+08:00","updated_at":"2024-05-03T15:36:19+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/70ddf29fe7875f0157b9a7f4a800ce542c942ef6_8f5bf858-8b36-4a7a-9ade-e11a9f5a4f50.webp?v=1714721779","variant_ids":[41886030790755]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 mini - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - 伊沃克人1-塗鴉藝術 - 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-PB37","featured_media":{"alt":null,"id":23877316870243,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/70ddf29fe7875f0157b9a7f4a800ce542c942ef6_8f5bf858-8b36-4a7a-9ade-e11a9f5a4f50.webp?v=1714721779"}},"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: "停產" }