$product = {"id":7415121903715,"title":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 Pro Max - 1G - G本款","handle":"iphone-12-pro-max-mod-nx-magsafe-printable-iv07","description":null,"published_at":"2024-06-11T17:58:32+08:00","created_at":"2024-05-05T20:27:08+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 pro max","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":41912086888547,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118724-IV07","requires_shipping":true,"taxable":true,"featured_image":{"id":31488213418083,"product_id":7415121903715,"position":1,"created_at":"2024-05-05T20:27:11+08:00","updated_at":"2024-05-05T20:27:11+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/06d4d7592a4b38eb182db0865398624ebf076a56_8337a214-00df-404f-8388-7966419597dc.webp?v=1714912031","variant_ids":[41912086888547]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 Pro Max - 1G - G本款 - 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":"MPB0118724-IV07","featured_media":{"alt":null,"id":23893558067299,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/06d4d7592a4b38eb182db0865398624ebf076a56_8337a214-00df-404f-8388-7966419597dc.webp?v=1714912031"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/06d4d7592a4b38eb182db0865398624ebf076a56_8337a214-00df-404f-8388-7966419597dc.webp?v=1714912031","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0d8992313d7ca40a4c2821a7e7a0b03fb61033d0_be41da3f-0ccb-489c-9e2c-777d2555e663.webp?v=1714912033","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/faca05fd55975c65566ae7ac80ad851cf4716f83_86a86724-ec00-4735-bb30-275f9496a7ae.webp?v=1714912035","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/70868f9ea0292b400c68df974fb0c485c64ba0d4_01e87dad-eadc-4d42-a484-d6046e6ca500.webp?v=1714912038","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d760fffe28b9db816f60ca2baa0f2063e91aef04_f085d961-10df-488e-815c-b39029df50ba.webp?v=1714912040","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3d4caeda375addf8c3268f9cdd7fe888c5d488ce_a0bb5110-9505-47bd-9a38-64e2f5d848b4.webp?v=1714912043","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6e690775a2b9c8b978979bd2f7c54d98e78404f2_d0379783-4727-46e7-b0a8-930742964834.webp?v=1714912045","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/50d36531eab2642935292564e5530a4858902962_006abde7-589b-4777-9ada-2e7da54ea92b.webp?v=1714912048","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c43a8bb9b6dc6469b6f39d2ae5e09b6338c5898d_9f1c460d-4dfe-4894-81b3-26ba3490d492.webp?v=1714912050","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/81393178c76957eb56a6c6df57fec03287d6ca5a_1aaa9f1d-8597-4778-950f-f49b11bc9ad2.webp?v=1714912052"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/06d4d7592a4b38eb182db0865398624ebf076a56_8337a214-00df-404f-8388-7966419597dc.webp?v=1714912031","options":["color"],"media":[{"alt":null,"id":23893558067299,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/06d4d7592a4b38eb182db0865398624ebf076a56_8337a214-00df-404f-8388-7966419597dc.webp?v=1714912031"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/06d4d7592a4b38eb182db0865398624ebf076a56_8337a214-00df-404f-8388-7966419597dc.webp?v=1714912031","width":2000},{"alt":null,"id":23893558886499,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0d8992313d7ca40a4c2821a7e7a0b03fb61033d0_be41da3f-0ccb-489c-9e2c-777d2555e663.webp?v=1714912033"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0d8992313d7ca40a4c2821a7e7a0b03fb61033d0_be41da3f-0ccb-489c-9e2c-777d2555e663.webp?v=1714912033","width":2000},{"alt":null,"id":23893559279715,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/faca05fd55975c65566ae7ac80ad851cf4716f83_86a86724-ec00-4735-bb30-275f9496a7ae.webp?v=1714912035"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/faca05fd55975c65566ae7ac80ad851cf4716f83_86a86724-ec00-4735-bb30-275f9496a7ae.webp?v=1714912035","width":2000},{"alt":null,"id":23893560262755,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/70868f9ea0292b400c68df974fb0c485c64ba0d4_01e87dad-eadc-4d42-a484-d6046e6ca500.webp?v=1714912038"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/70868f9ea0292b400c68df974fb0c485c64ba0d4_01e87dad-eadc-4d42-a484-d6046e6ca500.webp?v=1714912038","width":2000},{"alt":null,"id":23893560557667,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d760fffe28b9db816f60ca2baa0f2063e91aef04_f085d961-10df-488e-815c-b39029df50ba.webp?v=1714912040"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d760fffe28b9db816f60ca2baa0f2063e91aef04_f085d961-10df-488e-815c-b39029df50ba.webp?v=1714912040","width":2000},{"alt":null,"id":23893560983651,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3d4caeda375addf8c3268f9cdd7fe888c5d488ce_a0bb5110-9505-47bd-9a38-64e2f5d848b4.webp?v=1714912043"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3d4caeda375addf8c3268f9cdd7fe888c5d488ce_a0bb5110-9505-47bd-9a38-64e2f5d848b4.webp?v=1714912043","width":2000},{"alt":null,"id":23893561311331,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6e690775a2b9c8b978979bd2f7c54d98e78404f2_d0379783-4727-46e7-b0a8-930742964834.webp?v=1714912045"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6e690775a2b9c8b978979bd2f7c54d98e78404f2_d0379783-4727-46e7-b0a8-930742964834.webp?v=1714912045","width":2000},{"alt":null,"id":23893561606243,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/50d36531eab2642935292564e5530a4858902962_006abde7-589b-4777-9ada-2e7da54ea92b.webp?v=1714912048"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/50d36531eab2642935292564e5530a4858902962_006abde7-589b-4777-9ada-2e7da54ea92b.webp?v=1714912048","width":2000},{"alt":null,"id":23893561868387,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c43a8bb9b6dc6469b6f39d2ae5e09b6338c5898d_9f1c460d-4dfe-4894-81b3-26ba3490d492.webp?v=1714912050"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c43a8bb9b6dc6469b6f39d2ae5e09b6338c5898d_9f1c460d-4dfe-4894-81b3-26ba3490d492.webp?v=1714912050","width":2000},{"alt":null,"id":23893562097763,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/81393178c76957eb56a6c6df57fec03287d6ca5a_1aaa9f1d-8597-4778-950f-f49b11bc9ad2.webp?v=1714912052"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/81393178c76957eb56a6c6df57fec03287d6ca5a_1aaa9f1d-8597-4778-950f-f49b11bc9ad2.webp?v=1714912052","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41912086888547,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118724-IV07","requires_shipping":true,"taxable":true,"featured_image":{"id":31488213418083,"product_id":7415121903715,"position":1,"created_at":"2024-05-05T20:27:11+08:00","updated_at":"2024-05-05T20:27:11+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/06d4d7592a4b38eb182db0865398624ebf076a56_8337a214-00df-404f-8388-7966419597dc.webp?v=1714912031","variant_ids":[41912086888547]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 Pro Max - 1G - G本款 - 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":"MPB0118724-IV07","featured_media":{"alt":null,"id":23893558067299,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/06d4d7592a4b38eb182db0865398624ebf076a56_8337a214-00df-404f-8388-7966419597dc.webp?v=1714912031"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41912086888547,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118724-IV07","requires_shipping":true,"taxable":true,"featured_image":{"id":31488213418083,"product_id":7415121903715,"position":1,"created_at":"2024-05-05T20:27:11+08:00","updated_at":"2024-05-05T20:27:11+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/06d4d7592a4b38eb182db0865398624ebf076a56_8337a214-00df-404f-8388-7966419597dc.webp?v=1714912031","variant_ids":[41912086888547]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 Pro Max - 1G - G本款 - 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":"MPB0118724-IV07","featured_media":{"alt":null,"id":23893558067299,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/06d4d7592a4b38eb182db0865398624ebf076a56_8337a214-00df-404f-8388-7966419597dc.webp?v=1714912031"}},"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: "停產" }