$product = {"id":7414105014371,"title":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 13 Pro Max - Care Bears - Best Friend Bear","handle":"iphone-13-pro-max-mod-nx-magsafe-printable-yb02","description":null,"published_at":"2024-06-11T17:49:01+08:00","created_at":"2024-05-05T14:10:06+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"設計師MOD NX MagSafe專區Care Bears","tags":["20%","25%","30%","35%","40%","45%","50%","b2b","brand-Apple","designer","designer-carebears","device-iPhone 13 Pro Max","merge","mod-nx-magsafe-printable","new-modnx-sku","reseller-modnx-magsafe-carebears","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":41904126263395,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0123224-YB02","requires_shipping":true,"taxable":true,"featured_image":{"id":31484691316835,"product_id":7414105014371,"position":10,"created_at":"2024-05-05T14:10:29+08:00","updated_at":"2024-05-05T14:10:29+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b959a738b9448e2d6259f94c177fd352487b334f_2e03bb49-647f-4536-b089-6c0f7ca3efd0.webp?v=1714889429","variant_ids":[41904126263395]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 13 Pro Max - Care Bears - Best Friend Bear - 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":"MPB0123224-YB02","featured_media":{"alt":null,"id":23889986650211,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b959a738b9448e2d6259f94c177fd352487b334f_2e03bb49-647f-4536-b089-6c0f7ca3efd0.webp?v=1714889429"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":41904126722147,"title":"Mod NX-海軍藍邊框","option1":"Mod NX-海軍藍邊框","option2":null,"option3":null,"sku":"MPB01232J5-YB02","requires_shipping":true,"taxable":true,"featured_image":{"id":31484685156451,"product_id":7414105014371,"position":6,"created_at":"2024-05-05T14:10:20+08:00","updated_at":"2024-05-05T14:10:20+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bf3d72a103aae4fd0b60ad98bc60bb8daaa5a8f2_cf8da85f-a515-42c6-ae2d-84129a9ab7c8.webp?v=1714889420","variant_ids":[41904126722147]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 13 Pro Max - Care Bears - Best Friend Bear - 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":"MPB01232J5-YB02","featured_media":{"alt":null,"id":23889980391523,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bf3d72a103aae4fd0b60ad98bc60bb8daaa5a8f2_cf8da85f-a515-42c6-ae2d-84129a9ab7c8.webp?v=1714889420"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/78af653b42c7a01619283a1040ec184cac3a0c15_e1c8b6d4-f174-4dff-afd6-a66ca89a30e9.webp?v=1714889408","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/205a90edb7f05072f7845f685d8634664eafeb4b_fe423275-ab67-4fc3-90b1-331bde946902.webp?v=1714889410","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8c5113974e4c45250ad8d449b7086987bd0be23d_7aacc039-a9dd-4896-98da-a34f3fa5ee88.webp?v=1714889413","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c98b715f6766f889d701e2a11214bded425d63d5_c99ed137-417f-4acb-b769-70b4d203020c.webp?v=1714889415","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6709427b95930f4b32cbf4c87341387851cd59bc_c49523be-e85f-4f6e-99b5-4181ff306c89.webp?v=1714889417","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bf3d72a103aae4fd0b60ad98bc60bb8daaa5a8f2_cf8da85f-a515-42c6-ae2d-84129a9ab7c8.webp?v=1714889420","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1eceb60a428e6ea444ee666d2836eea0a1bb1981_2026b2c0-7f66-45ce-83b2-5071af43a514.webp?v=1714889422","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3fbae85be9a061cd9b9bc79cbc4d4ff6d7279e2b_c634040d-8e36-4e91-ace5-8523bcf4e861.webp?v=1714889424","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c6c227bfbb48e47323cf21589dcfaf5a159e6bb7_d7125a85-3bb5-43d8-9bc5-24d01ec82054.webp?v=1714889427","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b959a738b9448e2d6259f94c177fd352487b334f_2e03bb49-647f-4536-b089-6c0f7ca3efd0.webp?v=1714889429","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f230ef743e34355bd819035a49eadb87be469825_46e410b6-f984-484f-a4b1-3e13462e514f.webp?v=1714889431"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/78af653b42c7a01619283a1040ec184cac3a0c15_e1c8b6d4-f174-4dff-afd6-a66ca89a30e9.webp?v=1714889408","options":["color"],"media":[{"alt":null,"id":23889972527203,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/78af653b42c7a01619283a1040ec184cac3a0c15_e1c8b6d4-f174-4dff-afd6-a66ca89a30e9.webp?v=1714889408"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/78af653b42c7a01619283a1040ec184cac3a0c15_e1c8b6d4-f174-4dff-afd6-a66ca89a30e9.webp?v=1714889408","width":2000},{"alt":null,"id":23889974001763,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/205a90edb7f05072f7845f685d8634664eafeb4b_fe423275-ab67-4fc3-90b1-331bde946902.webp?v=1714889410"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/205a90edb7f05072f7845f685d8634664eafeb4b_fe423275-ab67-4fc3-90b1-331bde946902.webp?v=1714889410","width":2000},{"alt":null,"id":23889975312483,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8c5113974e4c45250ad8d449b7086987bd0be23d_7aacc039-a9dd-4896-98da-a34f3fa5ee88.webp?v=1714889413"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8c5113974e4c45250ad8d449b7086987bd0be23d_7aacc039-a9dd-4896-98da-a34f3fa5ee88.webp?v=1714889413","width":2000},{"alt":null,"id":23889976885347,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c98b715f6766f889d701e2a11214bded425d63d5_c99ed137-417f-4acb-b769-70b4d203020c.webp?v=1714889415"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c98b715f6766f889d701e2a11214bded425d63d5_c99ed137-417f-4acb-b769-70b4d203020c.webp?v=1714889415","width":2000},{"alt":null,"id":23889978425443,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6709427b95930f4b32cbf4c87341387851cd59bc_c49523be-e85f-4f6e-99b5-4181ff306c89.webp?v=1714889417"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6709427b95930f4b32cbf4c87341387851cd59bc_c49523be-e85f-4f6e-99b5-4181ff306c89.webp?v=1714889417","width":2000},{"alt":null,"id":23889980391523,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bf3d72a103aae4fd0b60ad98bc60bb8daaa5a8f2_cf8da85f-a515-42c6-ae2d-84129a9ab7c8.webp?v=1714889420"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bf3d72a103aae4fd0b60ad98bc60bb8daaa5a8f2_cf8da85f-a515-42c6-ae2d-84129a9ab7c8.webp?v=1714889420","width":2000},{"alt":null,"id":23889981898851,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1eceb60a428e6ea444ee666d2836eea0a1bb1981_2026b2c0-7f66-45ce-83b2-5071af43a514.webp?v=1714889422"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1eceb60a428e6ea444ee666d2836eea0a1bb1981_2026b2c0-7f66-45ce-83b2-5071af43a514.webp?v=1714889422","width":2000},{"alt":null,"id":23889983504483,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3fbae85be9a061cd9b9bc79cbc4d4ff6d7279e2b_c634040d-8e36-4e91-ace5-8523bcf4e861.webp?v=1714889424"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3fbae85be9a061cd9b9bc79cbc4d4ff6d7279e2b_c634040d-8e36-4e91-ace5-8523bcf4e861.webp?v=1714889424","width":2000},{"alt":null,"id":23889985011811,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c6c227bfbb48e47323cf21589dcfaf5a159e6bb7_d7125a85-3bb5-43d8-9bc5-24d01ec82054.webp?v=1714889427"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c6c227bfbb48e47323cf21589dcfaf5a159e6bb7_d7125a85-3bb5-43d8-9bc5-24d01ec82054.webp?v=1714889427","width":2000},{"alt":null,"id":23889986650211,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b959a738b9448e2d6259f94c177fd352487b334f_2e03bb49-647f-4536-b089-6c0f7ca3efd0.webp?v=1714889429"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b959a738b9448e2d6259f94c177fd352487b334f_2e03bb49-647f-4536-b089-6c0f7ca3efd0.webp?v=1714889429","width":2000},{"alt":null,"id":23889987993699,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f230ef743e34355bd819035a49eadb87be469825_46e410b6-f984-484f-a4b1-3e13462e514f.webp?v=1714889431"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f230ef743e34355bd819035a49eadb87be469825_46e410b6-f984-484f-a4b1-3e13462e514f.webp?v=1714889431","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41904126263395,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0123224-YB02","requires_shipping":true,"taxable":true,"featured_image":{"id":31484691316835,"product_id":7414105014371,"position":10,"created_at":"2024-05-05T14:10:29+08:00","updated_at":"2024-05-05T14:10:29+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b959a738b9448e2d6259f94c177fd352487b334f_2e03bb49-647f-4536-b089-6c0f7ca3efd0.webp?v=1714889429","variant_ids":[41904126263395]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 13 Pro Max - Care Bears - Best Friend Bear - 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":"MPB0123224-YB02","featured_media":{"alt":null,"id":23889986650211,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b959a738b9448e2d6259f94c177fd352487b334f_2e03bb49-647f-4536-b089-6c0f7ca3efd0.webp?v=1714889429"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":41904126722147,"title":"Mod NX-海軍藍邊框","option1":"Mod NX-海軍藍邊框","option2":null,"option3":null,"sku":"MPB01232J5-YB02","requires_shipping":true,"taxable":true,"featured_image":{"id":31484685156451,"product_id":7414105014371,"position":6,"created_at":"2024-05-05T14:10:20+08:00","updated_at":"2024-05-05T14:10:20+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bf3d72a103aae4fd0b60ad98bc60bb8daaa5a8f2_cf8da85f-a515-42c6-ae2d-84129a9ab7c8.webp?v=1714889420","variant_ids":[41904126722147]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 13 Pro Max - Care Bears - Best Friend Bear - 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":"MPB01232J5-YB02","featured_media":{"alt":null,"id":23889980391523,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bf3d72a103aae4fd0b60ad98bc60bb8daaa5a8f2_cf8da85f-a515-42c6-ae2d-84129a9ab7c8.webp?v=1714889420"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41904126263395,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0123224-YB02","requires_shipping":true,"taxable":true,"featured_image":{"id":31484691316835,"product_id":7414105014371,"position":10,"created_at":"2024-05-05T14:10:29+08:00","updated_at":"2024-05-05T14:10:29+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b959a738b9448e2d6259f94c177fd352487b334f_2e03bb49-647f-4536-b089-6c0f7ca3efd0.webp?v=1714889429","variant_ids":[41904126263395]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 13 Pro Max - Care Bears - Best Friend Bear - 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":"MPB0123224-YB02","featured_media":{"alt":null,"id":23889986650211,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b959a738b9448e2d6259f94c177fd352487b334f_2e03bb49-647f-4536-b089-6c0f7ca3efd0.webp?v=1714889429"}},"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: "停產" }