$product = {"id":7408503849059,"title":"犀牛盾Mod NX手機殼 - iPhone 12 mini - 【聯名設計款】 - Look - 大自然的傑作(大堡礁)","handle":"iphone-12-mini-mod-nx-printable-af11","description":null,"published_at":"2024-06-11T16:39:05+08:00","created_at":"2024-05-03T15:39:31+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"設計師MOD NX專區-Look","tags":["20%","25%","30%","35%","40%","45%","50%","b2b","brand-Apple","designer","designer-look","device-iPhone 12 mini","merge","mod-nx-printable","new-modnx-sku","reseller-modnx-look","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":41886228643939,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118424-AF11","requires_shipping":true,"taxable":true,"featured_image":{"id":31472449781859,"product_id":7408503849059,"position":11,"created_at":"2024-05-03T15:39:59+08:00","updated_at":"2024-05-03T15:39:59+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cf6e0441aa77e3a5631145062c89ffde5d5d4e1c_4412a685-078c-4cab-974e-ca471785bf31.webp?v=1714721999","variant_ids":[41886228643939]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 mini - 【聯名設計款】 - Look - 大自然的傑作(大堡礁) - Mod NX-黑色邊框","public_title":"Mod NX-黑色邊框","options":["Mod NX-黑色邊框"],"price":90000,"weight":860,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"NPB0118424-AF11","featured_media":{"alt":null,"id":23877366841443,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cf6e0441aa77e3a5631145062c89ffde5d5d4e1c_4412a685-078c-4cab-974e-ca471785bf31.webp?v=1714721999"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/08e7bbfea90c952d8faf25f4610e39e367c823de_c5d31fa0-f2f2-4702-912c-6ed479fb953e.webp?v=1714721973","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/63d785b3ab0ebfd2a1421a9c54790a9b57907ca6_8d969fdb-da30-4b78-abcb-8635c766c53f.webp?v=1714721976","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a67f52bf748feb4ae814daa60c86dbd4d7e157e5_cda3f032-e362-47f2-8c69-84cc66d2ca1b.webp?v=1714721978","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/025a635c205929b150e6e3da341c88717ee9a239_0810f5e1-439d-44ac-a8f0-2aa49b4575a5.webp?v=1714721981","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/073805984423fef93002ddefd3dcf9daaeb428b4_b32cd7bc-0e80-458a-9a0a-ffe5156ff38a.webp?v=1714721984","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/db373be94744358749ff6b17fba162573a0e6768_3deb45b1-f838-40b2-a771-0f63e70b5423.webp?v=1714721986","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/15006959229dff6abbe8740609454e2b0d0e7a04_44cb4d4e-406c-4789-9f7c-3e1fc5b4d574.webp?v=1714721989","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9458d9b0e6b187d52d621369d728a69d82984e0d_2612d41f-e865-4bac-af39-f0c4f6f31f14.webp?v=1714721991","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5bae94529e48ca6d3a08d748249e9f701c5c822e_b85f75fe-5573-4a60-b06c-9ae27d77eac5.webp?v=1714721994","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/df6750f70f0e9b34e40923ec5dea285927ea39b5_4e38593e-73b5-4e69-bc64-2a27a73ed4ec.webp?v=1714721996","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cf6e0441aa77e3a5631145062c89ffde5d5d4e1c_4412a685-078c-4cab-974e-ca471785bf31.webp?v=1714721999"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/08e7bbfea90c952d8faf25f4610e39e367c823de_c5d31fa0-f2f2-4702-912c-6ed479fb953e.webp?v=1714721973","options":["color"],"media":[{"alt":null,"id":23877360746595,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/08e7bbfea90c952d8faf25f4610e39e367c823de_c5d31fa0-f2f2-4702-912c-6ed479fb953e.webp?v=1714721973"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/08e7bbfea90c952d8faf25f4610e39e367c823de_c5d31fa0-f2f2-4702-912c-6ed479fb953e.webp?v=1714721973","width":2000},{"alt":null,"id":23877361369187,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/63d785b3ab0ebfd2a1421a9c54790a9b57907ca6_8d969fdb-da30-4b78-abcb-8635c766c53f.webp?v=1714721976"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/63d785b3ab0ebfd2a1421a9c54790a9b57907ca6_8d969fdb-da30-4b78-abcb-8635c766c53f.webp?v=1714721976","width":2000},{"alt":null,"id":23877361991779,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a67f52bf748feb4ae814daa60c86dbd4d7e157e5_cda3f032-e362-47f2-8c69-84cc66d2ca1b.webp?v=1714721978"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a67f52bf748feb4ae814daa60c86dbd4d7e157e5_cda3f032-e362-47f2-8c69-84cc66d2ca1b.webp?v=1714721978","width":2000},{"alt":null,"id":23877362581603,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/025a635c205929b150e6e3da341c88717ee9a239_0810f5e1-439d-44ac-a8f0-2aa49b4575a5.webp?v=1714721981"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/025a635c205929b150e6e3da341c88717ee9a239_0810f5e1-439d-44ac-a8f0-2aa49b4575a5.webp?v=1714721981","width":2000},{"alt":null,"id":23877363302499,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/073805984423fef93002ddefd3dcf9daaeb428b4_b32cd7bc-0e80-458a-9a0a-ffe5156ff38a.webp?v=1714721984"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/073805984423fef93002ddefd3dcf9daaeb428b4_b32cd7bc-0e80-458a-9a0a-ffe5156ff38a.webp?v=1714721984","width":2000},{"alt":null,"id":23877363957859,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/db373be94744358749ff6b17fba162573a0e6768_3deb45b1-f838-40b2-a771-0f63e70b5423.webp?v=1714721986"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/db373be94744358749ff6b17fba162573a0e6768_3deb45b1-f838-40b2-a771-0f63e70b5423.webp?v=1714721986","width":2000},{"alt":null,"id":23877364514915,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/15006959229dff6abbe8740609454e2b0d0e7a04_44cb4d4e-406c-4789-9f7c-3e1fc5b4d574.webp?v=1714721989"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/15006959229dff6abbe8740609454e2b0d0e7a04_44cb4d4e-406c-4789-9f7c-3e1fc5b4d574.webp?v=1714721989","width":2000},{"alt":null,"id":23877365104739,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9458d9b0e6b187d52d621369d728a69d82984e0d_2612d41f-e865-4bac-af39-f0c4f6f31f14.webp?v=1714721991"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9458d9b0e6b187d52d621369d728a69d82984e0d_2612d41f-e865-4bac-af39-f0c4f6f31f14.webp?v=1714721991","width":2000},{"alt":null,"id":23877365661795,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5bae94529e48ca6d3a08d748249e9f701c5c822e_b85f75fe-5573-4a60-b06c-9ae27d77eac5.webp?v=1714721994"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5bae94529e48ca6d3a08d748249e9f701c5c822e_b85f75fe-5573-4a60-b06c-9ae27d77eac5.webp?v=1714721994","width":2000},{"alt":null,"id":23877366317155,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/df6750f70f0e9b34e40923ec5dea285927ea39b5_4e38593e-73b5-4e69-bc64-2a27a73ed4ec.webp?v=1714721996"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/df6750f70f0e9b34e40923ec5dea285927ea39b5_4e38593e-73b5-4e69-bc64-2a27a73ed4ec.webp?v=1714721996","width":2000},{"alt":null,"id":23877366841443,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cf6e0441aa77e3a5631145062c89ffde5d5d4e1c_4412a685-078c-4cab-974e-ca471785bf31.webp?v=1714721999"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cf6e0441aa77e3a5631145062c89ffde5d5d4e1c_4412a685-078c-4cab-974e-ca471785bf31.webp?v=1714721999","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $bumper = null; $variants = [{"id":41886228643939,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118424-AF11","requires_shipping":true,"taxable":true,"featured_image":{"id":31472449781859,"product_id":7408503849059,"position":11,"created_at":"2024-05-03T15:39:59+08:00","updated_at":"2024-05-03T15:39:59+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cf6e0441aa77e3a5631145062c89ffde5d5d4e1c_4412a685-078c-4cab-974e-ca471785bf31.webp?v=1714721999","variant_ids":[41886228643939]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 mini - 【聯名設計款】 - Look - 大自然的傑作(大堡礁) - Mod NX-黑色邊框","public_title":"Mod NX-黑色邊框","options":["Mod NX-黑色邊框"],"price":90000,"weight":860,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"NPB0118424-AF11","featured_media":{"alt":null,"id":23877366841443,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cf6e0441aa77e3a5631145062c89ffde5d5d4e1c_4412a685-078c-4cab-974e-ca471785bf31.webp?v=1714721999"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41886228643939,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118424-AF11","requires_shipping":true,"taxable":true,"featured_image":{"id":31472449781859,"product_id":7408503849059,"position":11,"created_at":"2024-05-03T15:39:59+08:00","updated_at":"2024-05-03T15:39:59+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cf6e0441aa77e3a5631145062c89ffde5d5d4e1c_4412a685-078c-4cab-974e-ca471785bf31.webp?v=1714721999","variant_ids":[41886228643939]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 mini - 【聯名設計款】 - Look - 大自然的傑作(大堡礁) - Mod NX-黑色邊框","public_title":"Mod NX-黑色邊框","options":["Mod NX-黑色邊框"],"price":90000,"weight":860,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"NPB0118424-AF11","featured_media":{"alt":null,"id":23877366841443,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cf6e0441aa77e3a5631145062c89ffde5d5d4e1c_4412a685-078c-4cab-974e-ca471785bf31.webp?v=1714721999"}},"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: "停產" }