$product = {"id":7407831744611,"title":"犀牛盾Mod NX手機殼 - iPhone 14 Plus - 【聯名設計款】 - Care Bears - 雨愛灌溉","handle":"iphone-14-plus-mod-nx-printable-yb08","description":null,"published_at":"2024-06-11T16:24:04+08:00","created_at":"2024-05-03T10:58:39+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":41879369318499,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0126124-YB08","requires_shipping":true,"taxable":true,"featured_image":{"id":31470481670243,"product_id":7407831744611,"position":8,"created_at":"2024-05-03T10:58:58+08:00","updated_at":"2024-05-03T10:58:58+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fc2a7cbd501a965fe2dbd460fc66791dd1632107_542e0685-73b0-4e2a-886a-6ceac8f2bbad.webp?v=1714705138","variant_ids":[41879369318499]},"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-YB08","featured_media":{"alt":null,"id":23875385426019,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fc2a7cbd501a965fe2dbd460fc66791dd1632107_542e0685-73b0-4e2a-886a-6ceac8f2bbad.webp?v=1714705138"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bdaa325b2125e70861c9005041a22ef6ba0be5e6_c2db0e64-670d-49d9-b3fc-e3d220c607fb.webp?v=1714705121","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7ade0e1dca57a01ea88f8fb71b35bb6d3561c83f_6da08710-f57d-4e20-bf36-e4b20e62badc.webp?v=1714705124","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c92da0b7534b0abd39f07f3f236edc4ffff84b82_aea81863-f6b3-4c02-94e8-bb4400f8546b.webp?v=1714705126","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0e2ff402be8c7bd2bbea0396d15c5b96cdf08351_c60dddb3-a03b-48ee-9669-33412cf6fb30.webp?v=1714705128","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c3d933cc7f822c9692b1098c9c866f315b6cd4ca_933b204b-f428-4bc6-84a3-2d446c7ccbc5.webp?v=1714705130","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d9d125e7f8a6c5e59f23d5e1e3432922606a260a_6122d591-03dd-42bb-ac2c-f4b57c130b76.webp?v=1714705133","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6675fe78b1a0164e88fe5b2d623930cfa84a7ef3_2a914b3c-e017-457a-9603-200609d9b57c.webp?v=1714705135","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fc2a7cbd501a965fe2dbd460fc66791dd1632107_542e0685-73b0-4e2a-886a-6ceac8f2bbad.webp?v=1714705138","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f04aa8137ca95a977623468ee6d8a7af7b0fea66_b9eb7f2d-e3c2-4da3-b529-0f99a5baa02e.webp?v=1714705140","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ca3298db4d7d07f2639743485635ffa35ff93b0d_0a8f49a8-6b5a-4a59-b3a6-b07c76cb293d.webp?v=1714705142"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bdaa325b2125e70861c9005041a22ef6ba0be5e6_c2db0e64-670d-49d9-b3fc-e3d220c607fb.webp?v=1714705121","options":["color"],"media":[{"alt":null,"id":23875381624931,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bdaa325b2125e70861c9005041a22ef6ba0be5e6_c2db0e64-670d-49d9-b3fc-e3d220c607fb.webp?v=1714705121"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bdaa325b2125e70861c9005041a22ef6ba0be5e6_c2db0e64-670d-49d9-b3fc-e3d220c607fb.webp?v=1714705121","width":2000},{"alt":null,"id":23875382050915,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7ade0e1dca57a01ea88f8fb71b35bb6d3561c83f_6da08710-f57d-4e20-bf36-e4b20e62badc.webp?v=1714705124"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7ade0e1dca57a01ea88f8fb71b35bb6d3561c83f_6da08710-f57d-4e20-bf36-e4b20e62badc.webp?v=1714705124","width":2000},{"alt":null,"id":23875382542435,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c92da0b7534b0abd39f07f3f236edc4ffff84b82_aea81863-f6b3-4c02-94e8-bb4400f8546b.webp?v=1714705126"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c92da0b7534b0abd39f07f3f236edc4ffff84b82_aea81863-f6b3-4c02-94e8-bb4400f8546b.webp?v=1714705126","width":2000},{"alt":null,"id":23875383066723,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0e2ff402be8c7bd2bbea0396d15c5b96cdf08351_c60dddb3-a03b-48ee-9669-33412cf6fb30.webp?v=1714705128"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0e2ff402be8c7bd2bbea0396d15c5b96cdf08351_c60dddb3-a03b-48ee-9669-33412cf6fb30.webp?v=1714705128","width":2000},{"alt":null,"id":23875383492707,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c3d933cc7f822c9692b1098c9c866f315b6cd4ca_933b204b-f428-4bc6-84a3-2d446c7ccbc5.webp?v=1714705130"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c3d933cc7f822c9692b1098c9c866f315b6cd4ca_933b204b-f428-4bc6-84a3-2d446c7ccbc5.webp?v=1714705130","width":2000},{"alt":null,"id":23875383984227,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d9d125e7f8a6c5e59f23d5e1e3432922606a260a_6122d591-03dd-42bb-ac2c-f4b57c130b76.webp?v=1714705133"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d9d125e7f8a6c5e59f23d5e1e3432922606a260a_6122d591-03dd-42bb-ac2c-f4b57c130b76.webp?v=1714705133","width":2000},{"alt":null,"id":23875384934499,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6675fe78b1a0164e88fe5b2d623930cfa84a7ef3_2a914b3c-e017-457a-9603-200609d9b57c.webp?v=1714705135"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6675fe78b1a0164e88fe5b2d623930cfa84a7ef3_2a914b3c-e017-457a-9603-200609d9b57c.webp?v=1714705135","width":2000},{"alt":null,"id":23875385426019,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fc2a7cbd501a965fe2dbd460fc66791dd1632107_542e0685-73b0-4e2a-886a-6ceac8f2bbad.webp?v=1714705138"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fc2a7cbd501a965fe2dbd460fc66791dd1632107_542e0685-73b0-4e2a-886a-6ceac8f2bbad.webp?v=1714705138","width":2000},{"alt":null,"id":23875385852003,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f04aa8137ca95a977623468ee6d8a7af7b0fea66_b9eb7f2d-e3c2-4da3-b529-0f99a5baa02e.webp?v=1714705140"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f04aa8137ca95a977623468ee6d8a7af7b0fea66_b9eb7f2d-e3c2-4da3-b529-0f99a5baa02e.webp?v=1714705140","width":2000},{"alt":null,"id":23875386277987,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ca3298db4d7d07f2639743485635ffa35ff93b0d_0a8f49a8-6b5a-4a59-b3a6-b07c76cb293d.webp?v=1714705142"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ca3298db4d7d07f2639743485635ffa35ff93b0d_0a8f49a8-6b5a-4a59-b3a6-b07c76cb293d.webp?v=1714705142","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $bumper = null; $variants = [{"id":41879369318499,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0126124-YB08","requires_shipping":true,"taxable":true,"featured_image":{"id":31470481670243,"product_id":7407831744611,"position":8,"created_at":"2024-05-03T10:58:58+08:00","updated_at":"2024-05-03T10:58:58+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fc2a7cbd501a965fe2dbd460fc66791dd1632107_542e0685-73b0-4e2a-886a-6ceac8f2bbad.webp?v=1714705138","variant_ids":[41879369318499]},"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-YB08","featured_media":{"alt":null,"id":23875385426019,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fc2a7cbd501a965fe2dbd460fc66791dd1632107_542e0685-73b0-4e2a-886a-6ceac8f2bbad.webp?v=1714705138"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41879369318499,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0126124-YB08","requires_shipping":true,"taxable":true,"featured_image":{"id":31470481670243,"product_id":7407831744611,"position":8,"created_at":"2024-05-03T10:58:58+08:00","updated_at":"2024-05-03T10:58:58+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fc2a7cbd501a965fe2dbd460fc66791dd1632107_542e0685-73b0-4e2a-886a-6ceac8f2bbad.webp?v=1714705138","variant_ids":[41879369318499]},"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-YB08","featured_media":{"alt":null,"id":23875385426019,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fc2a7cbd501a965fe2dbd460fc66791dd1632107_542e0685-73b0-4e2a-886a-6ceac8f2bbad.webp?v=1714705138"}},"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: "停產" }