$product = {"id":7408535208035,"title":"犀牛盾Mod NX手機殼 - iPhone 12 Pro Max - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - 伊沃克人2-塗鴉藝術","handle":"iphone-12-pro-max-mod-nx-printable-pb39","description":null,"published_at":"2024-06-11T16:39:59+08:00","created_at":"2024-05-03T15:45:35+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":41886590107747,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118724-PB39","requires_shipping":true,"taxable":true,"featured_image":{"id":31472522952803,"product_id":7408535208035,"position":1,"created_at":"2024-05-03T15:45:37+08:00","updated_at":"2024-05-03T15:45:37+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c45aaaf4fde0d77c359acef776712db97116fe8e_752f3ec5-ffd5-4bf4-9f10-543d71d3b830.webp?v=1714722337","variant_ids":[41886590107747]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 Pro Max - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - 伊沃克人2-塗鴉藝術 - 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-PB39","featured_media":{"alt":null,"id":23877440241763,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c45aaaf4fde0d77c359acef776712db97116fe8e_752f3ec5-ffd5-4bf4-9f10-543d71d3b830.webp?v=1714722337"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c45aaaf4fde0d77c359acef776712db97116fe8e_752f3ec5-ffd5-4bf4-9f10-543d71d3b830.webp?v=1714722337","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/29078d4964dfa164b088ac1eeae7f96412586b61_267ff165-a6ef-46a4-8e7a-8ab5549d556a.webp?v=1714722340","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ba37e18dda88b2d5af83fb89039400ac153b0fa8_2f5b6e18-22c7-4426-8210-98bcb0bd7bd2.webp?v=1714722342","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1385e821253305006d02d37c4ec28f4b95559f88_1bdf9a6c-09db-4b29-b926-7fd9c4a958de.webp?v=1714722344","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1afb8e5f3cba67aac974d56d7b31de8dc8273474_9c714ac1-3be7-40b4-a7cb-adacbb929ae9.webp?v=1714722346","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1b29b7e730487c2ff36fbc7474c6ae939481aa9e_d5ce0450-047f-404d-9a37-8f9855507397.webp?v=1714722349","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d15645df621b0964a3b090e922c849fa49bf812d_2256e6de-2222-4386-9b04-762f2258ffa4.webp?v=1714722351","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e747ef19a188324f80c77e5cf910df48f5e898a5_2b51055e-d37b-4190-9d5b-ea36f3d18bef.webp?v=1714722353","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b79845c9bb2e1ef78f5e3321ef73911a51cae1c6_062d80ef-8793-4caa-b62f-26b213c2860d.webp?v=1714722355","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/81724836de938c418c760b4078c9b0f5e4ddbd72_268f8471-3362-483d-8ef7-5dc2902d7680.webp?v=1714722357"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c45aaaf4fde0d77c359acef776712db97116fe8e_752f3ec5-ffd5-4bf4-9f10-543d71d3b830.webp?v=1714722337","options":["color"],"media":[{"alt":null,"id":23877440241763,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c45aaaf4fde0d77c359acef776712db97116fe8e_752f3ec5-ffd5-4bf4-9f10-543d71d3b830.webp?v=1714722337"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c45aaaf4fde0d77c359acef776712db97116fe8e_752f3ec5-ffd5-4bf4-9f10-543d71d3b830.webp?v=1714722337","width":2000},{"alt":null,"id":23877440831587,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/29078d4964dfa164b088ac1eeae7f96412586b61_267ff165-a6ef-46a4-8e7a-8ab5549d556a.webp?v=1714722340"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/29078d4964dfa164b088ac1eeae7f96412586b61_267ff165-a6ef-46a4-8e7a-8ab5549d556a.webp?v=1714722340","width":2000},{"alt":null,"id":23877441323107,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ba37e18dda88b2d5af83fb89039400ac153b0fa8_2f5b6e18-22c7-4426-8210-98bcb0bd7bd2.webp?v=1714722342"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ba37e18dda88b2d5af83fb89039400ac153b0fa8_2f5b6e18-22c7-4426-8210-98bcb0bd7bd2.webp?v=1714722342","width":2000},{"alt":null,"id":23877441749091,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1385e821253305006d02d37c4ec28f4b95559f88_1bdf9a6c-09db-4b29-b926-7fd9c4a958de.webp?v=1714722344"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1385e821253305006d02d37c4ec28f4b95559f88_1bdf9a6c-09db-4b29-b926-7fd9c4a958de.webp?v=1714722344","width":2000},{"alt":null,"id":23877442076771,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1afb8e5f3cba67aac974d56d7b31de8dc8273474_9c714ac1-3be7-40b4-a7cb-adacbb929ae9.webp?v=1714722346"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1afb8e5f3cba67aac974d56d7b31de8dc8273474_9c714ac1-3be7-40b4-a7cb-adacbb929ae9.webp?v=1714722346","width":2000},{"alt":null,"id":23877442863203,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1b29b7e730487c2ff36fbc7474c6ae939481aa9e_d5ce0450-047f-404d-9a37-8f9855507397.webp?v=1714722349"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1b29b7e730487c2ff36fbc7474c6ae939481aa9e_d5ce0450-047f-404d-9a37-8f9855507397.webp?v=1714722349","width":2000},{"alt":null,"id":23877443190883,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d15645df621b0964a3b090e922c849fa49bf812d_2256e6de-2222-4386-9b04-762f2258ffa4.webp?v=1714722351"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d15645df621b0964a3b090e922c849fa49bf812d_2256e6de-2222-4386-9b04-762f2258ffa4.webp?v=1714722351","width":2000},{"alt":null,"id":23877443518563,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e747ef19a188324f80c77e5cf910df48f5e898a5_2b51055e-d37b-4190-9d5b-ea36f3d18bef.webp?v=1714722353"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e747ef19a188324f80c77e5cf910df48f5e898a5_2b51055e-d37b-4190-9d5b-ea36f3d18bef.webp?v=1714722353","width":2000},{"alt":null,"id":23877444010083,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b79845c9bb2e1ef78f5e3321ef73911a51cae1c6_062d80ef-8793-4caa-b62f-26b213c2860d.webp?v=1714722355"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b79845c9bb2e1ef78f5e3321ef73911a51cae1c6_062d80ef-8793-4caa-b62f-26b213c2860d.webp?v=1714722355","width":2000},{"alt":null,"id":23877444436067,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/81724836de938c418c760b4078c9b0f5e4ddbd72_268f8471-3362-483d-8ef7-5dc2902d7680.webp?v=1714722357"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/81724836de938c418c760b4078c9b0f5e4ddbd72_268f8471-3362-483d-8ef7-5dc2902d7680.webp?v=1714722357","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $bumper = null; $variants = [{"id":41886590107747,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118724-PB39","requires_shipping":true,"taxable":true,"featured_image":{"id":31472522952803,"product_id":7408535208035,"position":1,"created_at":"2024-05-03T15:45:37+08:00","updated_at":"2024-05-03T15:45:37+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c45aaaf4fde0d77c359acef776712db97116fe8e_752f3ec5-ffd5-4bf4-9f10-543d71d3b830.webp?v=1714722337","variant_ids":[41886590107747]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 Pro Max - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - 伊沃克人2-塗鴉藝術 - 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-PB39","featured_media":{"alt":null,"id":23877440241763,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c45aaaf4fde0d77c359acef776712db97116fe8e_752f3ec5-ffd5-4bf4-9f10-543d71d3b830.webp?v=1714722337"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41886590107747,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118724-PB39","requires_shipping":true,"taxable":true,"featured_image":{"id":31472522952803,"product_id":7408535208035,"position":1,"created_at":"2024-05-03T15:45:37+08:00","updated_at":"2024-05-03T15:45:37+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c45aaaf4fde0d77c359acef776712db97116fe8e_752f3ec5-ffd5-4bf4-9f10-543d71d3b830.webp?v=1714722337","variant_ids":[41886590107747]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 Pro Max - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - 伊沃克人2-塗鴉藝術 - 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-PB39","featured_media":{"alt":null,"id":23877440241763,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c45aaaf4fde0d77c359acef776712db97116fe8e_752f3ec5-ffd5-4bf4-9f10-543d71d3b830.webp?v=1714722337"}},"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: "停產" }