$product = {"id":7415113580643,"title":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - 迪士尼-星際大戰 Star Wars - 黑武士-大臉系列","handle":"iphone-12-mini-mod-nx-magsafe-printable-pb78","description":null,"published_at":"2024-06-11T17:58:19+08:00","created_at":"2024-05-05T20:25:24+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 mini","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":41912020893795,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118424-PB78","requires_shipping":true,"taxable":true,"featured_image":{"id":31488197951587,"product_id":7415113580643,"position":9,"created_at":"2024-05-05T20:25:46+08:00","updated_at":"2024-05-05T20:25:46+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b9a61634c45ee90ec627da6333b1c9934d9f9ec1_577c67bb-8cb4-4d48-90af-853dc41ff3db.webp?v=1714911946","variant_ids":[41912020893795]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - 迪士尼-星際大戰 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":"MPB0118424-PB78","featured_media":{"alt":null,"id":23893542600803,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b9a61634c45ee90ec627da6333b1c9934d9f9ec1_577c67bb-8cb4-4d48-90af-853dc41ff3db.webp?v=1714911946"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3098f564f8e75604c4954d74a252b1869b1c3795_05c1ed5a-5dc9-4bf6-9e9b-57bbe00b9749.webp?v=1714911927","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/49fd512d6899964f3191f644661907adc6947302_8204a18f-c50d-4d86-a565-6420a1622255.webp?v=1714911929","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f836eb99a52f4a3db1a24304ed167d75416ff836_49bd6918-18d5-4d13-ac68-1de67e342913.webp?v=1714911932","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/caec5955e6473f3389c98ccf77a4db91f8d32251_8dd7a068-d3d3-40cd-ba93-5b8db96366b2.webp?v=1714911934","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a58d4b9c79cca239b65173fdae970ff69593cea2_f50f67a8-e1cd-4ec2-960f-549df49f12d6.webp?v=1714911937","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/83ba1e86dc2383dbe2fe6957c9b87b58a0fd84b8_1beea747-0b2e-44ca-a9a6-74e839f0cc2f.webp?v=1714911939","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7d960791dde38b4d23aaf6b41d38acaccc1c1792_0fc67d09-3caa-4f2a-870f-816197a01d9d.webp?v=1714911941","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fa3050ac946166f73705ecbbd08b51a933bac2d6_eddd2ad5-5704-4760-91f4-ed0360e89629.webp?v=1714911944","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b9a61634c45ee90ec627da6333b1c9934d9f9ec1_577c67bb-8cb4-4d48-90af-853dc41ff3db.webp?v=1714911946","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/38a529868bd024efe8adf4e0279dc5406fdb427a_135de22b-73fa-4772-befe-3b375e15f8bc.webp?v=1714911949","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a3134efb86946310c0f65b582f23a656f88c8bf8_9e548cd2-67fc-4f71-be58-4adb538f3fda.webp?v=1714911951"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3098f564f8e75604c4954d74a252b1869b1c3795_05c1ed5a-5dc9-4bf6-9e9b-57bbe00b9749.webp?v=1714911927","options":["color"],"media":[{"alt":null,"id":23893538504803,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3098f564f8e75604c4954d74a252b1869b1c3795_05c1ed5a-5dc9-4bf6-9e9b-57bbe00b9749.webp?v=1714911927"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3098f564f8e75604c4954d74a252b1869b1c3795_05c1ed5a-5dc9-4bf6-9e9b-57bbe00b9749.webp?v=1714911927","width":2000},{"alt":null,"id":23893538799715,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/49fd512d6899964f3191f644661907adc6947302_8204a18f-c50d-4d86-a565-6420a1622255.webp?v=1714911929"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/49fd512d6899964f3191f644661907adc6947302_8204a18f-c50d-4d86-a565-6420a1622255.webp?v=1714911929","width":2000},{"alt":null,"id":23893539684451,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f836eb99a52f4a3db1a24304ed167d75416ff836_49bd6918-18d5-4d13-ac68-1de67e342913.webp?v=1714911932"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f836eb99a52f4a3db1a24304ed167d75416ff836_49bd6918-18d5-4d13-ac68-1de67e342913.webp?v=1714911932","width":2000},{"alt":null,"id":23893540044899,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/caec5955e6473f3389c98ccf77a4db91f8d32251_8dd7a068-d3d3-40cd-ba93-5b8db96366b2.webp?v=1714911934"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/caec5955e6473f3389c98ccf77a4db91f8d32251_8dd7a068-d3d3-40cd-ba93-5b8db96366b2.webp?v=1714911934","width":2000},{"alt":null,"id":23893540864099,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a58d4b9c79cca239b65173fdae970ff69593cea2_f50f67a8-e1cd-4ec2-960f-549df49f12d6.webp?v=1714911937"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a58d4b9c79cca239b65173fdae970ff69593cea2_f50f67a8-e1cd-4ec2-960f-549df49f12d6.webp?v=1714911937","width":2000},{"alt":null,"id":23893541257315,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/83ba1e86dc2383dbe2fe6957c9b87b58a0fd84b8_1beea747-0b2e-44ca-a9a6-74e839f0cc2f.webp?v=1714911939"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/83ba1e86dc2383dbe2fe6957c9b87b58a0fd84b8_1beea747-0b2e-44ca-a9a6-74e839f0cc2f.webp?v=1714911939","width":2000},{"alt":null,"id":23893541617763,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7d960791dde38b4d23aaf6b41d38acaccc1c1792_0fc67d09-3caa-4f2a-870f-816197a01d9d.webp?v=1714911941"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7d960791dde38b4d23aaf6b41d38acaccc1c1792_0fc67d09-3caa-4f2a-870f-816197a01d9d.webp?v=1714911941","width":2000},{"alt":null,"id":23893542174819,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fa3050ac946166f73705ecbbd08b51a933bac2d6_eddd2ad5-5704-4760-91f4-ed0360e89629.webp?v=1714911944"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fa3050ac946166f73705ecbbd08b51a933bac2d6_eddd2ad5-5704-4760-91f4-ed0360e89629.webp?v=1714911944","width":2000},{"alt":null,"id":23893542600803,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b9a61634c45ee90ec627da6333b1c9934d9f9ec1_577c67bb-8cb4-4d48-90af-853dc41ff3db.webp?v=1714911946"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b9a61634c45ee90ec627da6333b1c9934d9f9ec1_577c67bb-8cb4-4d48-90af-853dc41ff3db.webp?v=1714911946","width":2000},{"alt":null,"id":23893543354467,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/38a529868bd024efe8adf4e0279dc5406fdb427a_135de22b-73fa-4772-befe-3b375e15f8bc.webp?v=1714911949"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/38a529868bd024efe8adf4e0279dc5406fdb427a_135de22b-73fa-4772-befe-3b375e15f8bc.webp?v=1714911949","width":2000},{"alt":null,"id":23893543813219,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a3134efb86946310c0f65b582f23a656f88c8bf8_9e548cd2-67fc-4f71-be58-4adb538f3fda.webp?v=1714911951"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a3134efb86946310c0f65b582f23a656f88c8bf8_9e548cd2-67fc-4f71-be58-4adb538f3fda.webp?v=1714911951","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41912020893795,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118424-PB78","requires_shipping":true,"taxable":true,"featured_image":{"id":31488197951587,"product_id":7415113580643,"position":9,"created_at":"2024-05-05T20:25:46+08:00","updated_at":"2024-05-05T20:25:46+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b9a61634c45ee90ec627da6333b1c9934d9f9ec1_577c67bb-8cb4-4d48-90af-853dc41ff3db.webp?v=1714911946","variant_ids":[41912020893795]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - 迪士尼-星際大戰 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":"MPB0118424-PB78","featured_media":{"alt":null,"id":23893542600803,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b9a61634c45ee90ec627da6333b1c9934d9f9ec1_577c67bb-8cb4-4d48-90af-853dc41ff3db.webp?v=1714911946"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41912020893795,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118424-PB78","requires_shipping":true,"taxable":true,"featured_image":{"id":31488197951587,"product_id":7415113580643,"position":9,"created_at":"2024-05-05T20:25:46+08:00","updated_at":"2024-05-05T20:25:46+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b9a61634c45ee90ec627da6333b1c9934d9f9ec1_577c67bb-8cb4-4d48-90af-853dc41ff3db.webp?v=1714911946","variant_ids":[41912020893795]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - 迪士尼-星際大戰 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":"MPB0118424-PB78","featured_media":{"alt":null,"id":23893542600803,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b9a61634c45ee90ec627da6333b1c9934d9f9ec1_577c67bb-8cb4-4d48-90af-853dc41ff3db.webp?v=1714911946"}},"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: "停產" }