$product = {"id":7694050590819,"title":"iPhone 16 JellyTint(MagSafe 兼容 \u0026 相機按鈕)","handle":"iphone-16-jellytint-magsafe-bumper-with-capture-button-featured-product","description":null,"published_at":"2024-12-11T14:27:01+08:00","created_at":"2024-12-02T11:10:39+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"JellyTint MagSafe With Capture Button","tags":["20%","25%","30%","35%","40%","45%","50%","all-phone-case-fp","brand-Apple","caribou:43007098519651:3158768:1","caribou:43007098552419:3158773:1","caribou:43007098585187:3158783:1","caribou:43010355462243:3158778:1","device-iPhone 16","discountable","discountable-item","dropdownDevice-Apple iPhone 16","featured-product","member","quickbuy","reseller","reseller-jellytint-magsafe-bumper-with-capture-button","type-jellytint-magsafe-with-capture-button-featured-product","viewable"],"price":128000,"price_min":128000,"price_max":128000,"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":43007098519651,"title":"酷墨灰","option1":"酷墨灰","option2":null,"option3":null,"sku":"MJB013250G","requires_shipping":true,"taxable":true,"featured_image":{"id":33011968639075,"product_id":7694050590819,"position":4,"created_at":"2024-12-03T16:40:30+08:00","updated_at":"2024-12-03T16:40:30+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bf881fc22aa541c4474158fe9332c2e6aa1adb09.webp?v=1733215230","variant_ids":[43007098519651]},"available":true,"name":"iPhone 16 JellyTint(MagSafe 兼容 \u0026 相機按鈕) - 酷墨灰","public_title":"酷墨灰","options":["酷墨灰"],"price":128000,"weight":1280,"compare_at_price":null,"inventory_quantity":999999996,"inventory_management":null,"inventory_policy":"deny","barcode":"4711563109128","featured_media":{"alt":null,"id":25039875801187,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bf881fc22aa541c4474158fe9332c2e6aa1adb09.webp?v=1733215230"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43007098552419,"title":"憂墨綠","option1":"憂墨綠","option2":null,"option3":null,"sku":"MJB013250H","requires_shipping":true,"taxable":true,"featured_image":{"id":33011968082019,"product_id":7694050590819,"position":1,"created_at":"2024-12-03T16:40:24+08:00","updated_at":"2024-12-03T16:40:24+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9f947a2f3236573143303f63472e810659ee7852.webp?v=1733215224","variant_ids":[43007098552419]},"available":true,"name":"iPhone 16 JellyTint(MagSafe 兼容 \u0026 相機按鈕) - 憂墨綠","public_title":"憂墨綠","options":["憂墨綠"],"price":128000,"weight":1280,"compare_at_price":null,"inventory_quantity":999999996,"inventory_management":null,"inventory_policy":"deny","barcode":"4711563109135","featured_media":{"alt":null,"id":25039875506275,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9f947a2f3236573143303f63472e810659ee7852.webp?v=1733215224"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43010355462243,"title":"激光藍","option1":"激光藍","option2":null,"option3":null,"sku":"MJB013250I","requires_shipping":true,"taxable":true,"featured_image":{"id":33011968475235,"product_id":7694050590819,"position":3,"created_at":"2024-12-03T16:40:28+08:00","updated_at":"2024-12-03T16:40:28+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6f9611d205fdef17c5b477be0f93246c0787b759.webp?v=1733215228","variant_ids":[43010355462243]},"available":true,"name":"iPhone 16 JellyTint(MagSafe 兼容 \u0026 相機按鈕) - 激光藍","public_title":"激光藍","options":["激光藍"],"price":128000,"weight":1280,"compare_at_price":null,"inventory_quantity":999999996,"inventory_management":null,"inventory_policy":"deny","barcode":"4711563109142","featured_media":{"alt":null,"id":25039875702883,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6f9611d205fdef17c5b477be0f93246c0787b759.webp?v=1733215228"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43007098585187,"title":"粉漾桃","option1":"粉漾桃","option2":null,"option3":null,"sku":"MJB013250J","requires_shipping":true,"taxable":true,"featured_image":{"id":33011968278627,"product_id":7694050590819,"position":2,"created_at":"2024-12-03T16:40:25+08:00","updated_at":"2024-12-03T16:40:25+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/72b83ed9cb7a553bea3d0fe01880314b355f25f5.webp?v=1733215225","variant_ids":[43007098585187]},"available":true,"name":"iPhone 16 JellyTint(MagSafe 兼容 \u0026 相機按鈕) - 粉漾桃","public_title":"粉漾桃","options":["粉漾桃"],"price":128000,"weight":1280,"compare_at_price":null,"inventory_quantity":999999996,"inventory_management":null,"inventory_policy":"deny","barcode":"4711563109159","featured_media":{"alt":null,"id":25039875604579,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/72b83ed9cb7a553bea3d0fe01880314b355f25f5.webp?v=1733215225"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9f947a2f3236573143303f63472e810659ee7852.webp?v=1733215224","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/72b83ed9cb7a553bea3d0fe01880314b355f25f5.webp?v=1733215225","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6f9611d205fdef17c5b477be0f93246c0787b759.webp?v=1733215228","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bf881fc22aa541c4474158fe9332c2e6aa1adb09.webp?v=1733215230"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9f947a2f3236573143303f63472e810659ee7852.webp?v=1733215224","options":["color"],"media":[{"alt":null,"id":25039875506275,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9f947a2f3236573143303f63472e810659ee7852.webp?v=1733215224"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9f947a2f3236573143303f63472e810659ee7852.webp?v=1733215224","width":2000},{"alt":null,"id":25039875604579,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/72b83ed9cb7a553bea3d0fe01880314b355f25f5.webp?v=1733215225"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/72b83ed9cb7a553bea3d0fe01880314b355f25f5.webp?v=1733215225","width":2000},{"alt":null,"id":25039875702883,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6f9611d205fdef17c5b477be0f93246c0787b759.webp?v=1733215228"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6f9611d205fdef17c5b477be0f93246c0787b759.webp?v=1733215228","width":2000},{"alt":null,"id":25039875801187,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bf881fc22aa541c4474158fe9332c2e6aa1adb09.webp?v=1733215230"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bf881fc22aa541c4474158fe9332c2e6aa1adb09.webp?v=1733215230","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $bumper = null; $variants = [{"id":43007098519651,"title":"酷墨灰","option1":"酷墨灰","option2":null,"option3":null,"sku":"MJB013250G","requires_shipping":true,"taxable":true,"featured_image":{"id":33011968639075,"product_id":7694050590819,"position":4,"created_at":"2024-12-03T16:40:30+08:00","updated_at":"2024-12-03T16:40:30+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bf881fc22aa541c4474158fe9332c2e6aa1adb09.webp?v=1733215230","variant_ids":[43007098519651]},"available":true,"name":"iPhone 16 JellyTint(MagSafe 兼容 \u0026 相機按鈕) - 酷墨灰","public_title":"酷墨灰","options":["酷墨灰"],"price":128000,"weight":1280,"compare_at_price":null,"inventory_quantity":999999996,"inventory_management":null,"inventory_policy":"deny","barcode":"4711563109128","featured_media":{"alt":null,"id":25039875801187,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bf881fc22aa541c4474158fe9332c2e6aa1adb09.webp?v=1733215230"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43007098552419,"title":"憂墨綠","option1":"憂墨綠","option2":null,"option3":null,"sku":"MJB013250H","requires_shipping":true,"taxable":true,"featured_image":{"id":33011968082019,"product_id":7694050590819,"position":1,"created_at":"2024-12-03T16:40:24+08:00","updated_at":"2024-12-03T16:40:24+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9f947a2f3236573143303f63472e810659ee7852.webp?v=1733215224","variant_ids":[43007098552419]},"available":true,"name":"iPhone 16 JellyTint(MagSafe 兼容 \u0026 相機按鈕) - 憂墨綠","public_title":"憂墨綠","options":["憂墨綠"],"price":128000,"weight":1280,"compare_at_price":null,"inventory_quantity":999999996,"inventory_management":null,"inventory_policy":"deny","barcode":"4711563109135","featured_media":{"alt":null,"id":25039875506275,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9f947a2f3236573143303f63472e810659ee7852.webp?v=1733215224"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43010355462243,"title":"激光藍","option1":"激光藍","option2":null,"option3":null,"sku":"MJB013250I","requires_shipping":true,"taxable":true,"featured_image":{"id":33011968475235,"product_id":7694050590819,"position":3,"created_at":"2024-12-03T16:40:28+08:00","updated_at":"2024-12-03T16:40:28+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6f9611d205fdef17c5b477be0f93246c0787b759.webp?v=1733215228","variant_ids":[43010355462243]},"available":true,"name":"iPhone 16 JellyTint(MagSafe 兼容 \u0026 相機按鈕) - 激光藍","public_title":"激光藍","options":["激光藍"],"price":128000,"weight":1280,"compare_at_price":null,"inventory_quantity":999999996,"inventory_management":null,"inventory_policy":"deny","barcode":"4711563109142","featured_media":{"alt":null,"id":25039875702883,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6f9611d205fdef17c5b477be0f93246c0787b759.webp?v=1733215228"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43007098585187,"title":"粉漾桃","option1":"粉漾桃","option2":null,"option3":null,"sku":"MJB013250J","requires_shipping":true,"taxable":true,"featured_image":{"id":33011968278627,"product_id":7694050590819,"position":2,"created_at":"2024-12-03T16:40:25+08:00","updated_at":"2024-12-03T16:40:25+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/72b83ed9cb7a553bea3d0fe01880314b355f25f5.webp?v=1733215225","variant_ids":[43007098585187]},"available":true,"name":"iPhone 16 JellyTint(MagSafe 兼容 \u0026 相機按鈕) - 粉漾桃","public_title":"粉漾桃","options":["粉漾桃"],"price":128000,"weight":1280,"compare_at_price":null,"inventory_quantity":999999996,"inventory_management":null,"inventory_policy":"deny","barcode":"4711563109159","featured_media":{"alt":null,"id":25039875604579,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/72b83ed9cb7a553bea3d0fe01880314b355f25f5.webp?v=1733215225"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":43007098519651,"title":"酷墨灰","option1":"酷墨灰","option2":null,"option3":null,"sku":"MJB013250G","requires_shipping":true,"taxable":true,"featured_image":{"id":33011968639075,"product_id":7694050590819,"position":4,"created_at":"2024-12-03T16:40:30+08:00","updated_at":"2024-12-03T16:40:30+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bf881fc22aa541c4474158fe9332c2e6aa1adb09.webp?v=1733215230","variant_ids":[43007098519651]},"available":true,"name":"iPhone 16 JellyTint(MagSafe 兼容 \u0026 相機按鈕) - 酷墨灰","public_title":"酷墨灰","options":["酷墨灰"],"price":128000,"weight":1280,"compare_at_price":null,"inventory_quantity":999999996,"inventory_management":null,"inventory_policy":"deny","barcode":"4711563109128","featured_media":{"alt":null,"id":25039875801187,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bf881fc22aa541c4474158fe9332c2e6aa1adb09.webp?v=1733215230"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}; var sellingStatus; $device_handle = null 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 storedData = sessionStorage.getItem('sellingStatusData'); try { sellingStatusData = JSON.parse(storedData) } catch (error) { console.error('JSON.parse Error', error) sellingStatusData = null } $(document).ready(function() { handleSellingStatus($defaultVariant.sku, sellingStatusData); }); function handleSellingStatus(currentSku, sellingStatusData) { const sellingStatusElement = document.getElementById('selling-status') const addToCartButton = document.getElementById('AddToCart-product-template') const currentProductSku = currentSku.replace(/-(.*)$/, '-') if ($variants) { const matchSellingStatusProduct = sellingStatusData.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, sellingStatusData) }); });
// 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: "停產" }