$product = {"id":7415971151971,"title":"犀牛盾Mod NX手機殼 - iPhone XS - 【聯名設計款】 - Batman - 小丑女與小丑","handle":"iphone-xs-mod-nx-printable-sb18","description":null,"published_at":"2024-06-11T16:49:17+08:00","created_at":"2024-05-06T12:34:25+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"設計師MOD NX專區-Batman","tags":["20%","25%","30%","35%","40%","45%","50%","b2b","brand-Apple","designer","designer-batman","device-iPhone XS","merge","mod-nx-printable","new-modnx-sku","reseller-modnx-batman","Top50","type-Mod NX Printable"],"price":90000,"price_min":90000,"price_max":90000,"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":41916070494307,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0108424-SB18","requires_shipping":true,"taxable":true,"featured_image":{"id":31490871001187,"product_id":7415971151971,"position":7,"created_at":"2024-05-06T12:34:41+08:00","updated_at":"2024-05-06T12:34:41+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/198d75e1ed9bab3b5bb96cfd5eea43e0729d95a1_c980f19d-dbbc-40eb-9215-6a6471660ed8.webp?v=1714970081","variant_ids":[41916070494307]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone XS - 【聯名設計款】 - Batman - 小丑女與小丑 - Mod NX-黑色邊框","public_title":"Mod NX-黑色邊框","options":["Mod NX-黑色邊框"],"price":90000,"weight":980,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"NPB0108424-SB18","featured_media":{"alt":null,"id":23896278007907,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/198d75e1ed9bab3b5bb96cfd5eea43e0729d95a1_c980f19d-dbbc-40eb-9215-6a6471660ed8.webp?v=1714970081"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/71b8c3c8e98e85d5f91e6d1b24a49760c3e6adbe_64d97fb3-dcf3-4ef8-a1be-57d5f30d28ff.webp?v=1714970067","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f723a8e9abf9a60d264800cafed051e7299bc3be_955fb307-92e2-427c-9d1d-ea5775b6def4.webp?v=1714970070","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/845a398b8a53b21d74689134c2d7170a001f2ae6_f6aa602c-95a6-4886-996e-c6d66702a00e.webp?v=1714970072","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ac0510ebec9ab807847bc043aa6181d944d872c2_84c80715-cf38-4037-97fe-0fdf9819d522.webp?v=1714970074","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e0c3b745c0189590ba4d89a35d63383296b32958_f54e5b5c-32b3-40e8-856b-06a9c8082931.webp?v=1714970077","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/498c707e270a6618f1018a37343ac1069d28f7e2_92dc49b1-a692-4e24-95ad-a7c1205f2586.webp?v=1714970079","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/198d75e1ed9bab3b5bb96cfd5eea43e0729d95a1_c980f19d-dbbc-40eb-9215-6a6471660ed8.webp?v=1714970081","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/deacb51b16adec9dff98a92d28f3c982c9b7f581_55ef94a5-5f6b-4f95-baf3-b5749cb2101f.webp?v=1714970084","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/351cec71f05fc04491c33e42ec6c71b8a9ed28a9_95d2fbda-5eb6-4d54-8f5f-5f5748d2a0f4.webp?v=1714970086","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/083786b5deb22f9d1e6f2dff4f7c115a03a1e32d_2c99983f-7836-4957-b1e2-de38b85ad0c4.webp?v=1714970088"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/71b8c3c8e98e85d5f91e6d1b24a49760c3e6adbe_64d97fb3-dcf3-4ef8-a1be-57d5f30d28ff.webp?v=1714970067","options":["color"],"media":[{"alt":null,"id":23896274960483,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/71b8c3c8e98e85d5f91e6d1b24a49760c3e6adbe_64d97fb3-dcf3-4ef8-a1be-57d5f30d28ff.webp?v=1714970067"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/71b8c3c8e98e85d5f91e6d1b24a49760c3e6adbe_64d97fb3-dcf3-4ef8-a1be-57d5f30d28ff.webp?v=1714970067","width":2000},{"alt":null,"id":23896275452003,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f723a8e9abf9a60d264800cafed051e7299bc3be_955fb307-92e2-427c-9d1d-ea5775b6def4.webp?v=1714970070"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f723a8e9abf9a60d264800cafed051e7299bc3be_955fb307-92e2-427c-9d1d-ea5775b6def4.webp?v=1714970070","width":2000},{"alt":null,"id":23896275910755,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/845a398b8a53b21d74689134c2d7170a001f2ae6_f6aa602c-95a6-4886-996e-c6d66702a00e.webp?v=1714970072"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/845a398b8a53b21d74689134c2d7170a001f2ae6_f6aa602c-95a6-4886-996e-c6d66702a00e.webp?v=1714970072","width":2000},{"alt":null,"id":23896276402275,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ac0510ebec9ab807847bc043aa6181d944d872c2_84c80715-cf38-4037-97fe-0fdf9819d522.webp?v=1714970074"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ac0510ebec9ab807847bc043aa6181d944d872c2_84c80715-cf38-4037-97fe-0fdf9819d522.webp?v=1714970074","width":2000},{"alt":null,"id":23896276729955,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e0c3b745c0189590ba4d89a35d63383296b32958_f54e5b5c-32b3-40e8-856b-06a9c8082931.webp?v=1714970077"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e0c3b745c0189590ba4d89a35d63383296b32958_f54e5b5c-32b3-40e8-856b-06a9c8082931.webp?v=1714970077","width":2000},{"alt":null,"id":23896277516387,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/498c707e270a6618f1018a37343ac1069d28f7e2_92dc49b1-a692-4e24-95ad-a7c1205f2586.webp?v=1714970079"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/498c707e270a6618f1018a37343ac1069d28f7e2_92dc49b1-a692-4e24-95ad-a7c1205f2586.webp?v=1714970079","width":2000},{"alt":null,"id":23896278007907,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/198d75e1ed9bab3b5bb96cfd5eea43e0729d95a1_c980f19d-dbbc-40eb-9215-6a6471660ed8.webp?v=1714970081"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/198d75e1ed9bab3b5bb96cfd5eea43e0729d95a1_c980f19d-dbbc-40eb-9215-6a6471660ed8.webp?v=1714970081","width":2000},{"alt":null,"id":23896278401123,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/deacb51b16adec9dff98a92d28f3c982c9b7f581_55ef94a5-5f6b-4f95-baf3-b5749cb2101f.webp?v=1714970084"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/deacb51b16adec9dff98a92d28f3c982c9b7f581_55ef94a5-5f6b-4f95-baf3-b5749cb2101f.webp?v=1714970084","width":2000},{"alt":null,"id":23896278794339,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/351cec71f05fc04491c33e42ec6c71b8a9ed28a9_95d2fbda-5eb6-4d54-8f5f-5f5748d2a0f4.webp?v=1714970086"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/351cec71f05fc04491c33e42ec6c71b8a9ed28a9_95d2fbda-5eb6-4d54-8f5f-5f5748d2a0f4.webp?v=1714970086","width":2000},{"alt":null,"id":23896279416931,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/083786b5deb22f9d1e6f2dff4f7c115a03a1e32d_2c99983f-7836-4957-b1e2-de38b85ad0c4.webp?v=1714970088"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/083786b5deb22f9d1e6f2dff4f7c115a03a1e32d_2c99983f-7836-4957-b1e2-de38b85ad0c4.webp?v=1714970088","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $bumper = null; $variants = [{"id":41916070494307,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0108424-SB18","requires_shipping":true,"taxable":true,"featured_image":{"id":31490871001187,"product_id":7415971151971,"position":7,"created_at":"2024-05-06T12:34:41+08:00","updated_at":"2024-05-06T12:34:41+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/198d75e1ed9bab3b5bb96cfd5eea43e0729d95a1_c980f19d-dbbc-40eb-9215-6a6471660ed8.webp?v=1714970081","variant_ids":[41916070494307]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone XS - 【聯名設計款】 - Batman - 小丑女與小丑 - Mod NX-黑色邊框","public_title":"Mod NX-黑色邊框","options":["Mod NX-黑色邊框"],"price":90000,"weight":980,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"NPB0108424-SB18","featured_media":{"alt":null,"id":23896278007907,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/198d75e1ed9bab3b5bb96cfd5eea43e0729d95a1_c980f19d-dbbc-40eb-9215-6a6471660ed8.webp?v=1714970081"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41916070494307,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0108424-SB18","requires_shipping":true,"taxable":true,"featured_image":{"id":31490871001187,"product_id":7415971151971,"position":7,"created_at":"2024-05-06T12:34:41+08:00","updated_at":"2024-05-06T12:34:41+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/198d75e1ed9bab3b5bb96cfd5eea43e0729d95a1_c980f19d-dbbc-40eb-9215-6a6471660ed8.webp?v=1714970081","variant_ids":[41916070494307]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone XS - 【聯名設計款】 - Batman - 小丑女與小丑 - Mod NX-黑色邊框","public_title":"Mod NX-黑色邊框","options":["Mod NX-黑色邊框"],"price":90000,"weight":980,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"NPB0108424-SB18","featured_media":{"alt":null,"id":23896278007907,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/198d75e1ed9bab3b5bb96cfd5eea43e0729d95a1_c980f19d-dbbc-40eb-9215-6a6471660ed8.webp?v=1714970081"}},"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: "停產" }