$product = {"id":7416056217699,"title":"犀牛盾Mod NX手機殼 - iPhone XS Max - 【聯名設計款】 - Batman - 黑白畫風-小丑","handle":"iphone-xs-max-mod-nx-printable-sb13","description":null,"published_at":"2024-06-11T16:51:34+08:00","created_at":"2024-05-06T12:49:58+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":41916964405347,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0108624-SB13","requires_shipping":true,"taxable":true,"featured_image":{"id":31491097264227,"product_id":7416056217699,"position":3,"created_at":"2024-05-06T12:50:06+08:00","updated_at":"2024-05-06T12:50:06+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1a057615838d12655d1544cd8dc4a98f3234859d_17cf77f7-70b7-4136-b34b-50a5d0dd0d22.webp?v=1714971006","variant_ids":[41916964405347]},"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-SB13","featured_media":{"alt":null,"id":23896504631395,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1a057615838d12655d1544cd8dc4a98f3234859d_17cf77f7-70b7-4136-b34b-50a5d0dd0d22.webp?v=1714971006"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0c8e6235056b1e2153750fc091f18cb6f3cb926a_92ed1f39-cbaf-4bb7-925e-86dd35bc400b.webp?v=1714971001","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0482296f5d6b3e0a275e8bc664dae35cdfb6d135_5983d5ea-2c4e-440f-bcc5-8361944cd193.webp?v=1714971004","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1a057615838d12655d1544cd8dc4a98f3234859d_17cf77f7-70b7-4136-b34b-50a5d0dd0d22.webp?v=1714971006","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2ef0258c3ad798df7d410fec3d37fa70c8beb220_e6bfcb58-cdd6-4170-bad1-670932eae12f.webp?v=1714971009","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/940481f99218088a509f141875dd140e06b6d65e_ead46f56-21fa-413f-abc0-1fda4fb34ced.webp?v=1714971011","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/455ab5bb7222c11b72f25d54c16040bcb4567dc4_3e6eac02-a676-4399-986d-8e4b5b6a2b4c.webp?v=1714971014","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d44b378c57d9cc1521c5dfe909c28cba8ac18df5_56132c42-3ba3-490e-911a-2c77b300fd7c.webp?v=1714971017","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7e134417a6a27ed9d13045d252c511418d972732_d92e9fbc-ef1f-478e-aadb-4f055fbf098e.webp?v=1714971019","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f88f3206d2c9d8bf9836a7c40efea65976a42ff5_6f02c5c3-5c94-4e18-a37f-325f8c8c7fc7.webp?v=1714971022","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/68338150d258ec1acdcd790f4319cbf40e2829c2_ecda8579-9827-4506-8ee2-805787509e77.webp?v=1714971024"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0c8e6235056b1e2153750fc091f18cb6f3cb926a_92ed1f39-cbaf-4bb7-925e-86dd35bc400b.webp?v=1714971001","options":["color"],"media":[{"alt":null,"id":23896503025763,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0c8e6235056b1e2153750fc091f18cb6f3cb926a_92ed1f39-cbaf-4bb7-925e-86dd35bc400b.webp?v=1714971001"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0c8e6235056b1e2153750fc091f18cb6f3cb926a_92ed1f39-cbaf-4bb7-925e-86dd35bc400b.webp?v=1714971001","width":2000},{"alt":null,"id":23896504238179,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0482296f5d6b3e0a275e8bc664dae35cdfb6d135_5983d5ea-2c4e-440f-bcc5-8361944cd193.webp?v=1714971004"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0482296f5d6b3e0a275e8bc664dae35cdfb6d135_5983d5ea-2c4e-440f-bcc5-8361944cd193.webp?v=1714971004","width":2000},{"alt":null,"id":23896504631395,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1a057615838d12655d1544cd8dc4a98f3234859d_17cf77f7-70b7-4136-b34b-50a5d0dd0d22.webp?v=1714971006"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1a057615838d12655d1544cd8dc4a98f3234859d_17cf77f7-70b7-4136-b34b-50a5d0dd0d22.webp?v=1714971006","width":2000},{"alt":null,"id":23896505253987,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2ef0258c3ad798df7d410fec3d37fa70c8beb220_e6bfcb58-cdd6-4170-bad1-670932eae12f.webp?v=1714971009"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2ef0258c3ad798df7d410fec3d37fa70c8beb220_e6bfcb58-cdd6-4170-bad1-670932eae12f.webp?v=1714971009","width":2000},{"alt":null,"id":23896505974883,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/940481f99218088a509f141875dd140e06b6d65e_ead46f56-21fa-413f-abc0-1fda4fb34ced.webp?v=1714971011"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/940481f99218088a509f141875dd140e06b6d65e_ead46f56-21fa-413f-abc0-1fda4fb34ced.webp?v=1714971011","width":2000},{"alt":null,"id":23896506630243,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/455ab5bb7222c11b72f25d54c16040bcb4567dc4_3e6eac02-a676-4399-986d-8e4b5b6a2b4c.webp?v=1714971014"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/455ab5bb7222c11b72f25d54c16040bcb4567dc4_3e6eac02-a676-4399-986d-8e4b5b6a2b4c.webp?v=1714971014","width":2000},{"alt":null,"id":23896507252835,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d44b378c57d9cc1521c5dfe909c28cba8ac18df5_56132c42-3ba3-490e-911a-2c77b300fd7c.webp?v=1714971017"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d44b378c57d9cc1521c5dfe909c28cba8ac18df5_56132c42-3ba3-490e-911a-2c77b300fd7c.webp?v=1714971017","width":2000},{"alt":null,"id":23896507711587,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7e134417a6a27ed9d13045d252c511418d972732_d92e9fbc-ef1f-478e-aadb-4f055fbf098e.webp?v=1714971019"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7e134417a6a27ed9d13045d252c511418d972732_d92e9fbc-ef1f-478e-aadb-4f055fbf098e.webp?v=1714971019","width":2000},{"alt":null,"id":23896508170339,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f88f3206d2c9d8bf9836a7c40efea65976a42ff5_6f02c5c3-5c94-4e18-a37f-325f8c8c7fc7.webp?v=1714971022"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f88f3206d2c9d8bf9836a7c40efea65976a42ff5_6f02c5c3-5c94-4e18-a37f-325f8c8c7fc7.webp?v=1714971022","width":2000},{"alt":null,"id":23896508629091,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/68338150d258ec1acdcd790f4319cbf40e2829c2_ecda8579-9827-4506-8ee2-805787509e77.webp?v=1714971024"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/68338150d258ec1acdcd790f4319cbf40e2829c2_ecda8579-9827-4506-8ee2-805787509e77.webp?v=1714971024","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41916964405347,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0108624-SB13","requires_shipping":true,"taxable":true,"featured_image":{"id":31491097264227,"product_id":7416056217699,"position":3,"created_at":"2024-05-06T12:50:06+08:00","updated_at":"2024-05-06T12:50:06+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1a057615838d12655d1544cd8dc4a98f3234859d_17cf77f7-70b7-4136-b34b-50a5d0dd0d22.webp?v=1714971006","variant_ids":[41916964405347]},"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-SB13","featured_media":{"alt":null,"id":23896504631395,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1a057615838d12655d1544cd8dc4a98f3234859d_17cf77f7-70b7-4136-b34b-50a5d0dd0d22.webp?v=1714971006"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41916964405347,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0108624-SB13","requires_shipping":true,"taxable":true,"featured_image":{"id":31491097264227,"product_id":7416056217699,"position":3,"created_at":"2024-05-06T12:50:06+08:00","updated_at":"2024-05-06T12:50:06+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1a057615838d12655d1544cd8dc4a98f3234859d_17cf77f7-70b7-4136-b34b-50a5d0dd0d22.webp?v=1714971006","variant_ids":[41916964405347]},"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-SB13","featured_media":{"alt":null,"id":23896504631395,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1a057615838d12655d1544cd8dc4a98f3234859d_17cf77f7-70b7-4136-b34b-50a5d0dd0d22.webp?v=1714971006"}},"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: "停產" }