$product = {"id":7769421152355,"title":"Pixel 8 SolidSuit (MagSafe 兼容) ilovedoodle Love Keeps Our Hearts Warm - 溫暖的愛","handle":"google-pixel-8-solidsuit-android-magsafe-xf56","description":null,"published_at":"2025-07-04T14:49:32+08:00","created_at":"2025-04-15T15:50:40+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"設計師SolidSuit MagSafe專區-I Love Doodle","tags":["10%","20%","30%","40%","50%","brand-Google","designer","designer-ilovedoodle","device-Pixel 8","merge","reseller-ilovedoodle"],"price":125000,"price_min":125000,"price_max":125000,"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":43302259228771,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"MST0230152-XF56","requires_shipping":true,"taxable":true,"featured_image":{"id":34197459599459,"product_id":7769421152355,"position":5,"created_at":"2025-07-16T15:06:43+08:00","updated_at":"2025-07-16T15:06:44+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/742d5a7da553e9d640a3e8693e9e8cadf9522c95_95b4864a-22b4-4e18-a681-d570fef764cd.webp?v=1752649604","variant_ids":[43302259228771]},"available":true,"name":"Pixel 8 SolidSuit (MagSafe 兼容) ilovedoodle Love Keeps Our Hearts Warm - 溫暖的愛 - Black","public_title":"Black","options":["Black"],"price":125000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"MST0230152-XF56","featured_media":{"alt":null,"id":25829909594211,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/742d5a7da553e9d640a3e8693e9e8cadf9522c95_95b4864a-22b4-4e18-a681-d570fef764cd.webp?v=1752649604"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6502030ea68f0936871d8b4f0508bdc127934340.webp?v=1744703447","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/832bb30cdfff7b016f6585c75cceb59d7a955a8c.webp?v=1752639426","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/742d5a7da553e9d640a3e8693e9e8cadf9522c95.webp?v=1752639427","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f25f95f2aecfdbb04afc047325e333092d763488.webp?v=1752639428","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/742d5a7da553e9d640a3e8693e9e8cadf9522c95_95b4864a-22b4-4e18-a681-d570fef764cd.webp?v=1752649604","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/832bb30cdfff7b016f6585c75cceb59d7a955a8c_7ba99665-8458-48f4-baac-c84eed387c47.webp?v=1752649606","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f25f95f2aecfdbb04afc047325e333092d763488_d14e2014-633f-4997-9b88-c87241e34cc4.webp?v=1752649606"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6502030ea68f0936871d8b4f0508bdc127934340.webp?v=1744703447","options":["color"],"media":[{"alt":null,"id":25495373185123,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6502030ea68f0936871d8b4f0508bdc127934340.webp?v=1744703447"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6502030ea68f0936871d8b4f0508bdc127934340.webp?v=1744703447","width":2000},{"alt":null,"id":25828526817379,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/832bb30cdfff7b016f6585c75cceb59d7a955a8c.webp?v=1752639426"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/832bb30cdfff7b016f6585c75cceb59d7a955a8c.webp?v=1752639426","width":2000},{"alt":null,"id":25828526981219,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/742d5a7da553e9d640a3e8693e9e8cadf9522c95.webp?v=1752639427"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/742d5a7da553e9d640a3e8693e9e8cadf9522c95.webp?v=1752639427","width":2000},{"alt":null,"id":25828527112291,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f25f95f2aecfdbb04afc047325e333092d763488.webp?v=1752639428"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f25f95f2aecfdbb04afc047325e333092d763488.webp?v=1752639428","width":2000},{"alt":null,"id":25829909594211,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/742d5a7da553e9d640a3e8693e9e8cadf9522c95_95b4864a-22b4-4e18-a681-d570fef764cd.webp?v=1752649604"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/742d5a7da553e9d640a3e8693e9e8cadf9522c95_95b4864a-22b4-4e18-a681-d570fef764cd.webp?v=1752649604","width":2000},{"alt":null,"id":25829909987427,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/832bb30cdfff7b016f6585c75cceb59d7a955a8c_7ba99665-8458-48f4-baac-c84eed387c47.webp?v=1752649606"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/832bb30cdfff7b016f6585c75cceb59d7a955a8c_7ba99665-8458-48f4-baac-c84eed387c47.webp?v=1752649606","width":2000},{"alt":null,"id":25829910216803,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f25f95f2aecfdbb04afc047325e333092d763488_d14e2014-633f-4997-9b88-c87241e34cc4.webp?v=1752649606"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f25f95f2aecfdbb04afc047325e333092d763488_d14e2014-633f-4997-9b88-c87241e34cc4.webp?v=1752649606","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $bumper = null; $variants = [{"id":43302259228771,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"MST0230152-XF56","requires_shipping":true,"taxable":true,"featured_image":{"id":34197459599459,"product_id":7769421152355,"position":5,"created_at":"2025-07-16T15:06:43+08:00","updated_at":"2025-07-16T15:06:44+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/742d5a7da553e9d640a3e8693e9e8cadf9522c95_95b4864a-22b4-4e18-a681-d570fef764cd.webp?v=1752649604","variant_ids":[43302259228771]},"available":true,"name":"Pixel 8 SolidSuit (MagSafe 兼容) ilovedoodle Love Keeps Our Hearts Warm - 溫暖的愛 - Black","public_title":"Black","options":["Black"],"price":125000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"MST0230152-XF56","featured_media":{"alt":null,"id":25829909594211,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/742d5a7da553e9d640a3e8693e9e8cadf9522c95_95b4864a-22b4-4e18-a681-d570fef764cd.webp?v=1752649604"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":43302259228771,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"MST0230152-XF56","requires_shipping":true,"taxable":true,"featured_image":{"id":34197459599459,"product_id":7769421152355,"position":5,"created_at":"2025-07-16T15:06:43+08:00","updated_at":"2025-07-16T15:06:44+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/742d5a7da553e9d640a3e8693e9e8cadf9522c95_95b4864a-22b4-4e18-a681-d570fef764cd.webp?v=1752649604","variant_ids":[43302259228771]},"available":true,"name":"Pixel 8 SolidSuit (MagSafe 兼容) ilovedoodle Love Keeps Our Hearts Warm - 溫暖的愛 - Black","public_title":"Black","options":["Black"],"price":125000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"MST0230152-XF56","featured_media":{"alt":null,"id":25829909594211,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/742d5a7da553e9d640a3e8693e9e8cadf9522c95_95b4864a-22b4-4e18-a681-d570fef764cd.webp?v=1752649604"}},"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: "停產" }