$product = {"id":7415003971683,"title":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - 迪士尼-星際大戰 Star Wars - R2D2-噴漆黑","handle":"iphone-12-mini-mod-nx-magsafe-printable-pb07","description":null,"published_at":"2024-06-11T17:55:23+08:00","created_at":"2024-05-05T20:04: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":41910838493283,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118424-PB07","requires_shipping":true,"taxable":true,"featured_image":{"id":31487901171811,"product_id":7415003971683,"position":8,"created_at":"2024-05-05T20:04:48+08:00","updated_at":"2024-05-05T20:04:48+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4741b8f4ec7907b5770e457ec2015c610b90d69b_e5b9d7d6-7573-4c8f-8dba-80e3aeb99c34.webp?v=1714910688","variant_ids":[41910838493283]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - 迪士尼-星際大戰 Star Wars - R2D2-噴漆黑 - 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-PB07","featured_media":{"alt":null,"id":23893245329507,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4741b8f4ec7907b5770e457ec2015c610b90d69b_e5b9d7d6-7573-4c8f-8dba-80e3aeb99c34.webp?v=1714910688"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/346138fe3ef8fd2a62db33edd857949395a7f490_bcd213a3-162c-4e33-8587-201c190aeb72.webp?v=1714910672","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bb436a95a03033174c6f0ccd5a56105b0debe5c9_9ad07204-d249-48f7-9346-e2d433f8d25d.webp?v=1714910674","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/259cef37a0655f7cfa26ca202dda2dd12c3167d6_c466dd23-ccb6-4e07-88d6-4e8933cdf8f6.webp?v=1714910677","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3fa75f44517af400cfbdc9cf4fa32bb22bb2b9f4_be1d93b6-ccd0-4e4d-8a79-0236110170cc.webp?v=1714910679","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dd1d7e4062b6e622d88928f5dab532a7e7fe4f23_e4797e58-08a4-4866-8918-82a8b54cfb55.webp?v=1714910681","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6b192d55c497ea966f2bffb522d1ec6fb56dcba6_4bad093a-9319-487b-afff-afdb38427a42.webp?v=1714910684","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d305ac33664ec9384aab5929679629c39b900668_77cbfa40-9c49-4e27-a95e-f997df2aca35.webp?v=1714910686","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4741b8f4ec7907b5770e457ec2015c610b90d69b_e5b9d7d6-7573-4c8f-8dba-80e3aeb99c34.webp?v=1714910688","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/945018d513e6756ac0d389889e5cab3caf51358c_5024e3de-a0dd-4c7d-a6b0-34d8fc133486.webp?v=1714910690","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6c3b4934c9a005a9fad8bd5c368417e08606a49e_712b6a1b-e9f5-43cf-9ab9-04a9fcd22cfa.webp?v=1714910693","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f5f6ed86de7ec0a6263a0ab69e840de50d7ec8db_62b10461-8c35-478c-a176-48efb1b4c697.webp?v=1714910695"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/346138fe3ef8fd2a62db33edd857949395a7f490_bcd213a3-162c-4e33-8587-201c190aeb72.webp?v=1714910672","options":["color"],"media":[{"alt":null,"id":23893240578147,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/346138fe3ef8fd2a62db33edd857949395a7f490_bcd213a3-162c-4e33-8587-201c190aeb72.webp?v=1714910672"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/346138fe3ef8fd2a62db33edd857949395a7f490_bcd213a3-162c-4e33-8587-201c190aeb72.webp?v=1714910672","width":2000},{"alt":null,"id":23893241331811,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bb436a95a03033174c6f0ccd5a56105b0debe5c9_9ad07204-d249-48f7-9346-e2d433f8d25d.webp?v=1714910674"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bb436a95a03033174c6f0ccd5a56105b0debe5c9_9ad07204-d249-48f7-9346-e2d433f8d25d.webp?v=1714910674","width":2000},{"alt":null,"id":23893242019939,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/259cef37a0655f7cfa26ca202dda2dd12c3167d6_c466dd23-ccb6-4e07-88d6-4e8933cdf8f6.webp?v=1714910677"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/259cef37a0655f7cfa26ca202dda2dd12c3167d6_c466dd23-ccb6-4e07-88d6-4e8933cdf8f6.webp?v=1714910677","width":2000},{"alt":null,"id":23893242413155,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3fa75f44517af400cfbdc9cf4fa32bb22bb2b9f4_be1d93b6-ccd0-4e4d-8a79-0236110170cc.webp?v=1714910679"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3fa75f44517af400cfbdc9cf4fa32bb22bb2b9f4_be1d93b6-ccd0-4e4d-8a79-0236110170cc.webp?v=1714910679","width":2000},{"alt":null,"id":23893243134051,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dd1d7e4062b6e622d88928f5dab532a7e7fe4f23_e4797e58-08a4-4866-8918-82a8b54cfb55.webp?v=1714910681"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dd1d7e4062b6e622d88928f5dab532a7e7fe4f23_e4797e58-08a4-4866-8918-82a8b54cfb55.webp?v=1714910681","width":2000},{"alt":null,"id":23893243953251,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6b192d55c497ea966f2bffb522d1ec6fb56dcba6_4bad093a-9319-487b-afff-afdb38427a42.webp?v=1714910684"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6b192d55c497ea966f2bffb522d1ec6fb56dcba6_4bad093a-9319-487b-afff-afdb38427a42.webp?v=1714910684","width":2000},{"alt":null,"id":23893244772451,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d305ac33664ec9384aab5929679629c39b900668_77cbfa40-9c49-4e27-a95e-f997df2aca35.webp?v=1714910686"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d305ac33664ec9384aab5929679629c39b900668_77cbfa40-9c49-4e27-a95e-f997df2aca35.webp?v=1714910686","width":2000},{"alt":null,"id":23893245329507,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4741b8f4ec7907b5770e457ec2015c610b90d69b_e5b9d7d6-7573-4c8f-8dba-80e3aeb99c34.webp?v=1714910688"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4741b8f4ec7907b5770e457ec2015c610b90d69b_e5b9d7d6-7573-4c8f-8dba-80e3aeb99c34.webp?v=1714910688","width":2000},{"alt":null,"id":23893245788259,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/945018d513e6756ac0d389889e5cab3caf51358c_5024e3de-a0dd-4c7d-a6b0-34d8fc133486.webp?v=1714910690"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/945018d513e6756ac0d389889e5cab3caf51358c_5024e3de-a0dd-4c7d-a6b0-34d8fc133486.webp?v=1714910690","width":2000},{"alt":null,"id":23893246443619,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6c3b4934c9a005a9fad8bd5c368417e08606a49e_712b6a1b-e9f5-43cf-9ab9-04a9fcd22cfa.webp?v=1714910693"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6c3b4934c9a005a9fad8bd5c368417e08606a49e_712b6a1b-e9f5-43cf-9ab9-04a9fcd22cfa.webp?v=1714910693","width":2000},{"alt":null,"id":23893247098979,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f5f6ed86de7ec0a6263a0ab69e840de50d7ec8db_62b10461-8c35-478c-a176-48efb1b4c697.webp?v=1714910695"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f5f6ed86de7ec0a6263a0ab69e840de50d7ec8db_62b10461-8c35-478c-a176-48efb1b4c697.webp?v=1714910695","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41910838493283,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118424-PB07","requires_shipping":true,"taxable":true,"featured_image":{"id":31487901171811,"product_id":7415003971683,"position":8,"created_at":"2024-05-05T20:04:48+08:00","updated_at":"2024-05-05T20:04:48+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4741b8f4ec7907b5770e457ec2015c610b90d69b_e5b9d7d6-7573-4c8f-8dba-80e3aeb99c34.webp?v=1714910688","variant_ids":[41910838493283]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - 迪士尼-星際大戰 Star Wars - R2D2-噴漆黑 - 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-PB07","featured_media":{"alt":null,"id":23893245329507,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4741b8f4ec7907b5770e457ec2015c610b90d69b_e5b9d7d6-7573-4c8f-8dba-80e3aeb99c34.webp?v=1714910688"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41910838493283,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118424-PB07","requires_shipping":true,"taxable":true,"featured_image":{"id":31487901171811,"product_id":7415003971683,"position":8,"created_at":"2024-05-05T20:04:48+08:00","updated_at":"2024-05-05T20:04:48+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4741b8f4ec7907b5770e457ec2015c610b90d69b_e5b9d7d6-7573-4c8f-8dba-80e3aeb99c34.webp?v=1714910688","variant_ids":[41910838493283]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - 迪士尼-星際大戰 Star Wars - R2D2-噴漆黑 - 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-PB07","featured_media":{"alt":null,"id":23893245329507,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4741b8f4ec7907b5770e457ec2015c610b90d69b_e5b9d7d6-7573-4c8f-8dba-80e3aeb99c34.webp?v=1714910688"}},"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: "停產" }