$product = {"id":7411259441251,"title":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 14 Plus - Care Bears - 愛心滿天","handle":"iphone-14-plus-mod-nx-magsafe-printable-yb07","description":null,"published_at":"2024-06-11T17:40:09+08:00","created_at":"2024-05-04T23:55:19+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"設計師MOD NX MagSafe專區Care Bears","tags":["20%","25%","30%","35%","40%","45%","50%","b2b","brand-Apple","designer","designer-carebears","device-iPhone 14 Plus","merge","mod-nx-magsafe-printable","new-modnx-sku","reseller-modnx-magsafe-carebears","Top50","type-Mod NX Printable MagSafe Printable"],"price":110000,"price_min":110000,"price_max":110000,"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":41896640839779,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0126124-YB07","requires_shipping":true,"taxable":true,"featured_image":{"id":31479981178979,"product_id":7411259441251,"position":5,"created_at":"2024-05-04T23:55:31+08:00","updated_at":"2024-05-04T23:55:31+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/32d712c9368d1e6b28d7b1b739fe3b0ac494438c_f45a030a-34c2-4ff7-98d9-8c9621ab7747.webp?v=1714838131","variant_ids":[41896640839779]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 14 Plus - Care Bears - 愛心滿天 - Mod NX-黑色邊框","public_title":"Mod NX-黑色邊框","options":["Mod NX-黑色邊框"],"price":110000,"weight":1380,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"MPB0126124-YB07","featured_media":{"alt":null,"id":23885231652963,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/32d712c9368d1e6b28d7b1b739fe3b0ac494438c_f45a030a-34c2-4ff7-98d9-8c9621ab7747.webp?v=1714838131"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d913fedca28d3370b48ee22ae52132aa0b3c89de_d5084b23-822a-4cc5-a95d-9b127cbc2aea.webp?v=1714838121","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/78f48c98274e3590cb5bf6f694aa22a0245f2ef8_a47f2b0e-e1da-43cb-92fa-9a8329f5abab.webp?v=1714838124","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f3526cb13a1685358185199c615c869abc8285ea_7d68b1d1-edae-49f7-b19f-f3c66074a81e.webp?v=1714838126","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/91366474823b630fdb23738827443a238943447f_8377c8f2-98b7-4df6-b19b-c91e341d2ea8.webp?v=1714838129","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/32d712c9368d1e6b28d7b1b739fe3b0ac494438c_f45a030a-34c2-4ff7-98d9-8c9621ab7747.webp?v=1714838131","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/238151e71daa29a87c0d2a4d5c2180109e3742a6_761326e2-d3a6-4c32-b396-5868a97f9a4e.webp?v=1714838133","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/860c58f397a3a01764414e40ccbcd4849c9a4a20_b18b49c0-8e99-491a-a382-9956985297c9.webp?v=1714838136","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f8232aad9fe2dac65f410afdcb60ed43bfd0a8fc_59c0a0c5-46d6-49dc-b8d4-ff0772d2e6ea.webp?v=1714838139","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3f05d5159907ad7bfec4282f82268c2767dead6b_c5543bda-585d-4c9f-869a-e5e02e28a405.webp?v=1714838141","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e67dd41dcd4b2782abfbfe0af24f5c4ec53d6438_6edd4da1-0cab-4760-b5c5-ae91ff6cf3c7.webp?v=1714838143"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d913fedca28d3370b48ee22ae52132aa0b3c89de_d5084b23-822a-4cc5-a95d-9b127cbc2aea.webp?v=1714838121","options":["color"],"media":[{"alt":null,"id":23885229457507,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d913fedca28d3370b48ee22ae52132aa0b3c89de_d5084b23-822a-4cc5-a95d-9b127cbc2aea.webp?v=1714838121"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d913fedca28d3370b48ee22ae52132aa0b3c89de_d5084b23-822a-4cc5-a95d-9b127cbc2aea.webp?v=1714838121","width":2000},{"alt":null,"id":23885229949027,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/78f48c98274e3590cb5bf6f694aa22a0245f2ef8_a47f2b0e-e1da-43cb-92fa-9a8329f5abab.webp?v=1714838124"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/78f48c98274e3590cb5bf6f694aa22a0245f2ef8_a47f2b0e-e1da-43cb-92fa-9a8329f5abab.webp?v=1714838124","width":2000},{"alt":null,"id":23885230473315,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f3526cb13a1685358185199c615c869abc8285ea_7d68b1d1-edae-49f7-b19f-f3c66074a81e.webp?v=1714838126"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f3526cb13a1685358185199c615c869abc8285ea_7d68b1d1-edae-49f7-b19f-f3c66074a81e.webp?v=1714838126","width":2000},{"alt":null,"id":23885230997603,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/91366474823b630fdb23738827443a238943447f_8377c8f2-98b7-4df6-b19b-c91e341d2ea8.webp?v=1714838129"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/91366474823b630fdb23738827443a238943447f_8377c8f2-98b7-4df6-b19b-c91e341d2ea8.webp?v=1714838129","width":2000},{"alt":null,"id":23885231652963,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/32d712c9368d1e6b28d7b1b739fe3b0ac494438c_f45a030a-34c2-4ff7-98d9-8c9621ab7747.webp?v=1714838131"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/32d712c9368d1e6b28d7b1b739fe3b0ac494438c_f45a030a-34c2-4ff7-98d9-8c9621ab7747.webp?v=1714838131","width":2000},{"alt":null,"id":23885232144483,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/238151e71daa29a87c0d2a4d5c2180109e3742a6_761326e2-d3a6-4c32-b396-5868a97f9a4e.webp?v=1714838133"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/238151e71daa29a87c0d2a4d5c2180109e3742a6_761326e2-d3a6-4c32-b396-5868a97f9a4e.webp?v=1714838133","width":2000},{"alt":null,"id":23885232701539,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/860c58f397a3a01764414e40ccbcd4849c9a4a20_b18b49c0-8e99-491a-a382-9956985297c9.webp?v=1714838136"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/860c58f397a3a01764414e40ccbcd4849c9a4a20_b18b49c0-8e99-491a-a382-9956985297c9.webp?v=1714838136","width":2000},{"alt":null,"id":23885233193059,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f8232aad9fe2dac65f410afdcb60ed43bfd0a8fc_59c0a0c5-46d6-49dc-b8d4-ff0772d2e6ea.webp?v=1714838139"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f8232aad9fe2dac65f410afdcb60ed43bfd0a8fc_59c0a0c5-46d6-49dc-b8d4-ff0772d2e6ea.webp?v=1714838139","width":2000},{"alt":null,"id":23885233717347,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3f05d5159907ad7bfec4282f82268c2767dead6b_c5543bda-585d-4c9f-869a-e5e02e28a405.webp?v=1714838141"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3f05d5159907ad7bfec4282f82268c2767dead6b_c5543bda-585d-4c9f-869a-e5e02e28a405.webp?v=1714838141","width":2000},{"alt":null,"id":23885234045027,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e67dd41dcd4b2782abfbfe0af24f5c4ec53d6438_6edd4da1-0cab-4760-b5c5-ae91ff6cf3c7.webp?v=1714838143"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e67dd41dcd4b2782abfbfe0af24f5c4ec53d6438_6edd4da1-0cab-4760-b5c5-ae91ff6cf3c7.webp?v=1714838143","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41896640839779,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0126124-YB07","requires_shipping":true,"taxable":true,"featured_image":{"id":31479981178979,"product_id":7411259441251,"position":5,"created_at":"2024-05-04T23:55:31+08:00","updated_at":"2024-05-04T23:55:31+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/32d712c9368d1e6b28d7b1b739fe3b0ac494438c_f45a030a-34c2-4ff7-98d9-8c9621ab7747.webp?v=1714838131","variant_ids":[41896640839779]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 14 Plus - Care Bears - 愛心滿天 - Mod NX-黑色邊框","public_title":"Mod NX-黑色邊框","options":["Mod NX-黑色邊框"],"price":110000,"weight":1380,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"MPB0126124-YB07","featured_media":{"alt":null,"id":23885231652963,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/32d712c9368d1e6b28d7b1b739fe3b0ac494438c_f45a030a-34c2-4ff7-98d9-8c9621ab7747.webp?v=1714838131"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41896640839779,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0126124-YB07","requires_shipping":true,"taxable":true,"featured_image":{"id":31479981178979,"product_id":7411259441251,"position":5,"created_at":"2024-05-04T23:55:31+08:00","updated_at":"2024-05-04T23:55:31+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/32d712c9368d1e6b28d7b1b739fe3b0ac494438c_f45a030a-34c2-4ff7-98d9-8c9621ab7747.webp?v=1714838131","variant_ids":[41896640839779]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 14 Plus - Care Bears - 愛心滿天 - Mod NX-黑色邊框","public_title":"Mod NX-黑色邊框","options":["Mod NX-黑色邊框"],"price":110000,"weight":1380,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"MPB0126124-YB07","featured_media":{"alt":null,"id":23885231652963,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/32d712c9368d1e6b28d7b1b739fe3b0ac494438c_f45a030a-34c2-4ff7-98d9-8c9621ab7747.webp?v=1714838131"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}; $device_handle = null; $type = ""; var sellingStatus if ($isMerge) { $(document).ready(function() { var productImg = $product.images[0]; var bumperImg = window.getProductImageUrl($defaultVariant.sku.split('-')[0]); var layers = ($type === 'mod-nx-backplate' || $type === 'mod-backplate') ? [productImg, bumperImg] : [bumperImg, productImg]; window.mergeProductImages(layers).then(function (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: "停產" }