$product = {"id":7931239071843,"title":"iPhone 14 Plus Mod NX (MagSafe 兼容) 白白日記 By Darylhochi Um...","handle":"iphone-14-plus-mod-nx-magsafe-ei82","description":null,"published_at":"2025-11-28T11:09:39+08:00","created_at":"2025-11-28T09:40:00+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"","tags":["10%","20%","30%","40%","50%","brand-Apple","designer","designer-darylhochi","device-iPhone 14 Plus","merge","reseller-darylhochi"],"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":43860701479011,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"MPB0126124-EI82","requires_shipping":true,"taxable":true,"featured_image":{"id":34861244055651,"product_id":7931239071843,"position":7,"created_at":"2025-11-28T09:40:10+08:00","updated_at":"2025-11-28T09:40:12+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/58c370e89f715ae97d918114779b5bb726452b86.webp?v=1764294012","variant_ids":[43860701479011]},"available":true,"name":"iPhone 14 Plus Mod NX (MagSafe 兼容) 白白日記 By Darylhochi Um... - 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-EI82","featured_media":{"alt":null,"id":26425663684707,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/58c370e89f715ae97d918114779b5bb726452b86.webp?v=1764294012"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5b2589b171626e267ca67b93ed69a85c4be5893e.webp?v=1764294009","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b6a6856cf16c25d5ad38156c2374bbc28eff8f76.webp?v=1764294010","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/38fad91d78aec9791b0e3897258e3a314cadcccd.webp?v=1764294010","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e14bff1e86f66dfd61ff8f8d5d7a601034360ab6.webp?v=1764294010","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d82d8cd11e0ece36a6e2ad42dfa498abb9a7f563.webp?v=1764294011","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a5dcd555929e565e30ab5a19306ef98c88bc23d0.webp?v=1764294011","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/58c370e89f715ae97d918114779b5bb726452b86.webp?v=1764294012","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9eefab6ddc361ce251df80327005b6c42734d11a.webp?v=1764294012","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1710b761e82975ac7c4fc737a4ec9bee056cd4fb.webp?v=1764294013","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ed854f6ae01ec022a290034ae54986d45ae15780.webp?v=1764294013","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9c178470235ca08630aef62943abc39e67da58a6.webp?v=1764294013","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a165fae1e769aec0aed2b60d87505b3d4a0791b2.webp?v=1764294014","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a07156f8d89d82cb44b4dfb5c372ca76b37efc28.webp?v=1764294014"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5b2589b171626e267ca67b93ed69a85c4be5893e.webp?v=1764294009","options":["color"],"media":[{"alt":null,"id":26425662210147,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5b2589b171626e267ca67b93ed69a85c4be5893e.webp?v=1764294009"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5b2589b171626e267ca67b93ed69a85c4be5893e.webp?v=1764294009","width":2000},{"alt":null,"id":26425662505059,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b6a6856cf16c25d5ad38156c2374bbc28eff8f76.webp?v=1764294010"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b6a6856cf16c25d5ad38156c2374bbc28eff8f76.webp?v=1764294010","width":2000},{"alt":null,"id":26425662767203,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/38fad91d78aec9791b0e3897258e3a314cadcccd.webp?v=1764294010"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/38fad91d78aec9791b0e3897258e3a314cadcccd.webp?v=1764294010","width":2000},{"alt":null,"id":26425662963811,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e14bff1e86f66dfd61ff8f8d5d7a601034360ab6.webp?v=1764294010"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e14bff1e86f66dfd61ff8f8d5d7a601034360ab6.webp?v=1764294010","width":2000},{"alt":null,"id":26425663225955,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d82d8cd11e0ece36a6e2ad42dfa498abb9a7f563.webp?v=1764294011"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d82d8cd11e0ece36a6e2ad42dfa498abb9a7f563.webp?v=1764294011","width":2000},{"alt":null,"id":26425663520867,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a5dcd555929e565e30ab5a19306ef98c88bc23d0.webp?v=1764294011"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a5dcd555929e565e30ab5a19306ef98c88bc23d0.webp?v=1764294011","width":2000},{"alt":null,"id":26425663684707,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/58c370e89f715ae97d918114779b5bb726452b86.webp?v=1764294012"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/58c370e89f715ae97d918114779b5bb726452b86.webp?v=1764294012","width":2000},{"alt":null,"id":26425663914083,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9eefab6ddc361ce251df80327005b6c42734d11a.webp?v=1764294012"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9eefab6ddc361ce251df80327005b6c42734d11a.webp?v=1764294012","width":2000},{"alt":null,"id":26425664045155,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1710b761e82975ac7c4fc737a4ec9bee056cd4fb.webp?v=1764294013"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1710b761e82975ac7c4fc737a4ec9bee056cd4fb.webp?v=1764294013","width":2000},{"alt":null,"id":26425664176227,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ed854f6ae01ec022a290034ae54986d45ae15780.webp?v=1764294013"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ed854f6ae01ec022a290034ae54986d45ae15780.webp?v=1764294013","width":2000},{"alt":null,"id":26425664405603,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9c178470235ca08630aef62943abc39e67da58a6.webp?v=1764294013"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9c178470235ca08630aef62943abc39e67da58a6.webp?v=1764294013","width":2000},{"alt":null,"id":26425664569443,"position":12,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a165fae1e769aec0aed2b60d87505b3d4a0791b2.webp?v=1764294014"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a165fae1e769aec0aed2b60d87505b3d4a0791b2.webp?v=1764294014","width":2000},{"alt":null,"id":26425664700515,"position":13,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a07156f8d89d82cb44b4dfb5c372ca76b37efc28.webp?v=1764294014"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a07156f8d89d82cb44b4dfb5c372ca76b37efc28.webp?v=1764294014","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $bumper = null; $variants = [{"id":43860701479011,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"MPB0126124-EI82","requires_shipping":true,"taxable":true,"featured_image":{"id":34861244055651,"product_id":7931239071843,"position":7,"created_at":"2025-11-28T09:40:10+08:00","updated_at":"2025-11-28T09:40:12+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/58c370e89f715ae97d918114779b5bb726452b86.webp?v=1764294012","variant_ids":[43860701479011]},"available":true,"name":"iPhone 14 Plus Mod NX (MagSafe 兼容) 白白日記 By Darylhochi Um... - 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-EI82","featured_media":{"alt":null,"id":26425663684707,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/58c370e89f715ae97d918114779b5bb726452b86.webp?v=1764294012"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":43860701479011,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"MPB0126124-EI82","requires_shipping":true,"taxable":true,"featured_image":{"id":34861244055651,"product_id":7931239071843,"position":7,"created_at":"2025-11-28T09:40:10+08:00","updated_at":"2025-11-28T09:40:12+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/58c370e89f715ae97d918114779b5bb726452b86.webp?v=1764294012","variant_ids":[43860701479011]},"available":true,"name":"iPhone 14 Plus Mod NX (MagSafe 兼容) 白白日記 By Darylhochi Um... - 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-EI82","featured_media":{"alt":null,"id":26425663684707,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/58c370e89f715ae97d918114779b5bb726452b86.webp?v=1764294012"}},"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: "停產" }