$product = {"id":7164412887139,"title":"犀牛盾Clear (MagSafe 兼容) 防摔背蓋手機殼 - iPhone 15 Pro - 【聯名設計款】 - Look - 人在做 北極冰川在看","handle":"iphone-15-pro-jellytint-magsafe-af05","description":null,"published_at":"2024-01-31T11:11:03+08:00","created_at":"2024-01-30T23:27:36+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"設計師JellyTint專區-Look","tags":["20%","20240304-reseller-\u003ereplace_to-","25%","30%","35%","40%","45%","50%","b2b","brand-Apple","designer","designer-look","device-iPhone 15 Pro","merge","reseller-jellytint-look","Top50","type-jellytint"],"price":148000,"price_min":148000,"price_max":148000,"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":41237516976227,"title":"Ash Black","option1":"Ash Black","option2":null,"option3":null,"sku":"MCN012970G-AF05","requires_shipping":true,"taxable":true,"featured_image":{"id":30868901986403,"product_id":7164412887139,"position":3,"created_at":"2024-01-30T23:27:46+08:00","updated_at":"2024-01-30T23:27:46+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/654b08ca081d83b82ce61a0dfe007a3ff0d109b3_25fa8594-63c3-4528-a05d-40ecbe4c7c50.webp?v=1706628466","variant_ids":[41237516976227]},"available":true,"name":"犀牛盾Clear (MagSafe 兼容) 防摔背蓋手機殼 - iPhone 15 Pro - 【聯名設計款】 - Look - 人在做 北極冰川在看 - Ash Black","public_title":"Ash Black","options":["Ash Black"],"price":148000,"weight":1350,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"MCN012970G-AF05","featured_media":{"alt":null,"id":23240292925539,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/654b08ca081d83b82ce61a0dfe007a3ff0d109b3_25fa8594-63c3-4528-a05d-40ecbe4c7c50.webp?v=1706628466"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":41237517041763,"title":"Cyber Blue","option1":"Cyber Blue","option2":null,"option3":null,"sku":"MCN012970I-AF05","requires_shipping":true,"taxable":true,"featured_image":{"id":30868900806755,"product_id":7164412887139,"position":2,"created_at":"2024-01-30T23:27:42+08:00","updated_at":"2024-01-30T23:27:42+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/74eb5c7aa3a5bd9cd396b4af621831b1b92417c8_40c32f38-b16a-41b8-b35f-ecbfc098d501.webp?v=1706628462","variant_ids":[41237517041763]},"available":true,"name":"犀牛盾Clear (MagSafe 兼容) 防摔背蓋手機殼 - iPhone 15 Pro - 【聯名設計款】 - Look - 人在做 北極冰川在看 - Cyber Blue","public_title":"Cyber Blue","options":["Cyber Blue"],"price":148000,"weight":1350,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"MCN012970I-AF05","featured_media":{"alt":null,"id":23240291745891,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/74eb5c7aa3a5bd9cd396b4af621831b1b92417c8_40c32f38-b16a-41b8-b35f-ecbfc098d501.webp?v=1706628462"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cce8386a4660f7a20cb206f07f721f4370d6185f_c30306ff-3d76-493f-86e7-1f428fa26df7.webp?v=1706628460","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/74eb5c7aa3a5bd9cd396b4af621831b1b92417c8_40c32f38-b16a-41b8-b35f-ecbfc098d501.webp?v=1706628462","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/654b08ca081d83b82ce61a0dfe007a3ff0d109b3_25fa8594-63c3-4528-a05d-40ecbe4c7c50.webp?v=1706628466","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4f5ef7974516bcca0f6292f4c0b5792d83a39bf3_692c2ee4-877a-4ec3-9b9c-f4cb89fd898e.webp?v=1706628469","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3012004a43a8555ecdedb499b4df3185d98cd7f7_6624ab47-2f42-469c-a1b8-27870aaebd23.webp?v=1706628471"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cce8386a4660f7a20cb206f07f721f4370d6185f_c30306ff-3d76-493f-86e7-1f428fa26df7.webp?v=1706628460","options":["color"],"media":[{"alt":null,"id":23240291156067,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cce8386a4660f7a20cb206f07f721f4370d6185f_c30306ff-3d76-493f-86e7-1f428fa26df7.webp?v=1706628460"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cce8386a4660f7a20cb206f07f721f4370d6185f_c30306ff-3d76-493f-86e7-1f428fa26df7.webp?v=1706628460","width":2000},{"alt":null,"id":23240291745891,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/74eb5c7aa3a5bd9cd396b4af621831b1b92417c8_40c32f38-b16a-41b8-b35f-ecbfc098d501.webp?v=1706628462"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/74eb5c7aa3a5bd9cd396b4af621831b1b92417c8_40c32f38-b16a-41b8-b35f-ecbfc098d501.webp?v=1706628462","width":2000},{"alt":null,"id":23240292925539,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/654b08ca081d83b82ce61a0dfe007a3ff0d109b3_25fa8594-63c3-4528-a05d-40ecbe4c7c50.webp?v=1706628466"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/654b08ca081d83b82ce61a0dfe007a3ff0d109b3_25fa8594-63c3-4528-a05d-40ecbe4c7c50.webp?v=1706628466","width":2000},{"alt":null,"id":23240293679203,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4f5ef7974516bcca0f6292f4c0b5792d83a39bf3_692c2ee4-877a-4ec3-9b9c-f4cb89fd898e.webp?v=1706628469"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4f5ef7974516bcca0f6292f4c0b5792d83a39bf3_692c2ee4-877a-4ec3-9b9c-f4cb89fd898e.webp?v=1706628469","width":2000},{"alt":null,"id":23240294170723,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3012004a43a8555ecdedb499b4df3185d98cd7f7_6624ab47-2f42-469c-a1b8-27870aaebd23.webp?v=1706628471"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3012004a43a8555ecdedb499b4df3185d98cd7f7_6624ab47-2f42-469c-a1b8-27870aaebd23.webp?v=1706628471","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41237516976227,"title":"Ash Black","option1":"Ash Black","option2":null,"option3":null,"sku":"MCN012970G-AF05","requires_shipping":true,"taxable":true,"featured_image":{"id":30868901986403,"product_id":7164412887139,"position":3,"created_at":"2024-01-30T23:27:46+08:00","updated_at":"2024-01-30T23:27:46+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/654b08ca081d83b82ce61a0dfe007a3ff0d109b3_25fa8594-63c3-4528-a05d-40ecbe4c7c50.webp?v=1706628466","variant_ids":[41237516976227]},"available":true,"name":"犀牛盾Clear (MagSafe 兼容) 防摔背蓋手機殼 - iPhone 15 Pro - 【聯名設計款】 - Look - 人在做 北極冰川在看 - Ash Black","public_title":"Ash Black","options":["Ash Black"],"price":148000,"weight":1350,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"MCN012970G-AF05","featured_media":{"alt":null,"id":23240292925539,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/654b08ca081d83b82ce61a0dfe007a3ff0d109b3_25fa8594-63c3-4528-a05d-40ecbe4c7c50.webp?v=1706628466"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":41237517041763,"title":"Cyber Blue","option1":"Cyber Blue","option2":null,"option3":null,"sku":"MCN012970I-AF05","requires_shipping":true,"taxable":true,"featured_image":{"id":30868900806755,"product_id":7164412887139,"position":2,"created_at":"2024-01-30T23:27:42+08:00","updated_at":"2024-01-30T23:27:42+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/74eb5c7aa3a5bd9cd396b4af621831b1b92417c8_40c32f38-b16a-41b8-b35f-ecbfc098d501.webp?v=1706628462","variant_ids":[41237517041763]},"available":true,"name":"犀牛盾Clear (MagSafe 兼容) 防摔背蓋手機殼 - iPhone 15 Pro - 【聯名設計款】 - Look - 人在做 北極冰川在看 - Cyber Blue","public_title":"Cyber Blue","options":["Cyber Blue"],"price":148000,"weight":1350,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"MCN012970I-AF05","featured_media":{"alt":null,"id":23240291745891,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/74eb5c7aa3a5bd9cd396b4af621831b1b92417c8_40c32f38-b16a-41b8-b35f-ecbfc098d501.webp?v=1706628462"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41237516976227,"title":"Ash Black","option1":"Ash Black","option2":null,"option3":null,"sku":"MCN012970G-AF05","requires_shipping":true,"taxable":true,"featured_image":{"id":30868901986403,"product_id":7164412887139,"position":3,"created_at":"2024-01-30T23:27:46+08:00","updated_at":"2024-01-30T23:27:46+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/654b08ca081d83b82ce61a0dfe007a3ff0d109b3_25fa8594-63c3-4528-a05d-40ecbe4c7c50.webp?v=1706628466","variant_ids":[41237516976227]},"available":true,"name":"犀牛盾Clear (MagSafe 兼容) 防摔背蓋手機殼 - iPhone 15 Pro - 【聯名設計款】 - Look - 人在做 北極冰川在看 - Ash Black","public_title":"Ash Black","options":["Ash Black"],"price":148000,"weight":1350,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"MCN012970G-AF05","featured_media":{"alt":null,"id":23240292925539,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/654b08ca081d83b82ce61a0dfe007a3ff0d109b3_25fa8594-63c3-4528-a05d-40ecbe4c7c50.webp?v=1706628466"}},"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: "停產" }