$product = {"id":7369214722147,"title":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 Pro Max - Snoopy 史努比 - 冰淇淋甜筒","handle":"iphone-12-pro-max-mod-nx-magsafe-printable-pl59","description":null,"published_at":"2024-06-11T17:31:36+08:00","created_at":"2024-04-23T15:46:01+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 pro max","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":41793684537443,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118724-PL59","requires_shipping":true,"taxable":true,"featured_image":{"id":31387085799523,"product_id":7369214722147,"position":2,"created_at":"2024-04-23T15:46:06+08:00","updated_at":"2024-04-23T15:46:06+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8f257404a134d2b377736451cb242e38156ec42f_75f56b6b-e6fb-4f8b-a4ac-8ab98306f5a9.webp?v=1713858366","variant_ids":[41793684537443]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 Pro Max - 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":"MPB0118724-PL59","featured_media":{"alt":null,"id":23789324501091,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8f257404a134d2b377736451cb242e38156ec42f_75f56b6b-e6fb-4f8b-a4ac-8ab98306f5a9.webp?v=1713858366"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8146e8053f2438a67ee1877ac507fb10746d8760_f793cf3c-797a-4b5b-afe5-58a4e5cd1fd6.webp?v=1713858364","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8f257404a134d2b377736451cb242e38156ec42f_75f56b6b-e6fb-4f8b-a4ac-8ab98306f5a9.webp?v=1713858366","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/590a95d73ae62704300390951b730ceea20f1ca6_b02cd116-46e5-4c65-b0f5-9d9cc9956b20.webp?v=1713858368","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d64ce7b48be17525ea9eb856038cbb6bbb2dff42_b2812192-81e9-483b-b27f-192c0c9e0ec5.webp?v=1713858370","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6d2250c12a7ef0700da8253376f9229efff2ae3a_fcc59321-1f33-4f1d-bbf1-dd6e9754ff5a.webp?v=1713858373","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0acf0ee205d2366d99925e40dc2d7ef09d0d17eb_86428028-2d0e-4ec0-97c9-2dabdb32b54a.webp?v=1713858376","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/92ff7c0f93e4b993ef115c230d5d3976b53a8f24_ff5eca97-6551-487c-a640-eadb66c49ef9.webp?v=1713858378","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/369e76455be0bb0fdc38ff9b1ffac084bed830e2_851f72d5-8108-4b60-90a3-3e68b5796017.webp?v=1713858381","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/82a877c4802cd16ffd8c2ba779e9bc3a4cdb2775_befbc0f1-0f48-4dad-9363-b8a59f8bd856.webp?v=1713858383","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/527ef54ad77832e980a15cd490210feb06f2bd1a_6dceb85a-1336-4632-bed8-0f87e2c1f21e.webp?v=1713858385"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8146e8053f2438a67ee1877ac507fb10746d8760_f793cf3c-797a-4b5b-afe5-58a4e5cd1fd6.webp?v=1713858364","options":["color"],"media":[{"alt":null,"id":23789323911267,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8146e8053f2438a67ee1877ac507fb10746d8760_f793cf3c-797a-4b5b-afe5-58a4e5cd1fd6.webp?v=1713858364"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8146e8053f2438a67ee1877ac507fb10746d8760_f793cf3c-797a-4b5b-afe5-58a4e5cd1fd6.webp?v=1713858364","width":2000},{"alt":null,"id":23789324501091,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8f257404a134d2b377736451cb242e38156ec42f_75f56b6b-e6fb-4f8b-a4ac-8ab98306f5a9.webp?v=1713858366"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8f257404a134d2b377736451cb242e38156ec42f_75f56b6b-e6fb-4f8b-a4ac-8ab98306f5a9.webp?v=1713858366","width":2000},{"alt":null,"id":23789325287523,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/590a95d73ae62704300390951b730ceea20f1ca6_b02cd116-46e5-4c65-b0f5-9d9cc9956b20.webp?v=1713858368"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/590a95d73ae62704300390951b730ceea20f1ca6_b02cd116-46e5-4c65-b0f5-9d9cc9956b20.webp?v=1713858368","width":2000},{"alt":null,"id":23789325877347,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d64ce7b48be17525ea9eb856038cbb6bbb2dff42_b2812192-81e9-483b-b27f-192c0c9e0ec5.webp?v=1713858370"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d64ce7b48be17525ea9eb856038cbb6bbb2dff42_b2812192-81e9-483b-b27f-192c0c9e0ec5.webp?v=1713858370","width":2000},{"alt":null,"id":23789326631011,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6d2250c12a7ef0700da8253376f9229efff2ae3a_fcc59321-1f33-4f1d-bbf1-dd6e9754ff5a.webp?v=1713858373"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6d2250c12a7ef0700da8253376f9229efff2ae3a_fcc59321-1f33-4f1d-bbf1-dd6e9754ff5a.webp?v=1713858373","width":2000},{"alt":null,"id":23789327319139,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0acf0ee205d2366d99925e40dc2d7ef09d0d17eb_86428028-2d0e-4ec0-97c9-2dabdb32b54a.webp?v=1713858376"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0acf0ee205d2366d99925e40dc2d7ef09d0d17eb_86428028-2d0e-4ec0-97c9-2dabdb32b54a.webp?v=1713858376","width":2000},{"alt":null,"id":23789328007267,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/92ff7c0f93e4b993ef115c230d5d3976b53a8f24_ff5eca97-6551-487c-a640-eadb66c49ef9.webp?v=1713858378"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/92ff7c0f93e4b993ef115c230d5d3976b53a8f24_ff5eca97-6551-487c-a640-eadb66c49ef9.webp?v=1713858378","width":2000},{"alt":null,"id":23789328629859,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/369e76455be0bb0fdc38ff9b1ffac084bed830e2_851f72d5-8108-4b60-90a3-3e68b5796017.webp?v=1713858381"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/369e76455be0bb0fdc38ff9b1ffac084bed830e2_851f72d5-8108-4b60-90a3-3e68b5796017.webp?v=1713858381","width":2000},{"alt":null,"id":23789329252451,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/82a877c4802cd16ffd8c2ba779e9bc3a4cdb2775_befbc0f1-0f48-4dad-9363-b8a59f8bd856.webp?v=1713858383"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/82a877c4802cd16ffd8c2ba779e9bc3a4cdb2775_befbc0f1-0f48-4dad-9363-b8a59f8bd856.webp?v=1713858383","width":2000},{"alt":null,"id":23789329809507,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/527ef54ad77832e980a15cd490210feb06f2bd1a_6dceb85a-1336-4632-bed8-0f87e2c1f21e.webp?v=1713858385"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/527ef54ad77832e980a15cd490210feb06f2bd1a_6dceb85a-1336-4632-bed8-0f87e2c1f21e.webp?v=1713858385","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $bumper = null; $variants = [{"id":41793684537443,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118724-PL59","requires_shipping":true,"taxable":true,"featured_image":{"id":31387085799523,"product_id":7369214722147,"position":2,"created_at":"2024-04-23T15:46:06+08:00","updated_at":"2024-04-23T15:46:06+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8f257404a134d2b377736451cb242e38156ec42f_75f56b6b-e6fb-4f8b-a4ac-8ab98306f5a9.webp?v=1713858366","variant_ids":[41793684537443]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 Pro Max - 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":"MPB0118724-PL59","featured_media":{"alt":null,"id":23789324501091,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8f257404a134d2b377736451cb242e38156ec42f_75f56b6b-e6fb-4f8b-a4ac-8ab98306f5a9.webp?v=1713858366"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41793684537443,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118724-PL59","requires_shipping":true,"taxable":true,"featured_image":{"id":31387085799523,"product_id":7369214722147,"position":2,"created_at":"2024-04-23T15:46:06+08:00","updated_at":"2024-04-23T15:46:06+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8f257404a134d2b377736451cb242e38156ec42f_75f56b6b-e6fb-4f8b-a4ac-8ab98306f5a9.webp?v=1713858366","variant_ids":[41793684537443]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 Pro Max - 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":"MPB0118724-PL59","featured_media":{"alt":null,"id":23789324501091,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8f257404a134d2b377736451cb242e38156ec42f_75f56b6b-e6fb-4f8b-a4ac-8ab98306f5a9.webp?v=1713858366"}},"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: "停產" }