$product = {"id":7415980720227,"title":"犀牛盾Mod NX手機殼 - iPhone XS - 【獨家設計款】 - 兔子電腦","handle":"iphone-xs-mod-nx-printable-mw06","description":null,"published_at":"2024-06-11T16:49:32+08:00","created_at":"2024-05-06T12:36:09+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"MOD NX 客製化","tags":["20%","25%","30%","35%","40%","45%","50%","b2b","brand-Apple","designer","device-iPhone XS","discountable-item","member","merge","mod-nx-printable","new-modnx-sku","reseller","reseller-modnx-chi-po-lin-series","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":41916165914723,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0108424-MW06","requires_shipping":true,"taxable":true,"featured_image":{"id":31490898329699,"product_id":7415980720227,"position":8,"created_at":"2024-05-06T12:36:27+08:00","updated_at":"2024-05-06T12:36:27+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c336248cff58a404773b31479b9c1f004088f3c1_44396728-13de-4d3c-8d58-520e88d6c712.webp?v=1714970187","variant_ids":[41916165914723]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone XS - 【獨家設計款】 - 兔子電腦 - 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":"NPB0108424-MW06","featured_media":{"alt":null,"id":23896305336419,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c336248cff58a404773b31479b9c1f004088f3c1_44396728-13de-4d3c-8d58-520e88d6c712.webp?v=1714970187"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/406c0be2f3a8538f4c7963bb1d1888994dc90e7c_60fc488d-25d4-401d-9b85-bc464e002981.webp?v=1714970171","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/82440f5f7959c6c502e79aa17527676daec766a7_dbd76570-fe4b-48d1-87cb-8623c63da680.webp?v=1714970173","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ed06b40d9a8ff0ebe7a9c6c54722e0505716f710_702fc888-c2fa-4df0-93e4-6b5b7932d806.webp?v=1714970175","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/14f6de55e0c50112f58b1977eb46eb72b5aa898d_ef4c4545-2261-4e4c-937f-ce361ec11275.webp?v=1714970178","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/251d011ec46cbc321c7f512871118cee82cb71eb_f89818e7-4290-4cf4-b173-b9f0f292a216.webp?v=1714970180","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/feba2373eb3fce4166c4f230ae196851099f02df_6c8c56ed-24e5-4561-a6dc-b6c4d5d0907e.webp?v=1714970183","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/92d2071c2fb46e1017d388164b5e32bb7fe48d21_d54d0368-7b21-4d7c-85b8-ae8437fc572f.webp?v=1714970185","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c336248cff58a404773b31479b9c1f004088f3c1_44396728-13de-4d3c-8d58-520e88d6c712.webp?v=1714970187","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0cfc71ed585a8a9ebd68a5aa8283efc232b0fab7_23ac2fa4-9e7f-4499-abda-c6b2a0209511.webp?v=1714970190","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e7c0bbdc4481325af1fa31654757a821462efd60_135ca395-e9d6-43ab-82cd-9e8fc69ef218.webp?v=1714970192"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/406c0be2f3a8538f4c7963bb1d1888994dc90e7c_60fc488d-25d4-401d-9b85-bc464e002981.webp?v=1714970171","options":["color"],"media":[{"alt":null,"id":23896300519523,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/406c0be2f3a8538f4c7963bb1d1888994dc90e7c_60fc488d-25d4-401d-9b85-bc464e002981.webp?v=1714970171"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/406c0be2f3a8538f4c7963bb1d1888994dc90e7c_60fc488d-25d4-401d-9b85-bc464e002981.webp?v=1714970171","width":2000},{"alt":null,"id":23896300945507,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/82440f5f7959c6c502e79aa17527676daec766a7_dbd76570-fe4b-48d1-87cb-8623c63da680.webp?v=1714970173"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/82440f5f7959c6c502e79aa17527676daec766a7_dbd76570-fe4b-48d1-87cb-8623c63da680.webp?v=1714970173","width":2000},{"alt":null,"id":23896301338723,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ed06b40d9a8ff0ebe7a9c6c54722e0505716f710_702fc888-c2fa-4df0-93e4-6b5b7932d806.webp?v=1714970175"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ed06b40d9a8ff0ebe7a9c6c54722e0505716f710_702fc888-c2fa-4df0-93e4-6b5b7932d806.webp?v=1714970175","width":2000},{"alt":null,"id":23896301961315,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/14f6de55e0c50112f58b1977eb46eb72b5aa898d_ef4c4545-2261-4e4c-937f-ce361ec11275.webp?v=1714970178"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/14f6de55e0c50112f58b1977eb46eb72b5aa898d_ef4c4545-2261-4e4c-937f-ce361ec11275.webp?v=1714970178","width":2000},{"alt":null,"id":23896302420067,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/251d011ec46cbc321c7f512871118cee82cb71eb_f89818e7-4290-4cf4-b173-b9f0f292a216.webp?v=1714970180"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/251d011ec46cbc321c7f512871118cee82cb71eb_f89818e7-4290-4cf4-b173-b9f0f292a216.webp?v=1714970180","width":2000},{"alt":null,"id":23896303960163,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/feba2373eb3fce4166c4f230ae196851099f02df_6c8c56ed-24e5-4561-a6dc-b6c4d5d0907e.webp?v=1714970183"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/feba2373eb3fce4166c4f230ae196851099f02df_6c8c56ed-24e5-4561-a6dc-b6c4d5d0907e.webp?v=1714970183","width":2000},{"alt":null,"id":23896304451683,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/92d2071c2fb46e1017d388164b5e32bb7fe48d21_d54d0368-7b21-4d7c-85b8-ae8437fc572f.webp?v=1714970185"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/92d2071c2fb46e1017d388164b5e32bb7fe48d21_d54d0368-7b21-4d7c-85b8-ae8437fc572f.webp?v=1714970185","width":2000},{"alt":null,"id":23896305336419,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c336248cff58a404773b31479b9c1f004088f3c1_44396728-13de-4d3c-8d58-520e88d6c712.webp?v=1714970187"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c336248cff58a404773b31479b9c1f004088f3c1_44396728-13de-4d3c-8d58-520e88d6c712.webp?v=1714970187","width":2000},{"alt":null,"id":23896305795171,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0cfc71ed585a8a9ebd68a5aa8283efc232b0fab7_23ac2fa4-9e7f-4499-abda-c6b2a0209511.webp?v=1714970190"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0cfc71ed585a8a9ebd68a5aa8283efc232b0fab7_23ac2fa4-9e7f-4499-abda-c6b2a0209511.webp?v=1714970190","width":2000},{"alt":null,"id":23896306221155,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e7c0bbdc4481325af1fa31654757a821462efd60_135ca395-e9d6-43ab-82cd-9e8fc69ef218.webp?v=1714970192"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e7c0bbdc4481325af1fa31654757a821462efd60_135ca395-e9d6-43ab-82cd-9e8fc69ef218.webp?v=1714970192","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $bumper = null; $variants = [{"id":41916165914723,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0108424-MW06","requires_shipping":true,"taxable":true,"featured_image":{"id":31490898329699,"product_id":7415980720227,"position":8,"created_at":"2024-05-06T12:36:27+08:00","updated_at":"2024-05-06T12:36:27+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c336248cff58a404773b31479b9c1f004088f3c1_44396728-13de-4d3c-8d58-520e88d6c712.webp?v=1714970187","variant_ids":[41916165914723]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone XS - 【獨家設計款】 - 兔子電腦 - 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":"NPB0108424-MW06","featured_media":{"alt":null,"id":23896305336419,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c336248cff58a404773b31479b9c1f004088f3c1_44396728-13de-4d3c-8d58-520e88d6c712.webp?v=1714970187"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41916165914723,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0108424-MW06","requires_shipping":true,"taxable":true,"featured_image":{"id":31490898329699,"product_id":7415980720227,"position":8,"created_at":"2024-05-06T12:36:27+08:00","updated_at":"2024-05-06T12:36:27+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c336248cff58a404773b31479b9c1f004088f3c1_44396728-13de-4d3c-8d58-520e88d6c712.webp?v=1714970187","variant_ids":[41916165914723]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone XS - 【獨家設計款】 - 兔子電腦 - 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":"NPB0108424-MW06","featured_media":{"alt":null,"id":23896305336419,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c336248cff58a404773b31479b9c1f004088f3c1_44396728-13de-4d3c-8d58-520e88d6c712.webp?v=1714970187"}},"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: "停產" }