$product = {"id":7416085938275,"title":"犀牛盾Mod NX手機殼 - iPhone XS Max - 【聯名設計款】 - Batman - 小丑","handle":"iphone-xs-max-mod-nx-printable-sb14","description":null,"published_at":"2024-06-11T16:52:20+08:00","created_at":"2024-05-06T12:55:31+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"設計師MOD NX專區-Batman","tags":["20%","25%","30%","35%","40%","45%","50%","b2b","brand-Apple","designer","designer-batman","device-iPhone XS Max","merge","mod-nx-printable","new-modnx-sku","reseller-modnx-batman","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":41917283598435,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0108624-SB14","requires_shipping":true,"taxable":true,"featured_image":{"id":31491181674595,"product_id":7416085938275,"position":1,"created_at":"2024-05-06T12:55:33+08:00","updated_at":"2024-05-06T12:55:33+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/151f7998d8d5a812409878f5ca3b2d45c917bcad_c630afd8-9fb0-4b76-810e-01c48eb8dc97.webp?v=1714971333","variant_ids":[41917283598435]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone XS Max - 【聯名設計款】 - Batman - 小丑 - 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-SB14","featured_media":{"alt":null,"id":23896589369443,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/151f7998d8d5a812409878f5ca3b2d45c917bcad_c630afd8-9fb0-4b76-810e-01c48eb8dc97.webp?v=1714971333"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/151f7998d8d5a812409878f5ca3b2d45c917bcad_c630afd8-9fb0-4b76-810e-01c48eb8dc97.webp?v=1714971333","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9d3d0a79bbfcb039f41dd83e875606dd80f41012_7a626a63-2fb9-41a6-8812-9439e66ce53a.webp?v=1714971336","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fbfa82e1057a618b5114cdc1670dc419c046b80b_c8b757bc-0ec3-451b-a7af-cf6640849051.webp?v=1714971338","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8b815d0db8778f20c4fbb25ca888151b741d7068_b5957592-fd5d-4621-872b-ab57b686ecb7.webp?v=1714971341","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/95c0c4ae0958766e1a00a451b9cc283afcb01e7e_9d68004c-7932-4731-89de-e17ee320f0d2.webp?v=1714971343","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/525b99b4f9f82aad28c70733c70b675349ac3841_b0196b18-4f5d-4a52-89b1-41a78f56eaa5.webp?v=1714971346","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/051f204f4def65360683914c91c633f303307bfd_cdfb2486-dbca-4287-8e5a-b0d4d754e5c5.webp?v=1714971348","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c6a105edb22a724e2ac28dfdef46f44a0e189195_feff7816-5ecb-441e-8604-130cca7e74f1.webp?v=1714971350","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/520c182dcd4d355e0d4b941e86333abd4bf324d6_bc581713-34eb-4089-b401-993cdb8c8bdd.webp?v=1714971353","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/affb3405bd64cae667249e224419627f920e1f2e_a417fe0e-68b3-4e85-a80e-aec122e566fe.webp?v=1714971355"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/151f7998d8d5a812409878f5ca3b2d45c917bcad_c630afd8-9fb0-4b76-810e-01c48eb8dc97.webp?v=1714971333","options":["color"],"media":[{"alt":null,"id":23896589369443,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/151f7998d8d5a812409878f5ca3b2d45c917bcad_c630afd8-9fb0-4b76-810e-01c48eb8dc97.webp?v=1714971333"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/151f7998d8d5a812409878f5ca3b2d45c917bcad_c630afd8-9fb0-4b76-810e-01c48eb8dc97.webp?v=1714971333","width":2000},{"alt":null,"id":23896589795427,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9d3d0a79bbfcb039f41dd83e875606dd80f41012_7a626a63-2fb9-41a6-8812-9439e66ce53a.webp?v=1714971336"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9d3d0a79bbfcb039f41dd83e875606dd80f41012_7a626a63-2fb9-41a6-8812-9439e66ce53a.webp?v=1714971336","width":2000},{"alt":null,"id":23896590352483,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fbfa82e1057a618b5114cdc1670dc419c046b80b_c8b757bc-0ec3-451b-a7af-cf6640849051.webp?v=1714971338"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fbfa82e1057a618b5114cdc1670dc419c046b80b_c8b757bc-0ec3-451b-a7af-cf6640849051.webp?v=1714971338","width":2000},{"alt":null,"id":23896591138915,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8b815d0db8778f20c4fbb25ca888151b741d7068_b5957592-fd5d-4621-872b-ab57b686ecb7.webp?v=1714971341"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8b815d0db8778f20c4fbb25ca888151b741d7068_b5957592-fd5d-4621-872b-ab57b686ecb7.webp?v=1714971341","width":2000},{"alt":null,"id":23896591433827,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/95c0c4ae0958766e1a00a451b9cc283afcb01e7e_9d68004c-7932-4731-89de-e17ee320f0d2.webp?v=1714971343"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/95c0c4ae0958766e1a00a451b9cc283afcb01e7e_9d68004c-7932-4731-89de-e17ee320f0d2.webp?v=1714971343","width":2000},{"alt":null,"id":23896591695971,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/525b99b4f9f82aad28c70733c70b675349ac3841_b0196b18-4f5d-4a52-89b1-41a78f56eaa5.webp?v=1714971346"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/525b99b4f9f82aad28c70733c70b675349ac3841_b0196b18-4f5d-4a52-89b1-41a78f56eaa5.webp?v=1714971346","width":2000},{"alt":null,"id":23896591892579,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/051f204f4def65360683914c91c633f303307bfd_cdfb2486-dbca-4287-8e5a-b0d4d754e5c5.webp?v=1714971348"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/051f204f4def65360683914c91c633f303307bfd_cdfb2486-dbca-4287-8e5a-b0d4d754e5c5.webp?v=1714971348","width":2000},{"alt":null,"id":23896592253027,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c6a105edb22a724e2ac28dfdef46f44a0e189195_feff7816-5ecb-441e-8604-130cca7e74f1.webp?v=1714971350"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c6a105edb22a724e2ac28dfdef46f44a0e189195_feff7816-5ecb-441e-8604-130cca7e74f1.webp?v=1714971350","width":2000},{"alt":null,"id":23896592679011,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/520c182dcd4d355e0d4b941e86333abd4bf324d6_bc581713-34eb-4089-b401-993cdb8c8bdd.webp?v=1714971353"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/520c182dcd4d355e0d4b941e86333abd4bf324d6_bc581713-34eb-4089-b401-993cdb8c8bdd.webp?v=1714971353","width":2000},{"alt":null,"id":23896592908387,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/affb3405bd64cae667249e224419627f920e1f2e_a417fe0e-68b3-4e85-a80e-aec122e566fe.webp?v=1714971355"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/affb3405bd64cae667249e224419627f920e1f2e_a417fe0e-68b3-4e85-a80e-aec122e566fe.webp?v=1714971355","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $bumper = null; $variants = [{"id":41917283598435,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0108624-SB14","requires_shipping":true,"taxable":true,"featured_image":{"id":31491181674595,"product_id":7416085938275,"position":1,"created_at":"2024-05-06T12:55:33+08:00","updated_at":"2024-05-06T12:55:33+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/151f7998d8d5a812409878f5ca3b2d45c917bcad_c630afd8-9fb0-4b76-810e-01c48eb8dc97.webp?v=1714971333","variant_ids":[41917283598435]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone XS Max - 【聯名設計款】 - Batman - 小丑 - 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-SB14","featured_media":{"alt":null,"id":23896589369443,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/151f7998d8d5a812409878f5ca3b2d45c917bcad_c630afd8-9fb0-4b76-810e-01c48eb8dc97.webp?v=1714971333"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41917283598435,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0108624-SB14","requires_shipping":true,"taxable":true,"featured_image":{"id":31491181674595,"product_id":7416085938275,"position":1,"created_at":"2024-05-06T12:55:33+08:00","updated_at":"2024-05-06T12:55:33+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/151f7998d8d5a812409878f5ca3b2d45c917bcad_c630afd8-9fb0-4b76-810e-01c48eb8dc97.webp?v=1714971333","variant_ids":[41917283598435]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone XS Max - 【聯名設計款】 - Batman - 小丑 - 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-SB14","featured_media":{"alt":null,"id":23896589369443,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/151f7998d8d5a812409878f5ca3b2d45c917bcad_c630afd8-9fb0-4b76-810e-01c48eb8dc97.webp?v=1714971333"}},"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: "停產" }