$product = {"id":7415996350563,"title":"犀牛盾Mod NX手機殼 - iPhone XS Max - 【聯名設計款】 - Look - 大自然的傑作(錫安國家公園)","handle":"iphone-xs-max-mod-nx-printable-af14","description":null,"published_at":"2024-06-11T16:49:57+08:00","created_at":"2024-05-06T12:39:12+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 XS Max","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":41916334866531,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0108624-AF14","requires_shipping":true,"taxable":true,"featured_image":{"id":31490942468195,"product_id":7415996350563,"position":4,"created_at":"2024-05-06T12:39:21+08:00","updated_at":"2024-05-06T12:39:21+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/47b1a6d271e00c7e98c84f6edae71ac8905f97e7_eb451b71-288c-4bd3-a0e6-b1d5c1e64731.webp?v=1714970361","variant_ids":[41916334866531]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone XS Max - 【聯名設計款】 - 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":"NPB0108624-AF14","featured_media":{"alt":null,"id":23896349605987,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/47b1a6d271e00c7e98c84f6edae71ac8905f97e7_eb451b71-288c-4bd3-a0e6-b1d5c1e64731.webp?v=1714970361"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/107dec3f4f9d3dba1dbc80b3cd707dbaa59ef2ef_5c47e85d-a889-466c-a388-2e0905d78e87.webp?v=1714970354","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6c83f8b1f9c991750dd5f3564b15d2caf76c79ae_90f581d2-bd45-4e94-a1df-abd0505cacd7.webp?v=1714970357","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ec46bd7725590d003442c21bf0ff0d0e4ca2bda9_857ca684-4cc5-41a4-93d9-718ed42b7103.webp?v=1714970359","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/47b1a6d271e00c7e98c84f6edae71ac8905f97e7_eb451b71-288c-4bd3-a0e6-b1d5c1e64731.webp?v=1714970361","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2e33d03f60447b148c44a133f2fae9df856fd2ce_4c217832-b88a-4db6-b9ff-0d149ce404cd.webp?v=1714970364","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bfbe2db559b73e356715f1c71553ba4e350fffe2_bcb45c2c-9eaf-4f7a-a90c-02a821087b25.webp?v=1714970366","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bcb1c96e868bd039984b8a812316dd05ea2204be_54cdca2b-1fc7-4bb8-a4e0-dc4664d938d3.webp?v=1714970369","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e114dec1d7468379c61f2af33333b4df095859ee_3f240a3a-87ae-45ac-8aab-04b90779b1b1.webp?v=1714970371","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/be5f6b27cd62fbe5af19ff42a153a90f3191fa5e_e2f629d0-ba80-48cb-b08a-2e91b10ccbb9.webp?v=1714970373","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8dd7a3f54e49326f314eb4e0c608a108567f4212_e301ed00-7927-4198-9fbe-3e4c0e685304.webp?v=1714970376"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/107dec3f4f9d3dba1dbc80b3cd707dbaa59ef2ef_5c47e85d-a889-466c-a388-2e0905d78e87.webp?v=1714970354","options":["color"],"media":[{"alt":null,"id":23896348164195,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/107dec3f4f9d3dba1dbc80b3cd707dbaa59ef2ef_5c47e85d-a889-466c-a388-2e0905d78e87.webp?v=1714970354"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/107dec3f4f9d3dba1dbc80b3cd707dbaa59ef2ef_5c47e85d-a889-466c-a388-2e0905d78e87.webp?v=1714970354","width":2000},{"alt":null,"id":23896348622947,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6c83f8b1f9c991750dd5f3564b15d2caf76c79ae_90f581d2-bd45-4e94-a1df-abd0505cacd7.webp?v=1714970357"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6c83f8b1f9c991750dd5f3564b15d2caf76c79ae_90f581d2-bd45-4e94-a1df-abd0505cacd7.webp?v=1714970357","width":2000},{"alt":null,"id":23896349114467,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ec46bd7725590d003442c21bf0ff0d0e4ca2bda9_857ca684-4cc5-41a4-93d9-718ed42b7103.webp?v=1714970359"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ec46bd7725590d003442c21bf0ff0d0e4ca2bda9_857ca684-4cc5-41a4-93d9-718ed42b7103.webp?v=1714970359","width":2000},{"alt":null,"id":23896349605987,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/47b1a6d271e00c7e98c84f6edae71ac8905f97e7_eb451b71-288c-4bd3-a0e6-b1d5c1e64731.webp?v=1714970361"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/47b1a6d271e00c7e98c84f6edae71ac8905f97e7_eb451b71-288c-4bd3-a0e6-b1d5c1e64731.webp?v=1714970361","width":2000},{"alt":null,"id":23896350195811,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2e33d03f60447b148c44a133f2fae9df856fd2ce_4c217832-b88a-4db6-b9ff-0d149ce404cd.webp?v=1714970364"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2e33d03f60447b148c44a133f2fae9df856fd2ce_4c217832-b88a-4db6-b9ff-0d149ce404cd.webp?v=1714970364","width":2000},{"alt":null,"id":23896351309923,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bfbe2db559b73e356715f1c71553ba4e350fffe2_bcb45c2c-9eaf-4f7a-a90c-02a821087b25.webp?v=1714970366"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bfbe2db559b73e356715f1c71553ba4e350fffe2_bcb45c2c-9eaf-4f7a-a90c-02a821087b25.webp?v=1714970366","width":2000},{"alt":null,"id":23896351703139,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bcb1c96e868bd039984b8a812316dd05ea2204be_54cdca2b-1fc7-4bb8-a4e0-dc4664d938d3.webp?v=1714970369"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bcb1c96e868bd039984b8a812316dd05ea2204be_54cdca2b-1fc7-4bb8-a4e0-dc4664d938d3.webp?v=1714970369","width":2000},{"alt":null,"id":23896352522339,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e114dec1d7468379c61f2af33333b4df095859ee_3f240a3a-87ae-45ac-8aab-04b90779b1b1.webp?v=1714970371"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e114dec1d7468379c61f2af33333b4df095859ee_3f240a3a-87ae-45ac-8aab-04b90779b1b1.webp?v=1714970371","width":2000},{"alt":null,"id":23896352882787,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/be5f6b27cd62fbe5af19ff42a153a90f3191fa5e_e2f629d0-ba80-48cb-b08a-2e91b10ccbb9.webp?v=1714970373"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/be5f6b27cd62fbe5af19ff42a153a90f3191fa5e_e2f629d0-ba80-48cb-b08a-2e91b10ccbb9.webp?v=1714970373","width":2000},{"alt":null,"id":23896353439843,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8dd7a3f54e49326f314eb4e0c608a108567f4212_e301ed00-7927-4198-9fbe-3e4c0e685304.webp?v=1714970376"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8dd7a3f54e49326f314eb4e0c608a108567f4212_e301ed00-7927-4198-9fbe-3e4c0e685304.webp?v=1714970376","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $bumper = null; $variants = [{"id":41916334866531,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0108624-AF14","requires_shipping":true,"taxable":true,"featured_image":{"id":31490942468195,"product_id":7415996350563,"position":4,"created_at":"2024-05-06T12:39:21+08:00","updated_at":"2024-05-06T12:39:21+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/47b1a6d271e00c7e98c84f6edae71ac8905f97e7_eb451b71-288c-4bd3-a0e6-b1d5c1e64731.webp?v=1714970361","variant_ids":[41916334866531]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone XS Max - 【聯名設計款】 - 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":"NPB0108624-AF14","featured_media":{"alt":null,"id":23896349605987,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/47b1a6d271e00c7e98c84f6edae71ac8905f97e7_eb451b71-288c-4bd3-a0e6-b1d5c1e64731.webp?v=1714970361"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41916334866531,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0108624-AF14","requires_shipping":true,"taxable":true,"featured_image":{"id":31490942468195,"product_id":7415996350563,"position":4,"created_at":"2024-05-06T12:39:21+08:00","updated_at":"2024-05-06T12:39:21+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/47b1a6d271e00c7e98c84f6edae71ac8905f97e7_eb451b71-288c-4bd3-a0e6-b1d5c1e64731.webp?v=1714970361","variant_ids":[41916334866531]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone XS Max - 【聯名設計款】 - 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":"NPB0108624-AF14","featured_media":{"alt":null,"id":23896349605987,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/47b1a6d271e00c7e98c84f6edae71ac8905f97e7_eb451b71-288c-4bd3-a0e6-b1d5c1e64731.webp?v=1714970361"}},"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: "停產" }