$product = {"id":7415898767459,"title":"犀牛盾Mod NX手機殼 - iPhone XS Max - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - 千年鷹-美式復古","handle":"iphone-xs-max-mod-nx-printable-pb99","description":null,"published_at":"2024-06-11T16:47:24+08:00","created_at":"2024-05-06T12:21:03+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 XS Max","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":41915329839203,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0108624-PB99","requires_shipping":true,"taxable":true,"featured_image":{"id":31490690416739,"product_id":7415898767459,"position":10,"created_at":"2024-05-06T12:21:28+08:00","updated_at":"2024-05-06T12:21:28+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/23aa4b5e0ada66fff7e13e4a80eda3ff79a1ea89_992bf095-f1ce-416e-a165-1ab9add1d617.webp?v=1714969288","variant_ids":[41915329839203]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone XS Max - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - 千年鷹-美式復古 - 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":"NPB0108624-PB99","featured_media":{"alt":null,"id":23896097095779,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/23aa4b5e0ada66fff7e13e4a80eda3ff79a1ea89_992bf095-f1ce-416e-a165-1ab9add1d617.webp?v=1714969288"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/55839b1486816dd2314426fcedd37d6a3f6ed949_a800fc47-a7cf-47ed-bf72-063fc1b9a14a.webp?v=1714969265","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7c30ab213d6d1f75f51e8bfe69e224e1b7cb087b_fd2d3b6f-1929-4d1a-80c2-515aea8f6e4f.webp?v=1714969268","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8a9a893e5b91afff70331d5bf73fe2773f052c3a_dfd3926e-16c7-4694-abb9-07569334e22e.webp?v=1714969271","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1f784074779a3b13789542967b225fd9d79623aa_e9fbc78d-b4e7-4881-8482-07b14f379eac.webp?v=1714969273","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/681dd03b5bcb0cac4a91e36aaa2a517601664a4e_48c48335-10e6-4362-a34c-5de08df59015.webp?v=1714969275","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/68a888ceb0b91b6fdd4d5cc00b6c5e88593c1c53_9d62226c-e4f7-4022-85f6-ca87f40d538e.webp?v=1714969278","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cfe98e7ed12b57b8f0e09678e036be8a2c617017_81c251ce-922c-455b-9b78-19f678052ea9.webp?v=1714969281","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2abc0f7ab3894e0dc72c28f677454c62472fbd73_06c51c62-3201-46c2-8dd2-bec0c0a8507d.webp?v=1714969283","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c0f19704041fe2f1af9439491a344d9cc242f0b9_1af76cce-a7f7-4b70-93ba-528ad7b35e25.webp?v=1714969286","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/23aa4b5e0ada66fff7e13e4a80eda3ff79a1ea89_992bf095-f1ce-416e-a165-1ab9add1d617.webp?v=1714969288"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/55839b1486816dd2314426fcedd37d6a3f6ed949_a800fc47-a7cf-47ed-bf72-063fc1b9a14a.webp?v=1714969265","options":["color"],"media":[{"alt":null,"id":23896092770403,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/55839b1486816dd2314426fcedd37d6a3f6ed949_a800fc47-a7cf-47ed-bf72-063fc1b9a14a.webp?v=1714969265"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/55839b1486816dd2314426fcedd37d6a3f6ed949_a800fc47-a7cf-47ed-bf72-063fc1b9a14a.webp?v=1714969265","width":2000},{"alt":null,"id":23896093327459,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7c30ab213d6d1f75f51e8bfe69e224e1b7cb087b_fd2d3b6f-1929-4d1a-80c2-515aea8f6e4f.webp?v=1714969268"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7c30ab213d6d1f75f51e8bfe69e224e1b7cb087b_fd2d3b6f-1929-4d1a-80c2-515aea8f6e4f.webp?v=1714969268","width":2000},{"alt":null,"id":23896093818979,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8a9a893e5b91afff70331d5bf73fe2773f052c3a_dfd3926e-16c7-4694-abb9-07569334e22e.webp?v=1714969271"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8a9a893e5b91afff70331d5bf73fe2773f052c3a_dfd3926e-16c7-4694-abb9-07569334e22e.webp?v=1714969271","width":2000},{"alt":null,"id":23896094179427,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1f784074779a3b13789542967b225fd9d79623aa_e9fbc78d-b4e7-4881-8482-07b14f379eac.webp?v=1714969273"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1f784074779a3b13789542967b225fd9d79623aa_e9fbc78d-b4e7-4881-8482-07b14f379eac.webp?v=1714969273","width":2000},{"alt":null,"id":23896094670947,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/681dd03b5bcb0cac4a91e36aaa2a517601664a4e_48c48335-10e6-4362-a34c-5de08df59015.webp?v=1714969275"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/681dd03b5bcb0cac4a91e36aaa2a517601664a4e_48c48335-10e6-4362-a34c-5de08df59015.webp?v=1714969275","width":2000},{"alt":null,"id":23896095096931,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/68a888ceb0b91b6fdd4d5cc00b6c5e88593c1c53_9d62226c-e4f7-4022-85f6-ca87f40d538e.webp?v=1714969278"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/68a888ceb0b91b6fdd4d5cc00b6c5e88593c1c53_9d62226c-e4f7-4022-85f6-ca87f40d538e.webp?v=1714969278","width":2000},{"alt":null,"id":23896095686755,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cfe98e7ed12b57b8f0e09678e036be8a2c617017_81c251ce-922c-455b-9b78-19f678052ea9.webp?v=1714969281"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cfe98e7ed12b57b8f0e09678e036be8a2c617017_81c251ce-922c-455b-9b78-19f678052ea9.webp?v=1714969281","width":2000},{"alt":null,"id":23896096243811,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2abc0f7ab3894e0dc72c28f677454c62472fbd73_06c51c62-3201-46c2-8dd2-bec0c0a8507d.webp?v=1714969283"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2abc0f7ab3894e0dc72c28f677454c62472fbd73_06c51c62-3201-46c2-8dd2-bec0c0a8507d.webp?v=1714969283","width":2000},{"alt":null,"id":23896096768099,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c0f19704041fe2f1af9439491a344d9cc242f0b9_1af76cce-a7f7-4b70-93ba-528ad7b35e25.webp?v=1714969286"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c0f19704041fe2f1af9439491a344d9cc242f0b9_1af76cce-a7f7-4b70-93ba-528ad7b35e25.webp?v=1714969286","width":2000},{"alt":null,"id":23896097095779,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/23aa4b5e0ada66fff7e13e4a80eda3ff79a1ea89_992bf095-f1ce-416e-a165-1ab9add1d617.webp?v=1714969288"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/23aa4b5e0ada66fff7e13e4a80eda3ff79a1ea89_992bf095-f1ce-416e-a165-1ab9add1d617.webp?v=1714969288","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $bumper = null; $variants = [{"id":41915329839203,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0108624-PB99","requires_shipping":true,"taxable":true,"featured_image":{"id":31490690416739,"product_id":7415898767459,"position":10,"created_at":"2024-05-06T12:21:28+08:00","updated_at":"2024-05-06T12:21:28+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/23aa4b5e0ada66fff7e13e4a80eda3ff79a1ea89_992bf095-f1ce-416e-a165-1ab9add1d617.webp?v=1714969288","variant_ids":[41915329839203]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone XS Max - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - 千年鷹-美式復古 - 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":"NPB0108624-PB99","featured_media":{"alt":null,"id":23896097095779,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/23aa4b5e0ada66fff7e13e4a80eda3ff79a1ea89_992bf095-f1ce-416e-a165-1ab9add1d617.webp?v=1714969288"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41915329839203,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0108624-PB99","requires_shipping":true,"taxable":true,"featured_image":{"id":31490690416739,"product_id":7415898767459,"position":10,"created_at":"2024-05-06T12:21:28+08:00","updated_at":"2024-05-06T12:21:28+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/23aa4b5e0ada66fff7e13e4a80eda3ff79a1ea89_992bf095-f1ce-416e-a165-1ab9add1d617.webp?v=1714969288","variant_ids":[41915329839203]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone XS Max - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - 千年鷹-美式復古 - 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":"NPB0108624-PB99","featured_media":{"alt":null,"id":23896097095779,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/23aa4b5e0ada66fff7e13e4a80eda3ff79a1ea89_992bf095-f1ce-416e-a165-1ab9add1d617.webp?v=1714969288"}},"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: "停產" }