$product = {"id":7415084384355,"title":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 Pro Max - 迪士尼-星際大戰 Star Wars - 黑武士-園丁-幽默系列","handle":"iphone-12-pro-max-mod-nx-magsafe-printable-pc12","description":null,"published_at":"2024-06-11T17:57:32+08:00","created_at":"2024-05-05T20:19:47+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 pro max","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":41911699800163,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118724-PC12","requires_shipping":true,"taxable":true,"featured_image":{"id":31488117473379,"product_id":7415084384355,"position":5,"created_at":"2024-05-05T20:19:59+08:00","updated_at":"2024-05-05T20:19:59+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/feea4c276473b81d0699d7b84002c0547f9d63ab_f9fe7cca-b6e9-4525-8a68-6cdc36f2cef8.webp?v=1714911599","variant_ids":[41911699800163]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 Pro Max - 迪士尼-星際大戰 Star Wars - 黑武士-園丁-幽默系列 - 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-PC12","featured_media":{"alt":null,"id":23893461991523,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/feea4c276473b81d0699d7b84002c0547f9d63ab_f9fe7cca-b6e9-4525-8a68-6cdc36f2cef8.webp?v=1714911599"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9707cca2e2e41c114dcc389316441d4f95d38716_5baa6ef4-bfb7-46d8-b2a2-9e1d981309a1.webp?v=1714911589","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1dc4bd3a616ec34ac32d615ac46f6ca647ceaff4_494d9c62-28b1-484e-aa56-44da0a5a95cb.webp?v=1714911592","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bfc605deee31952ea0d1d30d9ba47f546d97d0bc_31fa3f5f-4c00-4d87-867b-897d53a5cfe0.webp?v=1714911594","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b33d1abb332740a418e009034e9267360437198c_16e4592d-ef2e-4f97-951c-7a5724de2ee1.webp?v=1714911596","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/feea4c276473b81d0699d7b84002c0547f9d63ab_f9fe7cca-b6e9-4525-8a68-6cdc36f2cef8.webp?v=1714911599","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/428a2f4f918cadbd601791bfeda9bd76c1940052_275c3036-58ae-4673-9d98-a562dc1164d6.webp?v=1714911602","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b46d694e713fd4d5a2c1689e5d49c7d6e3d2a3c0_f1abdae9-66a6-40b7-9871-3a59a138310f.webp?v=1714911605","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8ba235d80feaad5bff64b0e83e721625c9bdcd1c_3dba9d1c-8af3-4e38-9ed3-a71fdab281af.webp?v=1714911607","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c302c27a7f46d576443ee62e7db1fa89e924fae2_461e8c07-afe4-4e61-8c28-26082ede5539.webp?v=1714911610","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5d60367dc7e794daf29da7f6500632aa5032a6e5_96bff17c-fc2b-4095-b16b-6a924e70c8d5.webp?v=1714911612"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9707cca2e2e41c114dcc389316441d4f95d38716_5baa6ef4-bfb7-46d8-b2a2-9e1d981309a1.webp?v=1714911589","options":["color"],"media":[{"alt":null,"id":23893459533923,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9707cca2e2e41c114dcc389316441d4f95d38716_5baa6ef4-bfb7-46d8-b2a2-9e1d981309a1.webp?v=1714911589"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9707cca2e2e41c114dcc389316441d4f95d38716_5baa6ef4-bfb7-46d8-b2a2-9e1d981309a1.webp?v=1714911589","width":2000},{"alt":null,"id":23893460025443,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1dc4bd3a616ec34ac32d615ac46f6ca647ceaff4_494d9c62-28b1-484e-aa56-44da0a5a95cb.webp?v=1714911592"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1dc4bd3a616ec34ac32d615ac46f6ca647ceaff4_494d9c62-28b1-484e-aa56-44da0a5a95cb.webp?v=1714911592","width":2000},{"alt":null,"id":23893460779107,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bfc605deee31952ea0d1d30d9ba47f546d97d0bc_31fa3f5f-4c00-4d87-867b-897d53a5cfe0.webp?v=1714911594"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bfc605deee31952ea0d1d30d9ba47f546d97d0bc_31fa3f5f-4c00-4d87-867b-897d53a5cfe0.webp?v=1714911594","width":2000},{"alt":null,"id":23893461467235,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b33d1abb332740a418e009034e9267360437198c_16e4592d-ef2e-4f97-951c-7a5724de2ee1.webp?v=1714911596"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b33d1abb332740a418e009034e9267360437198c_16e4592d-ef2e-4f97-951c-7a5724de2ee1.webp?v=1714911596","width":2000},{"alt":null,"id":23893461991523,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/feea4c276473b81d0699d7b84002c0547f9d63ab_f9fe7cca-b6e9-4525-8a68-6cdc36f2cef8.webp?v=1714911599"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/feea4c276473b81d0699d7b84002c0547f9d63ab_f9fe7cca-b6e9-4525-8a68-6cdc36f2cef8.webp?v=1714911599","width":2000},{"alt":null,"id":23893462843491,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/428a2f4f918cadbd601791bfeda9bd76c1940052_275c3036-58ae-4673-9d98-a562dc1164d6.webp?v=1714911602"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/428a2f4f918cadbd601791bfeda9bd76c1940052_275c3036-58ae-4673-9d98-a562dc1164d6.webp?v=1714911602","width":2000},{"alt":null,"id":23893463760995,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b46d694e713fd4d5a2c1689e5d49c7d6e3d2a3c0_f1abdae9-66a6-40b7-9871-3a59a138310f.webp?v=1714911605"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b46d694e713fd4d5a2c1689e5d49c7d6e3d2a3c0_f1abdae9-66a6-40b7-9871-3a59a138310f.webp?v=1714911605","width":2000},{"alt":null,"id":23893464285283,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8ba235d80feaad5bff64b0e83e721625c9bdcd1c_3dba9d1c-8af3-4e38-9ed3-a71fdab281af.webp?v=1714911607"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8ba235d80feaad5bff64b0e83e721625c9bdcd1c_3dba9d1c-8af3-4e38-9ed3-a71fdab281af.webp?v=1714911607","width":2000},{"alt":null,"id":23893464842339,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c302c27a7f46d576443ee62e7db1fa89e924fae2_461e8c07-afe4-4e61-8c28-26082ede5539.webp?v=1714911610"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c302c27a7f46d576443ee62e7db1fa89e924fae2_461e8c07-afe4-4e61-8c28-26082ede5539.webp?v=1714911610","width":2000},{"alt":null,"id":23893465301091,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5d60367dc7e794daf29da7f6500632aa5032a6e5_96bff17c-fc2b-4095-b16b-6a924e70c8d5.webp?v=1714911612"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5d60367dc7e794daf29da7f6500632aa5032a6e5_96bff17c-fc2b-4095-b16b-6a924e70c8d5.webp?v=1714911612","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41911699800163,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118724-PC12","requires_shipping":true,"taxable":true,"featured_image":{"id":31488117473379,"product_id":7415084384355,"position":5,"created_at":"2024-05-05T20:19:59+08:00","updated_at":"2024-05-05T20:19:59+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/feea4c276473b81d0699d7b84002c0547f9d63ab_f9fe7cca-b6e9-4525-8a68-6cdc36f2cef8.webp?v=1714911599","variant_ids":[41911699800163]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 Pro Max - 迪士尼-星際大戰 Star Wars - 黑武士-園丁-幽默系列 - 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-PC12","featured_media":{"alt":null,"id":23893461991523,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/feea4c276473b81d0699d7b84002c0547f9d63ab_f9fe7cca-b6e9-4525-8a68-6cdc36f2cef8.webp?v=1714911599"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41911699800163,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118724-PC12","requires_shipping":true,"taxable":true,"featured_image":{"id":31488117473379,"product_id":7415084384355,"position":5,"created_at":"2024-05-05T20:19:59+08:00","updated_at":"2024-05-05T20:19:59+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/feea4c276473b81d0699d7b84002c0547f9d63ab_f9fe7cca-b6e9-4525-8a68-6cdc36f2cef8.webp?v=1714911599","variant_ids":[41911699800163]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 Pro Max - 迪士尼-星際大戰 Star Wars - 黑武士-園丁-幽默系列 - 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-PC12","featured_media":{"alt":null,"id":23893461991523,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/feea4c276473b81d0699d7b84002c0547f9d63ab_f9fe7cca-b6e9-4525-8a68-6cdc36f2cef8.webp?v=1714911599"}},"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: "停產" }