$product = {"id":7415034445923,"title":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 Pro Max - Care Bears - We are together","handle":"iphone-12-pro-max-mod-nx-magsafe-printable-yb14","description":null,"published_at":"2024-06-11T17:56:12+08:00","created_at":"2024-05-05T20:10:41+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"設計師MOD NX MagSafe專區Care Bears","tags":["20%","25%","30%","35%","40%","45%","50%","b2b","brand-Apple","designer","designer-carebears","device-iPhone 12 pro max","merge","mod-nx-magsafe-printable","new-modnx-sku","reseller-modnx-magsafe-carebears","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":41911169450083,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118724-YB14","requires_shipping":true,"taxable":true,"featured_image":{"id":31487985811555,"product_id":7415034445923,"position":6,"created_at":"2024-05-05T20:10:55+08:00","updated_at":"2024-05-05T20:10:55+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cdd4c24f366082cef3d533d88249d677139b9c8b_71d2a447-0150-421c-9523-6caa71c8dff3.webp?v=1714911055","variant_ids":[41911169450083]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 Pro Max - Care Bears - We are together - Mod NX-黑色邊框","public_title":"Mod NX-黑色邊框","options":["Mod NX-黑色邊框"],"price":110000,"weight":1380,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"MPB0118724-YB14","featured_media":{"alt":null,"id":23893330067555,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cdd4c24f366082cef3d533d88249d677139b9c8b_71d2a447-0150-421c-9523-6caa71c8dff3.webp?v=1714911055"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d5b7494a361cce6581f046771cca7c4813a4c58f_1b2f0b42-84d4-4a1e-8744-3a81b0b68a62.webp?v=1714911043","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2871574abbf3312deab25d7e2646dfc441b32311_74c565b9-376a-4611-9f6a-27d9c69e1eff.webp?v=1714911045","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/19c3e6e7769280510fc15c1fa86b0d291a7fa493_5f9f98b6-3c31-480f-9eaa-48ecaa7f5200.webp?v=1714911048","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3066a708fc0800f30ccfc0330f4a54c5685ecd49_d3e0cc20-ecea-4db7-93ee-1ff6a8799637.webp?v=1714911050","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d34686412786f9c021663d79f708c695b0d3e941_806dbfa7-e39b-4dd3-b404-90f3856d6ba6.webp?v=1714911053","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cdd4c24f366082cef3d533d88249d677139b9c8b_71d2a447-0150-421c-9523-6caa71c8dff3.webp?v=1714911055","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bbbdb1a0d0ab6608a87dde69acdca1ba47abe1d5_2946d2b7-6687-412c-be4d-294b53b917ee.webp?v=1714911058","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/865806176dda08ebd4539192fab45611828cf06c_e63535e0-c16e-47e6-8a6e-9faaf62e0dfd.webp?v=1714911061","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/115ffe047203a77d8ecadee429413d9ebd81dd6b_fbd47e5d-4e78-4584-85c4-bea6a36059c2.webp?v=1714911063","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6216acc368e12e3e398c165cf7101b5eb9f288bd_7beaddf8-8be4-4035-a330-d6336e53e6fc.webp?v=1714911066"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d5b7494a361cce6581f046771cca7c4813a4c58f_1b2f0b42-84d4-4a1e-8744-3a81b0b68a62.webp?v=1714911043","options":["color"],"media":[{"alt":null,"id":23893327249507,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d5b7494a361cce6581f046771cca7c4813a4c58f_1b2f0b42-84d4-4a1e-8744-3a81b0b68a62.webp?v=1714911043"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d5b7494a361cce6581f046771cca7c4813a4c58f_1b2f0b42-84d4-4a1e-8744-3a81b0b68a62.webp?v=1714911043","width":2000},{"alt":null,"id":23893328035939,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2871574abbf3312deab25d7e2646dfc441b32311_74c565b9-376a-4611-9f6a-27d9c69e1eff.webp?v=1714911045"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2871574abbf3312deab25d7e2646dfc441b32311_74c565b9-376a-4611-9f6a-27d9c69e1eff.webp?v=1714911045","width":2000},{"alt":null,"id":23893328396387,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/19c3e6e7769280510fc15c1fa86b0d291a7fa493_5f9f98b6-3c31-480f-9eaa-48ecaa7f5200.webp?v=1714911048"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/19c3e6e7769280510fc15c1fa86b0d291a7fa493_5f9f98b6-3c31-480f-9eaa-48ecaa7f5200.webp?v=1714911048","width":2000},{"alt":null,"id":23893329150051,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3066a708fc0800f30ccfc0330f4a54c5685ecd49_d3e0cc20-ecea-4db7-93ee-1ff6a8799637.webp?v=1714911050"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3066a708fc0800f30ccfc0330f4a54c5685ecd49_d3e0cc20-ecea-4db7-93ee-1ff6a8799637.webp?v=1714911050","width":2000},{"alt":null,"id":23893329543267,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d34686412786f9c021663d79f708c695b0d3e941_806dbfa7-e39b-4dd3-b404-90f3856d6ba6.webp?v=1714911053"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d34686412786f9c021663d79f708c695b0d3e941_806dbfa7-e39b-4dd3-b404-90f3856d6ba6.webp?v=1714911053","width":2000},{"alt":null,"id":23893330067555,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cdd4c24f366082cef3d533d88249d677139b9c8b_71d2a447-0150-421c-9523-6caa71c8dff3.webp?v=1714911055"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cdd4c24f366082cef3d533d88249d677139b9c8b_71d2a447-0150-421c-9523-6caa71c8dff3.webp?v=1714911055","width":2000},{"alt":null,"id":23893330690147,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bbbdb1a0d0ab6608a87dde69acdca1ba47abe1d5_2946d2b7-6687-412c-be4d-294b53b917ee.webp?v=1714911058"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bbbdb1a0d0ab6608a87dde69acdca1ba47abe1d5_2946d2b7-6687-412c-be4d-294b53b917ee.webp?v=1714911058","width":2000},{"alt":null,"id":23893331116131,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/865806176dda08ebd4539192fab45611828cf06c_e63535e0-c16e-47e6-8a6e-9faaf62e0dfd.webp?v=1714911061"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/865806176dda08ebd4539192fab45611828cf06c_e63535e0-c16e-47e6-8a6e-9faaf62e0dfd.webp?v=1714911061","width":2000},{"alt":null,"id":23893331705955,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/115ffe047203a77d8ecadee429413d9ebd81dd6b_fbd47e5d-4e78-4584-85c4-bea6a36059c2.webp?v=1714911063"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/115ffe047203a77d8ecadee429413d9ebd81dd6b_fbd47e5d-4e78-4584-85c4-bea6a36059c2.webp?v=1714911063","width":2000},{"alt":null,"id":23893332066403,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6216acc368e12e3e398c165cf7101b5eb9f288bd_7beaddf8-8be4-4035-a330-d6336e53e6fc.webp?v=1714911066"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6216acc368e12e3e398c165cf7101b5eb9f288bd_7beaddf8-8be4-4035-a330-d6336e53e6fc.webp?v=1714911066","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41911169450083,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118724-YB14","requires_shipping":true,"taxable":true,"featured_image":{"id":31487985811555,"product_id":7415034445923,"position":6,"created_at":"2024-05-05T20:10:55+08:00","updated_at":"2024-05-05T20:10:55+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cdd4c24f366082cef3d533d88249d677139b9c8b_71d2a447-0150-421c-9523-6caa71c8dff3.webp?v=1714911055","variant_ids":[41911169450083]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 Pro Max - Care Bears - We are together - Mod NX-黑色邊框","public_title":"Mod NX-黑色邊框","options":["Mod NX-黑色邊框"],"price":110000,"weight":1380,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"MPB0118724-YB14","featured_media":{"alt":null,"id":23893330067555,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cdd4c24f366082cef3d533d88249d677139b9c8b_71d2a447-0150-421c-9523-6caa71c8dff3.webp?v=1714911055"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41911169450083,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118724-YB14","requires_shipping":true,"taxable":true,"featured_image":{"id":31487985811555,"product_id":7415034445923,"position":6,"created_at":"2024-05-05T20:10:55+08:00","updated_at":"2024-05-05T20:10:55+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cdd4c24f366082cef3d533d88249d677139b9c8b_71d2a447-0150-421c-9523-6caa71c8dff3.webp?v=1714911055","variant_ids":[41911169450083]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 Pro Max - Care Bears - We are together - Mod NX-黑色邊框","public_title":"Mod NX-黑色邊框","options":["Mod NX-黑色邊框"],"price":110000,"weight":1380,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"MPB0118724-YB14","featured_media":{"alt":null,"id":23893330067555,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cdd4c24f366082cef3d533d88249d677139b9c8b_71d2a447-0150-421c-9523-6caa71c8dff3.webp?v=1714911055"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}; $device_handle = null; $type = ""; var sellingStatus if ($isMerge) { $(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: "停產" }