$product = {"id":7407650406499,"title":"犀牛盾Mod NX手機殼 - iPhone 14 Plus - 【聯名設計款】 - Care Bears - 粉紫樂園","handle":"iphone-14-plus-mod-nx-printable-yb13","description":null,"published_at":"2024-06-11T16:21:33+08:00","created_at":"2024-05-03T10:37:27+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"設計師MOD NX專區-Care Bears","tags":["20%","25%","30%","35%","40%","45%","50%","b2b","brand-Apple","designer","designer-carebears","device-iPhone 14 Plus","merge","mod-nx-printable","new-modnx-sku","reseller-modnx-carebears","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":41877195817059,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0126124-YB13","requires_shipping":true,"taxable":true,"featured_image":{"id":31470155989091,"product_id":7407650406499,"position":7,"created_at":"2024-05-03T10:37:46+08:00","updated_at":"2024-05-03T10:37:46+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9b4ccc752a58706b11216cee9f2ddb9a5abf969a_a85b8a90-0d87-43d9-9c75-5e5bbccb769e.webp?v=1714703866","variant_ids":[41877195817059]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 14 Plus - 【聯名設計款】 - Care Bears - 粉紫樂園 - Mod NX-黑色邊框","public_title":"Mod NX-黑色邊框","options":["Mod NX-黑色邊框"],"price":90000,"weight":860,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"NPB0126124-YB13","featured_media":{"alt":null,"id":23875058827363,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9b4ccc752a58706b11216cee9f2ddb9a5abf969a_a85b8a90-0d87-43d9-9c75-5e5bbccb769e.webp?v=1714703866"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8ecf987fef591cd57eba8c374a47835ce0f25ee8_871e5a9f-1139-4d3f-980d-a58fb00496f0.webp?v=1714703849","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/02d6833eb908f362cb0ea61068480d5b974fd1d7_ced58afd-957e-4659-b5dc-f8150632fb26.webp?v=1714703852","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c53931ded239beb7163e6534e3eb8443a52e3623_982f42c6-ec82-43c4-87c0-2860ce73e2ca.webp?v=1714703855","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cf1750252a63cdc26e22445595d11daddb3edebb_b2704f63-9f75-4314-9d33-9acc2111eb0b.webp?v=1714703857","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d923c735bf3fa30e59f438ad358180f1a4f14f5f_cf8fa805-cd21-425c-99f3-c9957b63db3f.webp?v=1714703860","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/08e3fff95de45f413947565dff2d257cc2e3672c_62c64d64-1c42-4225-88fb-04b0e6b6ffb2.webp?v=1714703863","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9b4ccc752a58706b11216cee9f2ddb9a5abf969a_a85b8a90-0d87-43d9-9c75-5e5bbccb769e.webp?v=1714703866","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9a86b68ba4d7a0b90e3973ca51584ac176520935_10fa3af3-2739-4cb6-981e-4c63c50326c8.webp?v=1714703868","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3fbc21c62079d008db80f499e77748e59d35adce_8741ef35-e464-4347-8a2a-9ab0bb200da2.webp?v=1714703871","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/70d033cd51610839c1d0f6ba5b595fc3bdc053aa_832faf2a-33c9-4efb-94cb-7974e00e3e04.webp?v=1714703874"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8ecf987fef591cd57eba8c374a47835ce0f25ee8_871e5a9f-1139-4d3f-980d-a58fb00496f0.webp?v=1714703849","options":["color"],"media":[{"alt":null,"id":23875053781091,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8ecf987fef591cd57eba8c374a47835ce0f25ee8_871e5a9f-1139-4d3f-980d-a58fb00496f0.webp?v=1714703849"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8ecf987fef591cd57eba8c374a47835ce0f25ee8_871e5a9f-1139-4d3f-980d-a58fb00496f0.webp?v=1714703849","width":2000},{"alt":null,"id":23875054895203,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/02d6833eb908f362cb0ea61068480d5b974fd1d7_ced58afd-957e-4659-b5dc-f8150632fb26.webp?v=1714703852"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/02d6833eb908f362cb0ea61068480d5b974fd1d7_ced58afd-957e-4659-b5dc-f8150632fb26.webp?v=1714703852","width":2000},{"alt":null,"id":23875055583331,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c53931ded239beb7163e6534e3eb8443a52e3623_982f42c6-ec82-43c4-87c0-2860ce73e2ca.webp?v=1714703855"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c53931ded239beb7163e6534e3eb8443a52e3623_982f42c6-ec82-43c4-87c0-2860ce73e2ca.webp?v=1714703855","width":2000},{"alt":null,"id":23875056566371,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cf1750252a63cdc26e22445595d11daddb3edebb_b2704f63-9f75-4314-9d33-9acc2111eb0b.webp?v=1714703857"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cf1750252a63cdc26e22445595d11daddb3edebb_b2704f63-9f75-4314-9d33-9acc2111eb0b.webp?v=1714703857","width":2000},{"alt":null,"id":23875057320035,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d923c735bf3fa30e59f438ad358180f1a4f14f5f_cf8fa805-cd21-425c-99f3-c9957b63db3f.webp?v=1714703860"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d923c735bf3fa30e59f438ad358180f1a4f14f5f_cf8fa805-cd21-425c-99f3-c9957b63db3f.webp?v=1714703860","width":2000},{"alt":null,"id":23875057877091,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/08e3fff95de45f413947565dff2d257cc2e3672c_62c64d64-1c42-4225-88fb-04b0e6b6ffb2.webp?v=1714703863"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/08e3fff95de45f413947565dff2d257cc2e3672c_62c64d64-1c42-4225-88fb-04b0e6b6ffb2.webp?v=1714703863","width":2000},{"alt":null,"id":23875058827363,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9b4ccc752a58706b11216cee9f2ddb9a5abf969a_a85b8a90-0d87-43d9-9c75-5e5bbccb769e.webp?v=1714703866"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9b4ccc752a58706b11216cee9f2ddb9a5abf969a_a85b8a90-0d87-43d9-9c75-5e5bbccb769e.webp?v=1714703866","width":2000},{"alt":null,"id":23875059548259,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9a86b68ba4d7a0b90e3973ca51584ac176520935_10fa3af3-2739-4cb6-981e-4c63c50326c8.webp?v=1714703868"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9a86b68ba4d7a0b90e3973ca51584ac176520935_10fa3af3-2739-4cb6-981e-4c63c50326c8.webp?v=1714703868","width":2000},{"alt":null,"id":23875060334691,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3fbc21c62079d008db80f499e77748e59d35adce_8741ef35-e464-4347-8a2a-9ab0bb200da2.webp?v=1714703871"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3fbc21c62079d008db80f499e77748e59d35adce_8741ef35-e464-4347-8a2a-9ab0bb200da2.webp?v=1714703871","width":2000},{"alt":null,"id":23875061055587,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/70d033cd51610839c1d0f6ba5b595fc3bdc053aa_832faf2a-33c9-4efb-94cb-7974e00e3e04.webp?v=1714703874"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/70d033cd51610839c1d0f6ba5b595fc3bdc053aa_832faf2a-33c9-4efb-94cb-7974e00e3e04.webp?v=1714703874","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $bumper = null; $variants = [{"id":41877195817059,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0126124-YB13","requires_shipping":true,"taxable":true,"featured_image":{"id":31470155989091,"product_id":7407650406499,"position":7,"created_at":"2024-05-03T10:37:46+08:00","updated_at":"2024-05-03T10:37:46+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9b4ccc752a58706b11216cee9f2ddb9a5abf969a_a85b8a90-0d87-43d9-9c75-5e5bbccb769e.webp?v=1714703866","variant_ids":[41877195817059]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 14 Plus - 【聯名設計款】 - Care Bears - 粉紫樂園 - Mod NX-黑色邊框","public_title":"Mod NX-黑色邊框","options":["Mod NX-黑色邊框"],"price":90000,"weight":860,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"NPB0126124-YB13","featured_media":{"alt":null,"id":23875058827363,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9b4ccc752a58706b11216cee9f2ddb9a5abf969a_a85b8a90-0d87-43d9-9c75-5e5bbccb769e.webp?v=1714703866"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41877195817059,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0126124-YB13","requires_shipping":true,"taxable":true,"featured_image":{"id":31470155989091,"product_id":7407650406499,"position":7,"created_at":"2024-05-03T10:37:46+08:00","updated_at":"2024-05-03T10:37:46+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9b4ccc752a58706b11216cee9f2ddb9a5abf969a_a85b8a90-0d87-43d9-9c75-5e5bbccb769e.webp?v=1714703866","variant_ids":[41877195817059]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 14 Plus - 【聯名設計款】 - Care Bears - 粉紫樂園 - Mod NX-黑色邊框","public_title":"Mod NX-黑色邊框","options":["Mod NX-黑色邊框"],"price":90000,"weight":860,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"NPB0126124-YB13","featured_media":{"alt":null,"id":23875058827363,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9b4ccc752a58706b11216cee9f2ddb9a5abf969a_a85b8a90-0d87-43d9-9c75-5e5bbccb769e.webp?v=1714703866"}},"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: "停產" }