$product = {"id":7416028823651,"title":"犀牛盾Mod NX手機殼 - iPhone XS - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - POP千年鷹","handle":"iphone-xs-mod-nx-printable-pb27","description":null,"published_at":"2024-06-11T16:50:49+08:00","created_at":"2024-05-06T12:45:00+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","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":41916670312547,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0108424-PB27","requires_shipping":true,"taxable":true,"featured_image":{"id":31491027796067,"product_id":7416028823651,"position":7,"created_at":"2024-05-06T12:45:17+08:00","updated_at":"2024-05-06T12:45:17+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/002d012799e9acbdf3e00d17e1e28e853230b8d6_42982b15-6802-4c25-a608-25f89de8cccb.webp?v=1714970717","variant_ids":[41916670312547]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone XS - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - POP千年鷹 - 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":"NPB0108424-PB27","featured_media":{"alt":null,"id":23896435097699,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/002d012799e9acbdf3e00d17e1e28e853230b8d6_42982b15-6802-4c25-a608-25f89de8cccb.webp?v=1714970717"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/506712b10c34f9f27361c61938e37892fc482c61_7b4c4c3e-a4c0-4a60-9a8f-24b251de8220.webp?v=1714970702","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7e3d6fa01756fb491af932e0f2d695f8433e0877_44f9d309-184e-4ca4-808a-7507790d65ed.webp?v=1714970705","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a3d80c7d656a0df4aa3a432dd94b35d17357086b_dd867cc6-05d3-47ba-9dcf-88e3e67fc0a6.webp?v=1714970707","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a3e1020a6ef8c5937ffababde6c898fc47f989ba_061d3d46-38ee-4a33-ad73-296f44ad71df.webp?v=1714970710","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4ad5d7cda308aa4ffedac3573bb73e03f5ef380c_0094fc4f-0184-4e73-8eaa-c358df1acbb4.webp?v=1714970712","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ecb948be19ba3acfebc7865eeebd4abb9ec37947_86aae484-a286-40e2-8eb5-c07e6db08029.webp?v=1714970715","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/002d012799e9acbdf3e00d17e1e28e853230b8d6_42982b15-6802-4c25-a608-25f89de8cccb.webp?v=1714970717","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4235d5942304166fa473c110ca32f369cb17d3ae_75ddf7e2-2a01-4319-9f2b-b816474c1dab.webp?v=1714970720","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3fe44e3fd7946006a0f44dfeb783b1ee171af301_dff8eec2-8870-4177-82e7-4f00a0a1949e.webp?v=1714970722","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/64597709867ba8fbd83c4be175d192a22b14bfce_67225e6c-ee9e-4faa-a4d3-6891ac356e9e.webp?v=1714970725"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/506712b10c34f9f27361c61938e37892fc482c61_7b4c4c3e-a4c0-4a60-9a8f-24b251de8220.webp?v=1714970702","options":["color"],"media":[{"alt":null,"id":23896431493219,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/506712b10c34f9f27361c61938e37892fc482c61_7b4c4c3e-a4c0-4a60-9a8f-24b251de8220.webp?v=1714970702"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/506712b10c34f9f27361c61938e37892fc482c61_7b4c4c3e-a4c0-4a60-9a8f-24b251de8220.webp?v=1714970702","width":2000},{"alt":null,"id":23896432115811,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7e3d6fa01756fb491af932e0f2d695f8433e0877_44f9d309-184e-4ca4-808a-7507790d65ed.webp?v=1714970705"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7e3d6fa01756fb491af932e0f2d695f8433e0877_44f9d309-184e-4ca4-808a-7507790d65ed.webp?v=1714970705","width":2000},{"alt":null,"id":23896432607331,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a3d80c7d656a0df4aa3a432dd94b35d17357086b_dd867cc6-05d3-47ba-9dcf-88e3e67fc0a6.webp?v=1714970707"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a3d80c7d656a0df4aa3a432dd94b35d17357086b_dd867cc6-05d3-47ba-9dcf-88e3e67fc0a6.webp?v=1714970707","width":2000},{"alt":null,"id":23896433229923,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a3e1020a6ef8c5937ffababde6c898fc47f989ba_061d3d46-38ee-4a33-ad73-296f44ad71df.webp?v=1714970710"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a3e1020a6ef8c5937ffababde6c898fc47f989ba_061d3d46-38ee-4a33-ad73-296f44ad71df.webp?v=1714970710","width":2000},{"alt":null,"id":23896433721443,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4ad5d7cda308aa4ffedac3573bb73e03f5ef380c_0094fc4f-0184-4e73-8eaa-c358df1acbb4.webp?v=1714970712"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4ad5d7cda308aa4ffedac3573bb73e03f5ef380c_0094fc4f-0184-4e73-8eaa-c358df1acbb4.webp?v=1714970712","width":2000},{"alt":null,"id":23896434507875,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ecb948be19ba3acfebc7865eeebd4abb9ec37947_86aae484-a286-40e2-8eb5-c07e6db08029.webp?v=1714970715"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ecb948be19ba3acfebc7865eeebd4abb9ec37947_86aae484-a286-40e2-8eb5-c07e6db08029.webp?v=1714970715","width":2000},{"alt":null,"id":23896435097699,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/002d012799e9acbdf3e00d17e1e28e853230b8d6_42982b15-6802-4c25-a608-25f89de8cccb.webp?v=1714970717"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/002d012799e9acbdf3e00d17e1e28e853230b8d6_42982b15-6802-4c25-a608-25f89de8cccb.webp?v=1714970717","width":2000},{"alt":null,"id":23896435720291,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4235d5942304166fa473c110ca32f369cb17d3ae_75ddf7e2-2a01-4319-9f2b-b816474c1dab.webp?v=1714970720"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4235d5942304166fa473c110ca32f369cb17d3ae_75ddf7e2-2a01-4319-9f2b-b816474c1dab.webp?v=1714970720","width":2000},{"alt":null,"id":23896436211811,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3fe44e3fd7946006a0f44dfeb783b1ee171af301_dff8eec2-8870-4177-82e7-4f00a0a1949e.webp?v=1714970722"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3fe44e3fd7946006a0f44dfeb783b1ee171af301_dff8eec2-8870-4177-82e7-4f00a0a1949e.webp?v=1714970722","width":2000},{"alt":null,"id":23896436768867,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/64597709867ba8fbd83c4be175d192a22b14bfce_67225e6c-ee9e-4faa-a4d3-6891ac356e9e.webp?v=1714970725"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/64597709867ba8fbd83c4be175d192a22b14bfce_67225e6c-ee9e-4faa-a4d3-6891ac356e9e.webp?v=1714970725","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $bumper = null; $variants = [{"id":41916670312547,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0108424-PB27","requires_shipping":true,"taxable":true,"featured_image":{"id":31491027796067,"product_id":7416028823651,"position":7,"created_at":"2024-05-06T12:45:17+08:00","updated_at":"2024-05-06T12:45:17+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/002d012799e9acbdf3e00d17e1e28e853230b8d6_42982b15-6802-4c25-a608-25f89de8cccb.webp?v=1714970717","variant_ids":[41916670312547]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone XS - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - POP千年鷹 - 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":"NPB0108424-PB27","featured_media":{"alt":null,"id":23896435097699,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/002d012799e9acbdf3e00d17e1e28e853230b8d6_42982b15-6802-4c25-a608-25f89de8cccb.webp?v=1714970717"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41916670312547,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0108424-PB27","requires_shipping":true,"taxable":true,"featured_image":{"id":31491027796067,"product_id":7416028823651,"position":7,"created_at":"2024-05-06T12:45:17+08:00","updated_at":"2024-05-06T12:45:17+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/002d012799e9acbdf3e00d17e1e28e853230b8d6_42982b15-6802-4c25-a608-25f89de8cccb.webp?v=1714970717","variant_ids":[41916670312547]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone XS - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - POP千年鷹 - 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":"NPB0108424-PB27","featured_media":{"alt":null,"id":23896435097699,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/002d012799e9acbdf3e00d17e1e28e853230b8d6_42982b15-6802-4c25-a608-25f89de8cccb.webp?v=1714970717"}},"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: "停產" }