$product = {"id":7414947479651,"title":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - Batman - 高譚守護者","handle":"iphone-12-mini-mod-nx-magsafe-printable-sb20","description":null,"published_at":"2024-06-11T17:53:50+08:00","created_at":"2024-05-05T19:54:00+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 12 mini","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":41910237069411,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118424-SB20","requires_shipping":true,"taxable":true,"featured_image":{"id":31487754567779,"product_id":7414947479651,"position":8,"created_at":"2024-05-05T19:54:20+08:00","updated_at":"2024-05-05T19:54:20+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e9467d21570e5ab58adaf49aab23abeab87c7b37_0b45f921-8ef7-45d6-bf1f-f20d55d15065.webp?v=1714910060","variant_ids":[41910237069411]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - 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":"MPB0118424-SB20","featured_media":{"alt":null,"id":23893098430563,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e9467d21570e5ab58adaf49aab23abeab87c7b37_0b45f921-8ef7-45d6-bf1f-f20d55d15065.webp?v=1714910060"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e2a8e630e373348cbbdcadaa4b1e02c5fd5212b3_fa81337e-309b-4809-a90b-911b2de4b71f.webp?v=1714910043","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6f02b288a3e44331edcc011e0bc2d3bf61aab946_0627b70a-0b68-4b2a-9e13-16444a4d6493.webp?v=1714910045","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c2c73adf3cbecc0d4fb29b9f6322455391b5653f_c3f17c99-efbc-465d-a03f-8f8965245cd5.webp?v=1714910048","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f19d15772b3c9185ce31ffb9dcac00f9e62965d6_a7f92508-7850-4cc4-9592-3e1f6c58f16a.webp?v=1714910050","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/db637625e9a5a67359d907434c20d097b19d0b98_2097104b-b634-4a6f-bb2d-d55c8de9fd1a.webp?v=1714910052","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5ffb1fdb935a2394b37d924d004e114e11ab953b_ecc25e5b-916d-4605-9734-48084dfd41b9.webp?v=1714910055","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/896d9fe4fb8d5073b376b772e031b0bc493a6721_3fd2705b-babb-4c2a-a063-f5e542bd849c.webp?v=1714910057","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e9467d21570e5ab58adaf49aab23abeab87c7b37_0b45f921-8ef7-45d6-bf1f-f20d55d15065.webp?v=1714910060","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5b8dd43541cf8072ed35b7354b2cd535c54c2621_b1ba8fa0-7ef7-421e-b2be-cad77f72dd71.webp?v=1714910062","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0dc7aef28d22df7f44ea09171516a7173cc8e33a_484e8afc-fc64-4985-b0fa-97384df044f3.webp?v=1714910064","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f9a12a7c791533cd60b37485329f92b97cd0d25a_de85a609-d802-4bd2-943d-c52e027e165d.webp?v=1714910067"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e2a8e630e373348cbbdcadaa4b1e02c5fd5212b3_fa81337e-309b-4809-a90b-911b2de4b71f.webp?v=1714910043","options":["color"],"media":[{"alt":null,"id":23893094531171,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e2a8e630e373348cbbdcadaa4b1e02c5fd5212b3_fa81337e-309b-4809-a90b-911b2de4b71f.webp?v=1714910043"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e2a8e630e373348cbbdcadaa4b1e02c5fd5212b3_fa81337e-309b-4809-a90b-911b2de4b71f.webp?v=1714910043","width":2000},{"alt":null,"id":23893095317603,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6f02b288a3e44331edcc011e0bc2d3bf61aab946_0627b70a-0b68-4b2a-9e13-16444a4d6493.webp?v=1714910045"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6f02b288a3e44331edcc011e0bc2d3bf61aab946_0627b70a-0b68-4b2a-9e13-16444a4d6493.webp?v=1714910045","width":2000},{"alt":null,"id":23893095874659,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c2c73adf3cbecc0d4fb29b9f6322455391b5653f_c3f17c99-efbc-465d-a03f-8f8965245cd5.webp?v=1714910048"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c2c73adf3cbecc0d4fb29b9f6322455391b5653f_c3f17c99-efbc-465d-a03f-8f8965245cd5.webp?v=1714910048","width":2000},{"alt":null,"id":23893096398947,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f19d15772b3c9185ce31ffb9dcac00f9e62965d6_a7f92508-7850-4cc4-9592-3e1f6c58f16a.webp?v=1714910050"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f19d15772b3c9185ce31ffb9dcac00f9e62965d6_a7f92508-7850-4cc4-9592-3e1f6c58f16a.webp?v=1714910050","width":2000},{"alt":null,"id":23893097021539,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/db637625e9a5a67359d907434c20d097b19d0b98_2097104b-b634-4a6f-bb2d-d55c8de9fd1a.webp?v=1714910052"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/db637625e9a5a67359d907434c20d097b19d0b98_2097104b-b634-4a6f-bb2d-d55c8de9fd1a.webp?v=1714910052","width":2000},{"alt":null,"id":23893097316451,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5ffb1fdb935a2394b37d924d004e114e11ab953b_ecc25e5b-916d-4605-9734-48084dfd41b9.webp?v=1714910055"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5ffb1fdb935a2394b37d924d004e114e11ab953b_ecc25e5b-916d-4605-9734-48084dfd41b9.webp?v=1714910055","width":2000},{"alt":null,"id":23893098135651,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/896d9fe4fb8d5073b376b772e031b0bc493a6721_3fd2705b-babb-4c2a-a063-f5e542bd849c.webp?v=1714910057"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/896d9fe4fb8d5073b376b772e031b0bc493a6721_3fd2705b-babb-4c2a-a063-f5e542bd849c.webp?v=1714910057","width":2000},{"alt":null,"id":23893098430563,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e9467d21570e5ab58adaf49aab23abeab87c7b37_0b45f921-8ef7-45d6-bf1f-f20d55d15065.webp?v=1714910060"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e9467d21570e5ab58adaf49aab23abeab87c7b37_0b45f921-8ef7-45d6-bf1f-f20d55d15065.webp?v=1714910060","width":2000},{"alt":null,"id":23893099249763,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5b8dd43541cf8072ed35b7354b2cd535c54c2621_b1ba8fa0-7ef7-421e-b2be-cad77f72dd71.webp?v=1714910062"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5b8dd43541cf8072ed35b7354b2cd535c54c2621_b1ba8fa0-7ef7-421e-b2be-cad77f72dd71.webp?v=1714910062","width":2000},{"alt":null,"id":23893099839587,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0dc7aef28d22df7f44ea09171516a7173cc8e33a_484e8afc-fc64-4985-b0fa-97384df044f3.webp?v=1714910064"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0dc7aef28d22df7f44ea09171516a7173cc8e33a_484e8afc-fc64-4985-b0fa-97384df044f3.webp?v=1714910064","width":2000},{"alt":null,"id":23893100298339,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f9a12a7c791533cd60b37485329f92b97cd0d25a_de85a609-d802-4bd2-943d-c52e027e165d.webp?v=1714910067"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f9a12a7c791533cd60b37485329f92b97cd0d25a_de85a609-d802-4bd2-943d-c52e027e165d.webp?v=1714910067","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41910237069411,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118424-SB20","requires_shipping":true,"taxable":true,"featured_image":{"id":31487754567779,"product_id":7414947479651,"position":8,"created_at":"2024-05-05T19:54:20+08:00","updated_at":"2024-05-05T19:54:20+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e9467d21570e5ab58adaf49aab23abeab87c7b37_0b45f921-8ef7-45d6-bf1f-f20d55d15065.webp?v=1714910060","variant_ids":[41910237069411]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - 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":"MPB0118424-SB20","featured_media":{"alt":null,"id":23893098430563,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e9467d21570e5ab58adaf49aab23abeab87c7b37_0b45f921-8ef7-45d6-bf1f-f20d55d15065.webp?v=1714910060"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41910237069411,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118424-SB20","requires_shipping":true,"taxable":true,"featured_image":{"id":31487754567779,"product_id":7414947479651,"position":8,"created_at":"2024-05-05T19:54:20+08:00","updated_at":"2024-05-05T19:54:20+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e9467d21570e5ab58adaf49aab23abeab87c7b37_0b45f921-8ef7-45d6-bf1f-f20d55d15065.webp?v=1714910060","variant_ids":[41910237069411]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - 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":"MPB0118424-SB20","featured_media":{"alt":null,"id":23893098430563,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e9467d21570e5ab58adaf49aab23abeab87c7b37_0b45f921-8ef7-45d6-bf1f-f20d55d15065.webp?v=1714910060"}},"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: "停產" }