$product = {"id":7414942761059,"title":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - Look - 願傷疤 有天開出花(亞馬遜雨林)","handle":"iphone-12-mini-mod-nx-magsafe-printable-af01","description":null,"published_at":"2024-06-11T17:53:42+08:00","created_at":"2024-05-05T19:53:11+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":41910186147939,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118424-AF01","requires_shipping":true,"taxable":true,"featured_image":{"id":31487739887715,"product_id":7414942761059,"position":2,"created_at":"2024-05-05T19:53:16+08:00","updated_at":"2024-05-05T19:53:16+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/af204e364beadd47e0f0a5a794306afad3540c6d_f7e33f2a-4412-4954-a106-094d21a79f7d.webp?v=1714909996","variant_ids":[41910186147939]},"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-AF01","featured_media":{"alt":null,"id":23893083848803,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/af204e364beadd47e0f0a5a794306afad3540c6d_f7e33f2a-4412-4954-a106-094d21a79f7d.webp?v=1714909996"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b2d1c7a8a726789b2ce494399cbf70005741e5b9_82549b0c-f6b0-463b-92bf-5aa79c3a9db6.webp?v=1714909994","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/af204e364beadd47e0f0a5a794306afad3540c6d_f7e33f2a-4412-4954-a106-094d21a79f7d.webp?v=1714909996","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/10aa8a9624f9198005c50bd2eb60bd0333426ae7_5c66b60d-c651-405f-9f02-503d7c60e6c0.webp?v=1714909999","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5527699bc66f6e64605138b55fdf5179cd969506_31d63508-ce80-4eb6-ac0a-99e85538a423.webp?v=1714910001","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4400b53e471e063b71fdd76025097db13bb54fb6_bfe7a765-de84-4721-a21a-c053eb72eade.webp?v=1714910003","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4ba9968c95bb38149a17f91fba92ce66ff9224eb_5b4ddeb2-2bc5-4458-9d99-96ecef223baf.webp?v=1714910006","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bad35f6cc9aa03459cabeaa5eae9e2fda4f191ef_9d8075dd-3755-46bf-ac1d-15660791063c.webp?v=1714910009","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8a833b02cfbc5e02cb767090d1e64a4947ff33c0_21bd2e00-986f-48d3-937b-546765a6986a.webp?v=1714910011","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6e675f0f0d89257b309a7a071c8a5de384e7beaf_d6b84d96-536d-46c9-9a3e-01d5b1d41f18.webp?v=1714910014","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e13e1dc9b9b7722ec3ba19a492cca834e820491c_411f943c-f487-4b1a-aa97-d18c7a339a66.webp?v=1714910016","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dc9d9907cb0d2a1733480df207b828965ca81acc_3e2fd85d-14e4-4f1f-9dd5-c9056e53c86f.webp?v=1714910018"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b2d1c7a8a726789b2ce494399cbf70005741e5b9_82549b0c-f6b0-463b-92bf-5aa79c3a9db6.webp?v=1714909994","options":["color"],"media":[{"alt":null,"id":23893083095139,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b2d1c7a8a726789b2ce494399cbf70005741e5b9_82549b0c-f6b0-463b-92bf-5aa79c3a9db6.webp?v=1714909994"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b2d1c7a8a726789b2ce494399cbf70005741e5b9_82549b0c-f6b0-463b-92bf-5aa79c3a9db6.webp?v=1714909994","width":2000},{"alt":null,"id":23893083848803,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/af204e364beadd47e0f0a5a794306afad3540c6d_f7e33f2a-4412-4954-a106-094d21a79f7d.webp?v=1714909996"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/af204e364beadd47e0f0a5a794306afad3540c6d_f7e33f2a-4412-4954-a106-094d21a79f7d.webp?v=1714909996","width":2000},{"alt":null,"id":23893084340323,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/10aa8a9624f9198005c50bd2eb60bd0333426ae7_5c66b60d-c651-405f-9f02-503d7c60e6c0.webp?v=1714909999"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/10aa8a9624f9198005c50bd2eb60bd0333426ae7_5c66b60d-c651-405f-9f02-503d7c60e6c0.webp?v=1714909999","width":2000},{"alt":null,"id":23893084831843,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5527699bc66f6e64605138b55fdf5179cd969506_31d63508-ce80-4eb6-ac0a-99e85538a423.webp?v=1714910001"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5527699bc66f6e64605138b55fdf5179cd969506_31d63508-ce80-4eb6-ac0a-99e85538a423.webp?v=1714910001","width":2000},{"alt":null,"id":23893085487203,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4400b53e471e063b71fdd76025097db13bb54fb6_bfe7a765-de84-4721-a21a-c053eb72eade.webp?v=1714910003"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4400b53e471e063b71fdd76025097db13bb54fb6_bfe7a765-de84-4721-a21a-c053eb72eade.webp?v=1714910003","width":2000},{"alt":null,"id":23893086077027,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4ba9968c95bb38149a17f91fba92ce66ff9224eb_5b4ddeb2-2bc5-4458-9d99-96ecef223baf.webp?v=1714910006"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4ba9968c95bb38149a17f91fba92ce66ff9224eb_5b4ddeb2-2bc5-4458-9d99-96ecef223baf.webp?v=1714910006","width":2000},{"alt":null,"id":23893086568547,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bad35f6cc9aa03459cabeaa5eae9e2fda4f191ef_9d8075dd-3755-46bf-ac1d-15660791063c.webp?v=1714910009"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bad35f6cc9aa03459cabeaa5eae9e2fda4f191ef_9d8075dd-3755-46bf-ac1d-15660791063c.webp?v=1714910009","width":2000},{"alt":null,"id":23893087125603,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8a833b02cfbc5e02cb767090d1e64a4947ff33c0_21bd2e00-986f-48d3-937b-546765a6986a.webp?v=1714910011"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8a833b02cfbc5e02cb767090d1e64a4947ff33c0_21bd2e00-986f-48d3-937b-546765a6986a.webp?v=1714910011","width":2000},{"alt":null,"id":23893087813731,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6e675f0f0d89257b309a7a071c8a5de384e7beaf_d6b84d96-536d-46c9-9a3e-01d5b1d41f18.webp?v=1714910014"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6e675f0f0d89257b309a7a071c8a5de384e7beaf_d6b84d96-536d-46c9-9a3e-01d5b1d41f18.webp?v=1714910014","width":2000},{"alt":null,"id":23893088338019,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e13e1dc9b9b7722ec3ba19a492cca834e820491c_411f943c-f487-4b1a-aa97-d18c7a339a66.webp?v=1714910016"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e13e1dc9b9b7722ec3ba19a492cca834e820491c_411f943c-f487-4b1a-aa97-d18c7a339a66.webp?v=1714910016","width":2000},{"alt":null,"id":23893088895075,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dc9d9907cb0d2a1733480df207b828965ca81acc_3e2fd85d-14e4-4f1f-9dd5-c9056e53c86f.webp?v=1714910018"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dc9d9907cb0d2a1733480df207b828965ca81acc_3e2fd85d-14e4-4f1f-9dd5-c9056e53c86f.webp?v=1714910018","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41910186147939,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118424-AF01","requires_shipping":true,"taxable":true,"featured_image":{"id":31487739887715,"product_id":7414942761059,"position":2,"created_at":"2024-05-05T19:53:16+08:00","updated_at":"2024-05-05T19:53:16+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/af204e364beadd47e0f0a5a794306afad3540c6d_f7e33f2a-4412-4954-a106-094d21a79f7d.webp?v=1714909996","variant_ids":[41910186147939]},"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-AF01","featured_media":{"alt":null,"id":23893083848803,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/af204e364beadd47e0f0a5a794306afad3540c6d_f7e33f2a-4412-4954-a106-094d21a79f7d.webp?v=1714909996"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41910186147939,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118424-AF01","requires_shipping":true,"taxable":true,"featured_image":{"id":31487739887715,"product_id":7414942761059,"position":2,"created_at":"2024-05-05T19:53:16+08:00","updated_at":"2024-05-05T19:53:16+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/af204e364beadd47e0f0a5a794306afad3540c6d_f7e33f2a-4412-4954-a106-094d21a79f7d.webp?v=1714909996","variant_ids":[41910186147939]},"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-AF01","featured_media":{"alt":null,"id":23893083848803,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/af204e364beadd47e0f0a5a794306afad3540c6d_f7e33f2a-4412-4954-a106-094d21a79f7d.webp?v=1714909996"}},"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: "停產" }