$product = {"id":7415010984035,"title":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - 迪士尼-星際大戰 Star Wars - C3PO-經典","handle":"iphone-12-mini-mod-nx-magsafe-printable-pb24","description":null,"published_at":"2024-06-11T17:55:34+08:00","created_at":"2024-05-05T20:05:45+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"設計師MOD NX MagSafe專區迪士尼-星際大戰 Star Wars","tags":["20%","25%","30%","35%","40%","45%","50%","b2b","brand-Apple","designer","designer-starwars","device-iPhone 12 mini","merge","mod-nx-magsafe-printable","new-modnx-sku","reseller-modnx-magsafe-star-wars","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":41910913237091,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118424-PB24","requires_shipping":true,"taxable":true,"featured_image":{"id":31487916343395,"product_id":7415010984035,"position":4,"created_at":"2024-05-05T20:05:55+08:00","updated_at":"2024-05-05T20:05:55+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e4895312fa4b9d09c6784ea2e5276539ff5f142f_93d72d3f-d981-4a8c-a098-8943cf3680b9.webp?v=1714910755","variant_ids":[41910913237091]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - 迪士尼-星際大戰 Star Wars - C3PO-經典 - 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":"MPB0118424-PB24","featured_media":{"alt":null,"id":23893260402787,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e4895312fa4b9d09c6784ea2e5276539ff5f142f_93d72d3f-d981-4a8c-a098-8943cf3680b9.webp?v=1714910755"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/645c7c1f3caa84e0b3f5c536b14a1f4190d35ab3_83d96496-31a3-4d28-9f44-8dd724a17b79.webp?v=1714910748","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f2d5201ccdfaf9c9695c8731ac199066eda2ce44_40555884-e352-4ac5-b6fa-13427c3d96c0.webp?v=1714910750","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6086a4ed7857e28ccaafc9c30a8f82470d193ffe_89d9e986-9eb4-40fc-ab5a-4b29801c8fef.webp?v=1714910752","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e4895312fa4b9d09c6784ea2e5276539ff5f142f_93d72d3f-d981-4a8c-a098-8943cf3680b9.webp?v=1714910755","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1b5558f13e3b13061a21de35e976c576644084b4_a272436b-a959-491f-be9a-f1381a67544e.webp?v=1714910758","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3902f77b0aba95236bf17d44d92a3d1ca14d2884_39d1eb99-2b2e-4448-9134-1b245039c5c6.webp?v=1714910760","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c51fd24b9b9098c774f80e0dd5a7f0eb5904096b_791dd730-03f6-42db-93f7-166c99cb00f0.webp?v=1714910763","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5643269c055fd251a81ada29b42e0fa761fc0726_085df86b-da61-4925-9278-33ba03706bdb.webp?v=1714910765","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d3703f7c1bd9aa5e73826d4ad251dff8a1c9c1a9_781a0c70-c7bf-435f-8f8d-f2016e56f8fc.webp?v=1714910768","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/006b9762e5d6df5957428334917b3db203e0f118_2fd2f953-189f-42d3-8703-13aa451370a2.webp?v=1714910770","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/294eca0c655d81fad600ef16fc666b6d6838c9cb_ea7b5205-52f9-4412-8a7b-2844461719f0.webp?v=1714910772"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/645c7c1f3caa84e0b3f5c536b14a1f4190d35ab3_83d96496-31a3-4d28-9f44-8dd724a17b79.webp?v=1714910748","options":["color"],"media":[{"alt":null,"id":23893258698851,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/645c7c1f3caa84e0b3f5c536b14a1f4190d35ab3_83d96496-31a3-4d28-9f44-8dd724a17b79.webp?v=1714910748"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/645c7c1f3caa84e0b3f5c536b14a1f4190d35ab3_83d96496-31a3-4d28-9f44-8dd724a17b79.webp?v=1714910748","width":2000},{"alt":null,"id":23893259321443,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f2d5201ccdfaf9c9695c8731ac199066eda2ce44_40555884-e352-4ac5-b6fa-13427c3d96c0.webp?v=1714910750"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f2d5201ccdfaf9c9695c8731ac199066eda2ce44_40555884-e352-4ac5-b6fa-13427c3d96c0.webp?v=1714910750","width":2000},{"alt":null,"id":23893260009571,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6086a4ed7857e28ccaafc9c30a8f82470d193ffe_89d9e986-9eb4-40fc-ab5a-4b29801c8fef.webp?v=1714910752"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6086a4ed7857e28ccaafc9c30a8f82470d193ffe_89d9e986-9eb4-40fc-ab5a-4b29801c8fef.webp?v=1714910752","width":2000},{"alt":null,"id":23893260402787,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e4895312fa4b9d09c6784ea2e5276539ff5f142f_93d72d3f-d981-4a8c-a098-8943cf3680b9.webp?v=1714910755"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e4895312fa4b9d09c6784ea2e5276539ff5f142f_93d72d3f-d981-4a8c-a098-8943cf3680b9.webp?v=1714910755","width":2000},{"alt":null,"id":23893260959843,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1b5558f13e3b13061a21de35e976c576644084b4_a272436b-a959-491f-be9a-f1381a67544e.webp?v=1714910758"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1b5558f13e3b13061a21de35e976c576644084b4_a272436b-a959-491f-be9a-f1381a67544e.webp?v=1714910758","width":2000},{"alt":null,"id":23893261615203,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3902f77b0aba95236bf17d44d92a3d1ca14d2884_39d1eb99-2b2e-4448-9134-1b245039c5c6.webp?v=1714910760"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3902f77b0aba95236bf17d44d92a3d1ca14d2884_39d1eb99-2b2e-4448-9134-1b245039c5c6.webp?v=1714910760","width":2000},{"alt":null,"id":23893262368867,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c51fd24b9b9098c774f80e0dd5a7f0eb5904096b_791dd730-03f6-42db-93f7-166c99cb00f0.webp?v=1714910763"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c51fd24b9b9098c774f80e0dd5a7f0eb5904096b_791dd730-03f6-42db-93f7-166c99cb00f0.webp?v=1714910763","width":2000},{"alt":null,"id":23893262827619,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5643269c055fd251a81ada29b42e0fa761fc0726_085df86b-da61-4925-9278-33ba03706bdb.webp?v=1714910765"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5643269c055fd251a81ada29b42e0fa761fc0726_085df86b-da61-4925-9278-33ba03706bdb.webp?v=1714910765","width":2000},{"alt":null,"id":23893263384675,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d3703f7c1bd9aa5e73826d4ad251dff8a1c9c1a9_781a0c70-c7bf-435f-8f8d-f2016e56f8fc.webp?v=1714910768"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d3703f7c1bd9aa5e73826d4ad251dff8a1c9c1a9_781a0c70-c7bf-435f-8f8d-f2016e56f8fc.webp?v=1714910768","width":2000},{"alt":null,"id":23893263974499,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/006b9762e5d6df5957428334917b3db203e0f118_2fd2f953-189f-42d3-8703-13aa451370a2.webp?v=1714910770"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/006b9762e5d6df5957428334917b3db203e0f118_2fd2f953-189f-42d3-8703-13aa451370a2.webp?v=1714910770","width":2000},{"alt":null,"id":23893264531555,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/294eca0c655d81fad600ef16fc666b6d6838c9cb_ea7b5205-52f9-4412-8a7b-2844461719f0.webp?v=1714910772"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/294eca0c655d81fad600ef16fc666b6d6838c9cb_ea7b5205-52f9-4412-8a7b-2844461719f0.webp?v=1714910772","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41910913237091,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118424-PB24","requires_shipping":true,"taxable":true,"featured_image":{"id":31487916343395,"product_id":7415010984035,"position":4,"created_at":"2024-05-05T20:05:55+08:00","updated_at":"2024-05-05T20:05:55+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e4895312fa4b9d09c6784ea2e5276539ff5f142f_93d72d3f-d981-4a8c-a098-8943cf3680b9.webp?v=1714910755","variant_ids":[41910913237091]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - 迪士尼-星際大戰 Star Wars - C3PO-經典 - 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":"MPB0118424-PB24","featured_media":{"alt":null,"id":23893260402787,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e4895312fa4b9d09c6784ea2e5276539ff5f142f_93d72d3f-d981-4a8c-a098-8943cf3680b9.webp?v=1714910755"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41910913237091,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118424-PB24","requires_shipping":true,"taxable":true,"featured_image":{"id":31487916343395,"product_id":7415010984035,"position":4,"created_at":"2024-05-05T20:05:55+08:00","updated_at":"2024-05-05T20:05:55+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e4895312fa4b9d09c6784ea2e5276539ff5f142f_93d72d3f-d981-4a8c-a098-8943cf3680b9.webp?v=1714910755","variant_ids":[41910913237091]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - 迪士尼-星際大戰 Star Wars - C3PO-經典 - 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":"MPB0118424-PB24","featured_media":{"alt":null,"id":23893260402787,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e4895312fa4b9d09c6784ea2e5276539ff5f142f_93d72d3f-d981-4a8c-a098-8943cf3680b9.webp?v=1714910755"}},"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: "停產" }