$product = {"id":7415049584739,"title":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 Pro Max - 史迪奇 - 經典系列-不游泳但衝浪","handle":"iphone-12-pro-max-mod-nx-magsafe-printable-yf09","description":null,"published_at":"2024-06-11T17:56:37+08:00","created_at":"2024-05-05T20:13:20+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"設計師MOD NX MagSafe專區史迪奇","tags":["20%","25%","30%","35%","40%","45%","50%","b2b","brand-Apple","designer","designer-stitch","device-iPhone 12 pro max","merge","mod-nx-magsafe-printable","new-modnx-sku","reseller-modnx-magsafe-stitch","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":41911330242659,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118724-YF09","requires_shipping":true,"taxable":true,"featured_image":{"id":31488023363683,"product_id":7415049584739,"position":6,"created_at":"2024-05-05T20:13:33+08:00","updated_at":"2024-05-05T20:13:33+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b672e491181825b1fc6fad6fc676abc0e0bb61a7_f1a30a49-19cf-466f-b5d2-4f5a2a54575d.webp?v=1714911213","variant_ids":[41911330242659]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 Pro Max - 史迪奇 - 經典系列-不游泳但衝浪 - 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-YF09","featured_media":{"alt":null,"id":23893367685219,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b672e491181825b1fc6fad6fc676abc0e0bb61a7_f1a30a49-19cf-466f-b5d2-4f5a2a54575d.webp?v=1714911213"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/85fc0443ae9c3fc94c3e6257953216384d8aa738_fc51b566-0e18-48d7-985a-872542f38f7b.webp?v=1714911202","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2e35378f968827042639f055f2f8fc4193acf22b_66e8dca2-5c0d-4b04-b7c0-c144b2c8a460.webp?v=1714911204","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/66453f87ec144feaa5aaca6ea3075f0784bb6470_19649049-36d0-4008-9119-001160fa41dd.webp?v=1714911207","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ee01f0c28b26aa55bf625f32a54c73833f3f6bc0_0da98097-8744-4d91-a93f-4a0c76f1e4d5.webp?v=1714911209","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/752fc3745362b54ca4da8e915e9e723094ee44f7_679148db-7223-4b2e-84ce-8a7df9652f60.webp?v=1714911211","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b672e491181825b1fc6fad6fc676abc0e0bb61a7_f1a30a49-19cf-466f-b5d2-4f5a2a54575d.webp?v=1714911213","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/057c24ab536e408614ff8634d51cc858e1e8342e_02da0528-9ea7-4b87-807e-52d9f5b30772.webp?v=1714911216","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/907b5fc022e474ee26eefb15ea1a8f39616ba0f6_9be19477-6a9c-49be-aa82-b6a3d9eb5b36.webp?v=1714911218","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f3ceff6ddf8b5d951cc09c0666d95f26f5a8d61d_42cdc590-535f-4af7-98c1-b507b82f9908.webp?v=1714911220","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1c30694d7cd9b7e56fef5e11601e7f2779841311_d1fbd6f5-82be-4dfc-bbaa-d94827ceb239.webp?v=1714911222"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/85fc0443ae9c3fc94c3e6257953216384d8aa738_fc51b566-0e18-48d7-985a-872542f38f7b.webp?v=1714911202","options":["color"],"media":[{"alt":null,"id":23893365031011,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/85fc0443ae9c3fc94c3e6257953216384d8aa738_fc51b566-0e18-48d7-985a-872542f38f7b.webp?v=1714911202"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/85fc0443ae9c3fc94c3e6257953216384d8aa738_fc51b566-0e18-48d7-985a-872542f38f7b.webp?v=1714911202","width":2000},{"alt":null,"id":23893365456995,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2e35378f968827042639f055f2f8fc4193acf22b_66e8dca2-5c0d-4b04-b7c0-c144b2c8a460.webp?v=1714911204"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2e35378f968827042639f055f2f8fc4193acf22b_66e8dca2-5c0d-4b04-b7c0-c144b2c8a460.webp?v=1714911204","width":2000},{"alt":null,"id":23893366014051,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/66453f87ec144feaa5aaca6ea3075f0784bb6470_19649049-36d0-4008-9119-001160fa41dd.webp?v=1714911207"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/66453f87ec144feaa5aaca6ea3075f0784bb6470_19649049-36d0-4008-9119-001160fa41dd.webp?v=1714911207","width":2000},{"alt":null,"id":23893366767715,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ee01f0c28b26aa55bf625f32a54c73833f3f6bc0_0da98097-8744-4d91-a93f-4a0c76f1e4d5.webp?v=1714911209"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ee01f0c28b26aa55bf625f32a54c73833f3f6bc0_0da98097-8744-4d91-a93f-4a0c76f1e4d5.webp?v=1714911209","width":2000},{"alt":null,"id":23893367226467,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/752fc3745362b54ca4da8e915e9e723094ee44f7_679148db-7223-4b2e-84ce-8a7df9652f60.webp?v=1714911211"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/752fc3745362b54ca4da8e915e9e723094ee44f7_679148db-7223-4b2e-84ce-8a7df9652f60.webp?v=1714911211","width":2000},{"alt":null,"id":23893367685219,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b672e491181825b1fc6fad6fc676abc0e0bb61a7_f1a30a49-19cf-466f-b5d2-4f5a2a54575d.webp?v=1714911213"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b672e491181825b1fc6fad6fc676abc0e0bb61a7_f1a30a49-19cf-466f-b5d2-4f5a2a54575d.webp?v=1714911213","width":2000},{"alt":null,"id":23893368537187,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/057c24ab536e408614ff8634d51cc858e1e8342e_02da0528-9ea7-4b87-807e-52d9f5b30772.webp?v=1714911216"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/057c24ab536e408614ff8634d51cc858e1e8342e_02da0528-9ea7-4b87-807e-52d9f5b30772.webp?v=1714911216","width":2000},{"alt":null,"id":23893368995939,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/907b5fc022e474ee26eefb15ea1a8f39616ba0f6_9be19477-6a9c-49be-aa82-b6a3d9eb5b36.webp?v=1714911218"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/907b5fc022e474ee26eefb15ea1a8f39616ba0f6_9be19477-6a9c-49be-aa82-b6a3d9eb5b36.webp?v=1714911218","width":2000},{"alt":null,"id":23893369421923,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f3ceff6ddf8b5d951cc09c0666d95f26f5a8d61d_42cdc590-535f-4af7-98c1-b507b82f9908.webp?v=1714911220"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f3ceff6ddf8b5d951cc09c0666d95f26f5a8d61d_42cdc590-535f-4af7-98c1-b507b82f9908.webp?v=1714911220","width":2000},{"alt":null,"id":23893369716835,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1c30694d7cd9b7e56fef5e11601e7f2779841311_d1fbd6f5-82be-4dfc-bbaa-d94827ceb239.webp?v=1714911222"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1c30694d7cd9b7e56fef5e11601e7f2779841311_d1fbd6f5-82be-4dfc-bbaa-d94827ceb239.webp?v=1714911222","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41911330242659,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118724-YF09","requires_shipping":true,"taxable":true,"featured_image":{"id":31488023363683,"product_id":7415049584739,"position":6,"created_at":"2024-05-05T20:13:33+08:00","updated_at":"2024-05-05T20:13:33+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b672e491181825b1fc6fad6fc676abc0e0bb61a7_f1a30a49-19cf-466f-b5d2-4f5a2a54575d.webp?v=1714911213","variant_ids":[41911330242659]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 Pro Max - 史迪奇 - 經典系列-不游泳但衝浪 - 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-YF09","featured_media":{"alt":null,"id":23893367685219,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b672e491181825b1fc6fad6fc676abc0e0bb61a7_f1a30a49-19cf-466f-b5d2-4f5a2a54575d.webp?v=1714911213"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41911330242659,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118724-YF09","requires_shipping":true,"taxable":true,"featured_image":{"id":31488023363683,"product_id":7415049584739,"position":6,"created_at":"2024-05-05T20:13:33+08:00","updated_at":"2024-05-05T20:13:33+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b672e491181825b1fc6fad6fc676abc0e0bb61a7_f1a30a49-19cf-466f-b5d2-4f5a2a54575d.webp?v=1714911213","variant_ids":[41911330242659]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 Pro Max - 史迪奇 - 經典系列-不游泳但衝浪 - 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-YF09","featured_media":{"alt":null,"id":23893367685219,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b672e491181825b1fc6fad6fc676abc0e0bb61a7_f1a30a49-19cf-466f-b5d2-4f5a2a54575d.webp?v=1714911213"}},"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: "停產" }