$product = {"id":7407822274659,"title":"犀牛盾Mod NX手機殼 - iPhone 14 Plus - 【聯名設計款】 - Batman - Logo","handle":"iphone-14-plus-mod-nx-printable-sb16","description":null,"published_at":"2024-06-11T16:23:48+08:00","created_at":"2024-05-03T10:56:34+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 14 Plus","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":41879244734563,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0126124-SB16","requires_shipping":true,"taxable":true,"featured_image":{"id":31470453227619,"product_id":7407822274659,"position":1,"created_at":"2024-05-03T10:56:36+08:00","updated_at":"2024-05-03T10:56:36+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2541103ab32fe44fce95171ba00598637b79b792_2b7ed481-8d46-4ed9-8769-b57519166de9.webp?v=1714704996","variant_ids":[41879244734563]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 14 Plus - 【聯名設計款】 - Batman - Logo - 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":"NPB0126124-SB16","featured_media":{"alt":null,"id":23875356655715,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2541103ab32fe44fce95171ba00598637b79b792_2b7ed481-8d46-4ed9-8769-b57519166de9.webp?v=1714704996"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2541103ab32fe44fce95171ba00598637b79b792_2b7ed481-8d46-4ed9-8769-b57519166de9.webp?v=1714704996","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d0bd30c7ec098d9767405b556ec7a119afd0493e_74d133ae-7ed1-49bb-9ae5-212eed586669.webp?v=1714704998","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/39afecdd9a4b46a48f59c222e775a8228f01a06d_0c154276-761d-455f-a19d-add10c736f44.webp?v=1714705001","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/79e29dc5a7971d35c475510e8575f5c94e28bbde_ee91886a-3906-4468-baa8-077bcd8643af.webp?v=1714705003","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7cd04bd37dbae407a73feb40c13adf9267c62875_f086f690-adbb-4d6f-a00e-eb815904b0d0.webp?v=1714705006","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/32256a9208da6f35384a264f7f8c186e0a05a80f_47f37e4b-bebc-47df-abdf-4fbb76f7017b.webp?v=1714705008","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2f936073972b744fe2b8b7adf11e167219b55e3e_8dd768d0-9d81-40fd-8154-8965aae22075.webp?v=1714705010","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e02afb36a6dbc660543d00a9f34e475ab5564f4a_b834f771-2b92-49fb-ab42-1b7106abeff4.webp?v=1714705013","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/590e710cf4f7b13eedc85239d514abcf33393ad1_88eac04e-db81-464c-80b7-99c2439aef5f.webp?v=1714705015","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/de0e61f64eae6680c15dbc5b1e0037c01218589f_a5c08253-47e8-46c7-9008-10c4d995dcab.webp?v=1714705017"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2541103ab32fe44fce95171ba00598637b79b792_2b7ed481-8d46-4ed9-8769-b57519166de9.webp?v=1714704996","options":["color"],"media":[{"alt":null,"id":23875356655715,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2541103ab32fe44fce95171ba00598637b79b792_2b7ed481-8d46-4ed9-8769-b57519166de9.webp?v=1714704996"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2541103ab32fe44fce95171ba00598637b79b792_2b7ed481-8d46-4ed9-8769-b57519166de9.webp?v=1714704996","width":2000},{"alt":null,"id":23875356950627,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d0bd30c7ec098d9767405b556ec7a119afd0493e_74d133ae-7ed1-49bb-9ae5-212eed586669.webp?v=1714704998"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d0bd30c7ec098d9767405b556ec7a119afd0493e_74d133ae-7ed1-49bb-9ae5-212eed586669.webp?v=1714704998","width":2000},{"alt":null,"id":23875357507683,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/39afecdd9a4b46a48f59c222e775a8228f01a06d_0c154276-761d-455f-a19d-add10c736f44.webp?v=1714705001"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/39afecdd9a4b46a48f59c222e775a8228f01a06d_0c154276-761d-455f-a19d-add10c736f44.webp?v=1714705001","width":2000},{"alt":null,"id":23875357868131,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/79e29dc5a7971d35c475510e8575f5c94e28bbde_ee91886a-3906-4468-baa8-077bcd8643af.webp?v=1714705003"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/79e29dc5a7971d35c475510e8575f5c94e28bbde_ee91886a-3906-4468-baa8-077bcd8643af.webp?v=1714705003","width":2000},{"alt":null,"id":23875358195811,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7cd04bd37dbae407a73feb40c13adf9267c62875_f086f690-adbb-4d6f-a00e-eb815904b0d0.webp?v=1714705006"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7cd04bd37dbae407a73feb40c13adf9267c62875_f086f690-adbb-4d6f-a00e-eb815904b0d0.webp?v=1714705006","width":2000},{"alt":null,"id":23875358654563,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/32256a9208da6f35384a264f7f8c186e0a05a80f_47f37e4b-bebc-47df-abdf-4fbb76f7017b.webp?v=1714705008"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/32256a9208da6f35384a264f7f8c186e0a05a80f_47f37e4b-bebc-47df-abdf-4fbb76f7017b.webp?v=1714705008","width":2000},{"alt":null,"id":23875359080547,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2f936073972b744fe2b8b7adf11e167219b55e3e_8dd768d0-9d81-40fd-8154-8965aae22075.webp?v=1714705010"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2f936073972b744fe2b8b7adf11e167219b55e3e_8dd768d0-9d81-40fd-8154-8965aae22075.webp?v=1714705010","width":2000},{"alt":null,"id":23875359473763,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e02afb36a6dbc660543d00a9f34e475ab5564f4a_b834f771-2b92-49fb-ab42-1b7106abeff4.webp?v=1714705013"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e02afb36a6dbc660543d00a9f34e475ab5564f4a_b834f771-2b92-49fb-ab42-1b7106abeff4.webp?v=1714705013","width":2000},{"alt":null,"id":23875359932515,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/590e710cf4f7b13eedc85239d514abcf33393ad1_88eac04e-db81-464c-80b7-99c2439aef5f.webp?v=1714705015"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/590e710cf4f7b13eedc85239d514abcf33393ad1_88eac04e-db81-464c-80b7-99c2439aef5f.webp?v=1714705015","width":2000},{"alt":null,"id":23875360260195,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/de0e61f64eae6680c15dbc5b1e0037c01218589f_a5c08253-47e8-46c7-9008-10c4d995dcab.webp?v=1714705017"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/de0e61f64eae6680c15dbc5b1e0037c01218589f_a5c08253-47e8-46c7-9008-10c4d995dcab.webp?v=1714705017","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $bumper = null; $variants = [{"id":41879244734563,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0126124-SB16","requires_shipping":true,"taxable":true,"featured_image":{"id":31470453227619,"product_id":7407822274659,"position":1,"created_at":"2024-05-03T10:56:36+08:00","updated_at":"2024-05-03T10:56:36+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2541103ab32fe44fce95171ba00598637b79b792_2b7ed481-8d46-4ed9-8769-b57519166de9.webp?v=1714704996","variant_ids":[41879244734563]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 14 Plus - 【聯名設計款】 - Batman - Logo - 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":"NPB0126124-SB16","featured_media":{"alt":null,"id":23875356655715,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2541103ab32fe44fce95171ba00598637b79b792_2b7ed481-8d46-4ed9-8769-b57519166de9.webp?v=1714704996"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41879244734563,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0126124-SB16","requires_shipping":true,"taxable":true,"featured_image":{"id":31470453227619,"product_id":7407822274659,"position":1,"created_at":"2024-05-03T10:56:36+08:00","updated_at":"2024-05-03T10:56:36+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2541103ab32fe44fce95171ba00598637b79b792_2b7ed481-8d46-4ed9-8769-b57519166de9.webp?v=1714704996","variant_ids":[41879244734563]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 14 Plus - 【聯名設計款】 - Batman - Logo - 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":"NPB0126124-SB16","featured_media":{"alt":null,"id":23875356655715,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2541103ab32fe44fce95171ba00598637b79b792_2b7ed481-8d46-4ed9-8769-b57519166de9.webp?v=1714704996"}},"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: "停產" }