$product = {"id":7408416653411,"title":"犀牛盾Mod NX手機殼 - iPhone 12 Pro Max - 【聯名設計款】 - Care Bears - Good Luck Bear","handle":"iphone-12-pro-max-mod-nx-printable-yb05","description":null,"published_at":"2024-06-11T16:36:38+08:00","created_at":"2024-05-03T15:22:20+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 12 pro max","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":41885238591587,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118724-YB05","requires_shipping":true,"taxable":true,"featured_image":{"id":31472214540387,"product_id":7408416653411,"position":3,"created_at":"2024-05-03T15:22:28+08:00","updated_at":"2024-05-03T15:22:28+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/45c5c381fa9601500baac2063596a2bc35fad52f_35f8b4da-9fb1-42be-8103-da2bd854c665.webp?v=1714720948","variant_ids":[41885238591587]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 Pro Max - 【聯名設計款】 - Care Bears - Good Luck Bear - 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":"NPB0118724-YB05","featured_media":{"alt":null,"id":23877130354787,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/45c5c381fa9601500baac2063596a2bc35fad52f_35f8b4da-9fb1-42be-8103-da2bd854c665.webp?v=1714720948"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0ee5e12184d85e20507ac94ce14c0d7f913c35cc_30440efd-ec49-4176-9a3b-ff2f273a056b.webp?v=1714720943","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1215928579b3462b7e5e862b192b47624cde2ddf_63582cfc-c987-4ebc-8ea4-142ca04d4954.webp?v=1714720945","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/45c5c381fa9601500baac2063596a2bc35fad52f_35f8b4da-9fb1-42be-8103-da2bd854c665.webp?v=1714720948","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/86ee9bb78fe5743b799595286fe3bd36c719e498_1db9d633-2d64-4877-8ffb-1ca83cab9090.webp?v=1714720950","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5e483253f893cb8122abdf0f2c67f7d0ea2f0316_3e2c1131-30c5-4d20-b209-3290a9d62a40.webp?v=1714720952","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3a6920d1318c9431da3a0633147b1c778bd4ebe6_d4b87cde-1689-4511-967f-1ffe0bb1a285.webp?v=1714720955","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0e6f5cbbcff6f9ff09b213e5201cb0cc67ce5618_da0cee2d-0bc3-4c1a-8995-e38bb3030400.webp?v=1714720957","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f7999572561b0e5a4aa61ca5d687d0fae05b5c33_80649b60-a3fd-48e9-be91-d3b683991521.webp?v=1714720959","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fdb2f51be1966c86ad4059ca9e71fe3059da597f_9598b6a4-b504-401e-a0fa-d77cdde6660d.webp?v=1714720962","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a3848defb95ba4a5a694ed273c08154668e5b73e_a02b9f8f-3d08-48aa-9953-4fe56219208c.webp?v=1714720964"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0ee5e12184d85e20507ac94ce14c0d7f913c35cc_30440efd-ec49-4176-9a3b-ff2f273a056b.webp?v=1714720943","options":["color"],"media":[{"alt":null,"id":23877129404515,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0ee5e12184d85e20507ac94ce14c0d7f913c35cc_30440efd-ec49-4176-9a3b-ff2f273a056b.webp?v=1714720943"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0ee5e12184d85e20507ac94ce14c0d7f913c35cc_30440efd-ec49-4176-9a3b-ff2f273a056b.webp?v=1714720943","width":2000},{"alt":null,"id":23877129830499,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1215928579b3462b7e5e862b192b47624cde2ddf_63582cfc-c987-4ebc-8ea4-142ca04d4954.webp?v=1714720945"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1215928579b3462b7e5e862b192b47624cde2ddf_63582cfc-c987-4ebc-8ea4-142ca04d4954.webp?v=1714720945","width":2000},{"alt":null,"id":23877130354787,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/45c5c381fa9601500baac2063596a2bc35fad52f_35f8b4da-9fb1-42be-8103-da2bd854c665.webp?v=1714720948"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/45c5c381fa9601500baac2063596a2bc35fad52f_35f8b4da-9fb1-42be-8103-da2bd854c665.webp?v=1714720948","width":2000},{"alt":null,"id":23877130911843,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/86ee9bb78fe5743b799595286fe3bd36c719e498_1db9d633-2d64-4877-8ffb-1ca83cab9090.webp?v=1714720950"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/86ee9bb78fe5743b799595286fe3bd36c719e498_1db9d633-2d64-4877-8ffb-1ca83cab9090.webp?v=1714720950","width":2000},{"alt":null,"id":23877131468899,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5e483253f893cb8122abdf0f2c67f7d0ea2f0316_3e2c1131-30c5-4d20-b209-3290a9d62a40.webp?v=1714720952"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5e483253f893cb8122abdf0f2c67f7d0ea2f0316_3e2c1131-30c5-4d20-b209-3290a9d62a40.webp?v=1714720952","width":2000},{"alt":null,"id":23877132025955,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3a6920d1318c9431da3a0633147b1c778bd4ebe6_d4b87cde-1689-4511-967f-1ffe0bb1a285.webp?v=1714720955"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3a6920d1318c9431da3a0633147b1c778bd4ebe6_d4b87cde-1689-4511-967f-1ffe0bb1a285.webp?v=1714720955","width":2000},{"alt":null,"id":23877132419171,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0e6f5cbbcff6f9ff09b213e5201cb0cc67ce5618_da0cee2d-0bc3-4c1a-8995-e38bb3030400.webp?v=1714720957"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0e6f5cbbcff6f9ff09b213e5201cb0cc67ce5618_da0cee2d-0bc3-4c1a-8995-e38bb3030400.webp?v=1714720957","width":2000},{"alt":null,"id":23877132943459,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f7999572561b0e5a4aa61ca5d687d0fae05b5c33_80649b60-a3fd-48e9-be91-d3b683991521.webp?v=1714720959"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f7999572561b0e5a4aa61ca5d687d0fae05b5c33_80649b60-a3fd-48e9-be91-d3b683991521.webp?v=1714720959","width":2000},{"alt":null,"id":23877134483555,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fdb2f51be1966c86ad4059ca9e71fe3059da597f_9598b6a4-b504-401e-a0fa-d77cdde6660d.webp?v=1714720962"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fdb2f51be1966c86ad4059ca9e71fe3059da597f_9598b6a4-b504-401e-a0fa-d77cdde6660d.webp?v=1714720962","width":2000},{"alt":null,"id":23877134942307,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a3848defb95ba4a5a694ed273c08154668e5b73e_a02b9f8f-3d08-48aa-9953-4fe56219208c.webp?v=1714720964"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a3848defb95ba4a5a694ed273c08154668e5b73e_a02b9f8f-3d08-48aa-9953-4fe56219208c.webp?v=1714720964","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $bumper = null; $variants = [{"id":41885238591587,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118724-YB05","requires_shipping":true,"taxable":true,"featured_image":{"id":31472214540387,"product_id":7408416653411,"position":3,"created_at":"2024-05-03T15:22:28+08:00","updated_at":"2024-05-03T15:22:28+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/45c5c381fa9601500baac2063596a2bc35fad52f_35f8b4da-9fb1-42be-8103-da2bd854c665.webp?v=1714720948","variant_ids":[41885238591587]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 Pro Max - 【聯名設計款】 - Care Bears - Good Luck Bear - 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":"NPB0118724-YB05","featured_media":{"alt":null,"id":23877130354787,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/45c5c381fa9601500baac2063596a2bc35fad52f_35f8b4da-9fb1-42be-8103-da2bd854c665.webp?v=1714720948"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41885238591587,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118724-YB05","requires_shipping":true,"taxable":true,"featured_image":{"id":31472214540387,"product_id":7408416653411,"position":3,"created_at":"2024-05-03T15:22:28+08:00","updated_at":"2024-05-03T15:22:28+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/45c5c381fa9601500baac2063596a2bc35fad52f_35f8b4da-9fb1-42be-8103-da2bd854c665.webp?v=1714720948","variant_ids":[41885238591587]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 Pro Max - 【聯名設計款】 - Care Bears - Good Luck Bear - 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":"NPB0118724-YB05","featured_media":{"alt":null,"id":23877130354787,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/45c5c381fa9601500baac2063596a2bc35fad52f_35f8b4da-9fb1-42be-8103-da2bd854c665.webp?v=1714720948"}},"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: "停產" }