$product = {"id":7411414827107,"title":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 14 Plus - Batman - 蝙蝠車","handle":"iphone-14-plus-mod-nx-magsafe-printable-sb05","description":null,"published_at":"2024-06-11T17:44:21+08:00","created_at":"2024-05-05T00:25:16+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"設計師MOD NX MagSafe專區Batman","tags":["20%","25%","30%","35%","40%","45%","50%","b2b","brand-Apple","designer","designer-batman","device-iPhone 14 Plus","merge","mod-nx-magsafe-printable","new-modnx-sku","reseller-modnx-magsafe-batman","Top50","type-Mod NX Printable MagSafe Printable"],"price":110000,"price_min":110000,"price_max":110000,"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":41898590011491,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0126124-SB05","requires_shipping":true,"taxable":true,"featured_image":{"id":31480368300131,"product_id":7411414827107,"position":4,"created_at":"2024-05-05T00:25:25+08:00","updated_at":"2024-05-05T00:25:25+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c2989cc50155c6cca63bb995ad74a6791e718eca_dce050a7-67e3-46a7-9fe5-d773f2b8df2d.webp?v=1714839925","variant_ids":[41898590011491]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 14 Plus - Batman - 蝙蝠車 - Mod NX-黑色邊框","public_title":"Mod NX-黑色邊框","options":["Mod NX-黑色邊框"],"price":110000,"weight":1500,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"MPB0126124-SB05","featured_media":{"alt":null,"id":23885620052067,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c2989cc50155c6cca63bb995ad74a6791e718eca_dce050a7-67e3-46a7-9fe5-d773f2b8df2d.webp?v=1714839925"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e8ce070e7439de923a03e1bfddfcd1f14c3490aa_263f58dd-b1ac-4535-9f32-0a54855f3074.webp?v=1714839918","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f6580e871ccbe3af877878ff2faa197bb594761c_42491f21-53be-4b03-8d34-7552ef2eb8c4.webp?v=1714839920","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a34d1d48a33f3156c36a50142ed4603e1e21c757_afddd958-ebf3-4b89-bd48-21ab874af111.webp?v=1714839923","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c2989cc50155c6cca63bb995ad74a6791e718eca_dce050a7-67e3-46a7-9fe5-d773f2b8df2d.webp?v=1714839925","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9587515292349e52e9562bb70f8b3ee0334cbe3f_fea180fb-25a2-48a1-8511-c6d8ca6964e3.webp?v=1714839928","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3698daae02b08aa06b5c361e348cec538a0f3308_524fece0-7858-4c74-ae52-91d2a95d2c90.webp?v=1714839930","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c276c193b674be97806ec5d35663b5addc87c1a4_0b144e7d-e968-4787-8a57-46ada9451e89.webp?v=1714839933","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d71606b1b7c9d4ff429e755ea2c357ccc5a43c35_1ce0a510-3e43-4e90-a187-95ab59d3b5ca.webp?v=1714839935","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8265345b3f0ef79d7dca54fed404b019a6eb5bb7_fe8761b9-4cc2-4c83-96e0-4a4d2b5375cc.webp?v=1714839938","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b6a3bd4852c23a183b3b3ed585ad4c0c10126e60_6c668e6c-deda-4732-aadf-e0854ab8e233.webp?v=1714839940"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e8ce070e7439de923a03e1bfddfcd1f14c3490aa_263f58dd-b1ac-4535-9f32-0a54855f3074.webp?v=1714839918","options":["color"],"media":[{"alt":null,"id":23885618643043,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e8ce070e7439de923a03e1bfddfcd1f14c3490aa_263f58dd-b1ac-4535-9f32-0a54855f3074.webp?v=1714839918"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e8ce070e7439de923a03e1bfddfcd1f14c3490aa_263f58dd-b1ac-4535-9f32-0a54855f3074.webp?v=1714839918","width":2000},{"alt":null,"id":23885619036259,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f6580e871ccbe3af877878ff2faa197bb594761c_42491f21-53be-4b03-8d34-7552ef2eb8c4.webp?v=1714839920"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f6580e871ccbe3af877878ff2faa197bb594761c_42491f21-53be-4b03-8d34-7552ef2eb8c4.webp?v=1714839920","width":2000},{"alt":null,"id":23885619658851,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a34d1d48a33f3156c36a50142ed4603e1e21c757_afddd958-ebf3-4b89-bd48-21ab874af111.webp?v=1714839923"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a34d1d48a33f3156c36a50142ed4603e1e21c757_afddd958-ebf3-4b89-bd48-21ab874af111.webp?v=1714839923","width":2000},{"alt":null,"id":23885620052067,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c2989cc50155c6cca63bb995ad74a6791e718eca_dce050a7-67e3-46a7-9fe5-d773f2b8df2d.webp?v=1714839925"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c2989cc50155c6cca63bb995ad74a6791e718eca_dce050a7-67e3-46a7-9fe5-d773f2b8df2d.webp?v=1714839925","width":2000},{"alt":null,"id":23885620609123,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9587515292349e52e9562bb70f8b3ee0334cbe3f_fea180fb-25a2-48a1-8511-c6d8ca6964e3.webp?v=1714839928"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9587515292349e52e9562bb70f8b3ee0334cbe3f_fea180fb-25a2-48a1-8511-c6d8ca6964e3.webp?v=1714839928","width":2000},{"alt":null,"id":23885621231715,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3698daae02b08aa06b5c361e348cec538a0f3308_524fece0-7858-4c74-ae52-91d2a95d2c90.webp?v=1714839930"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3698daae02b08aa06b5c361e348cec538a0f3308_524fece0-7858-4c74-ae52-91d2a95d2c90.webp?v=1714839930","width":2000},{"alt":null,"id":23885621690467,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c276c193b674be97806ec5d35663b5addc87c1a4_0b144e7d-e968-4787-8a57-46ada9451e89.webp?v=1714839933"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c276c193b674be97806ec5d35663b5addc87c1a4_0b144e7d-e968-4787-8a57-46ada9451e89.webp?v=1714839933","width":2000},{"alt":null,"id":23885622280291,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d71606b1b7c9d4ff429e755ea2c357ccc5a43c35_1ce0a510-3e43-4e90-a187-95ab59d3b5ca.webp?v=1714839935"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d71606b1b7c9d4ff429e755ea2c357ccc5a43c35_1ce0a510-3e43-4e90-a187-95ab59d3b5ca.webp?v=1714839935","width":2000},{"alt":null,"id":23885622739043,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8265345b3f0ef79d7dca54fed404b019a6eb5bb7_fe8761b9-4cc2-4c83-96e0-4a4d2b5375cc.webp?v=1714839938"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8265345b3f0ef79d7dca54fed404b019a6eb5bb7_fe8761b9-4cc2-4c83-96e0-4a4d2b5375cc.webp?v=1714839938","width":2000},{"alt":null,"id":23885623427171,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b6a3bd4852c23a183b3b3ed585ad4c0c10126e60_6c668e6c-deda-4732-aadf-e0854ab8e233.webp?v=1714839940"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b6a3bd4852c23a183b3b3ed585ad4c0c10126e60_6c668e6c-deda-4732-aadf-e0854ab8e233.webp?v=1714839940","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41898590011491,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0126124-SB05","requires_shipping":true,"taxable":true,"featured_image":{"id":31480368300131,"product_id":7411414827107,"position":4,"created_at":"2024-05-05T00:25:25+08:00","updated_at":"2024-05-05T00:25:25+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c2989cc50155c6cca63bb995ad74a6791e718eca_dce050a7-67e3-46a7-9fe5-d773f2b8df2d.webp?v=1714839925","variant_ids":[41898590011491]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 14 Plus - Batman - 蝙蝠車 - Mod NX-黑色邊框","public_title":"Mod NX-黑色邊框","options":["Mod NX-黑色邊框"],"price":110000,"weight":1500,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"MPB0126124-SB05","featured_media":{"alt":null,"id":23885620052067,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c2989cc50155c6cca63bb995ad74a6791e718eca_dce050a7-67e3-46a7-9fe5-d773f2b8df2d.webp?v=1714839925"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41898590011491,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0126124-SB05","requires_shipping":true,"taxable":true,"featured_image":{"id":31480368300131,"product_id":7411414827107,"position":4,"created_at":"2024-05-05T00:25:25+08:00","updated_at":"2024-05-05T00:25:25+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c2989cc50155c6cca63bb995ad74a6791e718eca_dce050a7-67e3-46a7-9fe5-d773f2b8df2d.webp?v=1714839925","variant_ids":[41898590011491]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 14 Plus - Batman - 蝙蝠車 - Mod NX-黑色邊框","public_title":"Mod NX-黑色邊框","options":["Mod NX-黑色邊框"],"price":110000,"weight":1500,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"MPB0126124-SB05","featured_media":{"alt":null,"id":23885620052067,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c2989cc50155c6cca63bb995ad74a6791e718eca_dce050a7-67e3-46a7-9fe5-d773f2b8df2d.webp?v=1714839925"}},"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: "停產" }