$product = {"id":7416007000163,"title":"犀牛盾Mod NX手機殼 - iPhone XS Max - 【聯名設計款】 - 1G - 左看看","handle":"iphone-xs-max-mod-nx-printable-iv05","description":null,"published_at":"2024-06-11T16:50:15+08:00","created_at":"2024-05-06T12:41:10+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"設計師MOD NX專區-1G","tags":["20%","25%","30%","35%","40%","45%","50%","b2b","brand-Apple","designer","designer-1chun","device-iPhone XS Max","merge","mod-nx-printable","new-modnx-sku","reseller-modnx-1chun","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":41916446507107,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0108624-IV05","requires_shipping":true,"taxable":true,"featured_image":{"id":31490972975203,"product_id":7416007000163,"position":8,"created_at":"2024-05-06T12:41:28+08:00","updated_at":"2024-05-06T12:41:28+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/84229715d93ec3619780e9f25573162361a67d81_72e37485-8c38-4042-bdfd-541a71c9bfaf.webp?v=1714970488","variant_ids":[41916446507107]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone XS Max - 【聯名設計款】 - 1G - 左看看 - 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":"NPB0108624-IV05","featured_media":{"alt":null,"id":23896380178531,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/84229715d93ec3619780e9f25573162361a67d81_72e37485-8c38-4042-bdfd-541a71c9bfaf.webp?v=1714970488"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a25abead11adfacb0a7950a7c52aa93f813e966f_f7f90755-38e1-4cb4-953d-28fd3c707841.webp?v=1714970472","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/53446375a43426a6c3d102d332aa53afc3c3e9f7_138151a7-5042-4fc3-8597-b12db2957522.webp?v=1714970474","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/51ddb5c6e0a3d8bad1d29d285fa1c85b49346be6_3774defd-ccc3-470a-903e-8770f23f9bdb.webp?v=1714970477","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5528547dc9ca51a20b760a6138aad8b8df56865a_23a81ab5-41e7-4bb8-b4b6-6c99c757c1b0.webp?v=1714970479","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4cf2c5e8c040a4b65023f8d67d34390f8e2b5114_6942ecf0-8156-4ced-bc43-45f173681dc6.webp?v=1714970482","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8b04c217b51cd2f39a8fa421e1a222ba4f82a4cc_195e5f7c-661b-4136-ab6c-6a9a89fb6e05.webp?v=1714970484","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1043c237568f412728bec9e658a5393fa1a86485_4b9b0ec6-1971-44c1-8ca4-2f45c13de956.webp?v=1714970486","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/84229715d93ec3619780e9f25573162361a67d81_72e37485-8c38-4042-bdfd-541a71c9bfaf.webp?v=1714970488","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3775881260786b8e28320ed6055794d0ba8321dc_2de0a487-15fb-43e5-a812-50053f1c22b7.webp?v=1714970491","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2f7d6a706b4c484587002813ee98c5e1bd12f3d8_f352b80a-c9c5-4658-a2df-1e0c7a104a3a.webp?v=1714970493"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a25abead11adfacb0a7950a7c52aa93f813e966f_f7f90755-38e1-4cb4-953d-28fd3c707841.webp?v=1714970472","options":["color"],"media":[{"alt":null,"id":23896376049763,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a25abead11adfacb0a7950a7c52aa93f813e966f_f7f90755-38e1-4cb4-953d-28fd3c707841.webp?v=1714970472"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a25abead11adfacb0a7950a7c52aa93f813e966f_f7f90755-38e1-4cb4-953d-28fd3c707841.webp?v=1714970472","width":2000},{"alt":null,"id":23896377065571,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/53446375a43426a6c3d102d332aa53afc3c3e9f7_138151a7-5042-4fc3-8597-b12db2957522.webp?v=1714970474"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/53446375a43426a6c3d102d332aa53afc3c3e9f7_138151a7-5042-4fc3-8597-b12db2957522.webp?v=1714970474","width":2000},{"alt":null,"id":23896377524323,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/51ddb5c6e0a3d8bad1d29d285fa1c85b49346be6_3774defd-ccc3-470a-903e-8770f23f9bdb.webp?v=1714970477"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/51ddb5c6e0a3d8bad1d29d285fa1c85b49346be6_3774defd-ccc3-470a-903e-8770f23f9bdb.webp?v=1714970477","width":2000},{"alt":null,"id":23896378277987,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5528547dc9ca51a20b760a6138aad8b8df56865a_23a81ab5-41e7-4bb8-b4b6-6c99c757c1b0.webp?v=1714970479"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5528547dc9ca51a20b760a6138aad8b8df56865a_23a81ab5-41e7-4bb8-b4b6-6c99c757c1b0.webp?v=1714970479","width":2000},{"alt":null,"id":23896378703971,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4cf2c5e8c040a4b65023f8d67d34390f8e2b5114_6942ecf0-8156-4ced-bc43-45f173681dc6.webp?v=1714970482"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4cf2c5e8c040a4b65023f8d67d34390f8e2b5114_6942ecf0-8156-4ced-bc43-45f173681dc6.webp?v=1714970482","width":2000},{"alt":null,"id":23896379457635,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8b04c217b51cd2f39a8fa421e1a222ba4f82a4cc_195e5f7c-661b-4136-ab6c-6a9a89fb6e05.webp?v=1714970484"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8b04c217b51cd2f39a8fa421e1a222ba4f82a4cc_195e5f7c-661b-4136-ab6c-6a9a89fb6e05.webp?v=1714970484","width":2000},{"alt":null,"id":23896379883619,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1043c237568f412728bec9e658a5393fa1a86485_4b9b0ec6-1971-44c1-8ca4-2f45c13de956.webp?v=1714970486"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1043c237568f412728bec9e658a5393fa1a86485_4b9b0ec6-1971-44c1-8ca4-2f45c13de956.webp?v=1714970486","width":2000},{"alt":null,"id":23896380178531,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/84229715d93ec3619780e9f25573162361a67d81_72e37485-8c38-4042-bdfd-541a71c9bfaf.webp?v=1714970488"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/84229715d93ec3619780e9f25573162361a67d81_72e37485-8c38-4042-bdfd-541a71c9bfaf.webp?v=1714970488","width":2000},{"alt":null,"id":23896380670051,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3775881260786b8e28320ed6055794d0ba8321dc_2de0a487-15fb-43e5-a812-50053f1c22b7.webp?v=1714970491"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3775881260786b8e28320ed6055794d0ba8321dc_2de0a487-15fb-43e5-a812-50053f1c22b7.webp?v=1714970491","width":2000},{"alt":null,"id":23896381030499,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2f7d6a706b4c484587002813ee98c5e1bd12f3d8_f352b80a-c9c5-4658-a2df-1e0c7a104a3a.webp?v=1714970493"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2f7d6a706b4c484587002813ee98c5e1bd12f3d8_f352b80a-c9c5-4658-a2df-1e0c7a104a3a.webp?v=1714970493","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $bumper = null; $variants = [{"id":41916446507107,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0108624-IV05","requires_shipping":true,"taxable":true,"featured_image":{"id":31490972975203,"product_id":7416007000163,"position":8,"created_at":"2024-05-06T12:41:28+08:00","updated_at":"2024-05-06T12:41:28+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/84229715d93ec3619780e9f25573162361a67d81_72e37485-8c38-4042-bdfd-541a71c9bfaf.webp?v=1714970488","variant_ids":[41916446507107]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone XS Max - 【聯名設計款】 - 1G - 左看看 - 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":"NPB0108624-IV05","featured_media":{"alt":null,"id":23896380178531,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/84229715d93ec3619780e9f25573162361a67d81_72e37485-8c38-4042-bdfd-541a71c9bfaf.webp?v=1714970488"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41916446507107,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0108624-IV05","requires_shipping":true,"taxable":true,"featured_image":{"id":31490972975203,"product_id":7416007000163,"position":8,"created_at":"2024-05-06T12:41:28+08:00","updated_at":"2024-05-06T12:41:28+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/84229715d93ec3619780e9f25573162361a67d81_72e37485-8c38-4042-bdfd-541a71c9bfaf.webp?v=1714970488","variant_ids":[41916446507107]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone XS Max - 【聯名設計款】 - 1G - 左看看 - 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":"NPB0108624-IV05","featured_media":{"alt":null,"id":23896380178531,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/84229715d93ec3619780e9f25573162361a67d81_72e37485-8c38-4042-bdfd-541a71c9bfaf.webp?v=1714970488"}},"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: "停產" }