$product = {"id":7415047061603,"title":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 Pro Max - Care Bears - 雲朵綿綿","handle":"iphone-12-pro-max-mod-nx-magsafe-printable-yb10","description":null,"published_at":"2024-06-11T17:56:32+08:00","created_at":"2024-05-05T20:12:53+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 12 pro max","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":41911303209059,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118724-YB10","requires_shipping":true,"taxable":true,"featured_image":{"id":31488019365987,"product_id":7415047061603,"position":9,"created_at":"2024-05-05T20:13:14+08:00","updated_at":"2024-05-05T20:13:14+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c02dd191f8195427e81c3a95fd9734dfb0c69c41_109ac455-30c2-4ec4-84da-64fc2f48922d.webp?v=1714911194","variant_ids":[41911303209059]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 Pro Max - 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":"MPB0118724-YB10","featured_media":{"alt":null,"id":23893363654755,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c02dd191f8195427e81c3a95fd9734dfb0c69c41_109ac455-30c2-4ec4-84da-64fc2f48922d.webp?v=1714911194"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4dc7b48fe2b292dfd402d7acf0ee8da060dfe4e5_7281a5f0-c851-4eee-bfaf-2df1a55cd891.webp?v=1714911175","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e9deb5c96bad0e84eefc46151c3479f16e832b12_b3c7a688-8a91-4768-9dc7-daebfcec248e.webp?v=1714911178","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b55b9950a8e1e712fbd61ba08071f1650d5d60be_aa061c6b-02f3-4545-8244-7f8c5afb467f.webp?v=1714911181","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/88fd1ac32353e537f9f033b5110870dfc5a5c46e_7cfda124-e256-4c8c-88a7-eeaa00f2d74d.webp?v=1714911183","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/787e2da1f93c8a93ce3acc1425bf7f5774655a8f_d96dfccc-285b-4b02-a30c-b2aacf4a7398.webp?v=1714911185","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7b32e66ef888681679c26bb260cfd5aaf1c503c2_a2060a67-040a-4d65-8d0b-07ed1e28f489.webp?v=1714911188","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8f5e091ba76185ade3bca18345f367c24f9fadb9_585de856-e55d-45ad-8363-0e79a4dcf9d4.webp?v=1714911190","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0285e32b2038cf4b1c6265e5f17d62da0fd5e1c7_3a5a46f2-7147-4812-8391-bc4e584ab084.webp?v=1714911192","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c02dd191f8195427e81c3a95fd9734dfb0c69c41_109ac455-30c2-4ec4-84da-64fc2f48922d.webp?v=1714911194","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a313334a958d8e92d774e377933c19163e928bc7_56c67f87-ac90-428d-a3da-c6e96054fc96.webp?v=1714911197"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4dc7b48fe2b292dfd402d7acf0ee8da060dfe4e5_7281a5f0-c851-4eee-bfaf-2df1a55cd891.webp?v=1714911175","options":["color"],"media":[{"alt":null,"id":23893359100003,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4dc7b48fe2b292dfd402d7acf0ee8da060dfe4e5_7281a5f0-c851-4eee-bfaf-2df1a55cd891.webp?v=1714911175"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4dc7b48fe2b292dfd402d7acf0ee8da060dfe4e5_7281a5f0-c851-4eee-bfaf-2df1a55cd891.webp?v=1714911175","width":2000},{"alt":null,"id":23893359657059,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e9deb5c96bad0e84eefc46151c3479f16e832b12_b3c7a688-8a91-4768-9dc7-daebfcec248e.webp?v=1714911178"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e9deb5c96bad0e84eefc46151c3479f16e832b12_b3c7a688-8a91-4768-9dc7-daebfcec248e.webp?v=1714911178","width":2000},{"alt":null,"id":23893360246883,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b55b9950a8e1e712fbd61ba08071f1650d5d60be_aa061c6b-02f3-4545-8244-7f8c5afb467f.webp?v=1714911181"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b55b9950a8e1e712fbd61ba08071f1650d5d60be_aa061c6b-02f3-4545-8244-7f8c5afb467f.webp?v=1714911181","width":2000},{"alt":null,"id":23893360672867,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/88fd1ac32353e537f9f033b5110870dfc5a5c46e_7cfda124-e256-4c8c-88a7-eeaa00f2d74d.webp?v=1714911183"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/88fd1ac32353e537f9f033b5110870dfc5a5c46e_7cfda124-e256-4c8c-88a7-eeaa00f2d74d.webp?v=1714911183","width":2000},{"alt":null,"id":23893361098851,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/787e2da1f93c8a93ce3acc1425bf7f5774655a8f_d96dfccc-285b-4b02-a30c-b2aacf4a7398.webp?v=1714911185"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/787e2da1f93c8a93ce3acc1425bf7f5774655a8f_d96dfccc-285b-4b02-a30c-b2aacf4a7398.webp?v=1714911185","width":2000},{"alt":null,"id":23893361819747,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7b32e66ef888681679c26bb260cfd5aaf1c503c2_a2060a67-040a-4d65-8d0b-07ed1e28f489.webp?v=1714911188"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7b32e66ef888681679c26bb260cfd5aaf1c503c2_a2060a67-040a-4d65-8d0b-07ed1e28f489.webp?v=1714911188","width":2000},{"alt":null,"id":23893362868323,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8f5e091ba76185ade3bca18345f367c24f9fadb9_585de856-e55d-45ad-8363-0e79a4dcf9d4.webp?v=1714911190"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8f5e091ba76185ade3bca18345f367c24f9fadb9_585de856-e55d-45ad-8363-0e79a4dcf9d4.webp?v=1714911190","width":2000},{"alt":null,"id":23893363196003,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0285e32b2038cf4b1c6265e5f17d62da0fd5e1c7_3a5a46f2-7147-4812-8391-bc4e584ab084.webp?v=1714911192"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0285e32b2038cf4b1c6265e5f17d62da0fd5e1c7_3a5a46f2-7147-4812-8391-bc4e584ab084.webp?v=1714911192","width":2000},{"alt":null,"id":23893363654755,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c02dd191f8195427e81c3a95fd9734dfb0c69c41_109ac455-30c2-4ec4-84da-64fc2f48922d.webp?v=1714911194"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c02dd191f8195427e81c3a95fd9734dfb0c69c41_109ac455-30c2-4ec4-84da-64fc2f48922d.webp?v=1714911194","width":2000},{"alt":null,"id":23893364113507,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a313334a958d8e92d774e377933c19163e928bc7_56c67f87-ac90-428d-a3da-c6e96054fc96.webp?v=1714911197"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a313334a958d8e92d774e377933c19163e928bc7_56c67f87-ac90-428d-a3da-c6e96054fc96.webp?v=1714911197","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41911303209059,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118724-YB10","requires_shipping":true,"taxable":true,"featured_image":{"id":31488019365987,"product_id":7415047061603,"position":9,"created_at":"2024-05-05T20:13:14+08:00","updated_at":"2024-05-05T20:13:14+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c02dd191f8195427e81c3a95fd9734dfb0c69c41_109ac455-30c2-4ec4-84da-64fc2f48922d.webp?v=1714911194","variant_ids":[41911303209059]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 Pro Max - 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":"MPB0118724-YB10","featured_media":{"alt":null,"id":23893363654755,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c02dd191f8195427e81c3a95fd9734dfb0c69c41_109ac455-30c2-4ec4-84da-64fc2f48922d.webp?v=1714911194"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41911303209059,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118724-YB10","requires_shipping":true,"taxable":true,"featured_image":{"id":31488019365987,"product_id":7415047061603,"position":9,"created_at":"2024-05-05T20:13:14+08:00","updated_at":"2024-05-05T20:13:14+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c02dd191f8195427e81c3a95fd9734dfb0c69c41_109ac455-30c2-4ec4-84da-64fc2f48922d.webp?v=1714911194","variant_ids":[41911303209059]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 Pro Max - 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":"MPB0118724-YB10","featured_media":{"alt":null,"id":23893363654755,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c02dd191f8195427e81c3a95fd9734dfb0c69c41_109ac455-30c2-4ec4-84da-64fc2f48922d.webp?v=1714911194"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}; $device_handle = null; $brand_handle = null; $type = ""; var sellingStatus // 只有設計款(SKU 含 '-')才需要合圖 if ($isMerge && $defaultVariant.sku.includes('-')) { $(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: "停產" }