$product = {"id":7369135030371,"title":"犀牛盾Mod NX手機殼 - iPhone 12 Pro Max - 【聯名設計款】 - Snoopy 史努比 - 愛心墨鏡","handle":"iphone-12-pro-max-mod-nx-printable-pl64","description":null,"published_at":"2024-06-11T16:13:01+08:00","created_at":"2024-04-23T15:31:34+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"設計師MOD NX專區-Snoopy 史努比","tags":["20%","25%","30%","35%","40%","45%","50%","b2b","brand-Apple","designer","designer-snoopy","device-iPhone 12 pro max","merge","mod-nx-printable","new-modnx-sku","reseller-modnx-snoopy","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":41792909574243,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118724-PL64","requires_shipping":true,"taxable":true,"featured_image":{"id":31386881851491,"product_id":7369135030371,"position":8,"created_at":"2024-04-23T15:31:54+08:00","updated_at":"2024-04-23T15:31:54+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e201cc1d596f84f7e19f1ab369d35120e4436e8f_8fda0b5d-4005-49cb-8064-82ee42ac5159.webp?v=1713857514","variant_ids":[41792909574243]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 Pro Max - 【聯名設計款】 - Snoopy 史努比 - 愛心墨鏡 - 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":"NPB0118724-PL64","featured_media":{"alt":null,"id":23789119733859,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e201cc1d596f84f7e19f1ab369d35120e4436e8f_8fda0b5d-4005-49cb-8064-82ee42ac5159.webp?v=1713857514"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a15e2a795a20eb30b973d5c2680b6f2b874677b9_51555129-360b-466b-beb5-6f3c339a7cd7.webp?v=1713857496","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3a6d6530e25734c069d1f0a203316e537048703b_5f1c98ad-391e-4ebe-a825-9f19b3448f25.webp?v=1713857499","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e780cc7701dddaacec121b3dc9587acf27561839_f857b2c0-0f10-4a7a-85ac-0a22c7f76b44.webp?v=1713857501","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a33208b088f7d1df7e76de77fb6ea783633505bf_55ffbdf0-e982-43cb-8782-03d42e2cf475.webp?v=1713857505","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/da832b1a661f2fc74d709a21744b377ecadd4c88_f15c8e17-b63a-413a-b390-099fb16fb3d8.webp?v=1713857507","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/12a812982adea80178830d9de9553f73758751d7_796009f2-91e5-48bb-a2e2-eed2e45aab3d.webp?v=1713857510","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7a856d59a97e3b0bb1880bd396cc6448349268f2_6f97c923-0eaa-4a97-8cf1-27fdfcba69b5.webp?v=1713857512","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e201cc1d596f84f7e19f1ab369d35120e4436e8f_8fda0b5d-4005-49cb-8064-82ee42ac5159.webp?v=1713857514","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3017abba5d5a39fd83749f806004d7669ca40240_dea2e5ac-c1f3-4071-8f5a-2bdd2ec00cc6.webp?v=1713857517","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/72ed225aaec6fbf3fa970388ccfcc91f48b4299d_dda40ef9-3867-4ca7-ab68-cdd31b0a90ee.webp?v=1713857519"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a15e2a795a20eb30b973d5c2680b6f2b874677b9_51555129-360b-466b-beb5-6f3c339a7cd7.webp?v=1713857496","options":["color"],"media":[{"alt":null,"id":23789115015267,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a15e2a795a20eb30b973d5c2680b6f2b874677b9_51555129-360b-466b-beb5-6f3c339a7cd7.webp?v=1713857496"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a15e2a795a20eb30b973d5c2680b6f2b874677b9_51555129-360b-466b-beb5-6f3c339a7cd7.webp?v=1713857496","width":2000},{"alt":null,"id":23789115539555,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3a6d6530e25734c069d1f0a203316e537048703b_5f1c98ad-391e-4ebe-a825-9f19b3448f25.webp?v=1713857499"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3a6d6530e25734c069d1f0a203316e537048703b_5f1c98ad-391e-4ebe-a825-9f19b3448f25.webp?v=1713857499","width":2000},{"alt":null,"id":23789116096611,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e780cc7701dddaacec121b3dc9587acf27561839_f857b2c0-0f10-4a7a-85ac-0a22c7f76b44.webp?v=1713857501"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e780cc7701dddaacec121b3dc9587acf27561839_f857b2c0-0f10-4a7a-85ac-0a22c7f76b44.webp?v=1713857501","width":2000},{"alt":null,"id":23789116883043,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a33208b088f7d1df7e76de77fb6ea783633505bf_55ffbdf0-e982-43cb-8782-03d42e2cf475.webp?v=1713857505"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a33208b088f7d1df7e76de77fb6ea783633505bf_55ffbdf0-e982-43cb-8782-03d42e2cf475.webp?v=1713857505","width":2000},{"alt":null,"id":23789117571171,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/da832b1a661f2fc74d709a21744b377ecadd4c88_f15c8e17-b63a-413a-b390-099fb16fb3d8.webp?v=1713857507"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/da832b1a661f2fc74d709a21744b377ecadd4c88_f15c8e17-b63a-413a-b390-099fb16fb3d8.webp?v=1713857507","width":2000},{"alt":null,"id":23789118193763,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/12a812982adea80178830d9de9553f73758751d7_796009f2-91e5-48bb-a2e2-eed2e45aab3d.webp?v=1713857510"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/12a812982adea80178830d9de9553f73758751d7_796009f2-91e5-48bb-a2e2-eed2e45aab3d.webp?v=1713857510","width":2000},{"alt":null,"id":23789118980195,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7a856d59a97e3b0bb1880bd396cc6448349268f2_6f97c923-0eaa-4a97-8cf1-27fdfcba69b5.webp?v=1713857512"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7a856d59a97e3b0bb1880bd396cc6448349268f2_6f97c923-0eaa-4a97-8cf1-27fdfcba69b5.webp?v=1713857512","width":2000},{"alt":null,"id":23789119733859,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e201cc1d596f84f7e19f1ab369d35120e4436e8f_8fda0b5d-4005-49cb-8064-82ee42ac5159.webp?v=1713857514"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e201cc1d596f84f7e19f1ab369d35120e4436e8f_8fda0b5d-4005-49cb-8064-82ee42ac5159.webp?v=1713857514","width":2000},{"alt":null,"id":23789120454755,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3017abba5d5a39fd83749f806004d7669ca40240_dea2e5ac-c1f3-4071-8f5a-2bdd2ec00cc6.webp?v=1713857517"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3017abba5d5a39fd83749f806004d7669ca40240_dea2e5ac-c1f3-4071-8f5a-2bdd2ec00cc6.webp?v=1713857517","width":2000},{"alt":null,"id":23789121077347,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/72ed225aaec6fbf3fa970388ccfcc91f48b4299d_dda40ef9-3867-4ca7-ab68-cdd31b0a90ee.webp?v=1713857519"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/72ed225aaec6fbf3fa970388ccfcc91f48b4299d_dda40ef9-3867-4ca7-ab68-cdd31b0a90ee.webp?v=1713857519","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $bumper = null; $variants = [{"id":41792909574243,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118724-PL64","requires_shipping":true,"taxable":true,"featured_image":{"id":31386881851491,"product_id":7369135030371,"position":8,"created_at":"2024-04-23T15:31:54+08:00","updated_at":"2024-04-23T15:31:54+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e201cc1d596f84f7e19f1ab369d35120e4436e8f_8fda0b5d-4005-49cb-8064-82ee42ac5159.webp?v=1713857514","variant_ids":[41792909574243]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 Pro Max - 【聯名設計款】 - Snoopy 史努比 - 愛心墨鏡 - 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":"NPB0118724-PL64","featured_media":{"alt":null,"id":23789119733859,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e201cc1d596f84f7e19f1ab369d35120e4436e8f_8fda0b5d-4005-49cb-8064-82ee42ac5159.webp?v=1713857514"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41792909574243,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118724-PL64","requires_shipping":true,"taxable":true,"featured_image":{"id":31386881851491,"product_id":7369135030371,"position":8,"created_at":"2024-04-23T15:31:54+08:00","updated_at":"2024-04-23T15:31:54+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e201cc1d596f84f7e19f1ab369d35120e4436e8f_8fda0b5d-4005-49cb-8064-82ee42ac5159.webp?v=1713857514","variant_ids":[41792909574243]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 Pro Max - 【聯名設計款】 - Snoopy 史努比 - 愛心墨鏡 - 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":"NPB0118724-PL64","featured_media":{"alt":null,"id":23789119733859,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e201cc1d596f84f7e19f1ab369d35120e4436e8f_8fda0b5d-4005-49cb-8064-82ee42ac5159.webp?v=1713857514"}},"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: "停產" }