$product = {"id":7416205541475,"title":"犀牛盾Mod NX手機殼 - iPhone X - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - 黑武士-線稿風格","handle":"iphone-x-mod-nx-printable-pb51","description":null,"published_at":"2024-06-11T16:53:17+08:00","created_at":"2024-05-06T14:10:26+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 X","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":41918004953187,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0106424-PB51","requires_shipping":true,"taxable":true,"featured_image":{"id":31491640131683,"product_id":7416205541475,"position":10,"created_at":"2024-05-06T14:10:49+08:00","updated_at":"2024-05-06T14:10:49+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/af15dfe5067cf15047edb3389faf8e7b4399e876_c6c98764-16aa-4358-baac-ab3c893d0094.webp?v=1714975849","variant_ids":[41918004953187]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone X - 【聯名設計款】 - 迪士尼-星際大戰 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":"NPB0106424-PB51","featured_media":{"alt":null,"id":23897052217443,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/af15dfe5067cf15047edb3389faf8e7b4399e876_c6c98764-16aa-4358-baac-ab3c893d0094.webp?v=1714975849"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2385ef12c3fa864ec79323e2b9f4713677435401_ae32d637-21f3-4275-9e1e-354741327bb4.webp?v=1714975829","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/214533097f82a43aea273e590b97cc1de2a46701_0754c165-851d-4a83-831d-15ef5f9cd604.webp?v=1714975831","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/736c7ed4328ecb24316182061ba3bf1c157025bb_9f057f1b-2798-4cce-9344-db92b0f431e8.webp?v=1714975833","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c9209eefd4b54f9a4cb283c6dc54e4c7edda123e_65164531-a5da-45b3-88c4-23f737236025.webp?v=1714975836","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d0ca3b81f017a3c5d713ace6cc41a32c53ee9e29_780b36d9-3b7e-4779-a2a2-3fb0f7eeeaa2.webp?v=1714975838","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0303b7d4f1fb0bdd920fb79a988327e4691f191e_391fffde-d8e0-4b76-88d9-980c5580a044.webp?v=1714975840","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fe50e4a49b5bf8464d5535937c77c5b9ffcaed4d_f2f06420-89e6-4697-8021-e38f0720b68c.webp?v=1714975843","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5df37a26938db10499caf129619b4def3cf67336_2c93db56-2f95-43e0-9ed4-189f20266a35.webp?v=1714975845","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f901bf6c55c8a1a1f338608cb1ee0710d4431bc4_52553ab7-5120-4de8-b6ad-a7b8061c1843.webp?v=1714975847","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/af15dfe5067cf15047edb3389faf8e7b4399e876_c6c98764-16aa-4358-baac-ab3c893d0094.webp?v=1714975849"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2385ef12c3fa864ec79323e2b9f4713677435401_ae32d637-21f3-4275-9e1e-354741327bb4.webp?v=1714975829","options":["color"],"media":[{"alt":null,"id":23897047302243,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2385ef12c3fa864ec79323e2b9f4713677435401_ae32d637-21f3-4275-9e1e-354741327bb4.webp?v=1714975829"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2385ef12c3fa864ec79323e2b9f4713677435401_ae32d637-21f3-4275-9e1e-354741327bb4.webp?v=1714975829","width":2000},{"alt":null,"id":23897047957603,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/214533097f82a43aea273e590b97cc1de2a46701_0754c165-851d-4a83-831d-15ef5f9cd604.webp?v=1714975831"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/214533097f82a43aea273e590b97cc1de2a46701_0754c165-851d-4a83-831d-15ef5f9cd604.webp?v=1714975831","width":2000},{"alt":null,"id":23897048318051,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/736c7ed4328ecb24316182061ba3bf1c157025bb_9f057f1b-2798-4cce-9344-db92b0f431e8.webp?v=1714975833"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/736c7ed4328ecb24316182061ba3bf1c157025bb_9f057f1b-2798-4cce-9344-db92b0f431e8.webp?v=1714975833","width":2000},{"alt":null,"id":23897048809571,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c9209eefd4b54f9a4cb283c6dc54e4c7edda123e_65164531-a5da-45b3-88c4-23f737236025.webp?v=1714975836"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c9209eefd4b54f9a4cb283c6dc54e4c7edda123e_65164531-a5da-45b3-88c4-23f737236025.webp?v=1714975836","width":2000},{"alt":null,"id":23897049432163,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d0ca3b81f017a3c5d713ace6cc41a32c53ee9e29_780b36d9-3b7e-4779-a2a2-3fb0f7eeeaa2.webp?v=1714975838"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d0ca3b81f017a3c5d713ace6cc41a32c53ee9e29_780b36d9-3b7e-4779-a2a2-3fb0f7eeeaa2.webp?v=1714975838","width":2000},{"alt":null,"id":23897049923683,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0303b7d4f1fb0bdd920fb79a988327e4691f191e_391fffde-d8e0-4b76-88d9-980c5580a044.webp?v=1714975840"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0303b7d4f1fb0bdd920fb79a988327e4691f191e_391fffde-d8e0-4b76-88d9-980c5580a044.webp?v=1714975840","width":2000},{"alt":null,"id":23897050513507,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fe50e4a49b5bf8464d5535937c77c5b9ffcaed4d_f2f06420-89e6-4697-8021-e38f0720b68c.webp?v=1714975843"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fe50e4a49b5bf8464d5535937c77c5b9ffcaed4d_f2f06420-89e6-4697-8021-e38f0720b68c.webp?v=1714975843","width":2000},{"alt":null,"id":23897051234403,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5df37a26938db10499caf129619b4def3cf67336_2c93db56-2f95-43e0-9ed4-189f20266a35.webp?v=1714975845"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5df37a26938db10499caf129619b4def3cf67336_2c93db56-2f95-43e0-9ed4-189f20266a35.webp?v=1714975845","width":2000},{"alt":null,"id":23897051725923,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f901bf6c55c8a1a1f338608cb1ee0710d4431bc4_52553ab7-5120-4de8-b6ad-a7b8061c1843.webp?v=1714975847"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f901bf6c55c8a1a1f338608cb1ee0710d4431bc4_52553ab7-5120-4de8-b6ad-a7b8061c1843.webp?v=1714975847","width":2000},{"alt":null,"id":23897052217443,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/af15dfe5067cf15047edb3389faf8e7b4399e876_c6c98764-16aa-4358-baac-ab3c893d0094.webp?v=1714975849"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/af15dfe5067cf15047edb3389faf8e7b4399e876_c6c98764-16aa-4358-baac-ab3c893d0094.webp?v=1714975849","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $bumper = null; $variants = [{"id":41918004953187,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0106424-PB51","requires_shipping":true,"taxable":true,"featured_image":{"id":31491640131683,"product_id":7416205541475,"position":10,"created_at":"2024-05-06T14:10:49+08:00","updated_at":"2024-05-06T14:10:49+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/af15dfe5067cf15047edb3389faf8e7b4399e876_c6c98764-16aa-4358-baac-ab3c893d0094.webp?v=1714975849","variant_ids":[41918004953187]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone X - 【聯名設計款】 - 迪士尼-星際大戰 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":"NPB0106424-PB51","featured_media":{"alt":null,"id":23897052217443,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/af15dfe5067cf15047edb3389faf8e7b4399e876_c6c98764-16aa-4358-baac-ab3c893d0094.webp?v=1714975849"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41918004953187,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0106424-PB51","requires_shipping":true,"taxable":true,"featured_image":{"id":31491640131683,"product_id":7416205541475,"position":10,"created_at":"2024-05-06T14:10:49+08:00","updated_at":"2024-05-06T14:10:49+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/af15dfe5067cf15047edb3389faf8e7b4399e876_c6c98764-16aa-4358-baac-ab3c893d0094.webp?v=1714975849","variant_ids":[41918004953187]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone X - 【聯名設計款】 - 迪士尼-星際大戰 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":"NPB0106424-PB51","featured_media":{"alt":null,"id":23897052217443,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/af15dfe5067cf15047edb3389faf8e7b4399e876_c6c98764-16aa-4358-baac-ab3c893d0094.webp?v=1714975849"}},"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: "停產" }