$product = {"id":7411343097955,"title":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 14 Plus - Batman - 高譚守護者","handle":"iphone-14-plus-mod-nx-magsafe-printable-sb20","description":null,"published_at":"2024-06-11T17:42:23+08:00","created_at":"2024-05-05T00:11:15+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 14 Plus","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":41897690136675,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0126124-SB20","requires_shipping":true,"taxable":true,"featured_image":{"id":31480186110051,"product_id":7411343097955,"position":3,"created_at":"2024-05-05T00:11:22+08:00","updated_at":"2024-05-05T00:11:22+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6bd4f1b864536b7b36164f4b862862e267a93b4f_238697d3-3fab-4ba5-884a-4a835967681d.webp?v=1714839082","variant_ids":[41897690136675]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 14 Plus - 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":"MPB0126124-SB20","featured_media":{"alt":null,"id":23885437141091,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6bd4f1b864536b7b36164f4b862862e267a93b4f_238697d3-3fab-4ba5-884a-4a835967681d.webp?v=1714839082"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0db846384e14dd6ed1a9d0fed7ea41fd7580f187_2bac4f46-7341-4914-9bc3-df196cf5df21.webp?v=1714839077","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d11e790ad66fcc41e6e60ae31f25693cc0fabd28_25dc93ef-a685-4779-964f-e733ad6fff92.webp?v=1714839079","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6bd4f1b864536b7b36164f4b862862e267a93b4f_238697d3-3fab-4ba5-884a-4a835967681d.webp?v=1714839082","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/969a4fbf058a28d25151607a48ef82741d1ef549_6952021d-ff09-4638-8756-a62b54dbd476.webp?v=1714839084","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/68acbdc17ebbb9d6e4a6fbb16e26b5579eab454c_566cb643-4786-4cd2-bf4e-0f2443e5510b.webp?v=1714839087","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8cd292f9830ee9d8b78f0da8e4dfbf5c16ba743a_2e1dc5d7-6e33-4e6c-b5e7-a791eb85ff65.webp?v=1714839089","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5090563a6d3b8f29de4449eb63b5cbbbee9139f7_4a22332c-cc8e-4366-a431-8885ee6df3e1.webp?v=1714839092","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ee364bfdb0af2486f0dd07d42e724beaef55ad9d_b3490b58-ff2b-49fb-8057-ff715b8e3122.webp?v=1714839094","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e61d4dbb14ddb76a30d602b8acf83eb8c6eff63e_d679d377-a965-4505-ae14-f03665e87987.webp?v=1714839096","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f48c60b157fcd124c8630ad43ec6010a802722ae_f32f92f0-ed2d-4fa3-8e78-92a3d604b66d.webp?v=1714839099"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0db846384e14dd6ed1a9d0fed7ea41fd7580f187_2bac4f46-7341-4914-9bc3-df196cf5df21.webp?v=1714839077","options":["color"],"media":[{"alt":null,"id":23885436026979,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0db846384e14dd6ed1a9d0fed7ea41fd7580f187_2bac4f46-7341-4914-9bc3-df196cf5df21.webp?v=1714839077"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0db846384e14dd6ed1a9d0fed7ea41fd7580f187_2bac4f46-7341-4914-9bc3-df196cf5df21.webp?v=1714839077","width":2000},{"alt":null,"id":23885436682339,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d11e790ad66fcc41e6e60ae31f25693cc0fabd28_25dc93ef-a685-4779-964f-e733ad6fff92.webp?v=1714839079"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d11e790ad66fcc41e6e60ae31f25693cc0fabd28_25dc93ef-a685-4779-964f-e733ad6fff92.webp?v=1714839079","width":2000},{"alt":null,"id":23885437141091,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6bd4f1b864536b7b36164f4b862862e267a93b4f_238697d3-3fab-4ba5-884a-4a835967681d.webp?v=1714839082"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6bd4f1b864536b7b36164f4b862862e267a93b4f_238697d3-3fab-4ba5-884a-4a835967681d.webp?v=1714839082","width":2000},{"alt":null,"id":23885437665379,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/969a4fbf058a28d25151607a48ef82741d1ef549_6952021d-ff09-4638-8756-a62b54dbd476.webp?v=1714839084"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/969a4fbf058a28d25151607a48ef82741d1ef549_6952021d-ff09-4638-8756-a62b54dbd476.webp?v=1714839084","width":2000},{"alt":null,"id":23885438156899,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/68acbdc17ebbb9d6e4a6fbb16e26b5579eab454c_566cb643-4786-4cd2-bf4e-0f2443e5510b.webp?v=1714839087"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/68acbdc17ebbb9d6e4a6fbb16e26b5579eab454c_566cb643-4786-4cd2-bf4e-0f2443e5510b.webp?v=1714839087","width":2000},{"alt":null,"id":23885438582883,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8cd292f9830ee9d8b78f0da8e4dfbf5c16ba743a_2e1dc5d7-6e33-4e6c-b5e7-a791eb85ff65.webp?v=1714839089"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8cd292f9830ee9d8b78f0da8e4dfbf5c16ba743a_2e1dc5d7-6e33-4e6c-b5e7-a791eb85ff65.webp?v=1714839089","width":2000},{"alt":null,"id":23885439303779,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5090563a6d3b8f29de4449eb63b5cbbbee9139f7_4a22332c-cc8e-4366-a431-8885ee6df3e1.webp?v=1714839092"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5090563a6d3b8f29de4449eb63b5cbbbee9139f7_4a22332c-cc8e-4366-a431-8885ee6df3e1.webp?v=1714839092","width":2000},{"alt":null,"id":23885439631459,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ee364bfdb0af2486f0dd07d42e724beaef55ad9d_b3490b58-ff2b-49fb-8057-ff715b8e3122.webp?v=1714839094"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ee364bfdb0af2486f0dd07d42e724beaef55ad9d_b3490b58-ff2b-49fb-8057-ff715b8e3122.webp?v=1714839094","width":2000},{"alt":null,"id":23885440090211,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e61d4dbb14ddb76a30d602b8acf83eb8c6eff63e_d679d377-a965-4505-ae14-f03665e87987.webp?v=1714839096"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e61d4dbb14ddb76a30d602b8acf83eb8c6eff63e_d679d377-a965-4505-ae14-f03665e87987.webp?v=1714839096","width":2000},{"alt":null,"id":23885440680035,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f48c60b157fcd124c8630ad43ec6010a802722ae_f32f92f0-ed2d-4fa3-8e78-92a3d604b66d.webp?v=1714839099"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f48c60b157fcd124c8630ad43ec6010a802722ae_f32f92f0-ed2d-4fa3-8e78-92a3d604b66d.webp?v=1714839099","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41897690136675,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0126124-SB20","requires_shipping":true,"taxable":true,"featured_image":{"id":31480186110051,"product_id":7411343097955,"position":3,"created_at":"2024-05-05T00:11:22+08:00","updated_at":"2024-05-05T00:11:22+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6bd4f1b864536b7b36164f4b862862e267a93b4f_238697d3-3fab-4ba5-884a-4a835967681d.webp?v=1714839082","variant_ids":[41897690136675]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 14 Plus - 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":"MPB0126124-SB20","featured_media":{"alt":null,"id":23885437141091,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6bd4f1b864536b7b36164f4b862862e267a93b4f_238697d3-3fab-4ba5-884a-4a835967681d.webp?v=1714839082"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41897690136675,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0126124-SB20","requires_shipping":true,"taxable":true,"featured_image":{"id":31480186110051,"product_id":7411343097955,"position":3,"created_at":"2024-05-05T00:11:22+08:00","updated_at":"2024-05-05T00:11:22+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6bd4f1b864536b7b36164f4b862862e267a93b4f_238697d3-3fab-4ba5-884a-4a835967681d.webp?v=1714839082","variant_ids":[41897690136675]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 14 Plus - 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":"MPB0126124-SB20","featured_media":{"alt":null,"id":23885437141091,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6bd4f1b864536b7b36164f4b862862e267a93b4f_238697d3-3fab-4ba5-884a-4a835967681d.webp?v=1714839082"}},"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: "停產" }