$product = {"id":7830929703011,"title":"iPhone 14 Plus Mod NX (MagSafe 兼容) 不只是情人節:愛的方程式 愛的方程式:心跳(白)","handle":"iphone-14-plus-mod-nx-magsafe-bumper-original-design-dk04","description":null,"published_at":"2025-07-04T09:59:03+08:00","created_at":"2025-07-03T16:18:21+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"","tags":["10%","20%","30%","40%","50%","brand-Apple","designer-valentines-day-collection","device-iPhone 14 Plus","discountable-item","merge","original-design","reseller-valentines-day-collection"],"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":43507545342051,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"MPB0126124-DK04","requires_shipping":true,"taxable":true,"featured_image":{"id":34116887969891,"product_id":7830929703011,"position":7,"created_at":"2025-07-03T16:18:25+08:00","updated_at":"2025-07-03T16:18:27+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/be37607a318599bb0405a1465b00c23854bfe2ac.webp?v=1751530707","variant_ids":[43507545342051]},"available":true,"name":"iPhone 14 Plus Mod NX (MagSafe 兼容) 不只是情人節:愛的方程式 愛的方程式:心跳(白) - Black","public_title":"Black","options":["Black"],"price":110000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"MPB0126124-DK04","featured_media":{"alt":null,"id":25769699377251,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/be37607a318599bb0405a1465b00c23854bfe2ac.webp?v=1751530707"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7419e8f78f67715f75256ff94587716e15f62da4.webp?v=1751530704","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3c27fb676f679d3e1e57681f932502da654d55fd.webp?v=1751530704","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a2d1c0c1fe0fc72e78ca1c3f721bde99411fab64.webp?v=1751530705","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f66eb73f73bc1f23897312788bd72f51ac91d936.webp?v=1751530706","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1bb61ca358761fea1f05edd453051ab1f3301d63.webp?v=1751530706","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4165234649da0c5e1664978cd63c3c58e79e482e.webp?v=1751530707","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/be37607a318599bb0405a1465b00c23854bfe2ac.webp?v=1751530707","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b0af7d46dfa8daf02f20a8d47125302a49c09276.webp?v=1751530708","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b1e1484e1fcd79e70426f2cca277eb6961d4d16f.webp?v=1751530709","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/861f80aef20a4eeb60b0122667d731a3d22b895d.webp?v=1751530709","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1e17fa1628b87a00182d42ae7c702df702a9f4d5.webp?v=1751530710","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c50f74901e375cc3f94f9c18e07109dfbb436e7c.webp?v=1751530710","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cb8f079d192a07c85086c10234ed508622661467.webp?v=1751530711"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7419e8f78f67715f75256ff94587716e15f62da4.webp?v=1751530704","options":["color"],"media":[{"alt":null,"id":25769697869923,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7419e8f78f67715f75256ff94587716e15f62da4.webp?v=1751530704"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7419e8f78f67715f75256ff94587716e15f62da4.webp?v=1751530704","width":2000},{"alt":null,"id":25769698099299,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3c27fb676f679d3e1e57681f932502da654d55fd.webp?v=1751530704"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3c27fb676f679d3e1e57681f932502da654d55fd.webp?v=1751530704","width":2000},{"alt":null,"id":25769698328675,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a2d1c0c1fe0fc72e78ca1c3f721bde99411fab64.webp?v=1751530705"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a2d1c0c1fe0fc72e78ca1c3f721bde99411fab64.webp?v=1751530705","width":2000},{"alt":null,"id":25769698558051,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f66eb73f73bc1f23897312788bd72f51ac91d936.webp?v=1751530706"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f66eb73f73bc1f23897312788bd72f51ac91d936.webp?v=1751530706","width":2000},{"alt":null,"id":25769699016803,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1bb61ca358761fea1f05edd453051ab1f3301d63.webp?v=1751530706"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1bb61ca358761fea1f05edd453051ab1f3301d63.webp?v=1751530706","width":2000},{"alt":null,"id":25769699213411,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4165234649da0c5e1664978cd63c3c58e79e482e.webp?v=1751530707"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4165234649da0c5e1664978cd63c3c58e79e482e.webp?v=1751530707","width":2000},{"alt":null,"id":25769699377251,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/be37607a318599bb0405a1465b00c23854bfe2ac.webp?v=1751530707"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/be37607a318599bb0405a1465b00c23854bfe2ac.webp?v=1751530707","width":2000},{"alt":null,"id":25769699934307,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b0af7d46dfa8daf02f20a8d47125302a49c09276.webp?v=1751530708"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b0af7d46dfa8daf02f20a8d47125302a49c09276.webp?v=1751530708","width":2000},{"alt":null,"id":25769700196451,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b1e1484e1fcd79e70426f2cca277eb6961d4d16f.webp?v=1751530709"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b1e1484e1fcd79e70426f2cca277eb6961d4d16f.webp?v=1751530709","width":2000},{"alt":null,"id":25769700458595,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/861f80aef20a4eeb60b0122667d731a3d22b895d.webp?v=1751530709"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/861f80aef20a4eeb60b0122667d731a3d22b895d.webp?v=1751530709","width":2000},{"alt":null,"id":25769700753507,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1e17fa1628b87a00182d42ae7c702df702a9f4d5.webp?v=1751530710"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1e17fa1628b87a00182d42ae7c702df702a9f4d5.webp?v=1751530710","width":2000},{"alt":null,"id":25769701015651,"position":12,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c50f74901e375cc3f94f9c18e07109dfbb436e7c.webp?v=1751530710"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c50f74901e375cc3f94f9c18e07109dfbb436e7c.webp?v=1751530710","width":2000},{"alt":null,"id":25769701245027,"position":13,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cb8f079d192a07c85086c10234ed508622661467.webp?v=1751530711"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cb8f079d192a07c85086c10234ed508622661467.webp?v=1751530711","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $bumper = null; $variants = [{"id":43507545342051,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"MPB0126124-DK04","requires_shipping":true,"taxable":true,"featured_image":{"id":34116887969891,"product_id":7830929703011,"position":7,"created_at":"2025-07-03T16:18:25+08:00","updated_at":"2025-07-03T16:18:27+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/be37607a318599bb0405a1465b00c23854bfe2ac.webp?v=1751530707","variant_ids":[43507545342051]},"available":true,"name":"iPhone 14 Plus Mod NX (MagSafe 兼容) 不只是情人節:愛的方程式 愛的方程式:心跳(白) - Black","public_title":"Black","options":["Black"],"price":110000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"MPB0126124-DK04","featured_media":{"alt":null,"id":25769699377251,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/be37607a318599bb0405a1465b00c23854bfe2ac.webp?v=1751530707"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":43507545342051,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"MPB0126124-DK04","requires_shipping":true,"taxable":true,"featured_image":{"id":34116887969891,"product_id":7830929703011,"position":7,"created_at":"2025-07-03T16:18:25+08:00","updated_at":"2025-07-03T16:18:27+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/be37607a318599bb0405a1465b00c23854bfe2ac.webp?v=1751530707","variant_ids":[43507545342051]},"available":true,"name":"iPhone 14 Plus Mod NX (MagSafe 兼容) 不只是情人節:愛的方程式 愛的方程式:心跳(白) - Black","public_title":"Black","options":["Black"],"price":110000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"MPB0126124-DK04","featured_media":{"alt":null,"id":25769699377251,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/be37607a318599bb0405a1465b00c23854bfe2ac.webp?v=1751530707"}},"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: "停產" }