$product = {"id":7414941515875,"title":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - Weiweiboy - 超級可愛大王","handle":"iphone-12-mini-mod-nx-magsafe-printable-eo01","description":null,"published_at":"2024-06-11T17:53:40+08:00","created_at":"2024-05-05T19:52:57+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"設計師MOD NX MagSafe專區Weiweiboy","tags":["20%","25%","30%","35%","40%","45%","50%","b2b","brand-Apple","designer","designer-weiweiboy","device-iPhone 12 mini","merge","mod-nx-magsafe-printable","new-modnx-sku","reseller-modnx-magsafe-weiweiboy","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":41910171205731,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118424-EO01","requires_shipping":true,"taxable":true,"featured_image":{"id":31487740706915,"product_id":7414941515875,"position":9,"created_at":"2024-05-05T19:53:20+08:00","updated_at":"2024-05-05T19:53:20+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dcb5a7924ce8ced679c6ef97f58374b3487f63ac_bb8edbfa-a5a7-4c17-b637-16c4d0d2505e.webp?v=1714910000","variant_ids":[41910171205731]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - Weiweiboy - 超級可愛大王 - Mod NX-黑色邊框","public_title":"Mod NX-黑色邊框","options":["Mod NX-黑色邊框"],"price":110000,"weight":1380,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"MPB0118424-EO01","featured_media":{"alt":null,"id":23893084668003,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dcb5a7924ce8ced679c6ef97f58374b3487f63ac_bb8edbfa-a5a7-4c17-b637-16c4d0d2505e.webp?v=1714910000"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f0a71c9d3926f59854b873d32c8ad2a1876045df_dd468023-50c8-4504-8d44-69bb24e25311.webp?v=1714909979","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c6e933387a63fb543483a8056ff768b1b34a5943_b14f12ca-2c75-4fff-af5c-c195c77ab3a7.webp?v=1714909982","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/96ea14983c8561c22d850e5e4cf878c24cd24d0c_55ef05d1-b195-4d3e-a16b-9a90b53c6e4d.webp?v=1714909984","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7f3d3c6523d22ce29f3479c8f1879a4caf3cd081_95169c35-381b-40a8-ae89-c571bb748792.webp?v=1714909987","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7d2c4f5bc919248687c59344984906af21697b52_c5e9b7bd-7130-48e7-989e-172cef882a87.webp?v=1714909990","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/aed84e5711464f4f3306cc3f7027689875615599_b2acf304-d4ab-420a-93bd-cdbfbb9e0553.webp?v=1714909992","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2c813e4ebb0b538bb36eafe4bf52771f449c91e1_f9f41eb1-0efc-44e5-bc3f-bfd677e2be49.webp?v=1714909994","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4b300f0ee30b6d339e0dbe340b572fd1dc72caf9_d0f5fe4e-5a2c-44e4-aa6b-a95b0d723612.webp?v=1714909997","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dcb5a7924ce8ced679c6ef97f58374b3487f63ac_bb8edbfa-a5a7-4c17-b637-16c4d0d2505e.webp?v=1714910000","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/63ae653f70838b6142c3eef18dd5643846868727_af036bde-a3bd-4cf0-8daf-d2d43e597a0c.webp?v=1714910002","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4e9f64c363817ce43f0a8787fa1e784f1c9cfeb7_4a1198f8-b51d-4fb8-b84c-81c5c8eef7ae.webp?v=1714910004"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f0a71c9d3926f59854b873d32c8ad2a1876045df_dd468023-50c8-4504-8d44-69bb24e25311.webp?v=1714909979","options":["color"],"media":[{"alt":null,"id":23893079785571,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f0a71c9d3926f59854b873d32c8ad2a1876045df_dd468023-50c8-4504-8d44-69bb24e25311.webp?v=1714909979"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f0a71c9d3926f59854b873d32c8ad2a1876045df_dd468023-50c8-4504-8d44-69bb24e25311.webp?v=1714909979","width":2000},{"alt":null,"id":23893080146019,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c6e933387a63fb543483a8056ff768b1b34a5943_b14f12ca-2c75-4fff-af5c-c195c77ab3a7.webp?v=1714909982"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c6e933387a63fb543483a8056ff768b1b34a5943_b14f12ca-2c75-4fff-af5c-c195c77ab3a7.webp?v=1714909982","width":2000},{"alt":null,"id":23893080899683,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/96ea14983c8561c22d850e5e4cf878c24cd24d0c_55ef05d1-b195-4d3e-a16b-9a90b53c6e4d.webp?v=1714909984"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/96ea14983c8561c22d850e5e4cf878c24cd24d0c_55ef05d1-b195-4d3e-a16b-9a90b53c6e4d.webp?v=1714909984","width":2000},{"alt":null,"id":23893081489507,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7f3d3c6523d22ce29f3479c8f1879a4caf3cd081_95169c35-381b-40a8-ae89-c571bb748792.webp?v=1714909987"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7f3d3c6523d22ce29f3479c8f1879a4caf3cd081_95169c35-381b-40a8-ae89-c571bb748792.webp?v=1714909987","width":2000},{"alt":null,"id":23893082013795,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7d2c4f5bc919248687c59344984906af21697b52_c5e9b7bd-7130-48e7-989e-172cef882a87.webp?v=1714909990"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7d2c4f5bc919248687c59344984906af21697b52_c5e9b7bd-7130-48e7-989e-172cef882a87.webp?v=1714909990","width":2000},{"alt":null,"id":23893082701923,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/aed84e5711464f4f3306cc3f7027689875615599_b2acf304-d4ab-420a-93bd-cdbfbb9e0553.webp?v=1714909992"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/aed84e5711464f4f3306cc3f7027689875615599_b2acf304-d4ab-420a-93bd-cdbfbb9e0553.webp?v=1714909992","width":2000},{"alt":null,"id":23893083160675,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2c813e4ebb0b538bb36eafe4bf52771f449c91e1_f9f41eb1-0efc-44e5-bc3f-bfd677e2be49.webp?v=1714909994"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2c813e4ebb0b538bb36eafe4bf52771f449c91e1_f9f41eb1-0efc-44e5-bc3f-bfd677e2be49.webp?v=1714909994","width":2000},{"alt":null,"id":23893083979875,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4b300f0ee30b6d339e0dbe340b572fd1dc72caf9_d0f5fe4e-5a2c-44e4-aa6b-a95b0d723612.webp?v=1714909997"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4b300f0ee30b6d339e0dbe340b572fd1dc72caf9_d0f5fe4e-5a2c-44e4-aa6b-a95b0d723612.webp?v=1714909997","width":2000},{"alt":null,"id":23893084668003,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dcb5a7924ce8ced679c6ef97f58374b3487f63ac_bb8edbfa-a5a7-4c17-b637-16c4d0d2505e.webp?v=1714910000"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dcb5a7924ce8ced679c6ef97f58374b3487f63ac_bb8edbfa-a5a7-4c17-b637-16c4d0d2505e.webp?v=1714910000","width":2000},{"alt":null,"id":23893085093987,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/63ae653f70838b6142c3eef18dd5643846868727_af036bde-a3bd-4cf0-8daf-d2d43e597a0c.webp?v=1714910002"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/63ae653f70838b6142c3eef18dd5643846868727_af036bde-a3bd-4cf0-8daf-d2d43e597a0c.webp?v=1714910002","width":2000},{"alt":null,"id":23893085847651,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4e9f64c363817ce43f0a8787fa1e784f1c9cfeb7_4a1198f8-b51d-4fb8-b84c-81c5c8eef7ae.webp?v=1714910004"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4e9f64c363817ce43f0a8787fa1e784f1c9cfeb7_4a1198f8-b51d-4fb8-b84c-81c5c8eef7ae.webp?v=1714910004","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41910171205731,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118424-EO01","requires_shipping":true,"taxable":true,"featured_image":{"id":31487740706915,"product_id":7414941515875,"position":9,"created_at":"2024-05-05T19:53:20+08:00","updated_at":"2024-05-05T19:53:20+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dcb5a7924ce8ced679c6ef97f58374b3487f63ac_bb8edbfa-a5a7-4c17-b637-16c4d0d2505e.webp?v=1714910000","variant_ids":[41910171205731]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - Weiweiboy - 超級可愛大王 - Mod NX-黑色邊框","public_title":"Mod NX-黑色邊框","options":["Mod NX-黑色邊框"],"price":110000,"weight":1380,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"MPB0118424-EO01","featured_media":{"alt":null,"id":23893084668003,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dcb5a7924ce8ced679c6ef97f58374b3487f63ac_bb8edbfa-a5a7-4c17-b637-16c4d0d2505e.webp?v=1714910000"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41910171205731,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118424-EO01","requires_shipping":true,"taxable":true,"featured_image":{"id":31487740706915,"product_id":7414941515875,"position":9,"created_at":"2024-05-05T19:53:20+08:00","updated_at":"2024-05-05T19:53:20+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dcb5a7924ce8ced679c6ef97f58374b3487f63ac_bb8edbfa-a5a7-4c17-b637-16c4d0d2505e.webp?v=1714910000","variant_ids":[41910171205731]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - Weiweiboy - 超級可愛大王 - Mod NX-黑色邊框","public_title":"Mod NX-黑色邊框","options":["Mod NX-黑色邊框"],"price":110000,"weight":1380,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"MPB0118424-EO01","featured_media":{"alt":null,"id":23893084668003,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dcb5a7924ce8ced679c6ef97f58374b3487f63ac_bb8edbfa-a5a7-4c17-b637-16c4d0d2505e.webp?v=1714910000"}},"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: "停產" }