$product = {"id":7414942990435,"title":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 Pro Max - Batman - 漫畫風格","handle":"iphone-12-pro-max-mod-nx-magsafe-printable-sb02","description":null,"published_at":"2024-06-11T17:53:43+08:00","created_at":"2024-05-05T19:53:14+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"設計師MOD NX MagSafe專區Batman","tags":["20%","25%","30%","35%","40%","45%","50%","b2b","brand-Apple","designer","designer-batman","device-iPhone 12 pro max","merge","mod-nx-magsafe-printable","new-modnx-sku","reseller-modnx-magsafe-batman","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":41910185066595,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118724-SB02","requires_shipping":true,"taxable":true,"featured_image":{"id":31487742509155,"product_id":7414942990435,"position":6,"created_at":"2024-05-05T19:53:28+08:00","updated_at":"2024-05-05T19:53:28+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9adb3056ea5c900ea4157f305623dd6b052e0ada_dc311171-ca12-4624-94cf-f8452eec2ac7.webp?v=1714910008","variant_ids":[41910185066595]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 Pro Max - Batman - 漫畫風格 - 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-SB02","featured_media":{"alt":null,"id":23893086437475,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9adb3056ea5c900ea4157f305623dd6b052e0ada_dc311171-ca12-4624-94cf-f8452eec2ac7.webp?v=1714910008"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/618a3896530b62333c4db8b4a60c8f250edff603_7ee999ee-89ec-4eff-8172-90ed0cd4e7bf.webp?v=1714909997","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e010c4f7c746f83eb7c3d3ac8ceed1d96d20db38_23359b67-4cbd-4d4b-92ec-30536069cadc.webp?v=1714909999","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fcf052fd4f8f02032f21ea56ae3cde500f18705f_11f8d4d8-3db8-4954-9351-eae8a697c09f.webp?v=1714910001","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3d297f66ebad2ce4efe57d3beb4fe682753e890a_bb23c014-2929-409f-a582-4694b82ce62e.webp?v=1714910004","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/46300b87e0c8d7814bb02fadde0f833ddd9c32f9_82c1dc13-7adb-4e4f-885a-01e9b1a8250f.webp?v=1714910006","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9adb3056ea5c900ea4157f305623dd6b052e0ada_dc311171-ca12-4624-94cf-f8452eec2ac7.webp?v=1714910008","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/18fc5c00dfbc81c204e5c5c642aba89d3657bc32_a910955f-bcff-443d-a670-688cd4982a89.webp?v=1714910011","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/46382c3f995f361955a863b55b8d29ed03e6bfe0_d6068eed-065a-4172-84c5-9ab5380143f5.webp?v=1714910013","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/85c8e0714e0ca8a69fc3e12c6397acef34728ddc_51745f33-2c0f-4fbb-96ad-9670565c2d51.webp?v=1714910015","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8c2347907c42ee0dcef019b60eb86fb7470f7794_0e74cff9-6327-489c-9848-b04f5c487e7c.webp?v=1714910017"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/618a3896530b62333c4db8b4a60c8f250edff603_7ee999ee-89ec-4eff-8172-90ed0cd4e7bf.webp?v=1714909997","options":["color"],"media":[{"alt":null,"id":23893083881571,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/618a3896530b62333c4db8b4a60c8f250edff603_7ee999ee-89ec-4eff-8172-90ed0cd4e7bf.webp?v=1714909997"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/618a3896530b62333c4db8b4a60c8f250edff603_7ee999ee-89ec-4eff-8172-90ed0cd4e7bf.webp?v=1714909997","width":2000},{"alt":null,"id":23893084405859,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e010c4f7c746f83eb7c3d3ac8ceed1d96d20db38_23359b67-4cbd-4d4b-92ec-30536069cadc.webp?v=1714909999"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e010c4f7c746f83eb7c3d3ac8ceed1d96d20db38_23359b67-4cbd-4d4b-92ec-30536069cadc.webp?v=1714909999","width":2000},{"alt":null,"id":23893084897379,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fcf052fd4f8f02032f21ea56ae3cde500f18705f_11f8d4d8-3db8-4954-9351-eae8a697c09f.webp?v=1714910001"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fcf052fd4f8f02032f21ea56ae3cde500f18705f_11f8d4d8-3db8-4954-9351-eae8a697c09f.webp?v=1714910001","width":2000},{"alt":null,"id":23893085519971,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3d297f66ebad2ce4efe57d3beb4fe682753e890a_bb23c014-2929-409f-a582-4694b82ce62e.webp?v=1714910004"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3d297f66ebad2ce4efe57d3beb4fe682753e890a_bb23c014-2929-409f-a582-4694b82ce62e.webp?v=1714910004","width":2000},{"alt":null,"id":23893086011491,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/46300b87e0c8d7814bb02fadde0f833ddd9c32f9_82c1dc13-7adb-4e4f-885a-01e9b1a8250f.webp?v=1714910006"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/46300b87e0c8d7814bb02fadde0f833ddd9c32f9_82c1dc13-7adb-4e4f-885a-01e9b1a8250f.webp?v=1714910006","width":2000},{"alt":null,"id":23893086437475,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9adb3056ea5c900ea4157f305623dd6b052e0ada_dc311171-ca12-4624-94cf-f8452eec2ac7.webp?v=1714910008"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9adb3056ea5c900ea4157f305623dd6b052e0ada_dc311171-ca12-4624-94cf-f8452eec2ac7.webp?v=1714910008","width":2000},{"alt":null,"id":23893086961763,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/18fc5c00dfbc81c204e5c5c642aba89d3657bc32_a910955f-bcff-443d-a670-688cd4982a89.webp?v=1714910011"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/18fc5c00dfbc81c204e5c5c642aba89d3657bc32_a910955f-bcff-443d-a670-688cd4982a89.webp?v=1714910011","width":2000},{"alt":null,"id":23893087584355,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/46382c3f995f361955a863b55b8d29ed03e6bfe0_d6068eed-065a-4172-84c5-9ab5380143f5.webp?v=1714910013"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/46382c3f995f361955a863b55b8d29ed03e6bfe0_d6068eed-065a-4172-84c5-9ab5380143f5.webp?v=1714910013","width":2000},{"alt":null,"id":23893088141411,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/85c8e0714e0ca8a69fc3e12c6397acef34728ddc_51745f33-2c0f-4fbb-96ad-9670565c2d51.webp?v=1714910015"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/85c8e0714e0ca8a69fc3e12c6397acef34728ddc_51745f33-2c0f-4fbb-96ad-9670565c2d51.webp?v=1714910015","width":2000},{"alt":null,"id":23893088731235,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8c2347907c42ee0dcef019b60eb86fb7470f7794_0e74cff9-6327-489c-9848-b04f5c487e7c.webp?v=1714910017"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8c2347907c42ee0dcef019b60eb86fb7470f7794_0e74cff9-6327-489c-9848-b04f5c487e7c.webp?v=1714910017","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41910185066595,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118724-SB02","requires_shipping":true,"taxable":true,"featured_image":{"id":31487742509155,"product_id":7414942990435,"position":6,"created_at":"2024-05-05T19:53:28+08:00","updated_at":"2024-05-05T19:53:28+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9adb3056ea5c900ea4157f305623dd6b052e0ada_dc311171-ca12-4624-94cf-f8452eec2ac7.webp?v=1714910008","variant_ids":[41910185066595]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 Pro Max - Batman - 漫畫風格 - 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-SB02","featured_media":{"alt":null,"id":23893086437475,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9adb3056ea5c900ea4157f305623dd6b052e0ada_dc311171-ca12-4624-94cf-f8452eec2ac7.webp?v=1714910008"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41910185066595,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118724-SB02","requires_shipping":true,"taxable":true,"featured_image":{"id":31487742509155,"product_id":7414942990435,"position":6,"created_at":"2024-05-05T19:53:28+08:00","updated_at":"2024-05-05T19:53:28+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9adb3056ea5c900ea4157f305623dd6b052e0ada_dc311171-ca12-4624-94cf-f8452eec2ac7.webp?v=1714910008","variant_ids":[41910185066595]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 Pro Max - Batman - 漫畫風格 - 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-SB02","featured_media":{"alt":null,"id":23893086437475,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9adb3056ea5c900ea4157f305623dd6b052e0ada_dc311171-ca12-4624-94cf-f8452eec2ac7.webp?v=1714910008"}},"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: "停產" }