$product = {"id":7416386125923,"title":"犀牛盾Mod NX手機殼 - iPhone 7\/8\/SE2\/SE3 - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - Pattern BB8-Galaxy","handle":"iphone-8-mod-nx-printable-pb59","description":null,"published_at":"2024-06-11T16:57:39+08:00","created_at":"2024-05-06T14:46:49+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"設計師MOD NX專區-迪士尼-星際大戰 Star Wars","tags":["20%","25%","30%","35%","40%","45%","50%","b2b","brand-Apple","designer","designer-starwars","device-iPhone 8","merge","mod-nx-printable","new-modnx-sku","reseller-modnx-star-wars","Top50","type-Mod NX Printable"],"price":90000,"price_min":90000,"price_max":90000,"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":41919176278115,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0105424-PB59","requires_shipping":true,"taxable":true,"featured_image":{"id":31492003856483,"product_id":7416386125923,"position":9,"created_at":"2024-05-06T14:47:11+08:00","updated_at":"2024-05-06T14:47:11+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cf73731bb2c2a88ec896aa9ebc18bdcea31dcb4f_614f0cf6-d61e-4c72-82b4-378cd02a5a05.webp?v=1714978031","variant_ids":[41919176278115]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 7\/8\/SE2\/SE3 - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - Pattern BB8-Galaxy - Mod NX-黑色邊框","public_title":"Mod NX-黑色邊框","options":["Mod NX-黑色邊框"],"price":90000,"weight":980,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"NPB0105424-PB59","featured_media":{"alt":null,"id":23897417646179,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cf73731bb2c2a88ec896aa9ebc18bdcea31dcb4f_614f0cf6-d61e-4c72-82b4-378cd02a5a05.webp?v=1714978031"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bc5aed74e19bf504936e3e30de6313a2945d1f56_ee1e17ac-c40d-491a-b1a8-a577d7615a1b.webp?v=1714978012","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/06adfc7f7dfcf1dc33debbb4fb133cf921626ecf_abbc195a-e423-41b2-8104-c25426894a9b.webp?v=1714978014","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d100d1b98014b24276579e042ce7e7bbb2f5a974_c493da80-da78-4b31-ad97-0b15941b4c66.webp?v=1714978017","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3faacf55e39ba7a75dd52be4e7cdbc532ef3f3d4_6d43184e-4ff4-4072-a85d-d89fd266412e.webp?v=1714978019","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d7888fe96e4c8efe1bc84da28337fe3b0961ab06_60c55d1c-0f0f-4f30-b275-5c99f74e4de9.webp?v=1714978021","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0c525a4ab5a7f52724eecbcbe7c8a80db3bb434f_9eb9164c-6de2-431f-9364-f387d03ddceb.webp?v=1714978024","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/774716855bebcf6c83a33c867b61104f8defc0eb_d2439542-e5a5-4e68-83d2-318abab196f5.webp?v=1714978026","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d6fae1e18173c63dcfb5b2e9206d073ff381989a_b2d36388-c3e1-476e-a141-0a48c46b1232.webp?v=1714978029","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cf73731bb2c2a88ec896aa9ebc18bdcea31dcb4f_614f0cf6-d61e-4c72-82b4-378cd02a5a05.webp?v=1714978031","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/585332b9e99969d74b8565b23b0cfe249da6e795_bd10ee15-02b6-47f9-ab73-5dd8e91485d4.webp?v=1714978034"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bc5aed74e19bf504936e3e30de6313a2945d1f56_ee1e17ac-c40d-491a-b1a8-a577d7615a1b.webp?v=1714978012","options":["color"],"media":[{"alt":null,"id":23897412730979,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bc5aed74e19bf504936e3e30de6313a2945d1f56_ee1e17ac-c40d-491a-b1a8-a577d7615a1b.webp?v=1714978012"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bc5aed74e19bf504936e3e30de6313a2945d1f56_ee1e17ac-c40d-491a-b1a8-a577d7615a1b.webp?v=1714978012","width":2000},{"alt":null,"id":23897413451875,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/06adfc7f7dfcf1dc33debbb4fb133cf921626ecf_abbc195a-e423-41b2-8104-c25426894a9b.webp?v=1714978014"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/06adfc7f7dfcf1dc33debbb4fb133cf921626ecf_abbc195a-e423-41b2-8104-c25426894a9b.webp?v=1714978014","width":2000},{"alt":null,"id":23897413943395,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d100d1b98014b24276579e042ce7e7bbb2f5a974_c493da80-da78-4b31-ad97-0b15941b4c66.webp?v=1714978017"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d100d1b98014b24276579e042ce7e7bbb2f5a974_c493da80-da78-4b31-ad97-0b15941b4c66.webp?v=1714978017","width":2000},{"alt":null,"id":23897414598755,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3faacf55e39ba7a75dd52be4e7cdbc532ef3f3d4_6d43184e-4ff4-4072-a85d-d89fd266412e.webp?v=1714978019"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3faacf55e39ba7a75dd52be4e7cdbc532ef3f3d4_6d43184e-4ff4-4072-a85d-d89fd266412e.webp?v=1714978019","width":2000},{"alt":null,"id":23897414860899,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d7888fe96e4c8efe1bc84da28337fe3b0961ab06_60c55d1c-0f0f-4f30-b275-5c99f74e4de9.webp?v=1714978021"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d7888fe96e4c8efe1bc84da28337fe3b0961ab06_60c55d1c-0f0f-4f30-b275-5c99f74e4de9.webp?v=1714978021","width":2000},{"alt":null,"id":23897415745635,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0c525a4ab5a7f52724eecbcbe7c8a80db3bb434f_9eb9164c-6de2-431f-9364-f387d03ddceb.webp?v=1714978024"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0c525a4ab5a7f52724eecbcbe7c8a80db3bb434f_9eb9164c-6de2-431f-9364-f387d03ddceb.webp?v=1714978024","width":2000},{"alt":null,"id":23897416466531,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/774716855bebcf6c83a33c867b61104f8defc0eb_d2439542-e5a5-4e68-83d2-318abab196f5.webp?v=1714978026"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/774716855bebcf6c83a33c867b61104f8defc0eb_d2439542-e5a5-4e68-83d2-318abab196f5.webp?v=1714978026","width":2000},{"alt":null,"id":23897417121891,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d6fae1e18173c63dcfb5b2e9206d073ff381989a_b2d36388-c3e1-476e-a141-0a48c46b1232.webp?v=1714978029"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d6fae1e18173c63dcfb5b2e9206d073ff381989a_b2d36388-c3e1-476e-a141-0a48c46b1232.webp?v=1714978029","width":2000},{"alt":null,"id":23897417646179,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cf73731bb2c2a88ec896aa9ebc18bdcea31dcb4f_614f0cf6-d61e-4c72-82b4-378cd02a5a05.webp?v=1714978031"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cf73731bb2c2a88ec896aa9ebc18bdcea31dcb4f_614f0cf6-d61e-4c72-82b4-378cd02a5a05.webp?v=1714978031","width":2000},{"alt":null,"id":23897418170467,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/585332b9e99969d74b8565b23b0cfe249da6e795_bd10ee15-02b6-47f9-ab73-5dd8e91485d4.webp?v=1714978034"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/585332b9e99969d74b8565b23b0cfe249da6e795_bd10ee15-02b6-47f9-ab73-5dd8e91485d4.webp?v=1714978034","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $bumper = null; $variants = [{"id":41919176278115,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0105424-PB59","requires_shipping":true,"taxable":true,"featured_image":{"id":31492003856483,"product_id":7416386125923,"position":9,"created_at":"2024-05-06T14:47:11+08:00","updated_at":"2024-05-06T14:47:11+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cf73731bb2c2a88ec896aa9ebc18bdcea31dcb4f_614f0cf6-d61e-4c72-82b4-378cd02a5a05.webp?v=1714978031","variant_ids":[41919176278115]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 7\/8\/SE2\/SE3 - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - Pattern BB8-Galaxy - Mod NX-黑色邊框","public_title":"Mod NX-黑色邊框","options":["Mod NX-黑色邊框"],"price":90000,"weight":980,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"NPB0105424-PB59","featured_media":{"alt":null,"id":23897417646179,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cf73731bb2c2a88ec896aa9ebc18bdcea31dcb4f_614f0cf6-d61e-4c72-82b4-378cd02a5a05.webp?v=1714978031"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41919176278115,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0105424-PB59","requires_shipping":true,"taxable":true,"featured_image":{"id":31492003856483,"product_id":7416386125923,"position":9,"created_at":"2024-05-06T14:47:11+08:00","updated_at":"2024-05-06T14:47:11+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cf73731bb2c2a88ec896aa9ebc18bdcea31dcb4f_614f0cf6-d61e-4c72-82b4-378cd02a5a05.webp?v=1714978031","variant_ids":[41919176278115]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 7\/8\/SE2\/SE3 - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - Pattern BB8-Galaxy - Mod NX-黑色邊框","public_title":"Mod NX-黑色邊框","options":["Mod NX-黑色邊框"],"price":90000,"weight":980,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"NPB0105424-PB59","featured_media":{"alt":null,"id":23897417646179,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cf73731bb2c2a88ec896aa9ebc18bdcea31dcb4f_614f0cf6-d61e-4c72-82b4-378cd02a5a05.webp?v=1714978031"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}; $device_handle = null var sellingStatus if ($bumper) { $(document).ready(function() { var productImg = $product.images[0] var bumperVariants = $bumper.variants; var bumperColors = new Object(); var currentVariant = ''; var productType = ''; bumperVariants.forEach(variant => { bumperColors[`${variant.title.split(' (')[0].toLowerCase()}`] = variant.featured_image.src; }); if (productType === 'mod-nx-backplate' || productType === 'mod-backplate') { mergeImages( [productImg, bumperColors[currentVariant]], { crossOrigin: 'anonymous' } ).then(mergedImg => { $('.merged-img').attr('src', mergedImg); }); } else { mergeImages( [bumperColors[currentVariant], productImg], { crossOrigin: 'anonymous' } ).then(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: "停產" }