$product = {"id":7416030494819,"title":"犀牛盾Mod NX手機殼 - iPhone XS Max - 【聯名設計款】 - Batman - 復古版","handle":"iphone-xs-max-mod-nx-printable-sb01","description":null,"published_at":"2024-06-11T16:50:52+08:00","created_at":"2024-05-06T12:45:20+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":41916691513443,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0108624-SB01","requires_shipping":true,"taxable":true,"featured_image":{"id":31491030417507,"product_id":7416030494819,"position":4,"created_at":"2024-05-06T12:45:30+08:00","updated_at":"2024-05-06T12:45:30+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/935dadeeb0e5b1428eeca73677e0e8edb26841c8_157b3254-f11d-4d09-9f4d-b0d96732da39.webp?v=1714970730","variant_ids":[41916691513443]},"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-SB01","featured_media":{"alt":null,"id":23896437653603,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/935dadeeb0e5b1428eeca73677e0e8edb26841c8_157b3254-f11d-4d09-9f4d-b0d96732da39.webp?v=1714970730"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8101a147af1ccfced1e4021b928c2b91d145b6e7_7dbb93c5-1f7e-47b6-ad99-7f038c2889ee.webp?v=1714970723","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e0f42f304fe9980f61b06cb6cebbb13f716b38bd_c6c3df23-f8ae-4d74-b11f-e51b7953e2e3.webp?v=1714970725","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fbecb49da5c01aafe596d6dd909c3934d9515cac_2c7208a8-54ca-42f6-8c7f-135180e3ad14.webp?v=1714970727","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/935dadeeb0e5b1428eeca73677e0e8edb26841c8_157b3254-f11d-4d09-9f4d-b0d96732da39.webp?v=1714970730","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8144c8b0dfb84ca59cf1e9ed4e5341fc3b510c82_b6cb1fa0-a446-45a6-bbd9-be9584b877d8.webp?v=1714970732","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/56f55eeb481fb9c25a95d347e61a2746deb720a6_08d9614f-8748-4775-974b-7959cd8aaf10.webp?v=1714970734","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e63159c01ce1731fd0f6e3be266fc519e059c727_df985ddd-5287-43a6-bdb3-1f9fafc83945.webp?v=1714970737","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e18c05d748410b8e534db3465182c9aec094622c_e859322e-4487-4f7d-a68f-ce200346c225.webp?v=1714970739","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c2b345c7957e43b5aead3137569e7fa538401b4d_ab8f775d-203d-4acc-b3b6-ffaef090cc80.webp?v=1714970742","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/314f48e45b4d2aaacbe4d54dadcf16cdd8df0d0d_0f936866-8823-4e6d-914f-7854fb3473ad.webp?v=1714970744"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8101a147af1ccfced1e4021b928c2b91d145b6e7_7dbb93c5-1f7e-47b6-ad99-7f038c2889ee.webp?v=1714970723","options":["color"],"media":[{"alt":null,"id":23896436277347,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8101a147af1ccfced1e4021b928c2b91d145b6e7_7dbb93c5-1f7e-47b6-ad99-7f038c2889ee.webp?v=1714970723"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8101a147af1ccfced1e4021b928c2b91d145b6e7_7dbb93c5-1f7e-47b6-ad99-7f038c2889ee.webp?v=1714970723","width":2000},{"alt":null,"id":23896436703331,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e0f42f304fe9980f61b06cb6cebbb13f716b38bd_c6c3df23-f8ae-4d74-b11f-e51b7953e2e3.webp?v=1714970725"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e0f42f304fe9980f61b06cb6cebbb13f716b38bd_c6c3df23-f8ae-4d74-b11f-e51b7953e2e3.webp?v=1714970725","width":2000},{"alt":null,"id":23896437260387,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fbecb49da5c01aafe596d6dd909c3934d9515cac_2c7208a8-54ca-42f6-8c7f-135180e3ad14.webp?v=1714970727"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fbecb49da5c01aafe596d6dd909c3934d9515cac_2c7208a8-54ca-42f6-8c7f-135180e3ad14.webp?v=1714970727","width":2000},{"alt":null,"id":23896437653603,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/935dadeeb0e5b1428eeca73677e0e8edb26841c8_157b3254-f11d-4d09-9f4d-b0d96732da39.webp?v=1714970730"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/935dadeeb0e5b1428eeca73677e0e8edb26841c8_157b3254-f11d-4d09-9f4d-b0d96732da39.webp?v=1714970730","width":2000},{"alt":null,"id":23896438440035,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8144c8b0dfb84ca59cf1e9ed4e5341fc3b510c82_b6cb1fa0-a446-45a6-bbd9-be9584b877d8.webp?v=1714970732"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8144c8b0dfb84ca59cf1e9ed4e5341fc3b510c82_b6cb1fa0-a446-45a6-bbd9-be9584b877d8.webp?v=1714970732","width":2000},{"alt":null,"id":23896438997091,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/56f55eeb481fb9c25a95d347e61a2746deb720a6_08d9614f-8748-4775-974b-7959cd8aaf10.webp?v=1714970734"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/56f55eeb481fb9c25a95d347e61a2746deb720a6_08d9614f-8748-4775-974b-7959cd8aaf10.webp?v=1714970734","width":2000},{"alt":null,"id":23896439521379,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e63159c01ce1731fd0f6e3be266fc519e059c727_df985ddd-5287-43a6-bdb3-1f9fafc83945.webp?v=1714970737"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e63159c01ce1731fd0f6e3be266fc519e059c727_df985ddd-5287-43a6-bdb3-1f9fafc83945.webp?v=1714970737","width":2000},{"alt":null,"id":23896439914595,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e18c05d748410b8e534db3465182c9aec094622c_e859322e-4487-4f7d-a68f-ce200346c225.webp?v=1714970739"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e18c05d748410b8e534db3465182c9aec094622c_e859322e-4487-4f7d-a68f-ce200346c225.webp?v=1714970739","width":2000},{"alt":null,"id":23896440438883,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c2b345c7957e43b5aead3137569e7fa538401b4d_ab8f775d-203d-4acc-b3b6-ffaef090cc80.webp?v=1714970742"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c2b345c7957e43b5aead3137569e7fa538401b4d_ab8f775d-203d-4acc-b3b6-ffaef090cc80.webp?v=1714970742","width":2000},{"alt":null,"id":23896440766563,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/314f48e45b4d2aaacbe4d54dadcf16cdd8df0d0d_0f936866-8823-4e6d-914f-7854fb3473ad.webp?v=1714970744"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/314f48e45b4d2aaacbe4d54dadcf16cdd8df0d0d_0f936866-8823-4e6d-914f-7854fb3473ad.webp?v=1714970744","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41916691513443,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0108624-SB01","requires_shipping":true,"taxable":true,"featured_image":{"id":31491030417507,"product_id":7416030494819,"position":4,"created_at":"2024-05-06T12:45:30+08:00","updated_at":"2024-05-06T12:45:30+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/935dadeeb0e5b1428eeca73677e0e8edb26841c8_157b3254-f11d-4d09-9f4d-b0d96732da39.webp?v=1714970730","variant_ids":[41916691513443]},"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-SB01","featured_media":{"alt":null,"id":23896437653603,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/935dadeeb0e5b1428eeca73677e0e8edb26841c8_157b3254-f11d-4d09-9f4d-b0d96732da39.webp?v=1714970730"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41916691513443,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0108624-SB01","requires_shipping":true,"taxable":true,"featured_image":{"id":31491030417507,"product_id":7416030494819,"position":4,"created_at":"2024-05-06T12:45:30+08:00","updated_at":"2024-05-06T12:45:30+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/935dadeeb0e5b1428eeca73677e0e8edb26841c8_157b3254-f11d-4d09-9f4d-b0d96732da39.webp?v=1714970730","variant_ids":[41916691513443]},"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-SB01","featured_media":{"alt":null,"id":23896437653603,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/935dadeeb0e5b1428eeca73677e0e8edb26841c8_157b3254-f11d-4d09-9f4d-b0d96732da39.webp?v=1714970730"}},"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: "停產" }