$product = {"id":7415004987491,"title":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - 迪士尼-星際大戰 Star Wars - Pattern 伊沃克人-Galaxy","handle":"iphone-12-mini-mod-nx-magsafe-printable-pb60","description":null,"published_at":"2024-06-11T17:55:24+08:00","created_at":"2024-05-05T20:04:43+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":41910853337187,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118424-PB60","requires_shipping":true,"taxable":true,"featured_image":{"id":31487901761635,"product_id":7415004987491,"position":3,"created_at":"2024-05-05T20:04:50+08:00","updated_at":"2024-05-05T20:04:50+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/22d5bc37bc75d6585f6ffa71ffdf707a9cfa75f7_1aadf96d-a164-4792-80d0-b3b801a45b09.webp?v=1714910690","variant_ids":[41910853337187]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - 迪士尼-星際大戰 Star Wars - Pattern 伊沃克人-Galaxy - 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-PB60","featured_media":{"alt":null,"id":23893245821027,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/22d5bc37bc75d6585f6ffa71ffdf707a9cfa75f7_1aadf96d-a164-4792-80d0-b3b801a45b09.webp?v=1714910690"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dc80af4e302228591f8e30cc708a43966f727f37_9bb35775-d5f1-4837-bc15-7e1af967c25a.webp?v=1714910686","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1f5d3ba35057bcf0ca8e047d0b4e65a88ccc0ace_28c2406d-5722-4c92-aa0c-55d4bbffe12a.webp?v=1714910688","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/22d5bc37bc75d6585f6ffa71ffdf707a9cfa75f7_1aadf96d-a164-4792-80d0-b3b801a45b09.webp?v=1714910690","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0ee5d93a2150ec7fe3766483833aa4fd5cd62096_02fbcb59-169d-4932-a822-71274ea6c17d.webp?v=1714910693","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f760fba5207bab1baaad334ba280cb3e2d6311af_ea9b5e04-8377-4699-b8a3-a36ec403c9cf.webp?v=1714910696","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/009149f1f35dc7cedb4644ce21a901ff0f6d107c_75518999-c37f-45dc-b0c5-3d130566ed34.webp?v=1714910698","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/76f10d6d195c8be776587f5afa057f489e0acdb0_23ecb157-fcac-4102-ab24-50d0526ac9dc.webp?v=1714910700","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cd8ee8473ffca1a8bb818ea0e759d0def536d66e_20fd07ae-f5dc-4498-854e-1439ab63526e.webp?v=1714910703","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/122c112d22ee84ee994a75eec02a17e9e9927349_423e3533-54a0-42be-9b03-562c2d3cf92f.webp?v=1714910705","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cb21b2d467d6e17358597cfcb040203cf6e9bba6_5c987268-9ff6-4802-bf0a-072d078f4ef9.webp?v=1714910708","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3a511c75b0570d83c7a97f33c5a1b4d100597165_632770a3-bafe-41ac-92e7-8d0e34dd614c.webp?v=1714910710"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dc80af4e302228591f8e30cc708a43966f727f37_9bb35775-d5f1-4837-bc15-7e1af967c25a.webp?v=1714910686","options":["color"],"media":[{"alt":null,"id":23893244641379,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dc80af4e302228591f8e30cc708a43966f727f37_9bb35775-d5f1-4837-bc15-7e1af967c25a.webp?v=1714910686"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dc80af4e302228591f8e30cc708a43966f727f37_9bb35775-d5f1-4837-bc15-7e1af967c25a.webp?v=1714910686","width":2000},{"alt":null,"id":23893245296739,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1f5d3ba35057bcf0ca8e047d0b4e65a88ccc0ace_28c2406d-5722-4c92-aa0c-55d4bbffe12a.webp?v=1714910688"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1f5d3ba35057bcf0ca8e047d0b4e65a88ccc0ace_28c2406d-5722-4c92-aa0c-55d4bbffe12a.webp?v=1714910688","width":2000},{"alt":null,"id":23893245821027,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/22d5bc37bc75d6585f6ffa71ffdf707a9cfa75f7_1aadf96d-a164-4792-80d0-b3b801a45b09.webp?v=1714910690"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/22d5bc37bc75d6585f6ffa71ffdf707a9cfa75f7_1aadf96d-a164-4792-80d0-b3b801a45b09.webp?v=1714910690","width":2000},{"alt":null,"id":23893246509155,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0ee5d93a2150ec7fe3766483833aa4fd5cd62096_02fbcb59-169d-4932-a822-71274ea6c17d.webp?v=1714910693"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0ee5d93a2150ec7fe3766483833aa4fd5cd62096_02fbcb59-169d-4932-a822-71274ea6c17d.webp?v=1714910693","width":2000},{"alt":null,"id":23893247230051,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f760fba5207bab1baaad334ba280cb3e2d6311af_ea9b5e04-8377-4699-b8a3-a36ec403c9cf.webp?v=1714910696"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f760fba5207bab1baaad334ba280cb3e2d6311af_ea9b5e04-8377-4699-b8a3-a36ec403c9cf.webp?v=1714910696","width":2000},{"alt":null,"id":23893247754339,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/009149f1f35dc7cedb4644ce21a901ff0f6d107c_75518999-c37f-45dc-b0c5-3d130566ed34.webp?v=1714910698"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/009149f1f35dc7cedb4644ce21a901ff0f6d107c_75518999-c37f-45dc-b0c5-3d130566ed34.webp?v=1714910698","width":2000},{"alt":null,"id":23893248442467,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/76f10d6d195c8be776587f5afa057f489e0acdb0_23ecb157-fcac-4102-ab24-50d0526ac9dc.webp?v=1714910700"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/76f10d6d195c8be776587f5afa057f489e0acdb0_23ecb157-fcac-4102-ab24-50d0526ac9dc.webp?v=1714910700","width":2000},{"alt":null,"id":23893248901219,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cd8ee8473ffca1a8bb818ea0e759d0def536d66e_20fd07ae-f5dc-4498-854e-1439ab63526e.webp?v=1714910703"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cd8ee8473ffca1a8bb818ea0e759d0def536d66e_20fd07ae-f5dc-4498-854e-1439ab63526e.webp?v=1714910703","width":2000},{"alt":null,"id":23893249523811,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/122c112d22ee84ee994a75eec02a17e9e9927349_423e3533-54a0-42be-9b03-562c2d3cf92f.webp?v=1714910705"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/122c112d22ee84ee994a75eec02a17e9e9927349_423e3533-54a0-42be-9b03-562c2d3cf92f.webp?v=1714910705","width":2000},{"alt":null,"id":23893250015331,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cb21b2d467d6e17358597cfcb040203cf6e9bba6_5c987268-9ff6-4802-bf0a-072d078f4ef9.webp?v=1714910708"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cb21b2d467d6e17358597cfcb040203cf6e9bba6_5c987268-9ff6-4802-bf0a-072d078f4ef9.webp?v=1714910708","width":2000},{"alt":null,"id":23893250408547,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3a511c75b0570d83c7a97f33c5a1b4d100597165_632770a3-bafe-41ac-92e7-8d0e34dd614c.webp?v=1714910710"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3a511c75b0570d83c7a97f33c5a1b4d100597165_632770a3-bafe-41ac-92e7-8d0e34dd614c.webp?v=1714910710","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41910853337187,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118424-PB60","requires_shipping":true,"taxable":true,"featured_image":{"id":31487901761635,"product_id":7415004987491,"position":3,"created_at":"2024-05-05T20:04:50+08:00","updated_at":"2024-05-05T20:04:50+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/22d5bc37bc75d6585f6ffa71ffdf707a9cfa75f7_1aadf96d-a164-4792-80d0-b3b801a45b09.webp?v=1714910690","variant_ids":[41910853337187]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - 迪士尼-星際大戰 Star Wars - Pattern 伊沃克人-Galaxy - 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-PB60","featured_media":{"alt":null,"id":23893245821027,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/22d5bc37bc75d6585f6ffa71ffdf707a9cfa75f7_1aadf96d-a164-4792-80d0-b3b801a45b09.webp?v=1714910690"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41910853337187,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118424-PB60","requires_shipping":true,"taxable":true,"featured_image":{"id":31487901761635,"product_id":7415004987491,"position":3,"created_at":"2024-05-05T20:04:50+08:00","updated_at":"2024-05-05T20:04:50+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/22d5bc37bc75d6585f6ffa71ffdf707a9cfa75f7_1aadf96d-a164-4792-80d0-b3b801a45b09.webp?v=1714910690","variant_ids":[41910853337187]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - 迪士尼-星際大戰 Star Wars - Pattern 伊沃克人-Galaxy - 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-PB60","featured_media":{"alt":null,"id":23893245821027,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/22d5bc37bc75d6585f6ffa71ffdf707a9cfa75f7_1aadf96d-a164-4792-80d0-b3b801a45b09.webp?v=1714910690"}},"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: "停產" }