$product = {"id":7369221668963,"title":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - Snoopy 史努比 - 冰淇淋甜筒","handle":"iphone-12-mini-mod-nx-magsafe-printable-pl59","description":null,"published_at":"2024-06-11T17:31:45+08:00","created_at":"2024-04-23T15:47:16+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"設計師MOD NX MagSafe專區Snoopy 史努比","tags":["20%","25%","30%","35%","40%","45%","50%","b2b","brand-Apple","designer","designer-snoopy","device-iPhone 12 mini","merge","mod-nx-magsafe-printable","new-modnx-sku","reseller-modnx-magsafe-snoopy","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":41793760067683,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118424-PL59","requires_shipping":true,"taxable":true,"featured_image":{"id":31387105427555,"product_id":7369221668963,"position":4,"created_at":"2024-04-23T15:47:25+08:00","updated_at":"2024-04-23T15:47:25+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/358398b1a568f86cf129c74c393c9582076d7caa_0f6cbda3-3bb0-466d-8a73-d032d3fea99c.webp?v=1713858445","variant_ids":[41793760067683]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - Snoopy 史努比 - 冰淇淋甜筒 - 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-PL59","featured_media":{"alt":null,"id":23789344161891,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/358398b1a568f86cf129c74c393c9582076d7caa_0f6cbda3-3bb0-466d-8a73-d032d3fea99c.webp?v=1713858445"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c25ca0486b7bf3b6c8b3fb744ec82eed734fa4ee_b4641ffa-17ab-4b84-851f-16565bc9072e.webp?v=1713858438","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/794fc9a2342613c00efab5c7b5b28660a63d9212_84d9c9f2-a970-4964-be7e-20eab547bc35.webp?v=1713858440","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/87078b4d5840f43bb7d18bd223695afd11f2f74f_205c133b-8018-4334-85b0-cae1a5a8cd37.webp?v=1713858443","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/358398b1a568f86cf129c74c393c9582076d7caa_0f6cbda3-3bb0-466d-8a73-d032d3fea99c.webp?v=1713858445","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c92afdf8dd03026621614ec79f897995b85c8926_be0ab936-026d-4891-92fd-bedc9a7f96f1.webp?v=1713858448","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3c88d01ec6d61d751e0ce6fd1946b0f864865c5f_5e6c2261-822d-4e4c-9c4d-bc8b32d2c675.webp?v=1713858450","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9d4b12dcdcedd98b9de0bdca177852230201fb3d_3c1ce05a-6307-483e-99b3-bdc02a369d5d.webp?v=1713858452","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/270262d1745eaa8028fe3e1b25192dd35be94aa2_609f5cc8-108e-4b55-a7ab-6cd9b73b7f9a.webp?v=1713858454","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ecd3780949008e3945c740e7f97dfe38adfad036_f34e8194-00d0-4675-91c6-767bbf5f3af1.webp?v=1713858457","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ab3d8dd56bfee40443ca2fcf20532329c6e588be_6187bafd-703a-4b95-912b-4ae4ee98326a.webp?v=1713858460","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/08abf0fba4a61b678cf48c6680f1c1cf36a08251_02944b8a-bbc2-4ecd-bf4d-674a852851aa.webp?v=1713858462"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c25ca0486b7bf3b6c8b3fb744ec82eed734fa4ee_b4641ffa-17ab-4b84-851f-16565bc9072e.webp?v=1713858438","options":["color"],"media":[{"alt":null,"id":23789342425187,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c25ca0486b7bf3b6c8b3fb744ec82eed734fa4ee_b4641ffa-17ab-4b84-851f-16565bc9072e.webp?v=1713858438"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c25ca0486b7bf3b6c8b3fb744ec82eed734fa4ee_b4641ffa-17ab-4b84-851f-16565bc9072e.webp?v=1713858438","width":2000},{"alt":null,"id":23789342949475,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/794fc9a2342613c00efab5c7b5b28660a63d9212_84d9c9f2-a970-4964-be7e-20eab547bc35.webp?v=1713858440"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/794fc9a2342613c00efab5c7b5b28660a63d9212_84d9c9f2-a970-4964-be7e-20eab547bc35.webp?v=1713858440","width":2000},{"alt":null,"id":23789343637603,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/87078b4d5840f43bb7d18bd223695afd11f2f74f_205c133b-8018-4334-85b0-cae1a5a8cd37.webp?v=1713858443"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/87078b4d5840f43bb7d18bd223695afd11f2f74f_205c133b-8018-4334-85b0-cae1a5a8cd37.webp?v=1713858443","width":2000},{"alt":null,"id":23789344161891,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/358398b1a568f86cf129c74c393c9582076d7caa_0f6cbda3-3bb0-466d-8a73-d032d3fea99c.webp?v=1713858445"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/358398b1a568f86cf129c74c393c9582076d7caa_0f6cbda3-3bb0-466d-8a73-d032d3fea99c.webp?v=1713858445","width":2000},{"alt":null,"id":23789344751715,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c92afdf8dd03026621614ec79f897995b85c8926_be0ab936-026d-4891-92fd-bedc9a7f96f1.webp?v=1713858448"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c92afdf8dd03026621614ec79f897995b85c8926_be0ab936-026d-4891-92fd-bedc9a7f96f1.webp?v=1713858448","width":2000},{"alt":null,"id":23789345341539,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3c88d01ec6d61d751e0ce6fd1946b0f864865c5f_5e6c2261-822d-4e4c-9c4d-bc8b32d2c675.webp?v=1713858450"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3c88d01ec6d61d751e0ce6fd1946b0f864865c5f_5e6c2261-822d-4e4c-9c4d-bc8b32d2c675.webp?v=1713858450","width":2000},{"alt":null,"id":23789345931363,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9d4b12dcdcedd98b9de0bdca177852230201fb3d_3c1ce05a-6307-483e-99b3-bdc02a369d5d.webp?v=1713858452"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9d4b12dcdcedd98b9de0bdca177852230201fb3d_3c1ce05a-6307-483e-99b3-bdc02a369d5d.webp?v=1713858452","width":2000},{"alt":null,"id":23789346619491,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/270262d1745eaa8028fe3e1b25192dd35be94aa2_609f5cc8-108e-4b55-a7ab-6cd9b73b7f9a.webp?v=1713858454"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/270262d1745eaa8028fe3e1b25192dd35be94aa2_609f5cc8-108e-4b55-a7ab-6cd9b73b7f9a.webp?v=1713858454","width":2000},{"alt":null,"id":23789347438691,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ecd3780949008e3945c740e7f97dfe38adfad036_f34e8194-00d0-4675-91c6-767bbf5f3af1.webp?v=1713858457"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ecd3780949008e3945c740e7f97dfe38adfad036_f34e8194-00d0-4675-91c6-767bbf5f3af1.webp?v=1713858457","width":2000},{"alt":null,"id":23789348028515,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ab3d8dd56bfee40443ca2fcf20532329c6e588be_6187bafd-703a-4b95-912b-4ae4ee98326a.webp?v=1713858460"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ab3d8dd56bfee40443ca2fcf20532329c6e588be_6187bafd-703a-4b95-912b-4ae4ee98326a.webp?v=1713858460","width":2000},{"alt":null,"id":23789348618339,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/08abf0fba4a61b678cf48c6680f1c1cf36a08251_02944b8a-bbc2-4ecd-bf4d-674a852851aa.webp?v=1713858462"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/08abf0fba4a61b678cf48c6680f1c1cf36a08251_02944b8a-bbc2-4ecd-bf4d-674a852851aa.webp?v=1713858462","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41793760067683,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118424-PL59","requires_shipping":true,"taxable":true,"featured_image":{"id":31387105427555,"product_id":7369221668963,"position":4,"created_at":"2024-04-23T15:47:25+08:00","updated_at":"2024-04-23T15:47:25+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/358398b1a568f86cf129c74c393c9582076d7caa_0f6cbda3-3bb0-466d-8a73-d032d3fea99c.webp?v=1713858445","variant_ids":[41793760067683]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - Snoopy 史努比 - 冰淇淋甜筒 - 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-PL59","featured_media":{"alt":null,"id":23789344161891,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/358398b1a568f86cf129c74c393c9582076d7caa_0f6cbda3-3bb0-466d-8a73-d032d3fea99c.webp?v=1713858445"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41793760067683,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118424-PL59","requires_shipping":true,"taxable":true,"featured_image":{"id":31387105427555,"product_id":7369221668963,"position":4,"created_at":"2024-04-23T15:47:25+08:00","updated_at":"2024-04-23T15:47:25+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/358398b1a568f86cf129c74c393c9582076d7caa_0f6cbda3-3bb0-466d-8a73-d032d3fea99c.webp?v=1713858445","variant_ids":[41793760067683]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - Snoopy 史努比 - 冰淇淋甜筒 - 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-PL59","featured_media":{"alt":null,"id":23789344161891,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/358398b1a568f86cf129c74c393c9582076d7caa_0f6cbda3-3bb0-466d-8a73-d032d3fea99c.webp?v=1713858445"}},"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: "停產" }