$product = {"id":7369191391331,"title":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - Snoopy 史努比 - 曬太陽","handle":"iphone-12-mini-mod-nx-magsafe-printable-pl63","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 mini","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":41793442578531,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118424-PL63","requires_shipping":true,"taxable":true,"featured_image":{"id":31387023540323,"product_id":7369191391331,"position":1,"created_at":"2024-04-23T15:41:59+08:00","updated_at":"2024-04-23T15:41:59+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d18d068fb0a2580e9beaa774dae0d1446ba407e6_eab888d9-473b-4fcc-9a76-a13266e50edb.webp?v=1713858119","variant_ids":[41793442578531]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - 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":"MPB0118424-PL63","featured_media":{"alt":null,"id":23789262045283,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d18d068fb0a2580e9beaa774dae0d1446ba407e6_eab888d9-473b-4fcc-9a76-a13266e50edb.webp?v=1713858119"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d18d068fb0a2580e9beaa774dae0d1446ba407e6_eab888d9-473b-4fcc-9a76-a13266e50edb.webp?v=1713858119","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/885546c9d62aa5208bc646862c036cda04a192ec_daec4d18-b632-49a2-98bc-3d81e8aba15f.webp?v=1713858121","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a07ba943ee3cad67ec6df328764cec71ecfd9ca2_db0e7fe8-0879-4f82-8c78-a6d3d8469f0e.webp?v=1713858124","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8f5189e4d977d6449eb1e78acc368ed9b2af4bf5_ccc1d2e2-99ee-4980-8240-4e97a1411ee2.webp?v=1713858126","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/418bb711615660bf45f553bf871da4b72de6bc2a_a2ce216f-0443-4136-9bbb-300d9736e3c4.webp?v=1713858128","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d1b4dbff5fb48761c19f815f15c4ac2bef332316_bb8bcb87-7301-4800-802f-f59de5757be2.webp?v=1713858131","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0210976431c841a8ec620ab8f057bd108237c3dd_26cbe780-2f32-44cd-82b1-8cff6238b2dd.webp?v=1713858133","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/eeb9ff31259bdce015213ac9f2d490dbf1e716fa_69330a77-7855-44a0-a33c-14f2a6dc2145.webp?v=1713858136","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/81ddbf3de16daf582b68d80ef49c94e74192178e_4ba776e5-ef4d-4f42-a9f9-ca3bc409af48.webp?v=1713858138","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d4d76f173835b8e15ed7dacbf62b8c566013b394_9791903a-70c4-4858-bb1c-475e4de378fc.webp?v=1713858140","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1e103458ac376682e25f2fdd204e4790eda4f838_e867d939-a126-466d-9c9b-afae15d35faf.webp?v=1713858143"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d18d068fb0a2580e9beaa774dae0d1446ba407e6_eab888d9-473b-4fcc-9a76-a13266e50edb.webp?v=1713858119","options":["color"],"media":[{"alt":null,"id":23789262045283,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d18d068fb0a2580e9beaa774dae0d1446ba407e6_eab888d9-473b-4fcc-9a76-a13266e50edb.webp?v=1713858119"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d18d068fb0a2580e9beaa774dae0d1446ba407e6_eab888d9-473b-4fcc-9a76-a13266e50edb.webp?v=1713858119","width":2000},{"alt":null,"id":23789262700643,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/885546c9d62aa5208bc646862c036cda04a192ec_daec4d18-b632-49a2-98bc-3d81e8aba15f.webp?v=1713858121"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/885546c9d62aa5208bc646862c036cda04a192ec_daec4d18-b632-49a2-98bc-3d81e8aba15f.webp?v=1713858121","width":2000},{"alt":null,"id":23789263159395,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a07ba943ee3cad67ec6df328764cec71ecfd9ca2_db0e7fe8-0879-4f82-8c78-a6d3d8469f0e.webp?v=1713858124"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a07ba943ee3cad67ec6df328764cec71ecfd9ca2_db0e7fe8-0879-4f82-8c78-a6d3d8469f0e.webp?v=1713858124","width":2000},{"alt":null,"id":23789263880291,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8f5189e4d977d6449eb1e78acc368ed9b2af4bf5_ccc1d2e2-99ee-4980-8240-4e97a1411ee2.webp?v=1713858126"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8f5189e4d977d6449eb1e78acc368ed9b2af4bf5_ccc1d2e2-99ee-4980-8240-4e97a1411ee2.webp?v=1713858126","width":2000},{"alt":null,"id":23789264470115,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/418bb711615660bf45f553bf871da4b72de6bc2a_a2ce216f-0443-4136-9bbb-300d9736e3c4.webp?v=1713858128"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/418bb711615660bf45f553bf871da4b72de6bc2a_a2ce216f-0443-4136-9bbb-300d9736e3c4.webp?v=1713858128","width":2000},{"alt":null,"id":23789265158243,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d1b4dbff5fb48761c19f815f15c4ac2bef332316_bb8bcb87-7301-4800-802f-f59de5757be2.webp?v=1713858131"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d1b4dbff5fb48761c19f815f15c4ac2bef332316_bb8bcb87-7301-4800-802f-f59de5757be2.webp?v=1713858131","width":2000},{"alt":null,"id":23789265879139,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0210976431c841a8ec620ab8f057bd108237c3dd_26cbe780-2f32-44cd-82b1-8cff6238b2dd.webp?v=1713858133"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0210976431c841a8ec620ab8f057bd108237c3dd_26cbe780-2f32-44cd-82b1-8cff6238b2dd.webp?v=1713858133","width":2000},{"alt":null,"id":23789266501731,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/eeb9ff31259bdce015213ac9f2d490dbf1e716fa_69330a77-7855-44a0-a33c-14f2a6dc2145.webp?v=1713858136"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/eeb9ff31259bdce015213ac9f2d490dbf1e716fa_69330a77-7855-44a0-a33c-14f2a6dc2145.webp?v=1713858136","width":2000},{"alt":null,"id":23789266960483,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/81ddbf3de16daf582b68d80ef49c94e74192178e_4ba776e5-ef4d-4f42-a9f9-ca3bc409af48.webp?v=1713858138"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/81ddbf3de16daf582b68d80ef49c94e74192178e_4ba776e5-ef4d-4f42-a9f9-ca3bc409af48.webp?v=1713858138","width":2000},{"alt":null,"id":23789267583075,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d4d76f173835b8e15ed7dacbf62b8c566013b394_9791903a-70c4-4858-bb1c-475e4de378fc.webp?v=1713858140"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d4d76f173835b8e15ed7dacbf62b8c566013b394_9791903a-70c4-4858-bb1c-475e4de378fc.webp?v=1713858140","width":2000},{"alt":null,"id":23789268107363,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1e103458ac376682e25f2fdd204e4790eda4f838_e867d939-a126-466d-9c9b-afae15d35faf.webp?v=1713858143"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1e103458ac376682e25f2fdd204e4790eda4f838_e867d939-a126-466d-9c9b-afae15d35faf.webp?v=1713858143","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41793442578531,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118424-PL63","requires_shipping":true,"taxable":true,"featured_image":{"id":31387023540323,"product_id":7369191391331,"position":1,"created_at":"2024-04-23T15:41:59+08:00","updated_at":"2024-04-23T15:41:59+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d18d068fb0a2580e9beaa774dae0d1446ba407e6_eab888d9-473b-4fcc-9a76-a13266e50edb.webp?v=1713858119","variant_ids":[41793442578531]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - 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":"MPB0118424-PL63","featured_media":{"alt":null,"id":23789262045283,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d18d068fb0a2580e9beaa774dae0d1446ba407e6_eab888d9-473b-4fcc-9a76-a13266e50edb.webp?v=1713858119"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41793442578531,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118424-PL63","requires_shipping":true,"taxable":true,"featured_image":{"id":31387023540323,"product_id":7369191391331,"position":1,"created_at":"2024-04-23T15:41:59+08:00","updated_at":"2024-04-23T15:41:59+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d18d068fb0a2580e9beaa774dae0d1446ba407e6_eab888d9-473b-4fcc-9a76-a13266e50edb.webp?v=1713858119","variant_ids":[41793442578531]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - 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":"MPB0118424-PL63","featured_media":{"alt":null,"id":23789262045283,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d18d068fb0a2580e9beaa774dae0d1446ba407e6_eab888d9-473b-4fcc-9a76-a13266e50edb.webp?v=1713858119"}},"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: "停產" }