$product = {"id":7416189780067,"title":"犀牛盾Mod NX手機殼 - iPhone X - 【聯名設計款】 - Look - 大自然的傑作(大堡礁)","handle":"iphone-x-mod-nx-printable-af11","description":null,"published_at":"2024-06-11T16:52:57+08:00","created_at":"2024-05-06T14:08:10+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 X","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":41917866704995,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0106424-AF11","requires_shipping":true,"taxable":true,"featured_image":{"id":31491606216803,"product_id":7416189780067,"position":9,"created_at":"2024-05-06T14:08:31+08:00","updated_at":"2024-05-06T14:08:31+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4f9a4b752f0d770960f8c0c249e01888e8b1bcdc_229ed7a5-7275-4dbe-9480-38d273e8132a.webp?v=1714975711","variant_ids":[41917866704995]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone X - 【聯名設計款】 - 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":"NPB0106424-AF11","featured_media":{"alt":null,"id":23897018204259,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4f9a4b752f0d770960f8c0c249e01888e8b1bcdc_229ed7a5-7275-4dbe-9480-38d273e8132a.webp?v=1714975711"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/df1ecdcaddda30f25f6dfdd778b9f8ef2f0f2583_ebd4635e-6251-4e2e-870a-261318e24243.webp?v=1714975692","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fb9b6dace186eb61b4649e725a73192691f5e45f_41eccde8-0c40-46ca-8a10-f1c7dcd3f11c.webp?v=1714975695","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7748e96c81b9b3b3a3b52ed4897d156d9a8b5a4c_52fda46d-0062-4221-9a46-82228f5aa33e.webp?v=1714975697","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9a727f4ae2e97d51f7cb4afeed6d508f27dd4515_ac88bb61-dbb6-4c9a-88a8-ff96319ecb3b.webp?v=1714975699","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f6eda98c666d6cf82a8e0af07076b4b045bc8f2c_c1af0a6e-9b5f-471a-9e3e-8b39151e1f9e.webp?v=1714975702","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/82e149e148359a86e4a93fb838de9e3ba84c760f_498fc437-2334-4a03-a985-c347477aeb85.webp?v=1714975704","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3e92b0fa6d24cd9ec88a6c61dbba3291e98b6cae_803e5b49-2099-4201-a236-c8f55b817a81.webp?v=1714975707","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f5b819c2ef046eb383800d3aeca85883650cd68e_90561d3f-5b08-4168-8c75-a4b22d898998.webp?v=1714975709","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4f9a4b752f0d770960f8c0c249e01888e8b1bcdc_229ed7a5-7275-4dbe-9480-38d273e8132a.webp?v=1714975711","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/76f58c00fda4f857633293a9eea16e159cb31fcd_bcabffc1-24cd-4278-afa4-89cf731e907c.webp?v=1714975714"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/df1ecdcaddda30f25f6dfdd778b9f8ef2f0f2583_ebd4635e-6251-4e2e-870a-261318e24243.webp?v=1714975692","options":["color"],"media":[{"alt":null,"id":23897013649507,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/df1ecdcaddda30f25f6dfdd778b9f8ef2f0f2583_ebd4635e-6251-4e2e-870a-261318e24243.webp?v=1714975692"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/df1ecdcaddda30f25f6dfdd778b9f8ef2f0f2583_ebd4635e-6251-4e2e-870a-261318e24243.webp?v=1714975692","width":2000},{"alt":null,"id":23897014075491,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fb9b6dace186eb61b4649e725a73192691f5e45f_41eccde8-0c40-46ca-8a10-f1c7dcd3f11c.webp?v=1714975695"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fb9b6dace186eb61b4649e725a73192691f5e45f_41eccde8-0c40-46ca-8a10-f1c7dcd3f11c.webp?v=1714975695","width":2000},{"alt":null,"id":23897014665315,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7748e96c81b9b3b3a3b52ed4897d156d9a8b5a4c_52fda46d-0062-4221-9a46-82228f5aa33e.webp?v=1714975697"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7748e96c81b9b3b3a3b52ed4897d156d9a8b5a4c_52fda46d-0062-4221-9a46-82228f5aa33e.webp?v=1714975697","width":2000},{"alt":null,"id":23897015255139,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9a727f4ae2e97d51f7cb4afeed6d508f27dd4515_ac88bb61-dbb6-4c9a-88a8-ff96319ecb3b.webp?v=1714975699"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9a727f4ae2e97d51f7cb4afeed6d508f27dd4515_ac88bb61-dbb6-4c9a-88a8-ff96319ecb3b.webp?v=1714975699","width":2000},{"alt":null,"id":23897015713891,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f6eda98c666d6cf82a8e0af07076b4b045bc8f2c_c1af0a6e-9b5f-471a-9e3e-8b39151e1f9e.webp?v=1714975702"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f6eda98c666d6cf82a8e0af07076b4b045bc8f2c_c1af0a6e-9b5f-471a-9e3e-8b39151e1f9e.webp?v=1714975702","width":2000},{"alt":null,"id":23897016402019,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/82e149e148359a86e4a93fb838de9e3ba84c760f_498fc437-2334-4a03-a985-c347477aeb85.webp?v=1714975704"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/82e149e148359a86e4a93fb838de9e3ba84c760f_498fc437-2334-4a03-a985-c347477aeb85.webp?v=1714975704","width":2000},{"alt":null,"id":23897016959075,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3e92b0fa6d24cd9ec88a6c61dbba3291e98b6cae_803e5b49-2099-4201-a236-c8f55b817a81.webp?v=1714975707"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3e92b0fa6d24cd9ec88a6c61dbba3291e98b6cae_803e5b49-2099-4201-a236-c8f55b817a81.webp?v=1714975707","width":2000},{"alt":null,"id":23897017581667,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f5b819c2ef046eb383800d3aeca85883650cd68e_90561d3f-5b08-4168-8c75-a4b22d898998.webp?v=1714975709"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f5b819c2ef046eb383800d3aeca85883650cd68e_90561d3f-5b08-4168-8c75-a4b22d898998.webp?v=1714975709","width":2000},{"alt":null,"id":23897018204259,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4f9a4b752f0d770960f8c0c249e01888e8b1bcdc_229ed7a5-7275-4dbe-9480-38d273e8132a.webp?v=1714975711"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4f9a4b752f0d770960f8c0c249e01888e8b1bcdc_229ed7a5-7275-4dbe-9480-38d273e8132a.webp?v=1714975711","width":2000},{"alt":null,"id":23897018826851,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/76f58c00fda4f857633293a9eea16e159cb31fcd_bcabffc1-24cd-4278-afa4-89cf731e907c.webp?v=1714975714"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/76f58c00fda4f857633293a9eea16e159cb31fcd_bcabffc1-24cd-4278-afa4-89cf731e907c.webp?v=1714975714","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $bumper = null; $variants = [{"id":41917866704995,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0106424-AF11","requires_shipping":true,"taxable":true,"featured_image":{"id":31491606216803,"product_id":7416189780067,"position":9,"created_at":"2024-05-06T14:08:31+08:00","updated_at":"2024-05-06T14:08:31+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4f9a4b752f0d770960f8c0c249e01888e8b1bcdc_229ed7a5-7275-4dbe-9480-38d273e8132a.webp?v=1714975711","variant_ids":[41917866704995]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone X - 【聯名設計款】 - 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":"NPB0106424-AF11","featured_media":{"alt":null,"id":23897018204259,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4f9a4b752f0d770960f8c0c249e01888e8b1bcdc_229ed7a5-7275-4dbe-9480-38d273e8132a.webp?v=1714975711"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41917866704995,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0106424-AF11","requires_shipping":true,"taxable":true,"featured_image":{"id":31491606216803,"product_id":7416189780067,"position":9,"created_at":"2024-05-06T14:08:31+08:00","updated_at":"2024-05-06T14:08:31+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4f9a4b752f0d770960f8c0c249e01888e8b1bcdc_229ed7a5-7275-4dbe-9480-38d273e8132a.webp?v=1714975711","variant_ids":[41917866704995]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone X - 【聯名設計款】 - 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":"NPB0106424-AF11","featured_media":{"alt":null,"id":23897018204259,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4f9a4b752f0d770960f8c0c249e01888e8b1bcdc_229ed7a5-7275-4dbe-9480-38d273e8132a.webp?v=1714975711"}},"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: "停產" }