$product = {"id":7164391260259,"title":"犀牛盾Clear (MagSafe 兼容) 防摔背蓋手機殼 - iPhone 14 Pro Max - 【聯名設計款】 - Look - 人在做 北極冰川在看","handle":"iphone-14-pro-max-jellytint-magsafe-af05","description":null,"published_at":"2024-01-31T11:11:49+08:00","created_at":"2024-01-30T22:54:10+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 14 Pro Max","merge","reseller-jellytint-look","Top50","type-jellytint"],"price":135000,"price_min":135000,"price_max":135000,"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":41237376041059,"title":"Ash Black","option1":"Ash Black","option2":null,"option3":null,"sku":"MCN012630G-AF05","requires_shipping":true,"taxable":true,"featured_image":{"id":30868732280931,"product_id":7164391260259,"position":5,"created_at":"2024-01-30T22:54:23+08:00","updated_at":"2024-01-30T22:54:23+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9fa272ca056872e986f8c037ebc1f1c9789c7251_b68af3f6-9314-42a8-92d2-8600d73a8731.webp?v=1706626463","variant_ids":[41237376041059]},"available":true,"name":"犀牛盾Clear (MagSafe 兼容) 防摔背蓋手機殼 - iPhone 14 Pro Max - 【聯名設計款】 - Look - 人在做 北極冰川在看 - Ash Black","public_title":"Ash Black","options":["Ash Black"],"price":135000,"weight":1350,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"MCN012630G-AF05","featured_media":{"alt":null,"id":23240122269795,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9fa272ca056872e986f8c037ebc1f1c9789c7251_b68af3f6-9314-42a8-92d2-8600d73a8731.webp?v=1706626463"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":41237376106595,"title":"Cyber Blue","option1":"Cyber Blue","option2":null,"option3":null,"sku":"MCN012630I-AF05","requires_shipping":true,"taxable":true,"featured_image":{"id":30868732837987,"product_id":7164391260259,"position":6,"created_at":"2024-01-30T22:54:26+08:00","updated_at":"2024-01-30T22:54:26+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f441a2e457784e621c4219b94e69959bc995e42b_019bf974-384f-46f7-b2bc-2be10f84d920.webp?v=1706626466","variant_ids":[41237376106595]},"available":true,"name":"犀牛盾Clear (MagSafe 兼容) 防摔背蓋手機殼 - iPhone 14 Pro Max - 【聯名設計款】 - Look - 人在做 北極冰川在看 - Cyber Blue","public_title":"Cyber Blue","options":["Cyber Blue"],"price":135000,"weight":1350,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"MCN012630I-AF05","featured_media":{"alt":null,"id":23240122826851,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f441a2e457784e621c4219b94e69959bc995e42b_019bf974-384f-46f7-b2bc-2be10f84d920.webp?v=1706626466"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/294e7443138fc4b3c9b0af9e641a737d0001f37b_2aa22fd9-4a8a-4b86-8fa7-5d45397c8a2d.webp?v=1706626453","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ba1c599b86b0660b59b78b8a6447f44e0f922dca_1e804b6f-8b3b-42bd-9dd0-1d9ff981f3c1.webp?v=1706626456","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/da11bb839b7c3a6ff49ec1bc3dbb32f2ec0065b2_cf920ebc-d4c2-4de8-b173-2ed1060c1b03.webp?v=1706626458","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/97e336980439100b80b8abd97ecaef2457b6c481_28158964-30e9-4504-9a06-002a36f6dc1c.webp?v=1706626461","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9fa272ca056872e986f8c037ebc1f1c9789c7251_b68af3f6-9314-42a8-92d2-8600d73a8731.webp?v=1706626463","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f441a2e457784e621c4219b94e69959bc995e42b_019bf974-384f-46f7-b2bc-2be10f84d920.webp?v=1706626466"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/294e7443138fc4b3c9b0af9e641a737d0001f37b_2aa22fd9-4a8a-4b86-8fa7-5d45397c8a2d.webp?v=1706626453","options":["color"],"media":[{"alt":null,"id":23240119058531,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/294e7443138fc4b3c9b0af9e641a737d0001f37b_2aa22fd9-4a8a-4b86-8fa7-5d45397c8a2d.webp?v=1706626453"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/294e7443138fc4b3c9b0af9e641a737d0001f37b_2aa22fd9-4a8a-4b86-8fa7-5d45397c8a2d.webp?v=1706626453","width":2000},{"alt":null,"id":23240119746659,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ba1c599b86b0660b59b78b8a6447f44e0f922dca_1e804b6f-8b3b-42bd-9dd0-1d9ff981f3c1.webp?v=1706626456"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ba1c599b86b0660b59b78b8a6447f44e0f922dca_1e804b6f-8b3b-42bd-9dd0-1d9ff981f3c1.webp?v=1706626456","width":2000},{"alt":null,"id":23240120729699,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/da11bb839b7c3a6ff49ec1bc3dbb32f2ec0065b2_cf920ebc-d4c2-4de8-b173-2ed1060c1b03.webp?v=1706626458"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/da11bb839b7c3a6ff49ec1bc3dbb32f2ec0065b2_cf920ebc-d4c2-4de8-b173-2ed1060c1b03.webp?v=1706626458","width":2000},{"alt":null,"id":23240121516131,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/97e336980439100b80b8abd97ecaef2457b6c481_28158964-30e9-4504-9a06-002a36f6dc1c.webp?v=1706626461"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/97e336980439100b80b8abd97ecaef2457b6c481_28158964-30e9-4504-9a06-002a36f6dc1c.webp?v=1706626461","width":2000},{"alt":null,"id":23240122269795,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9fa272ca056872e986f8c037ebc1f1c9789c7251_b68af3f6-9314-42a8-92d2-8600d73a8731.webp?v=1706626463"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9fa272ca056872e986f8c037ebc1f1c9789c7251_b68af3f6-9314-42a8-92d2-8600d73a8731.webp?v=1706626463","width":2000},{"alt":null,"id":23240122826851,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f441a2e457784e621c4219b94e69959bc995e42b_019bf974-384f-46f7-b2bc-2be10f84d920.webp?v=1706626466"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f441a2e457784e621c4219b94e69959bc995e42b_019bf974-384f-46f7-b2bc-2be10f84d920.webp?v=1706626466","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $bumper = null; $variants = [{"id":41237376041059,"title":"Ash Black","option1":"Ash Black","option2":null,"option3":null,"sku":"MCN012630G-AF05","requires_shipping":true,"taxable":true,"featured_image":{"id":30868732280931,"product_id":7164391260259,"position":5,"created_at":"2024-01-30T22:54:23+08:00","updated_at":"2024-01-30T22:54:23+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9fa272ca056872e986f8c037ebc1f1c9789c7251_b68af3f6-9314-42a8-92d2-8600d73a8731.webp?v=1706626463","variant_ids":[41237376041059]},"available":true,"name":"犀牛盾Clear (MagSafe 兼容) 防摔背蓋手機殼 - iPhone 14 Pro Max - 【聯名設計款】 - Look - 人在做 北極冰川在看 - Ash Black","public_title":"Ash Black","options":["Ash Black"],"price":135000,"weight":1350,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"MCN012630G-AF05","featured_media":{"alt":null,"id":23240122269795,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9fa272ca056872e986f8c037ebc1f1c9789c7251_b68af3f6-9314-42a8-92d2-8600d73a8731.webp?v=1706626463"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":41237376106595,"title":"Cyber Blue","option1":"Cyber Blue","option2":null,"option3":null,"sku":"MCN012630I-AF05","requires_shipping":true,"taxable":true,"featured_image":{"id":30868732837987,"product_id":7164391260259,"position":6,"created_at":"2024-01-30T22:54:26+08:00","updated_at":"2024-01-30T22:54:26+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f441a2e457784e621c4219b94e69959bc995e42b_019bf974-384f-46f7-b2bc-2be10f84d920.webp?v=1706626466","variant_ids":[41237376106595]},"available":true,"name":"犀牛盾Clear (MagSafe 兼容) 防摔背蓋手機殼 - iPhone 14 Pro Max - 【聯名設計款】 - Look - 人在做 北極冰川在看 - Cyber Blue","public_title":"Cyber Blue","options":["Cyber Blue"],"price":135000,"weight":1350,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"MCN012630I-AF05","featured_media":{"alt":null,"id":23240122826851,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f441a2e457784e621c4219b94e69959bc995e42b_019bf974-384f-46f7-b2bc-2be10f84d920.webp?v=1706626466"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41237376041059,"title":"Ash Black","option1":"Ash Black","option2":null,"option3":null,"sku":"MCN012630G-AF05","requires_shipping":true,"taxable":true,"featured_image":{"id":30868732280931,"product_id":7164391260259,"position":5,"created_at":"2024-01-30T22:54:23+08:00","updated_at":"2024-01-30T22:54:23+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9fa272ca056872e986f8c037ebc1f1c9789c7251_b68af3f6-9314-42a8-92d2-8600d73a8731.webp?v=1706626463","variant_ids":[41237376041059]},"available":true,"name":"犀牛盾Clear (MagSafe 兼容) 防摔背蓋手機殼 - iPhone 14 Pro Max - 【聯名設計款】 - Look - 人在做 北極冰川在看 - Ash Black","public_title":"Ash Black","options":["Ash Black"],"price":135000,"weight":1350,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"MCN012630G-AF05","featured_media":{"alt":null,"id":23240122269795,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9fa272ca056872e986f8c037ebc1f1c9789c7251_b68af3f6-9314-42a8-92d2-8600d73a8731.webp?v=1706626463"}},"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: "停產" }