$product = {"id":7408410624099,"title":"犀牛盾Mod NX手機殼 - iPhone 12 Pro Max - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - 賈霸-塗鴉藝術","handle":"iphone-12-pro-max-mod-nx-printable-pb41","description":null,"published_at":"2024-06-11T16:36:28+08:00","created_at":"2024-05-03T15:21:04+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 12 pro 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":41885166796899,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118724-PB41","requires_shipping":true,"taxable":true,"featured_image":{"id":31472201072739,"product_id":7408410624099,"position":10,"created_at":"2024-05-03T15:21:28+08:00","updated_at":"2024-05-03T15:21:28+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a3f6920e695b9a5e051c4602569363340af0b90d_fc33e535-4068-43c5-8529-d6cbe710d69b.webp?v=1714720888","variant_ids":[41885166796899]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 Pro 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":"NPB0118724-PB41","featured_media":{"alt":null,"id":23877116887139,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a3f6920e695b9a5e051c4602569363340af0b90d_fc33e535-4068-43c5-8529-d6cbe710d69b.webp?v=1714720888"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/918ea9edcf922ae645817f9eb3f176c33301a781_0c2319b5-c202-4ad8-887b-3dcd51f182bf.webp?v=1714720866","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9a7979fa3c163ed0ee780ad2ce7ace1cf2eb3dc2_6a5f0916-b725-49f3-bb07-98506ce320fc.webp?v=1714720869","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/485358b46771bb3ce0995aa56c7546b02d81ccbb_9e4e409d-4963-49da-a39a-7339f2745436.webp?v=1714720871","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/66fdb4cf22ecd96ab3f4d3f58e3680b54df27c25_9eb03ffe-b515-4150-82ae-ee5b572161f6.webp?v=1714720874","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6d546555f33264d9f6bee51a1febe19dd0b7ab64_b21c0345-ce3c-4450-88e2-0dedb7ea785d.webp?v=1714720876","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5a09e7ecd689972cdb38c993496a0159a3d081eb_4a55fea3-ea71-4f81-b235-66425f58efb3.webp?v=1714720878","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/11fcbf3b539f2ac57cf19a108c543b7c36f5baf6_8b168f5b-162a-41f2-a448-52f2eda9b32e.webp?v=1714720881","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f26d003ef69089f4ddf619b15121897287f936a1_e50a3594-ad97-4bca-8123-6909f9ec8a16.webp?v=1714720883","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b2e2ab7d9726ffa292d475cb330d9a25f802622a_5973493d-1ae9-4c9c-bd56-c07ab9b93adf.webp?v=1714720885","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a3f6920e695b9a5e051c4602569363340af0b90d_fc33e535-4068-43c5-8529-d6cbe710d69b.webp?v=1714720888"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/918ea9edcf922ae645817f9eb3f176c33301a781_0c2319b5-c202-4ad8-887b-3dcd51f182bf.webp?v=1714720866","options":["color"],"media":[{"alt":null,"id":23877111971939,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/918ea9edcf922ae645817f9eb3f176c33301a781_0c2319b5-c202-4ad8-887b-3dcd51f182bf.webp?v=1714720866"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/918ea9edcf922ae645817f9eb3f176c33301a781_0c2319b5-c202-4ad8-887b-3dcd51f182bf.webp?v=1714720866","width":2000},{"alt":null,"id":23877112692835,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9a7979fa3c163ed0ee780ad2ce7ace1cf2eb3dc2_6a5f0916-b725-49f3-bb07-98506ce320fc.webp?v=1714720869"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9a7979fa3c163ed0ee780ad2ce7ace1cf2eb3dc2_6a5f0916-b725-49f3-bb07-98506ce320fc.webp?v=1714720869","width":2000},{"alt":null,"id":23877113315427,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/485358b46771bb3ce0995aa56c7546b02d81ccbb_9e4e409d-4963-49da-a39a-7339f2745436.webp?v=1714720871"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/485358b46771bb3ce0995aa56c7546b02d81ccbb_9e4e409d-4963-49da-a39a-7339f2745436.webp?v=1714720871","width":2000},{"alt":null,"id":23877113839715,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/66fdb4cf22ecd96ab3f4d3f58e3680b54df27c25_9eb03ffe-b515-4150-82ae-ee5b572161f6.webp?v=1714720874"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/66fdb4cf22ecd96ab3f4d3f58e3680b54df27c25_9eb03ffe-b515-4150-82ae-ee5b572161f6.webp?v=1714720874","width":2000},{"alt":null,"id":23877114396771,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6d546555f33264d9f6bee51a1febe19dd0b7ab64_b21c0345-ce3c-4450-88e2-0dedb7ea785d.webp?v=1714720876"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6d546555f33264d9f6bee51a1febe19dd0b7ab64_b21c0345-ce3c-4450-88e2-0dedb7ea785d.webp?v=1714720876","width":2000},{"alt":null,"id":23877114822755,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5a09e7ecd689972cdb38c993496a0159a3d081eb_4a55fea3-ea71-4f81-b235-66425f58efb3.webp?v=1714720878"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5a09e7ecd689972cdb38c993496a0159a3d081eb_4a55fea3-ea71-4f81-b235-66425f58efb3.webp?v=1714720878","width":2000},{"alt":null,"id":23877115347043,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/11fcbf3b539f2ac57cf19a108c543b7c36f5baf6_8b168f5b-162a-41f2-a448-52f2eda9b32e.webp?v=1714720881"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/11fcbf3b539f2ac57cf19a108c543b7c36f5baf6_8b168f5b-162a-41f2-a448-52f2eda9b32e.webp?v=1714720881","width":2000},{"alt":null,"id":23877115805795,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f26d003ef69089f4ddf619b15121897287f936a1_e50a3594-ad97-4bca-8123-6909f9ec8a16.webp?v=1714720883"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f26d003ef69089f4ddf619b15121897287f936a1_e50a3594-ad97-4bca-8123-6909f9ec8a16.webp?v=1714720883","width":2000},{"alt":null,"id":23877116330083,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b2e2ab7d9726ffa292d475cb330d9a25f802622a_5973493d-1ae9-4c9c-bd56-c07ab9b93adf.webp?v=1714720885"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b2e2ab7d9726ffa292d475cb330d9a25f802622a_5973493d-1ae9-4c9c-bd56-c07ab9b93adf.webp?v=1714720885","width":2000},{"alt":null,"id":23877116887139,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a3f6920e695b9a5e051c4602569363340af0b90d_fc33e535-4068-43c5-8529-d6cbe710d69b.webp?v=1714720888"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a3f6920e695b9a5e051c4602569363340af0b90d_fc33e535-4068-43c5-8529-d6cbe710d69b.webp?v=1714720888","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $bumper = null; $variants = [{"id":41885166796899,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118724-PB41","requires_shipping":true,"taxable":true,"featured_image":{"id":31472201072739,"product_id":7408410624099,"position":10,"created_at":"2024-05-03T15:21:28+08:00","updated_at":"2024-05-03T15:21:28+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a3f6920e695b9a5e051c4602569363340af0b90d_fc33e535-4068-43c5-8529-d6cbe710d69b.webp?v=1714720888","variant_ids":[41885166796899]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 Pro 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":"NPB0118724-PB41","featured_media":{"alt":null,"id":23877116887139,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a3f6920e695b9a5e051c4602569363340af0b90d_fc33e535-4068-43c5-8529-d6cbe710d69b.webp?v=1714720888"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41885166796899,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118724-PB41","requires_shipping":true,"taxable":true,"featured_image":{"id":31472201072739,"product_id":7408410624099,"position":10,"created_at":"2024-05-03T15:21:28+08:00","updated_at":"2024-05-03T15:21:28+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a3f6920e695b9a5e051c4602569363340af0b90d_fc33e535-4068-43c5-8529-d6cbe710d69b.webp?v=1714720888","variant_ids":[41885166796899]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 Pro 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":"NPB0118724-PB41","featured_media":{"alt":null,"id":23877116887139,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a3f6920e695b9a5e051c4602569363340af0b90d_fc33e535-4068-43c5-8529-d6cbe710d69b.webp?v=1714720888"}},"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: "停產" }