$product = {"id":7416060313699,"title":"犀牛盾Mod NX手機殼 - iPhone XS Max - 【聯名設計款】 - Batman - 蝙蝠俠出任務","handle":"iphone-xs-max-mod-nx-printable-sb06","description":null,"published_at":"2024-06-11T16:51:40+08:00","created_at":"2024-05-06T12:50:41+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"設計師MOD NX專區-Batman","tags":["20%","25%","30%","35%","40%","45%","50%","b2b","brand-Apple","designer","designer-batman","device-iPhone XS Max","merge","mod-nx-printable","new-modnx-sku","reseller-modnx-batman","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":41917009363043,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0108624-SB06","requires_shipping":true,"taxable":true,"featured_image":{"id":31491107291235,"product_id":7416060313699,"position":3,"created_at":"2024-05-06T12:50:48+08:00","updated_at":"2024-05-06T12:50:48+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/130448eed9ae2f7ab6638db2e31c6711c3c4bec9_8f1a2eae-0084-4964-9c71-16df209d3ccc.webp?v=1714971048","variant_ids":[41917009363043]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone XS Max - 【聯名設計款】 - Batman - 蝙蝠俠出任務 - 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":"NPB0108624-SB06","featured_media":{"alt":null,"id":23896514723939,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/130448eed9ae2f7ab6638db2e31c6711c3c4bec9_8f1a2eae-0084-4964-9c71-16df209d3ccc.webp?v=1714971048"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5f79f6f518979362b9e4119de788c24106da91b6_93fec269-e6ba-467a-a599-ceac0032764c.webp?v=1714971043","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/24896a6768066b408599f677921c079f0c5768f7_34b7b425-979c-4509-9d19-d7f5c57fa743.webp?v=1714971046","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/130448eed9ae2f7ab6638db2e31c6711c3c4bec9_8f1a2eae-0084-4964-9c71-16df209d3ccc.webp?v=1714971048","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/05a694c6dadea30915640367155e12eb0bc90327_fbb23e9d-049c-4899-87c7-ff5e4763cb42.webp?v=1714971051","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f0b989f5c32bc5f5264080c4b11acb52bc89345a_a7715801-57e4-43d5-88b1-3bfd35b352d7.webp?v=1714971053","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/26e804750ff7b948cef0ee724ee87cb179eb1d06_73438bc0-dbd9-46d1-a2b2-6e88486dc675.webp?v=1714971055","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/98219c93160848d0ca82e44cb0787170f2518149_94835fbc-9a8b-4ad1-b0df-6196e0db4c98.webp?v=1714971058","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5f10da023d9c1e9f84a7fff1c3dabd1764c61a90_37765d01-174a-4c48-80a8-597609dd62be.webp?v=1714971060","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1fad450ea00f66ca028e9433e3247b1765af72f0_e610d5d1-1007-4340-a30f-872564aa3e33.webp?v=1714971063","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f8f1f23462229e2e8aca83d321552110d1eda31d_c3727ea4-3add-43ca-9ba3-978f66a7d839.webp?v=1714971065"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5f79f6f518979362b9e4119de788c24106da91b6_93fec269-e6ba-467a-a599-ceac0032764c.webp?v=1714971043","options":["color"],"media":[{"alt":null,"id":23896513544291,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5f79f6f518979362b9e4119de788c24106da91b6_93fec269-e6ba-467a-a599-ceac0032764c.webp?v=1714971043"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5f79f6f518979362b9e4119de788c24106da91b6_93fec269-e6ba-467a-a599-ceac0032764c.webp?v=1714971043","width":2000},{"alt":null,"id":23896514199651,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/24896a6768066b408599f677921c079f0c5768f7_34b7b425-979c-4509-9d19-d7f5c57fa743.webp?v=1714971046"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/24896a6768066b408599f677921c079f0c5768f7_34b7b425-979c-4509-9d19-d7f5c57fa743.webp?v=1714971046","width":2000},{"alt":null,"id":23896514723939,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/130448eed9ae2f7ab6638db2e31c6711c3c4bec9_8f1a2eae-0084-4964-9c71-16df209d3ccc.webp?v=1714971048"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/130448eed9ae2f7ab6638db2e31c6711c3c4bec9_8f1a2eae-0084-4964-9c71-16df209d3ccc.webp?v=1714971048","width":2000},{"alt":null,"id":23896515215459,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/05a694c6dadea30915640367155e12eb0bc90327_fbb23e9d-049c-4899-87c7-ff5e4763cb42.webp?v=1714971051"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/05a694c6dadea30915640367155e12eb0bc90327_fbb23e9d-049c-4899-87c7-ff5e4763cb42.webp?v=1714971051","width":2000},{"alt":null,"id":23896516690019,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f0b989f5c32bc5f5264080c4b11acb52bc89345a_a7715801-57e4-43d5-88b1-3bfd35b352d7.webp?v=1714971053"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f0b989f5c32bc5f5264080c4b11acb52bc89345a_a7715801-57e4-43d5-88b1-3bfd35b352d7.webp?v=1714971053","width":2000},{"alt":null,"id":23896517312611,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/26e804750ff7b948cef0ee724ee87cb179eb1d06_73438bc0-dbd9-46d1-a2b2-6e88486dc675.webp?v=1714971055"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/26e804750ff7b948cef0ee724ee87cb179eb1d06_73438bc0-dbd9-46d1-a2b2-6e88486dc675.webp?v=1714971055","width":2000},{"alt":null,"id":23896517869667,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/98219c93160848d0ca82e44cb0787170f2518149_94835fbc-9a8b-4ad1-b0df-6196e0db4c98.webp?v=1714971058"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/98219c93160848d0ca82e44cb0787170f2518149_94835fbc-9a8b-4ad1-b0df-6196e0db4c98.webp?v=1714971058","width":2000},{"alt":null,"id":23896518721635,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5f10da023d9c1e9f84a7fff1c3dabd1764c61a90_37765d01-174a-4c48-80a8-597609dd62be.webp?v=1714971060"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5f10da023d9c1e9f84a7fff1c3dabd1764c61a90_37765d01-174a-4c48-80a8-597609dd62be.webp?v=1714971060","width":2000},{"alt":null,"id":23896519344227,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1fad450ea00f66ca028e9433e3247b1765af72f0_e610d5d1-1007-4340-a30f-872564aa3e33.webp?v=1714971063"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1fad450ea00f66ca028e9433e3247b1765af72f0_e610d5d1-1007-4340-a30f-872564aa3e33.webp?v=1714971063","width":2000},{"alt":null,"id":23896519770211,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f8f1f23462229e2e8aca83d321552110d1eda31d_c3727ea4-3add-43ca-9ba3-978f66a7d839.webp?v=1714971065"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f8f1f23462229e2e8aca83d321552110d1eda31d_c3727ea4-3add-43ca-9ba3-978f66a7d839.webp?v=1714971065","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41917009363043,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0108624-SB06","requires_shipping":true,"taxable":true,"featured_image":{"id":31491107291235,"product_id":7416060313699,"position":3,"created_at":"2024-05-06T12:50:48+08:00","updated_at":"2024-05-06T12:50:48+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/130448eed9ae2f7ab6638db2e31c6711c3c4bec9_8f1a2eae-0084-4964-9c71-16df209d3ccc.webp?v=1714971048","variant_ids":[41917009363043]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone XS Max - 【聯名設計款】 - Batman - 蝙蝠俠出任務 - 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":"NPB0108624-SB06","featured_media":{"alt":null,"id":23896514723939,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/130448eed9ae2f7ab6638db2e31c6711c3c4bec9_8f1a2eae-0084-4964-9c71-16df209d3ccc.webp?v=1714971048"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41917009363043,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0108624-SB06","requires_shipping":true,"taxable":true,"featured_image":{"id":31491107291235,"product_id":7416060313699,"position":3,"created_at":"2024-05-06T12:50:48+08:00","updated_at":"2024-05-06T12:50:48+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/130448eed9ae2f7ab6638db2e31c6711c3c4bec9_8f1a2eae-0084-4964-9c71-16df209d3ccc.webp?v=1714971048","variant_ids":[41917009363043]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone XS Max - 【聯名設計款】 - Batman - 蝙蝠俠出任務 - 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":"NPB0108624-SB06","featured_media":{"alt":null,"id":23896514723939,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/130448eed9ae2f7ab6638db2e31c6711c3c4bec9_8f1a2eae-0084-4964-9c71-16df209d3ccc.webp?v=1714971048"}},"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: "停產" }