$product = {"id":7415026090083,"title":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - 1G - 左看看","handle":"iphone-12-mini-mod-nx-magsafe-printable-iv05","description":null,"published_at":"2024-06-11T17:55:58+08:00","created_at":"2024-05-05T20:08:55+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"設計師MOD NX MagSafe專區1G","tags":["20%","25%","30%","35%","40%","45%","50%","b2b","brand-Apple","designer","designer-1chun","device-iPhone 12 mini","merge","mod-nx-magsafe-printable","new-modnx-sku","reseller-modnx-magsafe-1chun","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":41911077470307,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118424-IV05","requires_shipping":true,"taxable":true,"featured_image":{"id":31487963201635,"product_id":7415026090083,"position":7,"created_at":"2024-05-05T20:09:12+08:00","updated_at":"2024-05-05T20:09:12+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/711ac5eca09f210942c12a3b220edca28dd4c649_66cead85-b8b4-45f2-9da2-ee37f8b4eec2.webp?v=1714910952","variant_ids":[41911077470307]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - 1G - 左看看 - Mod NX-黑色邊框","public_title":"Mod NX-黑色邊框","options":["Mod NX-黑色邊框"],"price":110000,"weight":1380,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"MPB0118424-IV05","featured_media":{"alt":null,"id":23893307523171,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/711ac5eca09f210942c12a3b220edca28dd4c649_66cead85-b8b4-45f2-9da2-ee37f8b4eec2.webp?v=1714910952"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a80d01d3730f8f4d693522cd0cde61a5e8ffa46f_db2d7df0-e296-4f58-bf4e-536077db6465.webp?v=1714910938","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e1aa83deaaf8b884078d53538bbc3ab4093914e8_1f8ff873-4a7f-4b50-b7d5-e9b076aebb1d.webp?v=1714910940","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b9ec7fe434bd2d1138ccefc998fc7c9e267258bf_3acf1439-79ed-4b67-96d9-ebcf66f8ac75.webp?v=1714910943","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9dd136422e64af5996b750c96af083aa0e21e2e6_e6cbde5f-51fa-48df-9af4-9173ee68226e.webp?v=1714910945","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0927751167e8ed0d65b1b1e52670b4fb3c3ead4d_d1ffe446-7575-40f4-9c5b-eaaefbc77603.webp?v=1714910947","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/583965566d8253c792958408072e78d73b24505d_645da7bc-b833-4010-9648-78b8dbdbcebb.webp?v=1714910950","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/711ac5eca09f210942c12a3b220edca28dd4c649_66cead85-b8b4-45f2-9da2-ee37f8b4eec2.webp?v=1714910952","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7d6af1b1b58ba85ab7da4b44511782368363b8da_2bc6c4de-40b2-4622-b5fa-6f39626c08d7.webp?v=1714910954","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f692c9cf3099150bfed398d47c9f387d23abb533_61920243-96d9-4afe-902b-9979ac546a76.webp?v=1714910956","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/92f7bbf783cd70f99d82cfdf2cf19dd4d3fb33e5_609829ac-4f13-4d6e-97f1-551b5a7c9890.webp?v=1714910959","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b546c1f415acee51f1bc8cf2e8633d5c77e29636_d8ea4e0b-9322-495d-83e8-9fead0256c54.webp?v=1714910961"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a80d01d3730f8f4d693522cd0cde61a5e8ffa46f_db2d7df0-e296-4f58-bf4e-536077db6465.webp?v=1714910938","options":["color"],"media":[{"alt":null,"id":23893303951459,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a80d01d3730f8f4d693522cd0cde61a5e8ffa46f_db2d7df0-e296-4f58-bf4e-536077db6465.webp?v=1714910938"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a80d01d3730f8f4d693522cd0cde61a5e8ffa46f_db2d7df0-e296-4f58-bf4e-536077db6465.webp?v=1714910938","width":2000},{"alt":null,"id":23893304803427,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e1aa83deaaf8b884078d53538bbc3ab4093914e8_1f8ff873-4a7f-4b50-b7d5-e9b076aebb1d.webp?v=1714910940"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e1aa83deaaf8b884078d53538bbc3ab4093914e8_1f8ff873-4a7f-4b50-b7d5-e9b076aebb1d.webp?v=1714910940","width":2000},{"alt":null,"id":23893305589859,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b9ec7fe434bd2d1138ccefc998fc7c9e267258bf_3acf1439-79ed-4b67-96d9-ebcf66f8ac75.webp?v=1714910943"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b9ec7fe434bd2d1138ccefc998fc7c9e267258bf_3acf1439-79ed-4b67-96d9-ebcf66f8ac75.webp?v=1714910943","width":2000},{"alt":null,"id":23893305983075,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9dd136422e64af5996b750c96af083aa0e21e2e6_e6cbde5f-51fa-48df-9af4-9173ee68226e.webp?v=1714910945"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9dd136422e64af5996b750c96af083aa0e21e2e6_e6cbde5f-51fa-48df-9af4-9173ee68226e.webp?v=1714910945","width":2000},{"alt":null,"id":23893306572899,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0927751167e8ed0d65b1b1e52670b4fb3c3ead4d_d1ffe446-7575-40f4-9c5b-eaaefbc77603.webp?v=1714910947"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0927751167e8ed0d65b1b1e52670b4fb3c3ead4d_d1ffe446-7575-40f4-9c5b-eaaefbc77603.webp?v=1714910947","width":2000},{"alt":null,"id":23893306966115,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/583965566d8253c792958408072e78d73b24505d_645da7bc-b833-4010-9648-78b8dbdbcebb.webp?v=1714910950"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/583965566d8253c792958408072e78d73b24505d_645da7bc-b833-4010-9648-78b8dbdbcebb.webp?v=1714910950","width":2000},{"alt":null,"id":23893307523171,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/711ac5eca09f210942c12a3b220edca28dd4c649_66cead85-b8b4-45f2-9da2-ee37f8b4eec2.webp?v=1714910952"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/711ac5eca09f210942c12a3b220edca28dd4c649_66cead85-b8b4-45f2-9da2-ee37f8b4eec2.webp?v=1714910952","width":2000},{"alt":null,"id":23893308047459,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7d6af1b1b58ba85ab7da4b44511782368363b8da_2bc6c4de-40b2-4622-b5fa-6f39626c08d7.webp?v=1714910954"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7d6af1b1b58ba85ab7da4b44511782368363b8da_2bc6c4de-40b2-4622-b5fa-6f39626c08d7.webp?v=1714910954","width":2000},{"alt":null,"id":23893308407907,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f692c9cf3099150bfed398d47c9f387d23abb533_61920243-96d9-4afe-902b-9979ac546a76.webp?v=1714910956"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f692c9cf3099150bfed398d47c9f387d23abb533_61920243-96d9-4afe-902b-9979ac546a76.webp?v=1714910956","width":2000},{"alt":null,"id":23893308801123,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/92f7bbf783cd70f99d82cfdf2cf19dd4d3fb33e5_609829ac-4f13-4d6e-97f1-551b5a7c9890.webp?v=1714910959"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/92f7bbf783cd70f99d82cfdf2cf19dd4d3fb33e5_609829ac-4f13-4d6e-97f1-551b5a7c9890.webp?v=1714910959","width":2000},{"alt":null,"id":23893309620323,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b546c1f415acee51f1bc8cf2e8633d5c77e29636_d8ea4e0b-9322-495d-83e8-9fead0256c54.webp?v=1714910961"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b546c1f415acee51f1bc8cf2e8633d5c77e29636_d8ea4e0b-9322-495d-83e8-9fead0256c54.webp?v=1714910961","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $bumper = null; $variants = [{"id":41911077470307,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118424-IV05","requires_shipping":true,"taxable":true,"featured_image":{"id":31487963201635,"product_id":7415026090083,"position":7,"created_at":"2024-05-05T20:09:12+08:00","updated_at":"2024-05-05T20:09:12+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/711ac5eca09f210942c12a3b220edca28dd4c649_66cead85-b8b4-45f2-9da2-ee37f8b4eec2.webp?v=1714910952","variant_ids":[41911077470307]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - 1G - 左看看 - Mod NX-黑色邊框","public_title":"Mod NX-黑色邊框","options":["Mod NX-黑色邊框"],"price":110000,"weight":1380,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"MPB0118424-IV05","featured_media":{"alt":null,"id":23893307523171,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/711ac5eca09f210942c12a3b220edca28dd4c649_66cead85-b8b4-45f2-9da2-ee37f8b4eec2.webp?v=1714910952"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41911077470307,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118424-IV05","requires_shipping":true,"taxable":true,"featured_image":{"id":31487963201635,"product_id":7415026090083,"position":7,"created_at":"2024-05-05T20:09:12+08:00","updated_at":"2024-05-05T20:09:12+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/711ac5eca09f210942c12a3b220edca28dd4c649_66cead85-b8b4-45f2-9da2-ee37f8b4eec2.webp?v=1714910952","variant_ids":[41911077470307]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - 1G - 左看看 - Mod NX-黑色邊框","public_title":"Mod NX-黑色邊框","options":["Mod NX-黑色邊框"],"price":110000,"weight":1380,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"MPB0118424-IV05","featured_media":{"alt":null,"id":23893307523171,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/711ac5eca09f210942c12a3b220edca28dd4c649_66cead85-b8b4-45f2-9da2-ee37f8b4eec2.webp?v=1714910952"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}; $device_handle = null var sellingStatus if ($bumper) { $(document).ready(function() { var productImg = $product.images[0] var bumperVariants = $bumper.variants; var bumperColors = new Object(); var currentVariant = ''; var productType = ''; bumperVariants.forEach(variant => { bumperColors[`${variant.title.split(' (')[0].toLowerCase()}`] = variant.featured_image.src; }); if (productType === 'mod-nx-backplate' || productType === 'mod-backplate') { mergeImages( [productImg, bumperColors[currentVariant]], { crossOrigin: 'anonymous' } ).then(mergedImg => { $('.merged-img').attr('src', mergedImg); }); } else { mergeImages( [bumperColors[currentVariant], productImg], { crossOrigin: 'anonymous' } ).then(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: "停產" }