$product = {"id":7415083237475,"title":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - 史迪奇 - 夏威夷系列-每天搞怪","handle":"iphone-12-mini-mod-nx-magsafe-printable-yf06","description":null,"published_at":"2024-06-11T17:57:30+08:00","created_at":"2024-05-05T20:19:34+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"設計師MOD NX MagSafe專區史迪奇","tags":["20%","25%","30%","35%","40%","45%","50%","b2b","brand-Apple","designer","designer-stitch","device-iPhone 12 mini","merge","mod-nx-magsafe-printable","new-modnx-sku","reseller-modnx-magsafe-stitch","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":41911687610467,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118424-YF06","requires_shipping":true,"taxable":true,"featured_image":{"id":31488112328803,"product_id":7415083237475,"position":1,"created_at":"2024-05-05T20:19:37+08:00","updated_at":"2024-05-05T20:19:37+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/00e701bed26224e3c1f86d022394497ca8e0f8eb_f6e73160-0222-432c-ae72-f16b4b6787cb.webp?v=1714911577","variant_ids":[41911687610467]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - 史迪奇 - 夏威夷系列-每天搞怪 - 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-YF06","featured_media":{"alt":null,"id":23893456846947,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/00e701bed26224e3c1f86d022394497ca8e0f8eb_f6e73160-0222-432c-ae72-f16b4b6787cb.webp?v=1714911577"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/00e701bed26224e3c1f86d022394497ca8e0f8eb_f6e73160-0222-432c-ae72-f16b4b6787cb.webp?v=1714911577","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/05f8547fecaa295d3f20d0367a009a878b449a56_cd416a9c-72a1-452f-ab40-ffa2f61a8fad.webp?v=1714911579","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6a72dd5b2c45143b18c8c72ee81fe1c4c8e1ed4a_a85cbfb3-2841-4a1d-89b7-c95b083d2076.webp?v=1714911581","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/abfaea481f3f0312949547acaca93fb576af73f3_7e77ac46-c611-4b82-9b17-996a8650d6b4.webp?v=1714911583","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/eb271a6bb93d72947d52e66168ffd6c8d165ff36_c32247ee-94ce-4acb-b670-fa04af1b6f6a.webp?v=1714911586","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e7d1a10ccfdf1cfcbf5a93c3539051db9f04eab4_3962c325-e0cc-4716-bf37-4b7a8f13dc21.webp?v=1714911588","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/71f37c4bd90111959e6dd3804624b4434c6ef073_42c02658-0c71-45e4-840e-9d46bf87e364.webp?v=1714911591","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2e3f51052868a7072592a4713378ecd90634831f_900c21b2-4f21-4f14-994f-04e54a87acdb.webp?v=1714911593","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/34bae2d8b55479ffbc5d77fa48f16c47503f5755_3f781c8a-e400-4fde-909e-8513a683308a.webp?v=1714911595","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/261c84fbdb05b33672f6ab4bac7c0b3235d1aaa8_595ec50c-b358-4f0f-8dfa-c72288184a05.webp?v=1714911598","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d4483e04efbbb3fae25ecbe8498584f162b6cb1c_7e961044-ed4c-4af0-a804-59d42b6f7597.webp?v=1714911600"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/00e701bed26224e3c1f86d022394497ca8e0f8eb_f6e73160-0222-432c-ae72-f16b4b6787cb.webp?v=1714911577","options":["color"],"media":[{"alt":null,"id":23893456846947,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/00e701bed26224e3c1f86d022394497ca8e0f8eb_f6e73160-0222-432c-ae72-f16b4b6787cb.webp?v=1714911577"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/00e701bed26224e3c1f86d022394497ca8e0f8eb_f6e73160-0222-432c-ae72-f16b4b6787cb.webp?v=1714911577","width":2000},{"alt":null,"id":23893457469539,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/05f8547fecaa295d3f20d0367a009a878b449a56_cd416a9c-72a1-452f-ab40-ffa2f61a8fad.webp?v=1714911579"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/05f8547fecaa295d3f20d0367a009a878b449a56_cd416a9c-72a1-452f-ab40-ffa2f61a8fad.webp?v=1714911579","width":2000},{"alt":null,"id":23893457797219,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6a72dd5b2c45143b18c8c72ee81fe1c4c8e1ed4a_a85cbfb3-2841-4a1d-89b7-c95b083d2076.webp?v=1714911581"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6a72dd5b2c45143b18c8c72ee81fe1c4c8e1ed4a_a85cbfb3-2841-4a1d-89b7-c95b083d2076.webp?v=1714911581","width":2000},{"alt":null,"id":23893458321507,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/abfaea481f3f0312949547acaca93fb576af73f3_7e77ac46-c611-4b82-9b17-996a8650d6b4.webp?v=1714911583"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/abfaea481f3f0312949547acaca93fb576af73f3_7e77ac46-c611-4b82-9b17-996a8650d6b4.webp?v=1714911583","width":2000},{"alt":null,"id":23893458845795,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/eb271a6bb93d72947d52e66168ffd6c8d165ff36_c32247ee-94ce-4acb-b670-fa04af1b6f6a.webp?v=1714911586"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/eb271a6bb93d72947d52e66168ffd6c8d165ff36_c32247ee-94ce-4acb-b670-fa04af1b6f6a.webp?v=1714911586","width":2000},{"alt":null,"id":23893459271779,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e7d1a10ccfdf1cfcbf5a93c3539051db9f04eab4_3962c325-e0cc-4716-bf37-4b7a8f13dc21.webp?v=1714911588"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e7d1a10ccfdf1cfcbf5a93c3539051db9f04eab4_3962c325-e0cc-4716-bf37-4b7a8f13dc21.webp?v=1714911588","width":2000},{"alt":null,"id":23893459828835,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/71f37c4bd90111959e6dd3804624b4434c6ef073_42c02658-0c71-45e4-840e-9d46bf87e364.webp?v=1714911591"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/71f37c4bd90111959e6dd3804624b4434c6ef073_42c02658-0c71-45e4-840e-9d46bf87e364.webp?v=1714911591","width":2000},{"alt":null,"id":23893460516963,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2e3f51052868a7072592a4713378ecd90634831f_900c21b2-4f21-4f14-994f-04e54a87acdb.webp?v=1714911593"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2e3f51052868a7072592a4713378ecd90634831f_900c21b2-4f21-4f14-994f-04e54a87acdb.webp?v=1714911593","width":2000},{"alt":null,"id":23893461139555,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/34bae2d8b55479ffbc5d77fa48f16c47503f5755_3f781c8a-e400-4fde-909e-8513a683308a.webp?v=1714911595"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/34bae2d8b55479ffbc5d77fa48f16c47503f5755_3f781c8a-e400-4fde-909e-8513a683308a.webp?v=1714911595","width":2000},{"alt":null,"id":23893461762147,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/261c84fbdb05b33672f6ab4bac7c0b3235d1aaa8_595ec50c-b358-4f0f-8dfa-c72288184a05.webp?v=1714911598"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/261c84fbdb05b33672f6ab4bac7c0b3235d1aaa8_595ec50c-b358-4f0f-8dfa-c72288184a05.webp?v=1714911598","width":2000},{"alt":null,"id":23893462581347,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d4483e04efbbb3fae25ecbe8498584f162b6cb1c_7e961044-ed4c-4af0-a804-59d42b6f7597.webp?v=1714911600"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d4483e04efbbb3fae25ecbe8498584f162b6cb1c_7e961044-ed4c-4af0-a804-59d42b6f7597.webp?v=1714911600","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41911687610467,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118424-YF06","requires_shipping":true,"taxable":true,"featured_image":{"id":31488112328803,"product_id":7415083237475,"position":1,"created_at":"2024-05-05T20:19:37+08:00","updated_at":"2024-05-05T20:19:37+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/00e701bed26224e3c1f86d022394497ca8e0f8eb_f6e73160-0222-432c-ae72-f16b4b6787cb.webp?v=1714911577","variant_ids":[41911687610467]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - 史迪奇 - 夏威夷系列-每天搞怪 - 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-YF06","featured_media":{"alt":null,"id":23893456846947,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/00e701bed26224e3c1f86d022394497ca8e0f8eb_f6e73160-0222-432c-ae72-f16b4b6787cb.webp?v=1714911577"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41911687610467,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118424-YF06","requires_shipping":true,"taxable":true,"featured_image":{"id":31488112328803,"product_id":7415083237475,"position":1,"created_at":"2024-05-05T20:19:37+08:00","updated_at":"2024-05-05T20:19:37+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/00e701bed26224e3c1f86d022394497ca8e0f8eb_f6e73160-0222-432c-ae72-f16b4b6787cb.webp?v=1714911577","variant_ids":[41911687610467]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - 史迪奇 - 夏威夷系列-每天搞怪 - 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-YF06","featured_media":{"alt":null,"id":23893456846947,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/00e701bed26224e3c1f86d022394497ca8e0f8eb_f6e73160-0222-432c-ae72-f16b4b6787cb.webp?v=1714911577"}},"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: "停產" }