$product = {"id":7408561815651,"title":"犀牛盾Mod NX手機殼 - iPhone 12 Pro Max - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - 原力咒語-光劍系列","handle":"iphone-12-pro-max-mod-nx-printable-pb72","description":null,"published_at":"2024-06-11T16:40:46+08:00","created_at":"2024-05-03T15:51: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 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":41886889017443,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118724-PB72","requires_shipping":true,"taxable":true,"featured_image":{"id":31472596025443,"product_id":7408561815651,"position":7,"created_at":"2024-05-03T15:51:19+08:00","updated_at":"2024-05-03T15:51:19+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0082a12150a2ec8ba5e7e92f73135aa729de1547_2cad1e00-e0ef-432e-aba4-0b083ac32983.webp?v=1714722679","variant_ids":[41886889017443]},"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-PB72","featured_media":{"alt":null,"id":23877513543779,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0082a12150a2ec8ba5e7e92f73135aa729de1547_2cad1e00-e0ef-432e-aba4-0b083ac32983.webp?v=1714722679"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e46f0c7950cae919b937e131855bcf0763ef06a2_535d79c3-1265-4783-9352-c355b8abf96a.webp?v=1714722665","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cf01f1a699341e57add0e808b8a2f9e96f4e3ff0_b0470037-166f-4cb6-a676-2e00d27b5411.webp?v=1714722668","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8a55c8e42d67226187e1fab8e1105bda53472325_109e3056-caf3-4262-9ed9-7089730c4c3d.webp?v=1714722670","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8698b2497ed604ca093a14a82bab85710381e567_8c138d72-6312-4d00-96d5-b748446f51d4.webp?v=1714722673","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1b23d177bb19ab6e0de8da8f3bd66763ca22dc56_1b895502-e9ce-479d-b6b5-0d0a271cbd27.webp?v=1714722675","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/625753fd274180cf71f94e99d0f5bed5525de1b3_3224fcd2-e14f-4bc6-83cf-33dcc9051274.webp?v=1714722677","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0082a12150a2ec8ba5e7e92f73135aa729de1547_2cad1e00-e0ef-432e-aba4-0b083ac32983.webp?v=1714722679","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/349ada6cb1b997b45b6029b17fffee6cb6fd38b8_a90a8ebe-88e4-4ddd-882d-dd95ee0620b3.webp?v=1714722682","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/86d735a31c0c4a2f55f2974c55ad370248a73446_78833024-63f0-4e9d-ac36-f88eddda18c8.webp?v=1714722684","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/74e94e784b0a3648a32fe7763c3165f74e8df8b3_1e64da19-18e2-4bdb-8e99-0c665bda54c5.webp?v=1714722686"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e46f0c7950cae919b937e131855bcf0763ef06a2_535d79c3-1265-4783-9352-c355b8abf96a.webp?v=1714722665","options":["color"],"media":[{"alt":null,"id":23877510463587,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e46f0c7950cae919b937e131855bcf0763ef06a2_535d79c3-1265-4783-9352-c355b8abf96a.webp?v=1714722665"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e46f0c7950cae919b937e131855bcf0763ef06a2_535d79c3-1265-4783-9352-c355b8abf96a.webp?v=1714722665","width":2000},{"alt":null,"id":23877510889571,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cf01f1a699341e57add0e808b8a2f9e96f4e3ff0_b0470037-166f-4cb6-a676-2e00d27b5411.webp?v=1714722668"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cf01f1a699341e57add0e808b8a2f9e96f4e3ff0_b0470037-166f-4cb6-a676-2e00d27b5411.webp?v=1714722668","width":2000},{"alt":null,"id":23877511479395,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8a55c8e42d67226187e1fab8e1105bda53472325_109e3056-caf3-4262-9ed9-7089730c4c3d.webp?v=1714722670"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8a55c8e42d67226187e1fab8e1105bda53472325_109e3056-caf3-4262-9ed9-7089730c4c3d.webp?v=1714722670","width":2000},{"alt":null,"id":23877511970915,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8698b2497ed604ca093a14a82bab85710381e567_8c138d72-6312-4d00-96d5-b748446f51d4.webp?v=1714722673"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8698b2497ed604ca093a14a82bab85710381e567_8c138d72-6312-4d00-96d5-b748446f51d4.webp?v=1714722673","width":2000},{"alt":null,"id":23877512527971,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1b23d177bb19ab6e0de8da8f3bd66763ca22dc56_1b895502-e9ce-479d-b6b5-0d0a271cbd27.webp?v=1714722675"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1b23d177bb19ab6e0de8da8f3bd66763ca22dc56_1b895502-e9ce-479d-b6b5-0d0a271cbd27.webp?v=1714722675","width":2000},{"alt":null,"id":23877513019491,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/625753fd274180cf71f94e99d0f5bed5525de1b3_3224fcd2-e14f-4bc6-83cf-33dcc9051274.webp?v=1714722677"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/625753fd274180cf71f94e99d0f5bed5525de1b3_3224fcd2-e14f-4bc6-83cf-33dcc9051274.webp?v=1714722677","width":2000},{"alt":null,"id":23877513543779,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0082a12150a2ec8ba5e7e92f73135aa729de1547_2cad1e00-e0ef-432e-aba4-0b083ac32983.webp?v=1714722679"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0082a12150a2ec8ba5e7e92f73135aa729de1547_2cad1e00-e0ef-432e-aba4-0b083ac32983.webp?v=1714722679","width":2000},{"alt":null,"id":23877514035299,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/349ada6cb1b997b45b6029b17fffee6cb6fd38b8_a90a8ebe-88e4-4ddd-882d-dd95ee0620b3.webp?v=1714722682"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/349ada6cb1b997b45b6029b17fffee6cb6fd38b8_a90a8ebe-88e4-4ddd-882d-dd95ee0620b3.webp?v=1714722682","width":2000},{"alt":null,"id":23877514559587,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/86d735a31c0c4a2f55f2974c55ad370248a73446_78833024-63f0-4e9d-ac36-f88eddda18c8.webp?v=1714722684"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/86d735a31c0c4a2f55f2974c55ad370248a73446_78833024-63f0-4e9d-ac36-f88eddda18c8.webp?v=1714722684","width":2000},{"alt":null,"id":23877515083875,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/74e94e784b0a3648a32fe7763c3165f74e8df8b3_1e64da19-18e2-4bdb-8e99-0c665bda54c5.webp?v=1714722686"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/74e94e784b0a3648a32fe7763c3165f74e8df8b3_1e64da19-18e2-4bdb-8e99-0c665bda54c5.webp?v=1714722686","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $bumper = null; $variants = [{"id":41886889017443,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118724-PB72","requires_shipping":true,"taxable":true,"featured_image":{"id":31472596025443,"product_id":7408561815651,"position":7,"created_at":"2024-05-03T15:51:19+08:00","updated_at":"2024-05-03T15:51:19+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0082a12150a2ec8ba5e7e92f73135aa729de1547_2cad1e00-e0ef-432e-aba4-0b083ac32983.webp?v=1714722679","variant_ids":[41886889017443]},"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-PB72","featured_media":{"alt":null,"id":23877513543779,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0082a12150a2ec8ba5e7e92f73135aa729de1547_2cad1e00-e0ef-432e-aba4-0b083ac32983.webp?v=1714722679"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41886889017443,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118724-PB72","requires_shipping":true,"taxable":true,"featured_image":{"id":31472596025443,"product_id":7408561815651,"position":7,"created_at":"2024-05-03T15:51:19+08:00","updated_at":"2024-05-03T15:51:19+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0082a12150a2ec8ba5e7e92f73135aa729de1547_2cad1e00-e0ef-432e-aba4-0b083ac32983.webp?v=1714722679","variant_ids":[41886889017443]},"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-PB72","featured_media":{"alt":null,"id":23877513543779,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0082a12150a2ec8ba5e7e92f73135aa729de1547_2cad1e00-e0ef-432e-aba4-0b083ac32983.webp?v=1714722679"}},"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: "停產" }