$product = {"id":7369191555171,"title":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 Pro Max - Snoopy 史努比 - 夏日活動","handle":"iphone-12-pro-max-mod-nx-magsafe-printable-pl61","description":null,"published_at":"2024-06-11T17:31:08+08:00","created_at":"2024-04-23T15:41:57+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"設計師MOD NX MagSafe專區Snoopy 史努比","tags":["20%","25%","30%","35%","40%","45%","50%","b2b","brand-Apple","designer","designer-snoopy","device-iPhone 12 pro max","merge","mod-nx-magsafe-printable","new-modnx-sku","reseller-modnx-magsafe-snoopy","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":41793443266659,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118724-PL61","requires_shipping":true,"taxable":true,"featured_image":{"id":31387028488291,"product_id":7369191555171,"position":8,"created_at":"2024-04-23T15:42:18+08:00","updated_at":"2024-04-23T15:42:18+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5191a3ac42912178371bd7510a765919e42dacac_8e7151b1-c9dc-4265-9900-fdb0d8ddbd86.webp?v=1713858138","variant_ids":[41793443266659]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 Pro Max - Snoopy 史努比 - 夏日活動 - 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":"MPB0118724-PL61","featured_media":{"alt":null,"id":23789267026019,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5191a3ac42912178371bd7510a765919e42dacac_8e7151b1-c9dc-4265-9900-fdb0d8ddbd86.webp?v=1713858138"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/864904e315363d7d1979d09653f184ce2a4ca124_2c13c758-72f4-4e9f-8991-96a46fd2c793.webp?v=1713858120","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/36fd5c79f5dfb6029a48d623f472918c01963046_ad8be16a-4fdf-4f2d-b8b3-00e48b2f1baf.webp?v=1713858123","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8502cc60f804b364c0f29e97dcde133f74d819b5_3ca7f83d-ef03-42eb-8b32-97bc5c5f1091.webp?v=1713858125","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7a5f4dd72dfd88cefbac398587a91b8d6ce0f362_5f1ee881-8468-4bdb-8357-02b7bf0515e5.webp?v=1713858128","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ee5141b0baae417d9c0210d8351951135144e550_c3b45aab-f7f0-4d31-9807-bb638865068d.webp?v=1713858130","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/eb890ebc57926004782746c555fa40279b505344_fe393783-bf54-453b-a7a6-f5ff41e7023e.webp?v=1713858133","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/859e4b1d6907b6a7a8503bae53b412707c958027_51ed4463-aa21-4f22-adc9-ebfe07dd69b8.webp?v=1713858135","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5191a3ac42912178371bd7510a765919e42dacac_8e7151b1-c9dc-4265-9900-fdb0d8ddbd86.webp?v=1713858138","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2a42d7f2abbfd1e6f5b4334b0f13c851aba10bea_e191d7e0-c098-4fbd-97c0-fbf3640f82af.webp?v=1713858141","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/898d47766ecc537253748ebccb29f353e5479ba4_fe4c3e10-acd6-46ec-b860-22a6c1273b20.webp?v=1713858143"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/864904e315363d7d1979d09653f184ce2a4ca124_2c13c758-72f4-4e9f-8991-96a46fd2c793.webp?v=1713858120","options":["color"],"media":[{"alt":null,"id":23789262536803,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/864904e315363d7d1979d09653f184ce2a4ca124_2c13c758-72f4-4e9f-8991-96a46fd2c793.webp?v=1713858120"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/864904e315363d7d1979d09653f184ce2a4ca124_2c13c758-72f4-4e9f-8991-96a46fd2c793.webp?v=1713858120","width":2000},{"alt":null,"id":23789263028323,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/36fd5c79f5dfb6029a48d623f472918c01963046_ad8be16a-4fdf-4f2d-b8b3-00e48b2f1baf.webp?v=1713858123"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/36fd5c79f5dfb6029a48d623f472918c01963046_ad8be16a-4fdf-4f2d-b8b3-00e48b2f1baf.webp?v=1713858123","width":2000},{"alt":null,"id":23789263716451,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8502cc60f804b364c0f29e97dcde133f74d819b5_3ca7f83d-ef03-42eb-8b32-97bc5c5f1091.webp?v=1713858125"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8502cc60f804b364c0f29e97dcde133f74d819b5_3ca7f83d-ef03-42eb-8b32-97bc5c5f1091.webp?v=1713858125","width":2000},{"alt":null,"id":23789264273507,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7a5f4dd72dfd88cefbac398587a91b8d6ce0f362_5f1ee881-8468-4bdb-8357-02b7bf0515e5.webp?v=1713858128"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7a5f4dd72dfd88cefbac398587a91b8d6ce0f362_5f1ee881-8468-4bdb-8357-02b7bf0515e5.webp?v=1713858128","width":2000},{"alt":null,"id":23789265027171,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ee5141b0baae417d9c0210d8351951135144e550_c3b45aab-f7f0-4d31-9807-bb638865068d.webp?v=1713858130"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ee5141b0baae417d9c0210d8351951135144e550_c3b45aab-f7f0-4d31-9807-bb638865068d.webp?v=1713858130","width":2000},{"alt":null,"id":23789265682531,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/eb890ebc57926004782746c555fa40279b505344_fe393783-bf54-453b-a7a6-f5ff41e7023e.webp?v=1713858133"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/eb890ebc57926004782746c555fa40279b505344_fe393783-bf54-453b-a7a6-f5ff41e7023e.webp?v=1713858133","width":2000},{"alt":null,"id":23789266337891,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/859e4b1d6907b6a7a8503bae53b412707c958027_51ed4463-aa21-4f22-adc9-ebfe07dd69b8.webp?v=1713858135"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/859e4b1d6907b6a7a8503bae53b412707c958027_51ed4463-aa21-4f22-adc9-ebfe07dd69b8.webp?v=1713858135","width":2000},{"alt":null,"id":23789267026019,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5191a3ac42912178371bd7510a765919e42dacac_8e7151b1-c9dc-4265-9900-fdb0d8ddbd86.webp?v=1713858138"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5191a3ac42912178371bd7510a765919e42dacac_8e7151b1-c9dc-4265-9900-fdb0d8ddbd86.webp?v=1713858138","width":2000},{"alt":null,"id":23789267681379,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2a42d7f2abbfd1e6f5b4334b0f13c851aba10bea_e191d7e0-c098-4fbd-97c0-fbf3640f82af.webp?v=1713858141"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2a42d7f2abbfd1e6f5b4334b0f13c851aba10bea_e191d7e0-c098-4fbd-97c0-fbf3640f82af.webp?v=1713858141","width":2000},{"alt":null,"id":23789268205667,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/898d47766ecc537253748ebccb29f353e5479ba4_fe4c3e10-acd6-46ec-b860-22a6c1273b20.webp?v=1713858143"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/898d47766ecc537253748ebccb29f353e5479ba4_fe4c3e10-acd6-46ec-b860-22a6c1273b20.webp?v=1713858143","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41793443266659,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118724-PL61","requires_shipping":true,"taxable":true,"featured_image":{"id":31387028488291,"product_id":7369191555171,"position":8,"created_at":"2024-04-23T15:42:18+08:00","updated_at":"2024-04-23T15:42:18+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5191a3ac42912178371bd7510a765919e42dacac_8e7151b1-c9dc-4265-9900-fdb0d8ddbd86.webp?v=1713858138","variant_ids":[41793443266659]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 Pro Max - Snoopy 史努比 - 夏日活動 - 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":"MPB0118724-PL61","featured_media":{"alt":null,"id":23789267026019,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5191a3ac42912178371bd7510a765919e42dacac_8e7151b1-c9dc-4265-9900-fdb0d8ddbd86.webp?v=1713858138"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41793443266659,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118724-PL61","requires_shipping":true,"taxable":true,"featured_image":{"id":31387028488291,"product_id":7369191555171,"position":8,"created_at":"2024-04-23T15:42:18+08:00","updated_at":"2024-04-23T15:42:18+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5191a3ac42912178371bd7510a765919e42dacac_8e7151b1-c9dc-4265-9900-fdb0d8ddbd86.webp?v=1713858138","variant_ids":[41793443266659]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 Pro Max - Snoopy 史努比 - 夏日活動 - 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":"MPB0118724-PL61","featured_media":{"alt":null,"id":23789267026019,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5191a3ac42912178371bd7510a765919e42dacac_8e7151b1-c9dc-4265-9900-fdb0d8ddbd86.webp?v=1713858138"}},"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: "停產" }