$product = {"id":7415909253219,"title":"犀牛盾Mod NX手機殼 - iPhone XS Max - 【聯名設計款】 - Look - 大自然的傑作(亞馬遜雨林)","handle":"iphone-xs-max-mod-nx-printable-af09","description":null,"published_at":"2024-06-11T16:47:41+08:00","created_at":"2024-05-06T12:22:59+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":41915438497891,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0108624-AF09","requires_shipping":true,"taxable":true,"featured_image":{"id":31490712174691,"product_id":7415909253219,"position":8,"created_at":"2024-05-06T12:23:20+08:00","updated_at":"2024-05-06T12:23:20+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c89242df9a06cdf5402f9cb35e526a3186a1afd2_70b879c2-7189-471d-b425-c991223d2bd6.webp?v=1714969400","variant_ids":[41915438497891]},"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-AF09","featured_media":{"alt":null,"id":23896118919267,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c89242df9a06cdf5402f9cb35e526a3186a1afd2_70b879c2-7189-471d-b425-c991223d2bd6.webp?v=1714969400"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6dee281b9110a78032d4d41ff020dfb50b0d04ce_802b200a-1e34-48ce-8e21-f5815bcb188d.webp?v=1714969382","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ddd5b8501b28627a2e0f9629f1440eeac0c525ca_65ac8c65-2ffc-4ecb-8dce-fc516c8f9c07.webp?v=1714969385","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ae99fad3fab2558e3f6465fc7d70302ab6ccdaba_d3a251f4-d9be-488e-a6f4-8f2d2496542b.webp?v=1714969388","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d01125f7e567785625f5b6c765da71759e1bc1a8_e36b753c-bd66-4957-a9da-f7fe0fe381d0.webp?v=1714969390","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f21f8df2c71a5ca174ef17dae772241206f94ff6_1e4eb1d3-03a1-4ead-89ea-269e125819ec.webp?v=1714969393","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6c9d51130ad4e01469e2d4e6d83135d3b90824d5_2b423e10-f181-4849-8a53-bece97a12626.webp?v=1714969395","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3817b284a4776a9bbfb6ed2528fab74f7c9fa671_08cea99f-cb84-43e7-9f79-a0478221232c.webp?v=1714969398","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c89242df9a06cdf5402f9cb35e526a3186a1afd2_70b879c2-7189-471d-b425-c991223d2bd6.webp?v=1714969400","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/742e3c257ec9d37c072c5658312d9e76b56a3bb1_807cfb23-9444-4517-a008-70076f05882f.webp?v=1714969402","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/51280ce047fe59f16a2fd19aab270bab23489551_c490ffc4-d878-40ee-9330-8f1b4b5ff8dd.webp?v=1714969405"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6dee281b9110a78032d4d41ff020dfb50b0d04ce_802b200a-1e34-48ce-8e21-f5815bcb188d.webp?v=1714969382","options":["color"],"media":[{"alt":null,"id":23896115773539,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6dee281b9110a78032d4d41ff020dfb50b0d04ce_802b200a-1e34-48ce-8e21-f5815bcb188d.webp?v=1714969382"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6dee281b9110a78032d4d41ff020dfb50b0d04ce_802b200a-1e34-48ce-8e21-f5815bcb188d.webp?v=1714969382","width":2000},{"alt":null,"id":23896116265059,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ddd5b8501b28627a2e0f9629f1440eeac0c525ca_65ac8c65-2ffc-4ecb-8dce-fc516c8f9c07.webp?v=1714969385"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ddd5b8501b28627a2e0f9629f1440eeac0c525ca_65ac8c65-2ffc-4ecb-8dce-fc516c8f9c07.webp?v=1714969385","width":2000},{"alt":null,"id":23896116691043,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ae99fad3fab2558e3f6465fc7d70302ab6ccdaba_d3a251f4-d9be-488e-a6f4-8f2d2496542b.webp?v=1714969388"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ae99fad3fab2558e3f6465fc7d70302ab6ccdaba_d3a251f4-d9be-488e-a6f4-8f2d2496542b.webp?v=1714969388","width":2000},{"alt":null,"id":23896117182563,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d01125f7e567785625f5b6c765da71759e1bc1a8_e36b753c-bd66-4957-a9da-f7fe0fe381d0.webp?v=1714969390"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d01125f7e567785625f5b6c765da71759e1bc1a8_e36b753c-bd66-4957-a9da-f7fe0fe381d0.webp?v=1714969390","width":2000},{"alt":null,"id":23896117608547,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f21f8df2c71a5ca174ef17dae772241206f94ff6_1e4eb1d3-03a1-4ead-89ea-269e125819ec.webp?v=1714969393"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f21f8df2c71a5ca174ef17dae772241206f94ff6_1e4eb1d3-03a1-4ead-89ea-269e125819ec.webp?v=1714969393","width":2000},{"alt":null,"id":23896118100067,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6c9d51130ad4e01469e2d4e6d83135d3b90824d5_2b423e10-f181-4849-8a53-bece97a12626.webp?v=1714969395"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6c9d51130ad4e01469e2d4e6d83135d3b90824d5_2b423e10-f181-4849-8a53-bece97a12626.webp?v=1714969395","width":2000},{"alt":null,"id":23896118526051,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3817b284a4776a9bbfb6ed2528fab74f7c9fa671_08cea99f-cb84-43e7-9f79-a0478221232c.webp?v=1714969398"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3817b284a4776a9bbfb6ed2528fab74f7c9fa671_08cea99f-cb84-43e7-9f79-a0478221232c.webp?v=1714969398","width":2000},{"alt":null,"id":23896118919267,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c89242df9a06cdf5402f9cb35e526a3186a1afd2_70b879c2-7189-471d-b425-c991223d2bd6.webp?v=1714969400"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c89242df9a06cdf5402f9cb35e526a3186a1afd2_70b879c2-7189-471d-b425-c991223d2bd6.webp?v=1714969400","width":2000},{"alt":null,"id":23896119345251,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/742e3c257ec9d37c072c5658312d9e76b56a3bb1_807cfb23-9444-4517-a008-70076f05882f.webp?v=1714969402"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/742e3c257ec9d37c072c5658312d9e76b56a3bb1_807cfb23-9444-4517-a008-70076f05882f.webp?v=1714969402","width":2000},{"alt":null,"id":23896119902307,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/51280ce047fe59f16a2fd19aab270bab23489551_c490ffc4-d878-40ee-9330-8f1b4b5ff8dd.webp?v=1714969405"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/51280ce047fe59f16a2fd19aab270bab23489551_c490ffc4-d878-40ee-9330-8f1b4b5ff8dd.webp?v=1714969405","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41915438497891,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0108624-AF09","requires_shipping":true,"taxable":true,"featured_image":{"id":31490712174691,"product_id":7415909253219,"position":8,"created_at":"2024-05-06T12:23:20+08:00","updated_at":"2024-05-06T12:23:20+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c89242df9a06cdf5402f9cb35e526a3186a1afd2_70b879c2-7189-471d-b425-c991223d2bd6.webp?v=1714969400","variant_ids":[41915438497891]},"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-AF09","featured_media":{"alt":null,"id":23896118919267,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c89242df9a06cdf5402f9cb35e526a3186a1afd2_70b879c2-7189-471d-b425-c991223d2bd6.webp?v=1714969400"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41915438497891,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0108624-AF09","requires_shipping":true,"taxable":true,"featured_image":{"id":31490712174691,"product_id":7415909253219,"position":8,"created_at":"2024-05-06T12:23:20+08:00","updated_at":"2024-05-06T12:23:20+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c89242df9a06cdf5402f9cb35e526a3186a1afd2_70b879c2-7189-471d-b425-c991223d2bd6.webp?v=1714969400","variant_ids":[41915438497891]},"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-AF09","featured_media":{"alt":null,"id":23896118919267,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c89242df9a06cdf5402f9cb35e526a3186a1afd2_70b879c2-7189-471d-b425-c991223d2bd6.webp?v=1714969400"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}; $device_handle = null; $brand_handle = null; $type = ""; var sellingStatus // 只有設計款(SKU 含 '-')才需要合圖 if ($isMerge && $defaultVariant.sku.includes('-')) { $(document).ready(function() { var productImg = $product.images[0]; var bumperImg = window.getProductImageUrl($defaultVariant.sku.split('-')[0]); var layers = ($type === 'mod-nx-backplate' || $type === 'mod-backplate') ? [productImg, bumperImg] : [bumperImg, productImg]; window.mergeProductImages(layers).then(function (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: "停產" }