$product = {"id":7415021863011,"title":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - 1G - J個好","handle":"iphone-12-mini-mod-nx-magsafe-printable-iv08","description":null,"published_at":"2024-06-11T17:55:51+08:00","created_at":"2024-05-05T20:08:06+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":41911032479843,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118424-IV08","requires_shipping":true,"taxable":true,"featured_image":{"id":31487950815331,"product_id":7415021863011,"position":6,"created_at":"2024-05-05T20:08:20+08:00","updated_at":"2024-05-05T20:08:20+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b5f89e21300c85bf9721c09fc7e5d0231dce7ff9_aba368a4-232e-4ef8-aa76-4a222eb27047.webp?v=1714910900","variant_ids":[41911032479843]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - 1G - J個好 - 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-IV08","featured_media":{"alt":null,"id":23893295202403,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b5f89e21300c85bf9721c09fc7e5d0231dce7ff9_aba368a4-232e-4ef8-aa76-4a222eb27047.webp?v=1714910900"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2bcd6d128d6b5b2ca34ea9c95a5ab0c3eba919c0_5acef7d0-e6bf-4021-8102-479f00df93d4.webp?v=1714910888","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4800276ee4fcd09a29aab8917bfcb9d5914e7e84_98afa58b-5ecc-4a81-a5ec-c84a7dd74020.webp?v=1714910890","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4af54464d49adf4d2b966db5e82bb52833ca86a8_d5d07bb1-5662-46de-9963-bf95eab28cd9.webp?v=1714910892","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/68b14550e28d566942c47f14a9c397db03f030ec_face8347-f43c-4b02-9d40-55eb12fdfcf1.webp?v=1714910895","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/77e01c85bad5ce226ff78cfaca75006fd6965340_a70ecc9b-430e-4968-8ca8-f3ec34dfe142.webp?v=1714910897","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b5f89e21300c85bf9721c09fc7e5d0231dce7ff9_aba368a4-232e-4ef8-aa76-4a222eb27047.webp?v=1714910900","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ca7b184440d88a7fa70317c1197fd374f0155354_a3834aca-9b02-4e16-8245-57a9d1845ffd.webp?v=1714910902","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0512c4c30734b9a44d8e51c34966a81c6d218d4b_d2affa23-8890-42b1-9f82-c5b4fdde7de6.webp?v=1714910904","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f4bd5704536eb719c476c933257c22718592c8d4_d673aa41-14b2-4ca8-ad64-d878bdf1d307.webp?v=1714910907","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1657534b7d3fa4b498d79c1b30c429447b785917_434a5d7b-c8b8-43a2-9bd0-7a771a795501.webp?v=1714910909","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bb3615b9e56ce2c59d5c343388627cc5104a55e4_4c3df0b8-6a6a-4e35-af53-156f30e1d351.webp?v=1714910911"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2bcd6d128d6b5b2ca34ea9c95a5ab0c3eba919c0_5acef7d0-e6bf-4021-8102-479f00df93d4.webp?v=1714910888","options":["color"],"media":[{"alt":null,"id":23893291761763,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2bcd6d128d6b5b2ca34ea9c95a5ab0c3eba919c0_5acef7d0-e6bf-4021-8102-479f00df93d4.webp?v=1714910888"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2bcd6d128d6b5b2ca34ea9c95a5ab0c3eba919c0_5acef7d0-e6bf-4021-8102-479f00df93d4.webp?v=1714910888","width":2000},{"alt":null,"id":23893292417123,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4800276ee4fcd09a29aab8917bfcb9d5914e7e84_98afa58b-5ecc-4a81-a5ec-c84a7dd74020.webp?v=1714910890"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4800276ee4fcd09a29aab8917bfcb9d5914e7e84_98afa58b-5ecc-4a81-a5ec-c84a7dd74020.webp?v=1714910890","width":2000},{"alt":null,"id":23893292777571,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4af54464d49adf4d2b966db5e82bb52833ca86a8_d5d07bb1-5662-46de-9963-bf95eab28cd9.webp?v=1714910892"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4af54464d49adf4d2b966db5e82bb52833ca86a8_d5d07bb1-5662-46de-9963-bf95eab28cd9.webp?v=1714910892","width":2000},{"alt":null,"id":23893293269091,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/68b14550e28d566942c47f14a9c397db03f030ec_face8347-f43c-4b02-9d40-55eb12fdfcf1.webp?v=1714910895"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/68b14550e28d566942c47f14a9c397db03f030ec_face8347-f43c-4b02-9d40-55eb12fdfcf1.webp?v=1714910895","width":2000},{"alt":null,"id":23893293826147,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/77e01c85bad5ce226ff78cfaca75006fd6965340_a70ecc9b-430e-4968-8ca8-f3ec34dfe142.webp?v=1714910897"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/77e01c85bad5ce226ff78cfaca75006fd6965340_a70ecc9b-430e-4968-8ca8-f3ec34dfe142.webp?v=1714910897","width":2000},{"alt":null,"id":23893295202403,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b5f89e21300c85bf9721c09fc7e5d0231dce7ff9_aba368a4-232e-4ef8-aa76-4a222eb27047.webp?v=1714910900"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b5f89e21300c85bf9721c09fc7e5d0231dce7ff9_aba368a4-232e-4ef8-aa76-4a222eb27047.webp?v=1714910900","width":2000},{"alt":null,"id":23893295693923,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ca7b184440d88a7fa70317c1197fd374f0155354_a3834aca-9b02-4e16-8245-57a9d1845ffd.webp?v=1714910902"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ca7b184440d88a7fa70317c1197fd374f0155354_a3834aca-9b02-4e16-8245-57a9d1845ffd.webp?v=1714910902","width":2000},{"alt":null,"id":23893296152675,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0512c4c30734b9a44d8e51c34966a81c6d218d4b_d2affa23-8890-42b1-9f82-c5b4fdde7de6.webp?v=1714910904"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0512c4c30734b9a44d8e51c34966a81c6d218d4b_d2affa23-8890-42b1-9f82-c5b4fdde7de6.webp?v=1714910904","width":2000},{"alt":null,"id":23893296742499,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f4bd5704536eb719c476c933257c22718592c8d4_d673aa41-14b2-4ca8-ad64-d878bdf1d307.webp?v=1714910907"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f4bd5704536eb719c476c933257c22718592c8d4_d673aa41-14b2-4ca8-ad64-d878bdf1d307.webp?v=1714910907","width":2000},{"alt":null,"id":23893297102947,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1657534b7d3fa4b498d79c1b30c429447b785917_434a5d7b-c8b8-43a2-9bd0-7a771a795501.webp?v=1714910909"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1657534b7d3fa4b498d79c1b30c429447b785917_434a5d7b-c8b8-43a2-9bd0-7a771a795501.webp?v=1714910909","width":2000},{"alt":null,"id":23893297561699,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bb3615b9e56ce2c59d5c343388627cc5104a55e4_4c3df0b8-6a6a-4e35-af53-156f30e1d351.webp?v=1714910911"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bb3615b9e56ce2c59d5c343388627cc5104a55e4_4c3df0b8-6a6a-4e35-af53-156f30e1d351.webp?v=1714910911","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41911032479843,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118424-IV08","requires_shipping":true,"taxable":true,"featured_image":{"id":31487950815331,"product_id":7415021863011,"position":6,"created_at":"2024-05-05T20:08:20+08:00","updated_at":"2024-05-05T20:08:20+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b5f89e21300c85bf9721c09fc7e5d0231dce7ff9_aba368a4-232e-4ef8-aa76-4a222eb27047.webp?v=1714910900","variant_ids":[41911032479843]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - 1G - J個好 - 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-IV08","featured_media":{"alt":null,"id":23893295202403,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b5f89e21300c85bf9721c09fc7e5d0231dce7ff9_aba368a4-232e-4ef8-aa76-4a222eb27047.webp?v=1714910900"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41911032479843,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118424-IV08","requires_shipping":true,"taxable":true,"featured_image":{"id":31487950815331,"product_id":7415021863011,"position":6,"created_at":"2024-05-05T20:08:20+08:00","updated_at":"2024-05-05T20:08:20+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b5f89e21300c85bf9721c09fc7e5d0231dce7ff9_aba368a4-232e-4ef8-aa76-4a222eb27047.webp?v=1714910900","variant_ids":[41911032479843]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - 1G - J個好 - 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-IV08","featured_media":{"alt":null,"id":23893295202403,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b5f89e21300c85bf9721c09fc7e5d0231dce7ff9_aba368a4-232e-4ef8-aa76-4a222eb27047.webp?v=1714910900"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}; $device_handle = null; $type = ""; var sellingStatus if ($isMerge) { $(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: "停產" }