$product = {"id":7415031595107,"title":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - Look - 大自然的傑作(優勝美地國家公園)","handle":"iphone-12-mini-mod-nx-magsafe-printable-af13","description":null,"published_at":"2024-06-11T17:56:07+08:00","created_at":"2024-05-05T20:09:55+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 mini","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":41911132848227,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118424-AF13","requires_shipping":true,"taxable":true,"featured_image":{"id":31487974015075,"product_id":7415031595107,"position":1,"created_at":"2024-05-05T20:09:58+08:00","updated_at":"2024-05-05T20:09:58+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0c7a1b41c90d48d8be6d987602067aa4f9a0c129_e0f39f5a-dd65-43d2-a72e-4338906ceca6.webp?v=1714910998","variant_ids":[41911132848227]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - 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":"MPB0118424-AF13","featured_media":{"alt":null,"id":23893318336611,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0c7a1b41c90d48d8be6d987602067aa4f9a0c129_e0f39f5a-dd65-43d2-a72e-4338906ceca6.webp?v=1714910998"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0c7a1b41c90d48d8be6d987602067aa4f9a0c129_e0f39f5a-dd65-43d2-a72e-4338906ceca6.webp?v=1714910998","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a963a7fc4f3ebeee139c90a1882ad33304a8277c_b2ecda29-bc62-4c00-8bbd-33ba2a3e0a1b.webp?v=1714911000","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f6949143ff4727939d2558bced1d94b9ae4d2241_f1f2b149-d550-4ece-93c4-525c6c20999f.webp?v=1714911003","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/533ff46af07187798d3071a9e58d985b411ad2bb_c1f5d2ec-9739-4922-ae06-03c531d9eb58.webp?v=1714911006","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a0a99a680c543c9753db26002e0f172c590afcd0_8d333eb3-0752-487c-9f7b-8eb1a05387f8.webp?v=1714911009","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9fad3844e83aabe0d26d488408bc8c1f107a825b_67330e4b-0e1a-4675-9f18-aab3b1f3162c.webp?v=1714911011","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/955ca5da7dd8df74fe3fc606081da2c6d64f372b_404a34b3-82eb-4d46-9c7f-5f58f09274bf.webp?v=1714911014","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/864f50ccc3459ece10a7a2d9f62565d4b15ad9d1_dc2ea82f-eec6-46c6-8083-8529920272c6.webp?v=1714911016","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/57c69e0c3958d9bc0d98b30e79ae320aa3286e98_1d80ceaf-6c3a-4a0c-b5a6-c1af3c32d2a0.webp?v=1714911018","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b568fd985a0c3d3d601cb04d17a3ff0b238df176_d6d6e0b8-e797-4aea-aa10-64aaa6d587f6.webp?v=1714911021","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/416dfa8e9a91260404f70388e245afb05aa2a510_9cfdb3f4-0e32-4065-9022-921cefbb66c9.webp?v=1714911023"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0c7a1b41c90d48d8be6d987602067aa4f9a0c129_e0f39f5a-dd65-43d2-a72e-4338906ceca6.webp?v=1714910998","options":["color"],"media":[{"alt":null,"id":23893318336611,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0c7a1b41c90d48d8be6d987602067aa4f9a0c129_e0f39f5a-dd65-43d2-a72e-4338906ceca6.webp?v=1714910998"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0c7a1b41c90d48d8be6d987602067aa4f9a0c129_e0f39f5a-dd65-43d2-a72e-4338906ceca6.webp?v=1714910998","width":2000},{"alt":null,"id":23893319057507,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a963a7fc4f3ebeee139c90a1882ad33304a8277c_b2ecda29-bc62-4c00-8bbd-33ba2a3e0a1b.webp?v=1714911000"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a963a7fc4f3ebeee139c90a1882ad33304a8277c_b2ecda29-bc62-4c00-8bbd-33ba2a3e0a1b.webp?v=1714911000","width":2000},{"alt":null,"id":23893319876707,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f6949143ff4727939d2558bced1d94b9ae4d2241_f1f2b149-d550-4ece-93c4-525c6c20999f.webp?v=1714911003"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f6949143ff4727939d2558bced1d94b9ae4d2241_f1f2b149-d550-4ece-93c4-525c6c20999f.webp?v=1714911003","width":2000},{"alt":null,"id":23893320335459,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/533ff46af07187798d3071a9e58d985b411ad2bb_c1f5d2ec-9739-4922-ae06-03c531d9eb58.webp?v=1714911006"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/533ff46af07187798d3071a9e58d985b411ad2bb_c1f5d2ec-9739-4922-ae06-03c531d9eb58.webp?v=1714911006","width":2000},{"alt":null,"id":23893320892515,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a0a99a680c543c9753db26002e0f172c590afcd0_8d333eb3-0752-487c-9f7b-8eb1a05387f8.webp?v=1714911009"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a0a99a680c543c9753db26002e0f172c590afcd0_8d333eb3-0752-487c-9f7b-8eb1a05387f8.webp?v=1714911009","width":2000},{"alt":null,"id":23893321384035,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9fad3844e83aabe0d26d488408bc8c1f107a825b_67330e4b-0e1a-4675-9f18-aab3b1f3162c.webp?v=1714911011"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9fad3844e83aabe0d26d488408bc8c1f107a825b_67330e4b-0e1a-4675-9f18-aab3b1f3162c.webp?v=1714911011","width":2000},{"alt":null,"id":23893321941091,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/955ca5da7dd8df74fe3fc606081da2c6d64f372b_404a34b3-82eb-4d46-9c7f-5f58f09274bf.webp?v=1714911014"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/955ca5da7dd8df74fe3fc606081da2c6d64f372b_404a34b3-82eb-4d46-9c7f-5f58f09274bf.webp?v=1714911014","width":2000},{"alt":null,"id":23893322727523,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/864f50ccc3459ece10a7a2d9f62565d4b15ad9d1_dc2ea82f-eec6-46c6-8083-8529920272c6.webp?v=1714911016"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/864f50ccc3459ece10a7a2d9f62565d4b15ad9d1_dc2ea82f-eec6-46c6-8083-8529920272c6.webp?v=1714911016","width":2000},{"alt":null,"id":23893323120739,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/57c69e0c3958d9bc0d98b30e79ae320aa3286e98_1d80ceaf-6c3a-4a0c-b5a6-c1af3c32d2a0.webp?v=1714911018"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/57c69e0c3958d9bc0d98b30e79ae320aa3286e98_1d80ceaf-6c3a-4a0c-b5a6-c1af3c32d2a0.webp?v=1714911018","width":2000},{"alt":null,"id":23893323350115,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b568fd985a0c3d3d601cb04d17a3ff0b238df176_d6d6e0b8-e797-4aea-aa10-64aaa6d587f6.webp?v=1714911021"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b568fd985a0c3d3d601cb04d17a3ff0b238df176_d6d6e0b8-e797-4aea-aa10-64aaa6d587f6.webp?v=1714911021","width":2000},{"alt":null,"id":23893323612259,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/416dfa8e9a91260404f70388e245afb05aa2a510_9cfdb3f4-0e32-4065-9022-921cefbb66c9.webp?v=1714911023"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/416dfa8e9a91260404f70388e245afb05aa2a510_9cfdb3f4-0e32-4065-9022-921cefbb66c9.webp?v=1714911023","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41911132848227,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118424-AF13","requires_shipping":true,"taxable":true,"featured_image":{"id":31487974015075,"product_id":7415031595107,"position":1,"created_at":"2024-05-05T20:09:58+08:00","updated_at":"2024-05-05T20:09:58+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0c7a1b41c90d48d8be6d987602067aa4f9a0c129_e0f39f5a-dd65-43d2-a72e-4338906ceca6.webp?v=1714910998","variant_ids":[41911132848227]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - 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":"MPB0118424-AF13","featured_media":{"alt":null,"id":23893318336611,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0c7a1b41c90d48d8be6d987602067aa4f9a0c129_e0f39f5a-dd65-43d2-a72e-4338906ceca6.webp?v=1714910998"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41911132848227,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118424-AF13","requires_shipping":true,"taxable":true,"featured_image":{"id":31487974015075,"product_id":7415031595107,"position":1,"created_at":"2024-05-05T20:09:58+08:00","updated_at":"2024-05-05T20:09:58+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0c7a1b41c90d48d8be6d987602067aa4f9a0c129_e0f39f5a-dd65-43d2-a72e-4338906ceca6.webp?v=1714910998","variant_ids":[41911132848227]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - 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":"MPB0118424-AF13","featured_media":{"alt":null,"id":23893318336611,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0c7a1b41c90d48d8be6d987602067aa4f9a0c129_e0f39f5a-dd65-43d2-a72e-4338906ceca6.webp?v=1714910998"}},"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: "停產" }