$product = {"id":7415080812643,"title":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - Batman - 復古版","handle":"iphone-12-mini-mod-nx-magsafe-printable-sb01","description":null,"published_at":"2024-06-11T17:57:27+08:00","created_at":"2024-05-05T20:19:07+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 mini","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":41911664935011,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118424-SB01","requires_shipping":true,"taxable":true,"featured_image":{"id":31488106397795,"product_id":7415080812643,"position":2,"created_at":"2024-05-05T20:19:11+08:00","updated_at":"2024-05-05T20:19:11+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e0b164c33732816a8cef4611b2d7e4c405c76d60_546f4a95-26c8-4bd3-a856-134f1e793a04.webp?v=1714911551","variant_ids":[41911664935011]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - 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":"MPB0118424-SB01","featured_media":{"alt":null,"id":23893450915939,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e0b164c33732816a8cef4611b2d7e4c405c76d60_546f4a95-26c8-4bd3-a856-134f1e793a04.webp?v=1714911551"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7c10efb2534a992abdfe2499efcb2776daf3a49b_b17f35d4-b92a-427b-96f0-8e8f3359ff61.webp?v=1714911549","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e0b164c33732816a8cef4611b2d7e4c405c76d60_546f4a95-26c8-4bd3-a856-134f1e793a04.webp?v=1714911551","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c53065c8b17d290012256ff50f6388ac76cf7fbe_8e6a1916-b843-4095-8b53-784a1d77be74.webp?v=1714911554","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/62ac8d3f858bbdaa5b6dd93153b17ddce7991f3d_a9c66e64-53df-4df0-b3a3-e2ae7577dee9.webp?v=1714911556","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5611d47e358f7ae06f791498fc73cdbcac25e94d_7325b71b-eea4-46f6-9991-9d34aafcb9b8.webp?v=1714911558","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/de680be361a52840326c4c557758a039d8aeee3f_1ba041da-409f-4805-9e3e-377b74a473fe.webp?v=1714911561","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ee94bd31529fdfa3900b1d107d6565b538c8f3b7_0832d05f-d73c-4c71-a124-90c9291a3a9e.webp?v=1714911563","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d9245603b0fbed3ffd30f127afc51258cbbd544d_fd4ea2c9-74e9-4a55-9651-6d543bd847a0.webp?v=1714911566","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/57d2683d21cab70ee4525f7c4deaa974d4e667a5_0fc42889-816f-4d28-a2cc-d0e1a2c7c819.webp?v=1714911568","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8b49f24b027337648e4a8fc413dd1e148d831d47_a891a25b-ec57-4784-9454-b9586c71ee69.webp?v=1714911570","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/10c21897a47fdc4dc2e6bdd201329f339781fae5_8d69593a-511d-466a-b1ab-19b2b1c21813.webp?v=1714911573"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7c10efb2534a992abdfe2499efcb2776daf3a49b_b17f35d4-b92a-427b-96f0-8e8f3359ff61.webp?v=1714911549","options":["color"],"media":[{"alt":null,"id":23893450424419,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7c10efb2534a992abdfe2499efcb2776daf3a49b_b17f35d4-b92a-427b-96f0-8e8f3359ff61.webp?v=1714911549"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7c10efb2534a992abdfe2499efcb2776daf3a49b_b17f35d4-b92a-427b-96f0-8e8f3359ff61.webp?v=1714911549","width":2000},{"alt":null,"id":23893450915939,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e0b164c33732816a8cef4611b2d7e4c405c76d60_546f4a95-26c8-4bd3-a856-134f1e793a04.webp?v=1714911551"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e0b164c33732816a8cef4611b2d7e4c405c76d60_546f4a95-26c8-4bd3-a856-134f1e793a04.webp?v=1714911551","width":2000},{"alt":null,"id":23893451571299,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c53065c8b17d290012256ff50f6388ac76cf7fbe_8e6a1916-b843-4095-8b53-784a1d77be74.webp?v=1714911554"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c53065c8b17d290012256ff50f6388ac76cf7fbe_8e6a1916-b843-4095-8b53-784a1d77be74.webp?v=1714911554","width":2000},{"alt":null,"id":23893452095587,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/62ac8d3f858bbdaa5b6dd93153b17ddce7991f3d_a9c66e64-53df-4df0-b3a3-e2ae7577dee9.webp?v=1714911556"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/62ac8d3f858bbdaa5b6dd93153b17ddce7991f3d_a9c66e64-53df-4df0-b3a3-e2ae7577dee9.webp?v=1714911556","width":2000},{"alt":null,"id":23893452816483,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5611d47e358f7ae06f791498fc73cdbcac25e94d_7325b71b-eea4-46f6-9991-9d34aafcb9b8.webp?v=1714911558"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5611d47e358f7ae06f791498fc73cdbcac25e94d_7325b71b-eea4-46f6-9991-9d34aafcb9b8.webp?v=1714911558","width":2000},{"alt":null,"id":23893453471843,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/de680be361a52840326c4c557758a039d8aeee3f_1ba041da-409f-4805-9e3e-377b74a473fe.webp?v=1714911561"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/de680be361a52840326c4c557758a039d8aeee3f_1ba041da-409f-4805-9e3e-377b74a473fe.webp?v=1714911561","width":2000},{"alt":null,"id":23893454094435,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ee94bd31529fdfa3900b1d107d6565b538c8f3b7_0832d05f-d73c-4c71-a124-90c9291a3a9e.webp?v=1714911563"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ee94bd31529fdfa3900b1d107d6565b538c8f3b7_0832d05f-d73c-4c71-a124-90c9291a3a9e.webp?v=1714911563","width":2000},{"alt":null,"id":23893454553187,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d9245603b0fbed3ffd30f127afc51258cbbd544d_fd4ea2c9-74e9-4a55-9651-6d543bd847a0.webp?v=1714911566"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d9245603b0fbed3ffd30f127afc51258cbbd544d_fd4ea2c9-74e9-4a55-9651-6d543bd847a0.webp?v=1714911566","width":2000},{"alt":null,"id":23893454946403,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/57d2683d21cab70ee4525f7c4deaa974d4e667a5_0fc42889-816f-4d28-a2cc-d0e1a2c7c819.webp?v=1714911568"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/57d2683d21cab70ee4525f7c4deaa974d4e667a5_0fc42889-816f-4d28-a2cc-d0e1a2c7c819.webp?v=1714911568","width":2000},{"alt":null,"id":23893455306851,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8b49f24b027337648e4a8fc413dd1e148d831d47_a891a25b-ec57-4784-9454-b9586c71ee69.webp?v=1714911570"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8b49f24b027337648e4a8fc413dd1e148d831d47_a891a25b-ec57-4784-9454-b9586c71ee69.webp?v=1714911570","width":2000},{"alt":null,"id":23893455798371,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/10c21897a47fdc4dc2e6bdd201329f339781fae5_8d69593a-511d-466a-b1ab-19b2b1c21813.webp?v=1714911573"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/10c21897a47fdc4dc2e6bdd201329f339781fae5_8d69593a-511d-466a-b1ab-19b2b1c21813.webp?v=1714911573","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41911664935011,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118424-SB01","requires_shipping":true,"taxable":true,"featured_image":{"id":31488106397795,"product_id":7415080812643,"position":2,"created_at":"2024-05-05T20:19:11+08:00","updated_at":"2024-05-05T20:19:11+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e0b164c33732816a8cef4611b2d7e4c405c76d60_546f4a95-26c8-4bd3-a856-134f1e793a04.webp?v=1714911551","variant_ids":[41911664935011]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - 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":"MPB0118424-SB01","featured_media":{"alt":null,"id":23893450915939,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e0b164c33732816a8cef4611b2d7e4c405c76d60_546f4a95-26c8-4bd3-a856-134f1e793a04.webp?v=1714911551"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41911664935011,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118424-SB01","requires_shipping":true,"taxable":true,"featured_image":{"id":31488106397795,"product_id":7415080812643,"position":2,"created_at":"2024-05-05T20:19:11+08:00","updated_at":"2024-05-05T20:19:11+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e0b164c33732816a8cef4611b2d7e4c405c76d60_546f4a95-26c8-4bd3-a856-134f1e793a04.webp?v=1714911551","variant_ids":[41911664935011]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - 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":"MPB0118424-SB01","featured_media":{"alt":null,"id":23893450915939,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e0b164c33732816a8cef4611b2d7e4c405c76d60_546f4a95-26c8-4bd3-a856-134f1e793a04.webp?v=1714911551"}},"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: "停產" }