$product = {"id":7415894311011,"title":"犀牛盾Mod NX手機殼 - iPhone XS Max - 【聯名設計款】 - Look - 願傷疤 有天開出花(加州野火)","handle":"iphone-xs-max-mod-nx-printable-af03","description":null,"published_at":"2024-06-11T16:47:16+08:00","created_at":"2024-05-06T12:20:09+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":41915283406947,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0108624-AF03","requires_shipping":true,"taxable":true,"featured_image":{"id":31490677014627,"product_id":7415894311011,"position":2,"created_at":"2024-05-06T12:20:14+08:00","updated_at":"2024-05-06T12:20:14+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/14024dc08cb78afeae93b36308b8f2cb6939cb83_dd3d6bdf-1860-4380-a032-d227a6a537b7.webp?v=1714969214","variant_ids":[41915283406947]},"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-AF03","featured_media":{"alt":null,"id":23896083693667,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/14024dc08cb78afeae93b36308b8f2cb6939cb83_dd3d6bdf-1860-4380-a032-d227a6a537b7.webp?v=1714969214"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/15578cea7b7424db0ce0c73e00c9efb672b1034f_e493f340-a9fa-41f1-88fb-cf29aff5d791.webp?v=1714969211","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/14024dc08cb78afeae93b36308b8f2cb6939cb83_dd3d6bdf-1860-4380-a032-d227a6a537b7.webp?v=1714969214","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/236afa0d187c89849b47e77655136f7b91941790_c11045c6-45c8-468c-a38d-936fe59d7940.webp?v=1714969217","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8f304b01193e297e338ca73029f2b69778c60453_4251b32a-0f2f-42da-a638-67e6b7865ab0.webp?v=1714969219","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1b7f04f9ca0467b71c0ff78368f6e9aa5d6aec8b_5ceda5d3-b8f7-48f5-857b-aa35230d445f.webp?v=1714969222","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/40ba18b00950d9a3670744d4ea4529808633a284_32371104-927a-4740-955f-abfc3a393723.webp?v=1714969224","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4abb54187bf3677fdceddf9bed4991b80e1666fe_0ec28007-9060-4c40-a581-cebe5c3984ce.webp?v=1714969227","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/40786a99f3262a97144a164db884157729e7c2cd_9e3e3b6a-0093-4b07-9499-276f9e361ab4.webp?v=1714969229","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/169c455556f8446e66a441ce06d8f7e0a5fb1015_48bdda5c-267e-4eb5-92f7-fd5b65a4cfca.webp?v=1714969232","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e6da919d40fb8ef3cce656310aed210ab0508fa7_5e454286-a7f1-4673-a447-328c17d4b362.webp?v=1714969235"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/15578cea7b7424db0ce0c73e00c9efb672b1034f_e493f340-a9fa-41f1-88fb-cf29aff5d791.webp?v=1714969211","options":["color"],"media":[{"alt":null,"id":23896083136611,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/15578cea7b7424db0ce0c73e00c9efb672b1034f_e493f340-a9fa-41f1-88fb-cf29aff5d791.webp?v=1714969211"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/15578cea7b7424db0ce0c73e00c9efb672b1034f_e493f340-a9fa-41f1-88fb-cf29aff5d791.webp?v=1714969211","width":2000},{"alt":null,"id":23896083693667,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/14024dc08cb78afeae93b36308b8f2cb6939cb83_dd3d6bdf-1860-4380-a032-d227a6a537b7.webp?v=1714969214"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/14024dc08cb78afeae93b36308b8f2cb6939cb83_dd3d6bdf-1860-4380-a032-d227a6a537b7.webp?v=1714969214","width":2000},{"alt":null,"id":23896084054115,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/236afa0d187c89849b47e77655136f7b91941790_c11045c6-45c8-468c-a38d-936fe59d7940.webp?v=1714969217"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/236afa0d187c89849b47e77655136f7b91941790_c11045c6-45c8-468c-a38d-936fe59d7940.webp?v=1714969217","width":2000},{"alt":null,"id":23896084512867,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8f304b01193e297e338ca73029f2b69778c60453_4251b32a-0f2f-42da-a638-67e6b7865ab0.webp?v=1714969219"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8f304b01193e297e338ca73029f2b69778c60453_4251b32a-0f2f-42da-a638-67e6b7865ab0.webp?v=1714969219","width":2000},{"alt":null,"id":23896085004387,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1b7f04f9ca0467b71c0ff78368f6e9aa5d6aec8b_5ceda5d3-b8f7-48f5-857b-aa35230d445f.webp?v=1714969222"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1b7f04f9ca0467b71c0ff78368f6e9aa5d6aec8b_5ceda5d3-b8f7-48f5-857b-aa35230d445f.webp?v=1714969222","width":2000},{"alt":null,"id":23896085594211,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/40ba18b00950d9a3670744d4ea4529808633a284_32371104-927a-4740-955f-abfc3a393723.webp?v=1714969224"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/40ba18b00950d9a3670744d4ea4529808633a284_32371104-927a-4740-955f-abfc3a393723.webp?v=1714969224","width":2000},{"alt":null,"id":23896085921891,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4abb54187bf3677fdceddf9bed4991b80e1666fe_0ec28007-9060-4c40-a581-cebe5c3984ce.webp?v=1714969227"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4abb54187bf3677fdceddf9bed4991b80e1666fe_0ec28007-9060-4c40-a581-cebe5c3984ce.webp?v=1714969227","width":2000},{"alt":null,"id":23896086380643,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/40786a99f3262a97144a164db884157729e7c2cd_9e3e3b6a-0093-4b07-9499-276f9e361ab4.webp?v=1714969229"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/40786a99f3262a97144a164db884157729e7c2cd_9e3e3b6a-0093-4b07-9499-276f9e361ab4.webp?v=1714969229","width":2000},{"alt":null,"id":23896086839395,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/169c455556f8446e66a441ce06d8f7e0a5fb1015_48bdda5c-267e-4eb5-92f7-fd5b65a4cfca.webp?v=1714969232"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/169c455556f8446e66a441ce06d8f7e0a5fb1015_48bdda5c-267e-4eb5-92f7-fd5b65a4cfca.webp?v=1714969232","width":2000},{"alt":null,"id":23896087330915,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e6da919d40fb8ef3cce656310aed210ab0508fa7_5e454286-a7f1-4673-a447-328c17d4b362.webp?v=1714969235"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e6da919d40fb8ef3cce656310aed210ab0508fa7_5e454286-a7f1-4673-a447-328c17d4b362.webp?v=1714969235","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41915283406947,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0108624-AF03","requires_shipping":true,"taxable":true,"featured_image":{"id":31490677014627,"product_id":7415894311011,"position":2,"created_at":"2024-05-06T12:20:14+08:00","updated_at":"2024-05-06T12:20:14+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/14024dc08cb78afeae93b36308b8f2cb6939cb83_dd3d6bdf-1860-4380-a032-d227a6a537b7.webp?v=1714969214","variant_ids":[41915283406947]},"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-AF03","featured_media":{"alt":null,"id":23896083693667,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/14024dc08cb78afeae93b36308b8f2cb6939cb83_dd3d6bdf-1860-4380-a032-d227a6a537b7.webp?v=1714969214"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41915283406947,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0108624-AF03","requires_shipping":true,"taxable":true,"featured_image":{"id":31490677014627,"product_id":7415894311011,"position":2,"created_at":"2024-05-06T12:20:14+08:00","updated_at":"2024-05-06T12:20:14+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/14024dc08cb78afeae93b36308b8f2cb6939cb83_dd3d6bdf-1860-4380-a032-d227a6a537b7.webp?v=1714969214","variant_ids":[41915283406947]},"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-AF03","featured_media":{"alt":null,"id":23896083693667,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/14024dc08cb78afeae93b36308b8f2cb6939cb83_dd3d6bdf-1860-4380-a032-d227a6a537b7.webp?v=1714969214"}},"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: "停產" }