$product = {"id":7164412100707,"title":"犀牛盾Clear (MagSafe 兼容) 防摔背蓋手機殼 - iPhone 15 Pro Max - 【聯名設計款】 - Snoopy 史努比 - 愛心墨鏡","handle":"iphone-15-pro-max-jellytint-magsafe-pl64","description":null,"published_at":"2024-01-30T23:27:28+08:00","created_at":"2024-01-30T23:27:14+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"設計師JellyTint專區-Snoopy 史努比","tags":["20%","20240304-reseller-\u003ereplace_to-","25%","30%","35%","40%","45%","50%","b2b","brand-Apple","designer","designer-snoopy","device-iPhone 15 Pro Max","merge","reseller-jellytint-snoopy","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":41237510750307,"title":"Ash Black","option1":"Ash Black","option2":null,"option3":null,"sku":"MCN012980G-PL64","requires_shipping":true,"taxable":true,"featured_image":{"id":30868895498339,"product_id":7164412100707,"position":3,"created_at":"2024-01-30T23:27:23+08:00","updated_at":"2024-01-30T23:27:23+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/62932cc701bbcb0209b4b212b2d6ba851c3e018f_c72be6d7-0bf3-4190-bd33-b1157488be84.webp?v=1706628443","variant_ids":[41237510750307]},"available":true,"name":"犀牛盾Clear (MagSafe 兼容) 防摔背蓋手機殼 - iPhone 15 Pro Max - 【聯名設計款】 - Snoopy 史努比 - 愛心墨鏡 - Ash Black","public_title":"Ash Black","options":["Ash Black"],"price":148000,"weight":1680,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"MCN012980G-PL64","featured_media":{"alt":null,"id":23240286437475,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/62932cc701bbcb0209b4b212b2d6ba851c3e018f_c72be6d7-0bf3-4190-bd33-b1157488be84.webp?v=1706628443"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":41237510848611,"title":"Fancy Pink","option1":"Fancy Pink","option2":null,"option3":null,"sku":"MCN012980J-PL64","requires_shipping":true,"taxable":true,"featured_image":{"id":30868896317539,"product_id":7164412100707,"position":4,"created_at":"2024-01-30T23:27:25+08:00","updated_at":"2024-01-30T23:27:25+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bc30d1661dd79f358db99423a7efc3424d186023_2d1fc031-a4fa-40f1-afd2-5248e16c178f.webp?v=1706628445","variant_ids":[41237510848611]},"available":true,"name":"犀牛盾Clear (MagSafe 兼容) 防摔背蓋手機殼 - iPhone 15 Pro Max - 【聯名設計款】 - Snoopy 史努比 - 愛心墨鏡 - Fancy Pink","public_title":"Fancy Pink","options":["Fancy Pink"],"price":148000,"weight":1680,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"MCN012980J-PL64","featured_media":{"alt":null,"id":23240287256675,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bc30d1661dd79f358db99423a7efc3424d186023_2d1fc031-a4fa-40f1-afd2-5248e16c178f.webp?v=1706628445"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5c483729bd0de5d5f9b7420ca16d6784f13f96a1_1c5c20fe-09e2-408a-83f4-86e0d31dd8ce.webp?v=1706628437","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5c066309104c2e3d335057658ccdbe7327b5e2c1_4b304f0d-a6df-4662-8502-1c038d84db07.webp?v=1706628440","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/62932cc701bbcb0209b4b212b2d6ba851c3e018f_c72be6d7-0bf3-4190-bd33-b1157488be84.webp?v=1706628443","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bc30d1661dd79f358db99423a7efc3424d186023_2d1fc031-a4fa-40f1-afd2-5248e16c178f.webp?v=1706628445","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d34c454ab0c21e43b9c309e1fabaa4e5cb06d147_56433eeb-3165-499e-bea7-e6fdf344388d.webp?v=1706628448"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5c483729bd0de5d5f9b7420ca16d6784f13f96a1_1c5c20fe-09e2-408a-83f4-86e0d31dd8ce.webp?v=1706628437","options":["color"],"media":[{"alt":null,"id":23240284438627,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5c483729bd0de5d5f9b7420ca16d6784f13f96a1_1c5c20fe-09e2-408a-83f4-86e0d31dd8ce.webp?v=1706628437"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5c483729bd0de5d5f9b7420ca16d6784f13f96a1_1c5c20fe-09e2-408a-83f4-86e0d31dd8ce.webp?v=1706628437","width":2000},{"alt":null,"id":23240285290595,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5c066309104c2e3d335057658ccdbe7327b5e2c1_4b304f0d-a6df-4662-8502-1c038d84db07.webp?v=1706628440"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5c066309104c2e3d335057658ccdbe7327b5e2c1_4b304f0d-a6df-4662-8502-1c038d84db07.webp?v=1706628440","width":2000},{"alt":null,"id":23240286437475,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/62932cc701bbcb0209b4b212b2d6ba851c3e018f_c72be6d7-0bf3-4190-bd33-b1157488be84.webp?v=1706628443"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/62932cc701bbcb0209b4b212b2d6ba851c3e018f_c72be6d7-0bf3-4190-bd33-b1157488be84.webp?v=1706628443","width":2000},{"alt":null,"id":23240287256675,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bc30d1661dd79f358db99423a7efc3424d186023_2d1fc031-a4fa-40f1-afd2-5248e16c178f.webp?v=1706628445"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bc30d1661dd79f358db99423a7efc3424d186023_2d1fc031-a4fa-40f1-afd2-5248e16c178f.webp?v=1706628445","width":2000},{"alt":null,"id":23240287912035,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d34c454ab0c21e43b9c309e1fabaa4e5cb06d147_56433eeb-3165-499e-bea7-e6fdf344388d.webp?v=1706628448"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d34c454ab0c21e43b9c309e1fabaa4e5cb06d147_56433eeb-3165-499e-bea7-e6fdf344388d.webp?v=1706628448","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41237510750307,"title":"Ash Black","option1":"Ash Black","option2":null,"option3":null,"sku":"MCN012980G-PL64","requires_shipping":true,"taxable":true,"featured_image":{"id":30868895498339,"product_id":7164412100707,"position":3,"created_at":"2024-01-30T23:27:23+08:00","updated_at":"2024-01-30T23:27:23+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/62932cc701bbcb0209b4b212b2d6ba851c3e018f_c72be6d7-0bf3-4190-bd33-b1157488be84.webp?v=1706628443","variant_ids":[41237510750307]},"available":true,"name":"犀牛盾Clear (MagSafe 兼容) 防摔背蓋手機殼 - iPhone 15 Pro Max - 【聯名設計款】 - Snoopy 史努比 - 愛心墨鏡 - Ash Black","public_title":"Ash Black","options":["Ash Black"],"price":148000,"weight":1680,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"MCN012980G-PL64","featured_media":{"alt":null,"id":23240286437475,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/62932cc701bbcb0209b4b212b2d6ba851c3e018f_c72be6d7-0bf3-4190-bd33-b1157488be84.webp?v=1706628443"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":41237510848611,"title":"Fancy Pink","option1":"Fancy Pink","option2":null,"option3":null,"sku":"MCN012980J-PL64","requires_shipping":true,"taxable":true,"featured_image":{"id":30868896317539,"product_id":7164412100707,"position":4,"created_at":"2024-01-30T23:27:25+08:00","updated_at":"2024-01-30T23:27:25+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bc30d1661dd79f358db99423a7efc3424d186023_2d1fc031-a4fa-40f1-afd2-5248e16c178f.webp?v=1706628445","variant_ids":[41237510848611]},"available":true,"name":"犀牛盾Clear (MagSafe 兼容) 防摔背蓋手機殼 - iPhone 15 Pro Max - 【聯名設計款】 - Snoopy 史努比 - 愛心墨鏡 - Fancy Pink","public_title":"Fancy Pink","options":["Fancy Pink"],"price":148000,"weight":1680,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"MCN012980J-PL64","featured_media":{"alt":null,"id":23240287256675,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bc30d1661dd79f358db99423a7efc3424d186023_2d1fc031-a4fa-40f1-afd2-5248e16c178f.webp?v=1706628445"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41237510750307,"title":"Ash Black","option1":"Ash Black","option2":null,"option3":null,"sku":"MCN012980G-PL64","requires_shipping":true,"taxable":true,"featured_image":{"id":30868895498339,"product_id":7164412100707,"position":3,"created_at":"2024-01-30T23:27:23+08:00","updated_at":"2024-01-30T23:27:23+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/62932cc701bbcb0209b4b212b2d6ba851c3e018f_c72be6d7-0bf3-4190-bd33-b1157488be84.webp?v=1706628443","variant_ids":[41237510750307]},"available":true,"name":"犀牛盾Clear (MagSafe 兼容) 防摔背蓋手機殼 - iPhone 15 Pro Max - 【聯名設計款】 - Snoopy 史努比 - 愛心墨鏡 - Ash Black","public_title":"Ash Black","options":["Ash Black"],"price":148000,"weight":1680,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"MCN012980G-PL64","featured_media":{"alt":null,"id":23240286437475,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/62932cc701bbcb0209b4b212b2d6ba851c3e018f_c72be6d7-0bf3-4190-bd33-b1157488be84.webp?v=1706628443"}},"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: "停產" }