$product = {"id":7415009214563,"title":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - 迪士尼-星際大戰 Star Wars - Pattern 星際大戰-Galaxy","handle":"iphone-12-mini-mod-nx-magsafe-printable-pb61","description":null,"published_at":"2024-06-11T17:55:31+08:00","created_at":"2024-05-05T20:05:29+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"設計師MOD NX MagSafe專區迪士尼-星際大戰 Star Wars","tags":["20%","25%","30%","35%","40%","45%","50%","b2b","brand-Apple","designer","designer-starwars","device-iPhone 12 mini","merge","mod-nx-magsafe-printable","new-modnx-sku","reseller-modnx-magsafe-star-wars","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":41910899769443,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118424-PB61","requires_shipping":true,"taxable":true,"featured_image":{"id":31487915622499,"product_id":7415009214563,"position":9,"created_at":"2024-05-05T20:05:51+08:00","updated_at":"2024-05-05T20:05:51+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2f4691292680c464a209b13d79426a191c917289_2e5690c6-30be-4af4-b761-5580c05a8a29.webp?v=1714910751","variant_ids":[41910899769443]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - 迪士尼-星際大戰 Star Wars - Pattern 星際大戰-Galaxy - 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-PB61","featured_media":{"alt":null,"id":23893259714659,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2f4691292680c464a209b13d79426a191c917289_2e5690c6-30be-4af4-b761-5580c05a8a29.webp?v=1714910751"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8c2162002db15904dabd6a57ad2ddf8af1be79c3_9fa62f01-3c0c-4818-8db6-4b3fe3d1da7c.webp?v=1714910732","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c39628a1c46a409396c0c7a63e181ab0f3c7560f_94cb5b1c-c6f0-4f5e-9a4d-1d85ec7e3e40.webp?v=1714910734","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8a50922782579e91ffb2140e07fa540f15e0c802_6096a16f-7307-487b-a04c-f30deb9f354d.webp?v=1714910737","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ef9869f7e9369c7b72683d81c7f152c41125cb52_b3c858ff-8e9e-430d-b87a-f7d55e757618.webp?v=1714910739","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1ea7b81047327ef200cee97f760080c5dfc0788c_01b71c98-901c-4ba4-b4b8-2c58101f06b8.webp?v=1714910742","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/add69adea2376b6f86ec1e4d9635056d561e98c4_7e0f90bd-e978-4ceb-85d7-f08821e6ac49.webp?v=1714910744","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/86587c121689f63253a9271c34ff474957233bd8_03dbf09a-4d94-4139-832f-8394c6a445cf.webp?v=1714910746","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f0f16b5b34b9ed1451c6ad9700355b3ed2160b2e_47993ce3-e1b2-4b68-a7d0-48abe982bb92.webp?v=1714910749","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2f4691292680c464a209b13d79426a191c917289_2e5690c6-30be-4af4-b761-5580c05a8a29.webp?v=1714910751","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/83a757b4af01c82674e48970084eb03fa12c8caf_2c4c10c1-bdbe-4189-bd6d-4c11a9ba595a.webp?v=1714910754","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9b00a3e327d9b25b217ffc5b43a219d3e7349079_a4dd9bc1-e1bc-4ccc-985e-ef1fac265028.webp?v=1714910756"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8c2162002db15904dabd6a57ad2ddf8af1be79c3_9fa62f01-3c0c-4818-8db6-4b3fe3d1da7c.webp?v=1714910732","options":["color"],"media":[{"alt":null,"id":23893255028835,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8c2162002db15904dabd6a57ad2ddf8af1be79c3_9fa62f01-3c0c-4818-8db6-4b3fe3d1da7c.webp?v=1714910732"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8c2162002db15904dabd6a57ad2ddf8af1be79c3_9fa62f01-3c0c-4818-8db6-4b3fe3d1da7c.webp?v=1714910732","width":2000},{"alt":null,"id":23893255487587,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c39628a1c46a409396c0c7a63e181ab0f3c7560f_94cb5b1c-c6f0-4f5e-9a4d-1d85ec7e3e40.webp?v=1714910734"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c39628a1c46a409396c0c7a63e181ab0f3c7560f_94cb5b1c-c6f0-4f5e-9a4d-1d85ec7e3e40.webp?v=1714910734","width":2000},{"alt":null,"id":23893255979107,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8a50922782579e91ffb2140e07fa540f15e0c802_6096a16f-7307-487b-a04c-f30deb9f354d.webp?v=1714910737"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8a50922782579e91ffb2140e07fa540f15e0c802_6096a16f-7307-487b-a04c-f30deb9f354d.webp?v=1714910737","width":2000},{"alt":null,"id":23893256470627,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ef9869f7e9369c7b72683d81c7f152c41125cb52_b3c858ff-8e9e-430d-b87a-f7d55e757618.webp?v=1714910739"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ef9869f7e9369c7b72683d81c7f152c41125cb52_b3c858ff-8e9e-430d-b87a-f7d55e757618.webp?v=1714910739","width":2000},{"alt":null,"id":23893257289827,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1ea7b81047327ef200cee97f760080c5dfc0788c_01b71c98-901c-4ba4-b4b8-2c58101f06b8.webp?v=1714910742"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1ea7b81047327ef200cee97f760080c5dfc0788c_01b71c98-901c-4ba4-b4b8-2c58101f06b8.webp?v=1714910742","width":2000},{"alt":null,"id":23893257781347,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/add69adea2376b6f86ec1e4d9635056d561e98c4_7e0f90bd-e978-4ceb-85d7-f08821e6ac49.webp?v=1714910744"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/add69adea2376b6f86ec1e4d9635056d561e98c4_7e0f90bd-e978-4ceb-85d7-f08821e6ac49.webp?v=1714910744","width":2000},{"alt":null,"id":23893258305635,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/86587c121689f63253a9271c34ff474957233bd8_03dbf09a-4d94-4139-832f-8394c6a445cf.webp?v=1714910746"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/86587c121689f63253a9271c34ff474957233bd8_03dbf09a-4d94-4139-832f-8394c6a445cf.webp?v=1714910746","width":2000},{"alt":null,"id":23893258928227,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f0f16b5b34b9ed1451c6ad9700355b3ed2160b2e_47993ce3-e1b2-4b68-a7d0-48abe982bb92.webp?v=1714910749"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f0f16b5b34b9ed1451c6ad9700355b3ed2160b2e_47993ce3-e1b2-4b68-a7d0-48abe982bb92.webp?v=1714910749","width":2000},{"alt":null,"id":23893259714659,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2f4691292680c464a209b13d79426a191c917289_2e5690c6-30be-4af4-b761-5580c05a8a29.webp?v=1714910751"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2f4691292680c464a209b13d79426a191c917289_2e5690c6-30be-4af4-b761-5580c05a8a29.webp?v=1714910751","width":2000},{"alt":null,"id":23893260238947,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/83a757b4af01c82674e48970084eb03fa12c8caf_2c4c10c1-bdbe-4189-bd6d-4c11a9ba595a.webp?v=1714910754"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/83a757b4af01c82674e48970084eb03fa12c8caf_2c4c10c1-bdbe-4189-bd6d-4c11a9ba595a.webp?v=1714910754","width":2000},{"alt":null,"id":23893260763235,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9b00a3e327d9b25b217ffc5b43a219d3e7349079_a4dd9bc1-e1bc-4ccc-985e-ef1fac265028.webp?v=1714910756"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9b00a3e327d9b25b217ffc5b43a219d3e7349079_a4dd9bc1-e1bc-4ccc-985e-ef1fac265028.webp?v=1714910756","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41910899769443,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118424-PB61","requires_shipping":true,"taxable":true,"featured_image":{"id":31487915622499,"product_id":7415009214563,"position":9,"created_at":"2024-05-05T20:05:51+08:00","updated_at":"2024-05-05T20:05:51+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2f4691292680c464a209b13d79426a191c917289_2e5690c6-30be-4af4-b761-5580c05a8a29.webp?v=1714910751","variant_ids":[41910899769443]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - 迪士尼-星際大戰 Star Wars - Pattern 星際大戰-Galaxy - 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-PB61","featured_media":{"alt":null,"id":23893259714659,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2f4691292680c464a209b13d79426a191c917289_2e5690c6-30be-4af4-b761-5580c05a8a29.webp?v=1714910751"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41910899769443,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118424-PB61","requires_shipping":true,"taxable":true,"featured_image":{"id":31487915622499,"product_id":7415009214563,"position":9,"created_at":"2024-05-05T20:05:51+08:00","updated_at":"2024-05-05T20:05:51+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2f4691292680c464a209b13d79426a191c917289_2e5690c6-30be-4af4-b761-5580c05a8a29.webp?v=1714910751","variant_ids":[41910899769443]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - 迪士尼-星際大戰 Star Wars - Pattern 星際大戰-Galaxy - 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-PB61","featured_media":{"alt":null,"id":23893259714659,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2f4691292680c464a209b13d79426a191c917289_2e5690c6-30be-4af4-b761-5580c05a8a29.webp?v=1714910751"}},"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: "停產" }