$product = {"id":7415022649443,"title":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - 史迪奇 - 經典系列-Aloha!","handle":"iphone-12-mini-mod-nx-magsafe-printable-yf08","description":null,"published_at":"2024-06-11T17:55:53+08:00","created_at":"2024-05-05T20:08:15+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"設計師MOD NX MagSafe專區史迪奇","tags":["20%","25%","30%","35%","40%","45%","50%","b2b","brand-Apple","designer","designer-stitch","device-iPhone 12 mini","merge","mod-nx-magsafe-printable","new-modnx-sku","reseller-modnx-magsafe-stitch","Top50","type-Mod NX Printable MagSafe Printable"],"price":110000,"price_min":110000,"price_max":110000,"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":41911042211939,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118424-YF08","requires_shipping":true,"taxable":true,"featured_image":{"id":31487952191587,"product_id":7415022649443,"position":4,"created_at":"2024-05-05T20:08:26+08:00","updated_at":"2024-05-05T20:08:26+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7ac94c41485ff7f6e70c75cc55c4a1156875ef4c_62b14e7d-5b7a-4940-aed4-090de05afb9c.webp?v=1714910906","variant_ids":[41911042211939]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - 史迪奇 - 經典系列-Aloha! - Mod NX-黑色邊框","public_title":"Mod NX-黑色邊框","options":["Mod NX-黑色邊框"],"price":110000,"weight":1500,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"MPB0118424-YF08","featured_media":{"alt":null,"id":23893296513123,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7ac94c41485ff7f6e70c75cc55c4a1156875ef4c_62b14e7d-5b7a-4940-aed4-090de05afb9c.webp?v=1714910906"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a91e576165480fa72fb22800fd8b7be6bd3f1932_5129ef56-d0ee-4fae-86e8-5f88c59ed372.webp?v=1714910898","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b806b9e078efa05ba3018cc48d3c0c61d97bf285_24f9246b-d401-4969-9812-8da2a79365fd.webp?v=1714910900","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b56aad6e1ded25de35fb23edb99865110da7ed36_99d973ee-1dd0-4630-875e-de9ade329da5.webp?v=1714910903","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7ac94c41485ff7f6e70c75cc55c4a1156875ef4c_62b14e7d-5b7a-4940-aed4-090de05afb9c.webp?v=1714910906","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2653cd462c9665d42bbde10feb0aa47c195222cf_82b9b176-0d08-48a8-9e26-0dcbc62c8387.webp?v=1714910908","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ba238f6ac35d5b4fdbcd7992f5a4383aac23aba7_771c7f49-ce40-4e5f-b165-ad1c0de02a01.webp?v=1714910910","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b4e9a1b9403875d6090236435d1a8f3cd2b3dac8_05ea4c4a-d6c1-4242-985e-2a3f9da57cba.webp?v=1714910913","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/88d787f4533b1f995c3dbd9b7e928126dbfbc073_f9266505-fb30-483c-a286-45cce32ce95c.webp?v=1714910915","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/acd20e1122ecc0168541d4045067a5e37d6df2f3_87673aec-b15b-4f3b-b2dd-1a906281ec6d.webp?v=1714910917","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a6e8d0d69bff92cdc57884a9b9e856401207051b_2f0d44e6-4e53-4dff-9465-2ecf40cc90cc.webp?v=1714910920","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1990f7e1192b6a54d58209144aa49e30d0429787_64052101-da63-41ce-8208-0791536419fa.webp?v=1714910922"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a91e576165480fa72fb22800fd8b7be6bd3f1932_5129ef56-d0ee-4fae-86e8-5f88c59ed372.webp?v=1714910898","options":["color"],"media":[{"alt":null,"id":23893294284899,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a91e576165480fa72fb22800fd8b7be6bd3f1932_5129ef56-d0ee-4fae-86e8-5f88c59ed372.webp?v=1714910898"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a91e576165480fa72fb22800fd8b7be6bd3f1932_5129ef56-d0ee-4fae-86e8-5f88c59ed372.webp?v=1714910898","width":2000},{"alt":null,"id":23893295399011,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b806b9e078efa05ba3018cc48d3c0c61d97bf285_24f9246b-d401-4969-9812-8da2a79365fd.webp?v=1714910900"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b806b9e078efa05ba3018cc48d3c0c61d97bf285_24f9246b-d401-4969-9812-8da2a79365fd.webp?v=1714910900","width":2000},{"alt":null,"id":23893295923299,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b56aad6e1ded25de35fb23edb99865110da7ed36_99d973ee-1dd0-4630-875e-de9ade329da5.webp?v=1714910903"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b56aad6e1ded25de35fb23edb99865110da7ed36_99d973ee-1dd0-4630-875e-de9ade329da5.webp?v=1714910903","width":2000},{"alt":null,"id":23893296513123,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7ac94c41485ff7f6e70c75cc55c4a1156875ef4c_62b14e7d-5b7a-4940-aed4-090de05afb9c.webp?v=1714910906"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7ac94c41485ff7f6e70c75cc55c4a1156875ef4c_62b14e7d-5b7a-4940-aed4-090de05afb9c.webp?v=1714910906","width":2000},{"alt":null,"id":23893296971875,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2653cd462c9665d42bbde10feb0aa47c195222cf_82b9b176-0d08-48a8-9e26-0dcbc62c8387.webp?v=1714910908"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2653cd462c9665d42bbde10feb0aa47c195222cf_82b9b176-0d08-48a8-9e26-0dcbc62c8387.webp?v=1714910908","width":2000},{"alt":null,"id":23893297365091,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ba238f6ac35d5b4fdbcd7992f5a4383aac23aba7_771c7f49-ce40-4e5f-b165-ad1c0de02a01.webp?v=1714910910"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ba238f6ac35d5b4fdbcd7992f5a4383aac23aba7_771c7f49-ce40-4e5f-b165-ad1c0de02a01.webp?v=1714910910","width":2000},{"alt":null,"id":23893297823843,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b4e9a1b9403875d6090236435d1a8f3cd2b3dac8_05ea4c4a-d6c1-4242-985e-2a3f9da57cba.webp?v=1714910913"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b4e9a1b9403875d6090236435d1a8f3cd2b3dac8_05ea4c4a-d6c1-4242-985e-2a3f9da57cba.webp?v=1714910913","width":2000},{"alt":null,"id":23893298544739,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/88d787f4533b1f995c3dbd9b7e928126dbfbc073_f9266505-fb30-483c-a286-45cce32ce95c.webp?v=1714910915"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/88d787f4533b1f995c3dbd9b7e928126dbfbc073_f9266505-fb30-483c-a286-45cce32ce95c.webp?v=1714910915","width":2000},{"alt":null,"id":23893298970723,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/acd20e1122ecc0168541d4045067a5e37d6df2f3_87673aec-b15b-4f3b-b2dd-1a906281ec6d.webp?v=1714910917"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/acd20e1122ecc0168541d4045067a5e37d6df2f3_87673aec-b15b-4f3b-b2dd-1a906281ec6d.webp?v=1714910917","width":2000},{"alt":null,"id":23893299691619,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a6e8d0d69bff92cdc57884a9b9e856401207051b_2f0d44e6-4e53-4dff-9465-2ecf40cc90cc.webp?v=1714910920"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a6e8d0d69bff92cdc57884a9b9e856401207051b_2f0d44e6-4e53-4dff-9465-2ecf40cc90cc.webp?v=1714910920","width":2000},{"alt":null,"id":23893300150371,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1990f7e1192b6a54d58209144aa49e30d0429787_64052101-da63-41ce-8208-0791536419fa.webp?v=1714910922"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1990f7e1192b6a54d58209144aa49e30d0429787_64052101-da63-41ce-8208-0791536419fa.webp?v=1714910922","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41911042211939,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118424-YF08","requires_shipping":true,"taxable":true,"featured_image":{"id":31487952191587,"product_id":7415022649443,"position":4,"created_at":"2024-05-05T20:08:26+08:00","updated_at":"2024-05-05T20:08:26+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7ac94c41485ff7f6e70c75cc55c4a1156875ef4c_62b14e7d-5b7a-4940-aed4-090de05afb9c.webp?v=1714910906","variant_ids":[41911042211939]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - 史迪奇 - 經典系列-Aloha! - Mod NX-黑色邊框","public_title":"Mod NX-黑色邊框","options":["Mod NX-黑色邊框"],"price":110000,"weight":1500,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"MPB0118424-YF08","featured_media":{"alt":null,"id":23893296513123,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7ac94c41485ff7f6e70c75cc55c4a1156875ef4c_62b14e7d-5b7a-4940-aed4-090de05afb9c.webp?v=1714910906"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41911042211939,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118424-YF08","requires_shipping":true,"taxable":true,"featured_image":{"id":31487952191587,"product_id":7415022649443,"position":4,"created_at":"2024-05-05T20:08:26+08:00","updated_at":"2024-05-05T20:08:26+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7ac94c41485ff7f6e70c75cc55c4a1156875ef4c_62b14e7d-5b7a-4940-aed4-090de05afb9c.webp?v=1714910906","variant_ids":[41911042211939]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - 史迪奇 - 經典系列-Aloha! - Mod NX-黑色邊框","public_title":"Mod NX-黑色邊框","options":["Mod NX-黑色邊框"],"price":110000,"weight":1500,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"MPB0118424-YF08","featured_media":{"alt":null,"id":23893296513123,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7ac94c41485ff7f6e70c75cc55c4a1156875ef4c_62b14e7d-5b7a-4940-aed4-090de05afb9c.webp?v=1714910906"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}; $device_handle = null; $type = ""; var sellingStatus if ($isMerge) { $(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: "停產" }