$product = {"id":7408466886755,"title":"犀牛盾Mod NX手機殼 - iPhone 12 mini - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - 風暴兵-日文字系列","handle":"iphone-12-mini-mod-nx-printable-pb62","description":null,"published_at":"2024-06-11T16:38:02+08:00","created_at":"2024-05-03T15:32:16+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"設計師MOD NX專區-迪士尼-星際大戰 Star Wars","tags":["20%","25%","30%","35%","40%","45%","50%","b2b","brand-Apple","designer","designer-starwars","device-iPhone 12 mini","merge","mod-nx-printable","new-modnx-sku","reseller-modnx-star-wars","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":41885804986467,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118424-PB62","requires_shipping":true,"taxable":true,"featured_image":{"id":31472353706083,"product_id":7408466886755,"position":7,"created_at":"2024-05-03T15:32:33+08:00","updated_at":"2024-05-03T15:32:33+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c3eb6bb305334a17141bf8d30bb1dee818dd5f23_aeebd59c-4aad-4390-be93-73eef1c55b79.webp?v=1714721553","variant_ids":[41885804986467]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 mini - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - 風暴兵-日文字系列 - Mod NX-黑色邊框","public_title":"Mod NX-黑色邊框","options":["Mod NX-黑色邊框"],"price":90000,"weight":980,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"NPB0118424-PB62","featured_media":{"alt":null,"id":23877270339683,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c3eb6bb305334a17141bf8d30bb1dee818dd5f23_aeebd59c-4aad-4390-be93-73eef1c55b79.webp?v=1714721553"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/723f0b9ac5131a20b233d4a2ea2ed3f0b3553921_6427fb55-57ca-4f40-ba5f-05d05d8a915b.webp?v=1714721539","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/214b5294ba6f080fdb2cfccfd6e2f4c948e25e4b_fd37a733-889a-4dc8-9313-f3380414af52.webp?v=1714721541","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0092d77c434fec73f1c27091cbe684bfa56b32c2_f199e4c8-2be7-41b5-968b-f477463844e5.webp?v=1714721544","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/621e6be08182c63afd8aca5456396f8c756af15d_6f8934bf-4aae-4de5-a734-0d578b254331.webp?v=1714721546","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7ea8022cf12dd9d2ae4269cb8cf197e0d3efd7fa_5dd78845-d54e-4f5d-ae9e-5e5c24dc5d0e.webp?v=1714721549","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1c1da75eeddae8cf18348261666542adb53f5244_3f3cf803-d317-4d39-a6b0-a1b072797c46.webp?v=1714721551","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c3eb6bb305334a17141bf8d30bb1dee818dd5f23_aeebd59c-4aad-4390-be93-73eef1c55b79.webp?v=1714721553","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/309868540d9ca530ee2f9caac0bff034f934e3e9_7513e961-981e-43e9-86f2-217a7a85840a.webp?v=1714721556","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cb87ed23c3810a1f805f24da31680533af8a28b0_a25b5c0e-27f5-48ec-958d-a4d19d11d83f.webp?v=1714721558","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/27f0b19591c39062f4c5fdcd8f6b4b21e5c7dfc2_b51d9d8d-3023-4b6a-b824-717764ec4437.webp?v=1714721561","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6c2b6affcc125fae03668b818f91c225c6c2104a_67413717-a201-47c9-8c0b-a51992a55b44.webp?v=1714721563"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/723f0b9ac5131a20b233d4a2ea2ed3f0b3553921_6427fb55-57ca-4f40-ba5f-05d05d8a915b.webp?v=1714721539","options":["color"],"media":[{"alt":null,"id":23877267325027,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/723f0b9ac5131a20b233d4a2ea2ed3f0b3553921_6427fb55-57ca-4f40-ba5f-05d05d8a915b.webp?v=1714721539"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/723f0b9ac5131a20b233d4a2ea2ed3f0b3553921_6427fb55-57ca-4f40-ba5f-05d05d8a915b.webp?v=1714721539","width":2000},{"alt":null,"id":23877267783779,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/214b5294ba6f080fdb2cfccfd6e2f4c948e25e4b_fd37a733-889a-4dc8-9313-f3380414af52.webp?v=1714721541"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/214b5294ba6f080fdb2cfccfd6e2f4c948e25e4b_fd37a733-889a-4dc8-9313-f3380414af52.webp?v=1714721541","width":2000},{"alt":null,"id":23877268242531,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0092d77c434fec73f1c27091cbe684bfa56b32c2_f199e4c8-2be7-41b5-968b-f477463844e5.webp?v=1714721544"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0092d77c434fec73f1c27091cbe684bfa56b32c2_f199e4c8-2be7-41b5-968b-f477463844e5.webp?v=1714721544","width":2000},{"alt":null,"id":23877268668515,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/621e6be08182c63afd8aca5456396f8c756af15d_6f8934bf-4aae-4de5-a734-0d578b254331.webp?v=1714721546"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/621e6be08182c63afd8aca5456396f8c756af15d_6f8934bf-4aae-4de5-a734-0d578b254331.webp?v=1714721546","width":2000},{"alt":null,"id":23877269127267,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7ea8022cf12dd9d2ae4269cb8cf197e0d3efd7fa_5dd78845-d54e-4f5d-ae9e-5e5c24dc5d0e.webp?v=1714721549"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7ea8022cf12dd9d2ae4269cb8cf197e0d3efd7fa_5dd78845-d54e-4f5d-ae9e-5e5c24dc5d0e.webp?v=1714721549","width":2000},{"alt":null,"id":23877269618787,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1c1da75eeddae8cf18348261666542adb53f5244_3f3cf803-d317-4d39-a6b0-a1b072797c46.webp?v=1714721551"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1c1da75eeddae8cf18348261666542adb53f5244_3f3cf803-d317-4d39-a6b0-a1b072797c46.webp?v=1714721551","width":2000},{"alt":null,"id":23877270339683,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c3eb6bb305334a17141bf8d30bb1dee818dd5f23_aeebd59c-4aad-4390-be93-73eef1c55b79.webp?v=1714721553"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c3eb6bb305334a17141bf8d30bb1dee818dd5f23_aeebd59c-4aad-4390-be93-73eef1c55b79.webp?v=1714721553","width":2000},{"alt":null,"id":23877270896739,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/309868540d9ca530ee2f9caac0bff034f934e3e9_7513e961-981e-43e9-86f2-217a7a85840a.webp?v=1714721556"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/309868540d9ca530ee2f9caac0bff034f934e3e9_7513e961-981e-43e9-86f2-217a7a85840a.webp?v=1714721556","width":2000},{"alt":null,"id":23877271388259,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cb87ed23c3810a1f805f24da31680533af8a28b0_a25b5c0e-27f5-48ec-958d-a4d19d11d83f.webp?v=1714721558"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cb87ed23c3810a1f805f24da31680533af8a28b0_a25b5c0e-27f5-48ec-958d-a4d19d11d83f.webp?v=1714721558","width":2000},{"alt":null,"id":23877271912547,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/27f0b19591c39062f4c5fdcd8f6b4b21e5c7dfc2_b51d9d8d-3023-4b6a-b824-717764ec4437.webp?v=1714721561"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/27f0b19591c39062f4c5fdcd8f6b4b21e5c7dfc2_b51d9d8d-3023-4b6a-b824-717764ec4437.webp?v=1714721561","width":2000},{"alt":null,"id":23877272404067,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6c2b6affcc125fae03668b818f91c225c6c2104a_67413717-a201-47c9-8c0b-a51992a55b44.webp?v=1714721563"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6c2b6affcc125fae03668b818f91c225c6c2104a_67413717-a201-47c9-8c0b-a51992a55b44.webp?v=1714721563","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41885804986467,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118424-PB62","requires_shipping":true,"taxable":true,"featured_image":{"id":31472353706083,"product_id":7408466886755,"position":7,"created_at":"2024-05-03T15:32:33+08:00","updated_at":"2024-05-03T15:32:33+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c3eb6bb305334a17141bf8d30bb1dee818dd5f23_aeebd59c-4aad-4390-be93-73eef1c55b79.webp?v=1714721553","variant_ids":[41885804986467]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 mini - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - 風暴兵-日文字系列 - Mod NX-黑色邊框","public_title":"Mod NX-黑色邊框","options":["Mod NX-黑色邊框"],"price":90000,"weight":980,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"NPB0118424-PB62","featured_media":{"alt":null,"id":23877270339683,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c3eb6bb305334a17141bf8d30bb1dee818dd5f23_aeebd59c-4aad-4390-be93-73eef1c55b79.webp?v=1714721553"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41885804986467,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118424-PB62","requires_shipping":true,"taxable":true,"featured_image":{"id":31472353706083,"product_id":7408466886755,"position":7,"created_at":"2024-05-03T15:32:33+08:00","updated_at":"2024-05-03T15:32:33+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c3eb6bb305334a17141bf8d30bb1dee818dd5f23_aeebd59c-4aad-4390-be93-73eef1c55b79.webp?v=1714721553","variant_ids":[41885804986467]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 mini - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - 風暴兵-日文字系列 - Mod NX-黑色邊框","public_title":"Mod NX-黑色邊框","options":["Mod NX-黑色邊框"],"price":90000,"weight":980,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"NPB0118424-PB62","featured_media":{"alt":null,"id":23877270339683,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c3eb6bb305334a17141bf8d30bb1dee818dd5f23_aeebd59c-4aad-4390-be93-73eef1c55b79.webp?v=1714721553"}},"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: "停產" }