$product = {"id":7415106338915,"title":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - 【獨家設計款】 - 窯花","handle":"iphone-12-mini-mod-nx-magsafe-printable-gd14","description":null,"published_at":"2024-06-11T17:58:08+08:00","created_at":"2024-05-05T20:24:03+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"MOD NX MagSafe 客製化","tags":["20%","25%","30%","35%","40%","45%","50%","b2b","brand-Apple","designer","device-iPhone 12 mini","discountable-item","member","merge","mod-nx-magsafe-printable","new-modnx-sku","reseller","reseller-modnx-magsafe-chi-po-lin-series","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":41911936319587,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118424-GD14","requires_shipping":true,"taxable":true,"featured_image":{"id":31488179437667,"product_id":7415106338915,"position":7,"created_at":"2024-05-05T20:24:20+08:00","updated_at":"2024-05-05T20:24:20+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2c19438bfd53531d239039e8f6dd419bf69a05f3_0fef0b4a-4864-44d4-a30d-5d250f2fa2bf.webp?v=1714911860","variant_ids":[41911936319587]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - 【獨家設計款】 - 窯花 - 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-GD14","featured_media":{"alt":null,"id":23893524054115,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2c19438bfd53531d239039e8f6dd419bf69a05f3_0fef0b4a-4864-44d4-a30d-5d250f2fa2bf.webp?v=1714911860"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/daecefe84a21426c7684cddde9b12542d3d4b6a9_26336516-1c80-410e-8cc9-6f145bde7a40.webp?v=1714911846","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4cd2f453d368a50966d9db424e3bbc87bf51a32b_28b08972-9e99-4fd8-b78b-31761efddb92.webp?v=1714911849","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/403662421d73465d22b9a49f5c3e2af9232757de_051ab105-b2d0-45b9-83c5-3a55ef70e172.webp?v=1714911851","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/27a14abfbae0db0dc2c2c00a249a6f01cef58792_322023c4-0c77-459a-b0ac-7548ba83dedd.webp?v=1714911853","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2b61155c0b95f79beb4c22054a0bc56e83451471_2f618521-322c-4453-ac35-b090baae024a.webp?v=1714911855","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c1d94543d32382b7b4313179450ed4a83a997268_f3ba1c45-2dde-4459-b449-218d81637701.webp?v=1714911858","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2c19438bfd53531d239039e8f6dd419bf69a05f3_0fef0b4a-4864-44d4-a30d-5d250f2fa2bf.webp?v=1714911860","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b3b21d93d305fe559efa712d04d7876ad276521a_74ca84ac-66aa-40fc-9465-53d880501f4e.webp?v=1714911862","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7addccdbf908e1acef24329e5b6637a573b43d34_14f58b4f-bdf1-4457-a60b-e31a889472a3.webp?v=1714911865","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c708df5451e5548631d5fb7524aa0a72a74b0408_e39fe42d-9faf-4829-b00b-73cc24dd672b.webp?v=1714911867","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4cc7bf1ac286804072713f689a7f172ed22a1f32_aa368114-e6ea-45ea-a28a-e95fcfb62617.webp?v=1714911869"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/daecefe84a21426c7684cddde9b12542d3d4b6a9_26336516-1c80-410e-8cc9-6f145bde7a40.webp?v=1714911846","options":["color"],"media":[{"alt":null,"id":23893520777315,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/daecefe84a21426c7684cddde9b12542d3d4b6a9_26336516-1c80-410e-8cc9-6f145bde7a40.webp?v=1714911846"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/daecefe84a21426c7684cddde9b12542d3d4b6a9_26336516-1c80-410e-8cc9-6f145bde7a40.webp?v=1714911846","width":2000},{"alt":null,"id":23893521334371,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4cd2f453d368a50966d9db424e3bbc87bf51a32b_28b08972-9e99-4fd8-b78b-31761efddb92.webp?v=1714911849"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4cd2f453d368a50966d9db424e3bbc87bf51a32b_28b08972-9e99-4fd8-b78b-31761efddb92.webp?v=1714911849","width":2000},{"alt":null,"id":23893522219107,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/403662421d73465d22b9a49f5c3e2af9232757de_051ab105-b2d0-45b9-83c5-3a55ef70e172.webp?v=1714911851"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/403662421d73465d22b9a49f5c3e2af9232757de_051ab105-b2d0-45b9-83c5-3a55ef70e172.webp?v=1714911851","width":2000},{"alt":null,"id":23893522645091,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/27a14abfbae0db0dc2c2c00a249a6f01cef58792_322023c4-0c77-459a-b0ac-7548ba83dedd.webp?v=1714911853"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/27a14abfbae0db0dc2c2c00a249a6f01cef58792_322023c4-0c77-459a-b0ac-7548ba83dedd.webp?v=1714911853","width":2000},{"alt":null,"id":23893523202147,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2b61155c0b95f79beb4c22054a0bc56e83451471_2f618521-322c-4453-ac35-b090baae024a.webp?v=1714911855"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2b61155c0b95f79beb4c22054a0bc56e83451471_2f618521-322c-4453-ac35-b090baae024a.webp?v=1714911855","width":2000},{"alt":null,"id":23893523529827,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c1d94543d32382b7b4313179450ed4a83a997268_f3ba1c45-2dde-4459-b449-218d81637701.webp?v=1714911858"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c1d94543d32382b7b4313179450ed4a83a997268_f3ba1c45-2dde-4459-b449-218d81637701.webp?v=1714911858","width":2000},{"alt":null,"id":23893524054115,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2c19438bfd53531d239039e8f6dd419bf69a05f3_0fef0b4a-4864-44d4-a30d-5d250f2fa2bf.webp?v=1714911860"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2c19438bfd53531d239039e8f6dd419bf69a05f3_0fef0b4a-4864-44d4-a30d-5d250f2fa2bf.webp?v=1714911860","width":2000},{"alt":null,"id":23893524545635,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b3b21d93d305fe559efa712d04d7876ad276521a_74ca84ac-66aa-40fc-9465-53d880501f4e.webp?v=1714911862"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b3b21d93d305fe559efa712d04d7876ad276521a_74ca84ac-66aa-40fc-9465-53d880501f4e.webp?v=1714911862","width":2000},{"alt":null,"id":23893524906083,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7addccdbf908e1acef24329e5b6637a573b43d34_14f58b4f-bdf1-4457-a60b-e31a889472a3.webp?v=1714911865"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7addccdbf908e1acef24329e5b6637a573b43d34_14f58b4f-bdf1-4457-a60b-e31a889472a3.webp?v=1714911865","width":2000},{"alt":null,"id":23893525954659,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c708df5451e5548631d5fb7524aa0a72a74b0408_e39fe42d-9faf-4829-b00b-73cc24dd672b.webp?v=1714911867"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c708df5451e5548631d5fb7524aa0a72a74b0408_e39fe42d-9faf-4829-b00b-73cc24dd672b.webp?v=1714911867","width":2000},{"alt":null,"id":23893526511715,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4cc7bf1ac286804072713f689a7f172ed22a1f32_aa368114-e6ea-45ea-a28a-e95fcfb62617.webp?v=1714911869"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4cc7bf1ac286804072713f689a7f172ed22a1f32_aa368114-e6ea-45ea-a28a-e95fcfb62617.webp?v=1714911869","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41911936319587,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118424-GD14","requires_shipping":true,"taxable":true,"featured_image":{"id":31488179437667,"product_id":7415106338915,"position":7,"created_at":"2024-05-05T20:24:20+08:00","updated_at":"2024-05-05T20:24:20+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2c19438bfd53531d239039e8f6dd419bf69a05f3_0fef0b4a-4864-44d4-a30d-5d250f2fa2bf.webp?v=1714911860","variant_ids":[41911936319587]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - 【獨家設計款】 - 窯花 - 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-GD14","featured_media":{"alt":null,"id":23893524054115,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2c19438bfd53531d239039e8f6dd419bf69a05f3_0fef0b4a-4864-44d4-a30d-5d250f2fa2bf.webp?v=1714911860"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41911936319587,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118424-GD14","requires_shipping":true,"taxable":true,"featured_image":{"id":31488179437667,"product_id":7415106338915,"position":7,"created_at":"2024-05-05T20:24:20+08:00","updated_at":"2024-05-05T20:24:20+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2c19438bfd53531d239039e8f6dd419bf69a05f3_0fef0b4a-4864-44d4-a30d-5d250f2fa2bf.webp?v=1714911860","variant_ids":[41911936319587]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - 【獨家設計款】 - 窯花 - 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-GD14","featured_media":{"alt":null,"id":23893524054115,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2c19438bfd53531d239039e8f6dd419bf69a05f3_0fef0b4a-4864-44d4-a30d-5d250f2fa2bf.webp?v=1714911860"}},"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: "停產" }