$product = {"id":7416327962723,"title":"犀牛盾Mod NX手機殼 - iPhone 7\/8\/SE2\/SE3 - 【聯名設計款】 - Look - 願傷疤 有天開出花(加州野火)","handle":"iphone-8-mod-nx-printable-af03","description":null,"published_at":"2024-06-11T16:56:00+08:00","created_at":"2024-05-06T14:35:20+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 8","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":41918546149475,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0105424-AF03","requires_shipping":true,"taxable":true,"featured_image":{"id":31491854958691,"product_id":7416327962723,"position":5,"created_at":"2024-05-06T14:35:33+08:00","updated_at":"2024-05-06T14:35:33+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/383f024eca597cc5eed36c908932ff72b6a806b7_2c34c419-8e11-49f7-b69a-3ac0053e2d48.webp?v=1714977333","variant_ids":[41918546149475]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 7\/8\/SE2\/SE3 - 【聯名設計款】 - 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":"NPB0105424-AF03","featured_media":{"alt":null,"id":23897267798115,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/383f024eca597cc5eed36c908932ff72b6a806b7_2c34c419-8e11-49f7-b69a-3ac0053e2d48.webp?v=1714977333"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/126c05669f9a9808f272d8ca1843aae0b6ec4e1c_0e9f4985-48ae-401e-8c9d-207d5b2be1b0.webp?v=1714977323","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/13ac7fb0535708e77701c9b031beaf9ad99e69d1_21659bb7-a0a4-4586-955a-caa94053effb.webp?v=1714977325","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/84a1051b0436659a01ecb2bc4e48184cbef37103_355db9cf-1830-443e-b6ae-746f99765744.webp?v=1714977328","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f9bdfbc58988df44ff0f5eddc08112376cda8447_a35e4831-ca51-473c-8640-d83854aa38eb.webp?v=1714977330","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/383f024eca597cc5eed36c908932ff72b6a806b7_2c34c419-8e11-49f7-b69a-3ac0053e2d48.webp?v=1714977333","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8d555672a120cd10ca0c2e7263327a8eea460951_52d06d74-4a2c-46ec-9154-3af8b0c11df1.webp?v=1714977335","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1930f4ad3777ccc5384ddfa3f219207d728cb864_94a66b40-91d9-4ea1-8d2b-034fd10e87d6.webp?v=1714977338","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1e2e25e412b4c9e344369b6965d36f1882a1b9a5_6d160f16-3cde-4589-8d52-7e22fcc84558.webp?v=1714977341","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/603f11e81f55fa0cf0824987acfcc276f73e096f_f0029ade-ab2d-4950-8551-3870c14ff5ae.webp?v=1714977343","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b543bf8b5508502fcd6793a622a83064f284ed0c_d6d3a01f-3a8d-4062-af78-1104945f64b8.webp?v=1714977346"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/126c05669f9a9808f272d8ca1843aae0b6ec4e1c_0e9f4985-48ae-401e-8c9d-207d5b2be1b0.webp?v=1714977323","options":["color"],"media":[{"alt":null,"id":23897266061411,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/126c05669f9a9808f272d8ca1843aae0b6ec4e1c_0e9f4985-48ae-401e-8c9d-207d5b2be1b0.webp?v=1714977323"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/126c05669f9a9808f272d8ca1843aae0b6ec4e1c_0e9f4985-48ae-401e-8c9d-207d5b2be1b0.webp?v=1714977323","width":2000},{"alt":null,"id":23897266749539,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/13ac7fb0535708e77701c9b031beaf9ad99e69d1_21659bb7-a0a4-4586-955a-caa94053effb.webp?v=1714977325"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/13ac7fb0535708e77701c9b031beaf9ad99e69d1_21659bb7-a0a4-4586-955a-caa94053effb.webp?v=1714977325","width":2000},{"alt":null,"id":23897267208291,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/84a1051b0436659a01ecb2bc4e48184cbef37103_355db9cf-1830-443e-b6ae-746f99765744.webp?v=1714977328"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/84a1051b0436659a01ecb2bc4e48184cbef37103_355db9cf-1830-443e-b6ae-746f99765744.webp?v=1714977328","width":2000},{"alt":null,"id":23897267568739,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f9bdfbc58988df44ff0f5eddc08112376cda8447_a35e4831-ca51-473c-8640-d83854aa38eb.webp?v=1714977330"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f9bdfbc58988df44ff0f5eddc08112376cda8447_a35e4831-ca51-473c-8640-d83854aa38eb.webp?v=1714977330","width":2000},{"alt":null,"id":23897267798115,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/383f024eca597cc5eed36c908932ff72b6a806b7_2c34c419-8e11-49f7-b69a-3ac0053e2d48.webp?v=1714977333"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/383f024eca597cc5eed36c908932ff72b6a806b7_2c34c419-8e11-49f7-b69a-3ac0053e2d48.webp?v=1714977333","width":2000},{"alt":null,"id":23897268322403,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8d555672a120cd10ca0c2e7263327a8eea460951_52d06d74-4a2c-46ec-9154-3af8b0c11df1.webp?v=1714977335"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8d555672a120cd10ca0c2e7263327a8eea460951_52d06d74-4a2c-46ec-9154-3af8b0c11df1.webp?v=1714977335","width":2000},{"alt":null,"id":23897268748387,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1930f4ad3777ccc5384ddfa3f219207d728cb864_94a66b40-91d9-4ea1-8d2b-034fd10e87d6.webp?v=1714977338"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1930f4ad3777ccc5384ddfa3f219207d728cb864_94a66b40-91d9-4ea1-8d2b-034fd10e87d6.webp?v=1714977338","width":2000},{"alt":null,"id":23897269239907,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1e2e25e412b4c9e344369b6965d36f1882a1b9a5_6d160f16-3cde-4589-8d52-7e22fcc84558.webp?v=1714977341"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1e2e25e412b4c9e344369b6965d36f1882a1b9a5_6d160f16-3cde-4589-8d52-7e22fcc84558.webp?v=1714977341","width":2000},{"alt":null,"id":23897269698659,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/603f11e81f55fa0cf0824987acfcc276f73e096f_f0029ade-ab2d-4950-8551-3870c14ff5ae.webp?v=1714977343"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/603f11e81f55fa0cf0824987acfcc276f73e096f_f0029ade-ab2d-4950-8551-3870c14ff5ae.webp?v=1714977343","width":2000},{"alt":null,"id":23897270255715,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b543bf8b5508502fcd6793a622a83064f284ed0c_d6d3a01f-3a8d-4062-af78-1104945f64b8.webp?v=1714977346"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b543bf8b5508502fcd6793a622a83064f284ed0c_d6d3a01f-3a8d-4062-af78-1104945f64b8.webp?v=1714977346","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $bumper = null; $variants = [{"id":41918546149475,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0105424-AF03","requires_shipping":true,"taxable":true,"featured_image":{"id":31491854958691,"product_id":7416327962723,"position":5,"created_at":"2024-05-06T14:35:33+08:00","updated_at":"2024-05-06T14:35:33+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/383f024eca597cc5eed36c908932ff72b6a806b7_2c34c419-8e11-49f7-b69a-3ac0053e2d48.webp?v=1714977333","variant_ids":[41918546149475]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 7\/8\/SE2\/SE3 - 【聯名設計款】 - 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":"NPB0105424-AF03","featured_media":{"alt":null,"id":23897267798115,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/383f024eca597cc5eed36c908932ff72b6a806b7_2c34c419-8e11-49f7-b69a-3ac0053e2d48.webp?v=1714977333"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41918546149475,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0105424-AF03","requires_shipping":true,"taxable":true,"featured_image":{"id":31491854958691,"product_id":7416327962723,"position":5,"created_at":"2024-05-06T14:35:33+08:00","updated_at":"2024-05-06T14:35:33+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/383f024eca597cc5eed36c908932ff72b6a806b7_2c34c419-8e11-49f7-b69a-3ac0053e2d48.webp?v=1714977333","variant_ids":[41918546149475]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 7\/8\/SE2\/SE3 - 【聯名設計款】 - 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":"NPB0105424-AF03","featured_media":{"alt":null,"id":23897267798115,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/383f024eca597cc5eed36c908932ff72b6a806b7_2c34c419-8e11-49f7-b69a-3ac0053e2d48.webp?v=1714977333"}},"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: "停產" }