$product = {"id":7164414034019,"title":"犀牛盾Clear (MagSafe 兼容) 防摔背蓋手機殼 - iPhone 15 Pro Max - 【聯名設計款】 - Look - 願傷疤 有天開出花(澳洲叢林大火)","handle":"iphone-15-pro-max-jellytint-magsafe-af02","description":null,"published_at":"2024-01-31T11:10:45+08:00","created_at":"2024-01-30T23:28:09+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 Max","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":41237524021347,"title":"Ash Black","option1":"Ash Black","option2":null,"option3":null,"sku":"MCN012980G-AF02","requires_shipping":true,"taxable":true,"featured_image":{"id":30868910932067,"product_id":7164414034019,"position":4,"created_at":"2024-01-30T23:28:20+08:00","updated_at":"2024-01-30T23:28:20+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2cde829c8599063636d1067bdaf528e423d4cbcb_fb611f64-623d-45db-905f-dbb85ce1fa42.webp?v=1706628500","variant_ids":[41237524021347]},"available":true,"name":"犀牛盾Clear (MagSafe 兼容) 防摔背蓋手機殼 - iPhone 15 Pro Max - 【聯名設計款】 - 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":"MCN012980G-AF02","featured_media":{"alt":null,"id":23240301871203,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2cde829c8599063636d1067bdaf528e423d4cbcb_fb611f64-623d-45db-905f-dbb85ce1fa42.webp?v=1706628500"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":41237524217955,"title":"Fancy Pink","option1":"Fancy Pink","option2":null,"option3":null,"sku":"MCN012980J-AF02","requires_shipping":true,"taxable":true,"featured_image":{"id":30868911718499,"product_id":7164414034019,"position":5,"created_at":"2024-01-30T23:28:23+08:00","updated_at":"2024-01-30T23:28:23+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e604cab9f6ab8b16b2307e624446b593c18307ad_8ee4300a-1f3f-4b5e-a163-c725d0e87c43.webp?v=1706628503","variant_ids":[41237524217955]},"available":true,"name":"犀牛盾Clear (MagSafe 兼容) 防摔背蓋手機殼 - iPhone 15 Pro Max - 【聯名設計款】 - Look - 願傷疤 有天開出花(澳洲叢林大火) - Fancy Pink","public_title":"Fancy Pink","options":["Fancy Pink"],"price":148000,"weight":1350,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"MCN012980J-AF02","featured_media":{"alt":null,"id":23240302657635,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e604cab9f6ab8b16b2307e624446b593c18307ad_8ee4300a-1f3f-4b5e-a163-c725d0e87c43.webp?v=1706628503"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7bffd4f3811ac7c1ae9eb78b04ba896ce05c430e_803b26bb-7269-4a10-823a-08b759721eec.webp?v=1706628493","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bb49a0e8a2a5b22eb9ec6d4a3e0083fc274e3735_39402815-03c6-4581-8686-4c0ec1e8149e.webp?v=1706628495","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c6473d5716fbaacc92a99ec68323fcd006c516c1_6ebb832c-9f0d-43ef-b4ce-cd6566f39248.webp?v=1706628498","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2cde829c8599063636d1067bdaf528e423d4cbcb_fb611f64-623d-45db-905f-dbb85ce1fa42.webp?v=1706628500","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e604cab9f6ab8b16b2307e624446b593c18307ad_8ee4300a-1f3f-4b5e-a163-c725d0e87c43.webp?v=1706628503","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/73b33ce228b75dc82f038ab79cccf492c6f0a283_ea87fc25-feda-4593-964f-056a5c2ec175.webp?v=1706628506","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dadf5a7eb3b4a9026b4fabd1148bccd68ce32e58_658b005f-6319-487e-8893-362e83c2bfb5.webp?v=1706628509"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7bffd4f3811ac7c1ae9eb78b04ba896ce05c430e_803b26bb-7269-4a10-823a-08b759721eec.webp?v=1706628493","options":["color"],"media":[{"alt":null,"id":23240299806819,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7bffd4f3811ac7c1ae9eb78b04ba896ce05c430e_803b26bb-7269-4a10-823a-08b759721eec.webp?v=1706628493"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7bffd4f3811ac7c1ae9eb78b04ba896ce05c430e_803b26bb-7269-4a10-823a-08b759721eec.webp?v=1706628493","width":2000},{"alt":null,"id":23240300560483,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bb49a0e8a2a5b22eb9ec6d4a3e0083fc274e3735_39402815-03c6-4581-8686-4c0ec1e8149e.webp?v=1706628495"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bb49a0e8a2a5b22eb9ec6d4a3e0083fc274e3735_39402815-03c6-4581-8686-4c0ec1e8149e.webp?v=1706628495","width":2000},{"alt":null,"id":23240301215843,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c6473d5716fbaacc92a99ec68323fcd006c516c1_6ebb832c-9f0d-43ef-b4ce-cd6566f39248.webp?v=1706628498"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c6473d5716fbaacc92a99ec68323fcd006c516c1_6ebb832c-9f0d-43ef-b4ce-cd6566f39248.webp?v=1706628498","width":2000},{"alt":null,"id":23240301871203,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2cde829c8599063636d1067bdaf528e423d4cbcb_fb611f64-623d-45db-905f-dbb85ce1fa42.webp?v=1706628500"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2cde829c8599063636d1067bdaf528e423d4cbcb_fb611f64-623d-45db-905f-dbb85ce1fa42.webp?v=1706628500","width":2000},{"alt":null,"id":23240302657635,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e604cab9f6ab8b16b2307e624446b593c18307ad_8ee4300a-1f3f-4b5e-a163-c725d0e87c43.webp?v=1706628503"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e604cab9f6ab8b16b2307e624446b593c18307ad_8ee4300a-1f3f-4b5e-a163-c725d0e87c43.webp?v=1706628503","width":2000},{"alt":null,"id":23240303575139,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/73b33ce228b75dc82f038ab79cccf492c6f0a283_ea87fc25-feda-4593-964f-056a5c2ec175.webp?v=1706628506"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/73b33ce228b75dc82f038ab79cccf492c6f0a283_ea87fc25-feda-4593-964f-056a5c2ec175.webp?v=1706628506","width":2000},{"alt":null,"id":23240304263267,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dadf5a7eb3b4a9026b4fabd1148bccd68ce32e58_658b005f-6319-487e-8893-362e83c2bfb5.webp?v=1706628509"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dadf5a7eb3b4a9026b4fabd1148bccd68ce32e58_658b005f-6319-487e-8893-362e83c2bfb5.webp?v=1706628509","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41237524021347,"title":"Ash Black","option1":"Ash Black","option2":null,"option3":null,"sku":"MCN012980G-AF02","requires_shipping":true,"taxable":true,"featured_image":{"id":30868910932067,"product_id":7164414034019,"position":4,"created_at":"2024-01-30T23:28:20+08:00","updated_at":"2024-01-30T23:28:20+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2cde829c8599063636d1067bdaf528e423d4cbcb_fb611f64-623d-45db-905f-dbb85ce1fa42.webp?v=1706628500","variant_ids":[41237524021347]},"available":true,"name":"犀牛盾Clear (MagSafe 兼容) 防摔背蓋手機殼 - iPhone 15 Pro Max - 【聯名設計款】 - 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":"MCN012980G-AF02","featured_media":{"alt":null,"id":23240301871203,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2cde829c8599063636d1067bdaf528e423d4cbcb_fb611f64-623d-45db-905f-dbb85ce1fa42.webp?v=1706628500"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":41237524217955,"title":"Fancy Pink","option1":"Fancy Pink","option2":null,"option3":null,"sku":"MCN012980J-AF02","requires_shipping":true,"taxable":true,"featured_image":{"id":30868911718499,"product_id":7164414034019,"position":5,"created_at":"2024-01-30T23:28:23+08:00","updated_at":"2024-01-30T23:28:23+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e604cab9f6ab8b16b2307e624446b593c18307ad_8ee4300a-1f3f-4b5e-a163-c725d0e87c43.webp?v=1706628503","variant_ids":[41237524217955]},"available":true,"name":"犀牛盾Clear (MagSafe 兼容) 防摔背蓋手機殼 - iPhone 15 Pro Max - 【聯名設計款】 - Look - 願傷疤 有天開出花(澳洲叢林大火) - Fancy Pink","public_title":"Fancy Pink","options":["Fancy Pink"],"price":148000,"weight":1350,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"MCN012980J-AF02","featured_media":{"alt":null,"id":23240302657635,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e604cab9f6ab8b16b2307e624446b593c18307ad_8ee4300a-1f3f-4b5e-a163-c725d0e87c43.webp?v=1706628503"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41237524021347,"title":"Ash Black","option1":"Ash Black","option2":null,"option3":null,"sku":"MCN012980G-AF02","requires_shipping":true,"taxable":true,"featured_image":{"id":30868910932067,"product_id":7164414034019,"position":4,"created_at":"2024-01-30T23:28:20+08:00","updated_at":"2024-01-30T23:28:20+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2cde829c8599063636d1067bdaf528e423d4cbcb_fb611f64-623d-45db-905f-dbb85ce1fa42.webp?v=1706628500","variant_ids":[41237524021347]},"available":true,"name":"犀牛盾Clear (MagSafe 兼容) 防摔背蓋手機殼 - iPhone 15 Pro Max - 【聯名設計款】 - 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":"MCN012980G-AF02","featured_media":{"alt":null,"id":23240301871203,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2cde829c8599063636d1067bdaf528e423d4cbcb_fb611f64-623d-45db-905f-dbb85ce1fa42.webp?v=1706628500"}},"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: "停產" }