$product = {"id":7415084122211,"title":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 Pro Max - Look - 大自然的傑作(優勝美地國家公園)","handle":"iphone-12-pro-max-mod-nx-magsafe-printable-af13","description":null,"published_at":"2024-06-11T17:57:32+08:00","created_at":"2024-05-05T20:19:44+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"設計師MOD NX MagSafe專區Look","tags":["20%","25%","30%","35%","40%","45%","50%","b2b","brand-Apple","designer","designer-look","device-iPhone 12 pro max","merge","mod-nx-magsafe-printable","new-modnx-sku","reseller-modnx-magsafe-look","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":41911695736931,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118724-AF13","requires_shipping":true,"taxable":true,"featured_image":{"id":31488120062051,"product_id":7415084122211,"position":10,"created_at":"2024-05-05T20:20:09+08:00","updated_at":"2024-05-05T20:20:09+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/79624ab678c8b10aed62012b4bc3763cb228a85f_bfd03b73-2655-4f85-98ac-6408b7b02bcf.webp?v=1714911609","variant_ids":[41911695736931]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 Pro Max - Look - 大自然的傑作(優勝美地國家公園) - 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-AF13","featured_media":{"alt":null,"id":23893464612963,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/79624ab678c8b10aed62012b4bc3763cb228a85f_bfd03b73-2655-4f85-98ac-6408b7b02bcf.webp?v=1714911609"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1f53903e712a8ba0f4db3da0b141a0bff4099b84_e3bf8f8e-3b47-491d-84c2-27445da38e80.webp?v=1714911586","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9b8dbdbe41fb5e961180debd349dd26eb4efc56e_773eb66e-aeb8-4599-a345-4e8e8a52e963.webp?v=1714911589","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fd64186941c53a4b701403702c31b667b07ad9d8_da5b3076-c02b-4438-b6f6-404a385753af.webp?v=1714911591","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e4abf2191b0b3964b5c4208643fb7e129ae503cf_ca1b3cba-6754-44db-994f-cf99f5244ecd.webp?v=1714911594","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4c5dd2da5387c821edcd8432751ae0e43ab5c967_5d01f998-0729-4aaf-8ce0-99e9d24b717d.webp?v=1714911596","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6c1cdfbf025fae60546d912286d84a730ff4fb8f_711e096d-a2eb-4c74-994e-dfc97b86978c.webp?v=1714911599","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0d4019f6febc394ff31badd27f6bd51f9546ae7f_9bf87ae5-16e5-4dc1-8d00-151718df2c8e.webp?v=1714911601","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cb29311b4092f9f1b9535f3fbda29f5020c9a601_82dbbeed-74a4-4a27-a8c4-d1e55284e72d.webp?v=1714911604","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d778d13126d250cd6dd689ae8e02db48b490dcc5_fb6df5b8-cbf9-4ca8-98d3-1d45e28b7af5.webp?v=1714911606","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/79624ab678c8b10aed62012b4bc3763cb228a85f_bfd03b73-2655-4f85-98ac-6408b7b02bcf.webp?v=1714911609"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1f53903e712a8ba0f4db3da0b141a0bff4099b84_e3bf8f8e-3b47-491d-84c2-27445da38e80.webp?v=1714911586","options":["color"],"media":[{"alt":null,"id":23893458944099,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1f53903e712a8ba0f4db3da0b141a0bff4099b84_e3bf8f8e-3b47-491d-84c2-27445da38e80.webp?v=1714911586"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1f53903e712a8ba0f4db3da0b141a0bff4099b84_e3bf8f8e-3b47-491d-84c2-27445da38e80.webp?v=1714911586","width":2000},{"alt":null,"id":23893459304547,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9b8dbdbe41fb5e961180debd349dd26eb4efc56e_773eb66e-aeb8-4599-a345-4e8e8a52e963.webp?v=1714911589"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9b8dbdbe41fb5e961180debd349dd26eb4efc56e_773eb66e-aeb8-4599-a345-4e8e8a52e963.webp?v=1714911589","width":2000},{"alt":null,"id":23893459894371,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fd64186941c53a4b701403702c31b667b07ad9d8_da5b3076-c02b-4438-b6f6-404a385753af.webp?v=1714911591"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fd64186941c53a4b701403702c31b667b07ad9d8_da5b3076-c02b-4438-b6f6-404a385753af.webp?v=1714911591","width":2000},{"alt":null,"id":23893460680803,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e4abf2191b0b3964b5c4208643fb7e129ae503cf_ca1b3cba-6754-44db-994f-cf99f5244ecd.webp?v=1714911594"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e4abf2191b0b3964b5c4208643fb7e129ae503cf_ca1b3cba-6754-44db-994f-cf99f5244ecd.webp?v=1714911594","width":2000},{"alt":null,"id":23893461368931,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4c5dd2da5387c821edcd8432751ae0e43ab5c967_5d01f998-0729-4aaf-8ce0-99e9d24b717d.webp?v=1714911596"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4c5dd2da5387c821edcd8432751ae0e43ab5c967_5d01f998-0729-4aaf-8ce0-99e9d24b717d.webp?v=1714911596","width":2000},{"alt":null,"id":23893461925987,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6c1cdfbf025fae60546d912286d84a730ff4fb8f_711e096d-a2eb-4c74-994e-dfc97b86978c.webp?v=1714911599"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6c1cdfbf025fae60546d912286d84a730ff4fb8f_711e096d-a2eb-4c74-994e-dfc97b86978c.webp?v=1714911599","width":2000},{"alt":null,"id":23893462712419,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0d4019f6febc394ff31badd27f6bd51f9546ae7f_9bf87ae5-16e5-4dc1-8d00-151718df2c8e.webp?v=1714911601"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0d4019f6febc394ff31badd27f6bd51f9546ae7f_9bf87ae5-16e5-4dc1-8d00-151718df2c8e.webp?v=1714911601","width":2000},{"alt":null,"id":23893463662691,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cb29311b4092f9f1b9535f3fbda29f5020c9a601_82dbbeed-74a4-4a27-a8c4-d1e55284e72d.webp?v=1714911604"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cb29311b4092f9f1b9535f3fbda29f5020c9a601_82dbbeed-74a4-4a27-a8c4-d1e55284e72d.webp?v=1714911604","width":2000},{"alt":null,"id":23893464154211,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d778d13126d250cd6dd689ae8e02db48b490dcc5_fb6df5b8-cbf9-4ca8-98d3-1d45e28b7af5.webp?v=1714911606"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d778d13126d250cd6dd689ae8e02db48b490dcc5_fb6df5b8-cbf9-4ca8-98d3-1d45e28b7af5.webp?v=1714911606","width":2000},{"alt":null,"id":23893464612963,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/79624ab678c8b10aed62012b4bc3763cb228a85f_bfd03b73-2655-4f85-98ac-6408b7b02bcf.webp?v=1714911609"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/79624ab678c8b10aed62012b4bc3763cb228a85f_bfd03b73-2655-4f85-98ac-6408b7b02bcf.webp?v=1714911609","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41911695736931,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118724-AF13","requires_shipping":true,"taxable":true,"featured_image":{"id":31488120062051,"product_id":7415084122211,"position":10,"created_at":"2024-05-05T20:20:09+08:00","updated_at":"2024-05-05T20:20:09+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/79624ab678c8b10aed62012b4bc3763cb228a85f_bfd03b73-2655-4f85-98ac-6408b7b02bcf.webp?v=1714911609","variant_ids":[41911695736931]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 Pro Max - Look - 大自然的傑作(優勝美地國家公園) - 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-AF13","featured_media":{"alt":null,"id":23893464612963,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/79624ab678c8b10aed62012b4bc3763cb228a85f_bfd03b73-2655-4f85-98ac-6408b7b02bcf.webp?v=1714911609"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41911695736931,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118724-AF13","requires_shipping":true,"taxable":true,"featured_image":{"id":31488120062051,"product_id":7415084122211,"position":10,"created_at":"2024-05-05T20:20:09+08:00","updated_at":"2024-05-05T20:20:09+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/79624ab678c8b10aed62012b4bc3763cb228a85f_bfd03b73-2655-4f85-98ac-6408b7b02bcf.webp?v=1714911609","variant_ids":[41911695736931]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 Pro Max - Look - 大自然的傑作(優勝美地國家公園) - 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-AF13","featured_media":{"alt":null,"id":23893464612963,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/79624ab678c8b10aed62012b4bc3763cb228a85f_bfd03b73-2655-4f85-98ac-6408b7b02bcf.webp?v=1714911609"}},"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: "停產" }