$product = {"id":7415955128419,"title":"犀牛盾Mod NX手機殼 - iPhone XS Max - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - ATAT-俠盜一號","handle":"iphone-xs-max-mod-nx-printable-pb67","description":null,"published_at":"2024-06-11T16:48:51+08:00","created_at":"2024-05-06T12:31:29+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 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":41915903279203,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0108624-PB67","requires_shipping":true,"taxable":true,"featured_image":{"id":31490830139491,"product_id":7415955128419,"position":8,"created_at":"2024-05-06T12:31:48+08:00","updated_at":"2024-05-06T12:31:48+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5de00d23e9ce89e4051bdfd3aab9bc66bba944e9_342a7102-687b-4809-85f6-2f3511143494.webp?v=1714969908","variant_ids":[41915903279203]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone XS Max - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - ATAT-俠盜一號 - 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":"NPB0108624-PB67","featured_media":{"alt":null,"id":23896237015139,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5de00d23e9ce89e4051bdfd3aab9bc66bba944e9_342a7102-687b-4809-85f6-2f3511143494.webp?v=1714969908"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f3d481a2227a5a32051cea49a23a43e74b2dba6d_7001becb-2972-4520-9f27-d37a367ea7f5.webp?v=1714969892","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5175af42c2612ce0f6c51d5ddda4488623d3f4ab_c4cbf0f3-5634-45c2-9e8d-2b4f6e7d343c.webp?v=1714969894","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5e691747084205a6d64e76a82882ae68e07ade34_b308dc17-767f-433a-8079-5203d8a166b6.webp?v=1714969896","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8535906c62c382a439e5769468fb36151d8033bf_9e409c58-cef9-490a-9299-c006c2527c93.webp?v=1714969899","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f92d4dc4a322902fbdbd927df85c3ca5489647dc_f2bc81c2-0bf6-450b-8e43-7281aaf775ac.webp?v=1714969901","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9486109184ea50e349a889b5a2b991a69b84543e_06619a0d-73e9-4979-8024-f9e5cbc0a81d.webp?v=1714969903","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4eb49bf0e1095686e2b74c7c65f4a217cbea006a_73eeea78-7dac-4cef-950f-b2906d3b5cba.webp?v=1714969905","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5de00d23e9ce89e4051bdfd3aab9bc66bba944e9_342a7102-687b-4809-85f6-2f3511143494.webp?v=1714969908","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a603c3765c1300de27156e9f13074fe47ccdfc06_fabdd8b4-5029-40d9-b0e5-8c2271e5596c.webp?v=1714969911","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c8b32f0a2b0a1d40581df89235a6bea3426b3d80_c0dabca4-3ca5-46e6-9197-08464ce129fa.webp?v=1714969913"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f3d481a2227a5a32051cea49a23a43e74b2dba6d_7001becb-2972-4520-9f27-d37a367ea7f5.webp?v=1714969892","options":["color"],"media":[{"alt":null,"id":23896233771107,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f3d481a2227a5a32051cea49a23a43e74b2dba6d_7001becb-2972-4520-9f27-d37a367ea7f5.webp?v=1714969892"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f3d481a2227a5a32051cea49a23a43e74b2dba6d_7001becb-2972-4520-9f27-d37a367ea7f5.webp?v=1714969892","width":2000},{"alt":null,"id":23896234492003,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5175af42c2612ce0f6c51d5ddda4488623d3f4ab_c4cbf0f3-5634-45c2-9e8d-2b4f6e7d343c.webp?v=1714969894"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5175af42c2612ce0f6c51d5ddda4488623d3f4ab_c4cbf0f3-5634-45c2-9e8d-2b4f6e7d343c.webp?v=1714969894","width":2000},{"alt":null,"id":23896234917987,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5e691747084205a6d64e76a82882ae68e07ade34_b308dc17-767f-433a-8079-5203d8a166b6.webp?v=1714969896"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5e691747084205a6d64e76a82882ae68e07ade34_b308dc17-767f-433a-8079-5203d8a166b6.webp?v=1714969896","width":2000},{"alt":null,"id":23896235180131,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8535906c62c382a439e5769468fb36151d8033bf_9e409c58-cef9-490a-9299-c006c2527c93.webp?v=1714969899"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8535906c62c382a439e5769468fb36151d8033bf_9e409c58-cef9-490a-9299-c006c2527c93.webp?v=1714969899","width":2000},{"alt":null,"id":23896235835491,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f92d4dc4a322902fbdbd927df85c3ca5489647dc_f2bc81c2-0bf6-450b-8e43-7281aaf775ac.webp?v=1714969901"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f92d4dc4a322902fbdbd927df85c3ca5489647dc_f2bc81c2-0bf6-450b-8e43-7281aaf775ac.webp?v=1714969901","width":2000},{"alt":null,"id":23896236130403,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9486109184ea50e349a889b5a2b991a69b84543e_06619a0d-73e9-4979-8024-f9e5cbc0a81d.webp?v=1714969903"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9486109184ea50e349a889b5a2b991a69b84543e_06619a0d-73e9-4979-8024-f9e5cbc0a81d.webp?v=1714969903","width":2000},{"alt":null,"id":23896236556387,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4eb49bf0e1095686e2b74c7c65f4a217cbea006a_73eeea78-7dac-4cef-950f-b2906d3b5cba.webp?v=1714969905"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4eb49bf0e1095686e2b74c7c65f4a217cbea006a_73eeea78-7dac-4cef-950f-b2906d3b5cba.webp?v=1714969905","width":2000},{"alt":null,"id":23896237015139,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5de00d23e9ce89e4051bdfd3aab9bc66bba944e9_342a7102-687b-4809-85f6-2f3511143494.webp?v=1714969908"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5de00d23e9ce89e4051bdfd3aab9bc66bba944e9_342a7102-687b-4809-85f6-2f3511143494.webp?v=1714969908","width":2000},{"alt":null,"id":23896237441123,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a603c3765c1300de27156e9f13074fe47ccdfc06_fabdd8b4-5029-40d9-b0e5-8c2271e5596c.webp?v=1714969911"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a603c3765c1300de27156e9f13074fe47ccdfc06_fabdd8b4-5029-40d9-b0e5-8c2271e5596c.webp?v=1714969911","width":2000},{"alt":null,"id":23896238391395,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c8b32f0a2b0a1d40581df89235a6bea3426b3d80_c0dabca4-3ca5-46e6-9197-08464ce129fa.webp?v=1714969913"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c8b32f0a2b0a1d40581df89235a6bea3426b3d80_c0dabca4-3ca5-46e6-9197-08464ce129fa.webp?v=1714969913","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $bumper = null; $variants = [{"id":41915903279203,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0108624-PB67","requires_shipping":true,"taxable":true,"featured_image":{"id":31490830139491,"product_id":7415955128419,"position":8,"created_at":"2024-05-06T12:31:48+08:00","updated_at":"2024-05-06T12:31:48+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5de00d23e9ce89e4051bdfd3aab9bc66bba944e9_342a7102-687b-4809-85f6-2f3511143494.webp?v=1714969908","variant_ids":[41915903279203]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone XS Max - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - ATAT-俠盜一號 - 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":"NPB0108624-PB67","featured_media":{"alt":null,"id":23896237015139,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5de00d23e9ce89e4051bdfd3aab9bc66bba944e9_342a7102-687b-4809-85f6-2f3511143494.webp?v=1714969908"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41915903279203,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0108624-PB67","requires_shipping":true,"taxable":true,"featured_image":{"id":31490830139491,"product_id":7415955128419,"position":8,"created_at":"2024-05-06T12:31:48+08:00","updated_at":"2024-05-06T12:31:48+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5de00d23e9ce89e4051bdfd3aab9bc66bba944e9_342a7102-687b-4809-85f6-2f3511143494.webp?v=1714969908","variant_ids":[41915903279203]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone XS Max - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - ATAT-俠盜一號 - 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":"NPB0108624-PB67","featured_media":{"alt":null,"id":23896237015139,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5de00d23e9ce89e4051bdfd3aab9bc66bba944e9_342a7102-687b-4809-85f6-2f3511143494.webp?v=1714969908"}},"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: "停產" }