$product = {"id":7408549068899,"title":"犀牛盾Mod NX手機殼 - iPhone 12 mini - 【聯名設計款】 - Batman - 哥譚市","handle":"iphone-12-mini-mod-nx-printable-sb19","description":null,"published_at":"2024-06-11T16:40:23+08:00","created_at":"2024-05-03T15:48:25+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"設計師MOD NX專區-Batman","tags":["20%","25%","30%","35%","40%","45%","50%","b2b","brand-Apple","designer","designer-batman","device-iPhone 12 mini","merge","mod-nx-printable","new-modnx-sku","reseller-modnx-batman","Top50","type-Mod NX Printable"],"price":90000,"price_min":90000,"price_max":90000,"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":41886745985123,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118424-SB19","requires_shipping":true,"taxable":true,"featured_image":{"id":31472561061987,"product_id":7408549068899,"position":3,"created_at":"2024-05-03T15:48:32+08:00","updated_at":"2024-05-03T15:48:32+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ad871cf6d066fd2ed2cf243aaf5f42226e12431e_da3c5391-0997-4626-b761-f9a05c86394d.webp?v=1714722512","variant_ids":[41886745985123]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 mini - 【聯名設計款】 - Batman - 哥譚市 - Mod NX-黑色邊框","public_title":"Mod NX-黑色邊框","options":["Mod NX-黑色邊框"],"price":90000,"weight":980,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"NPB0118424-SB19","featured_media":{"alt":null,"id":23877478514787,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ad871cf6d066fd2ed2cf243aaf5f42226e12431e_da3c5391-0997-4626-b761-f9a05c86394d.webp?v=1714722512"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/13c1ff749db9b98415cc02cc1edd2351e1bac1e8_dd6de642-b823-4cde-9442-8fbce43b2f45.webp?v=1714722507","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/afd77b4f6054a8e9da7483783d7b9a24592cbc16_919bb4ec-4a28-4851-9443-417330172cd9.webp?v=1714722510","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ad871cf6d066fd2ed2cf243aaf5f42226e12431e_da3c5391-0997-4626-b761-f9a05c86394d.webp?v=1714722512","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3e351f55b203316839077d6c9a5ddf285b1aa53a_fa45638f-7c1f-4871-b1e8-2d40c69080a2.webp?v=1714722514","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3f1aabe8b847ce656e653beb07fbdc4b8bc29df1_66f57af6-b8b0-4eaa-8290-f2c9837f425a.webp?v=1714722517","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4bf58e618fef26e6a33c4849569f4fa6603e19f7_35964127-49a9-4a43-ae29-3b00a212aeb1.webp?v=1714722520","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/86eaec8e3b4927d7e983d036abf8690b5f0b91d4_5b54809b-442e-4bf1-b2b5-4c6bdebf5a9b.webp?v=1714722522","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/119d73767b53624ac59af86e95216f2a7630450d_69a6c706-c728-473e-b159-70a829bee3a2.webp?v=1714722524","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7e2fdc88c1cc52bcfe8edff6a717a5aad58b87f0_7f1b50cc-8fcb-4a33-8da0-0cb0ac9b8703.webp?v=1714722527","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6c61567f019370fb0d66cb2c080ae9a0c731017d_abaf3be0-05c4-4578-9ac7-4a4031924018.webp?v=1714722529","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b2efecbb4d8841097bd60f438fa8873c9153a61f_170b2260-2b89-48ae-a4ed-28a687abf9f3.webp?v=1714722532"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/13c1ff749db9b98415cc02cc1edd2351e1bac1e8_dd6de642-b823-4cde-9442-8fbce43b2f45.webp?v=1714722507","options":["color"],"media":[{"alt":null,"id":23877477400675,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/13c1ff749db9b98415cc02cc1edd2351e1bac1e8_dd6de642-b823-4cde-9442-8fbce43b2f45.webp?v=1714722507"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/13c1ff749db9b98415cc02cc1edd2351e1bac1e8_dd6de642-b823-4cde-9442-8fbce43b2f45.webp?v=1714722507","width":2000},{"alt":null,"id":23877477892195,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/afd77b4f6054a8e9da7483783d7b9a24592cbc16_919bb4ec-4a28-4851-9443-417330172cd9.webp?v=1714722510"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/afd77b4f6054a8e9da7483783d7b9a24592cbc16_919bb4ec-4a28-4851-9443-417330172cd9.webp?v=1714722510","width":2000},{"alt":null,"id":23877478514787,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ad871cf6d066fd2ed2cf243aaf5f42226e12431e_da3c5391-0997-4626-b761-f9a05c86394d.webp?v=1714722512"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ad871cf6d066fd2ed2cf243aaf5f42226e12431e_da3c5391-0997-4626-b761-f9a05c86394d.webp?v=1714722512","width":2000},{"alt":null,"id":23877478940771,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3e351f55b203316839077d6c9a5ddf285b1aa53a_fa45638f-7c1f-4871-b1e8-2d40c69080a2.webp?v=1714722514"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3e351f55b203316839077d6c9a5ddf285b1aa53a_fa45638f-7c1f-4871-b1e8-2d40c69080a2.webp?v=1714722514","width":2000},{"alt":null,"id":23877479530595,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3f1aabe8b847ce656e653beb07fbdc4b8bc29df1_66f57af6-b8b0-4eaa-8290-f2c9837f425a.webp?v=1714722517"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3f1aabe8b847ce656e653beb07fbdc4b8bc29df1_66f57af6-b8b0-4eaa-8290-f2c9837f425a.webp?v=1714722517","width":2000},{"alt":null,"id":23877480120419,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4bf58e618fef26e6a33c4849569f4fa6603e19f7_35964127-49a9-4a43-ae29-3b00a212aeb1.webp?v=1714722520"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4bf58e618fef26e6a33c4849569f4fa6603e19f7_35964127-49a9-4a43-ae29-3b00a212aeb1.webp?v=1714722520","width":2000},{"alt":null,"id":23877480710243,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/86eaec8e3b4927d7e983d036abf8690b5f0b91d4_5b54809b-442e-4bf1-b2b5-4c6bdebf5a9b.webp?v=1714722522"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/86eaec8e3b4927d7e983d036abf8690b5f0b91d4_5b54809b-442e-4bf1-b2b5-4c6bdebf5a9b.webp?v=1714722522","width":2000},{"alt":null,"id":23877481136227,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/119d73767b53624ac59af86e95216f2a7630450d_69a6c706-c728-473e-b159-70a829bee3a2.webp?v=1714722524"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/119d73767b53624ac59af86e95216f2a7630450d_69a6c706-c728-473e-b159-70a829bee3a2.webp?v=1714722524","width":2000},{"alt":null,"id":23877481791587,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7e2fdc88c1cc52bcfe8edff6a717a5aad58b87f0_7f1b50cc-8fcb-4a33-8da0-0cb0ac9b8703.webp?v=1714722527"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7e2fdc88c1cc52bcfe8edff6a717a5aad58b87f0_7f1b50cc-8fcb-4a33-8da0-0cb0ac9b8703.webp?v=1714722527","width":2000},{"alt":null,"id":23877482381411,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6c61567f019370fb0d66cb2c080ae9a0c731017d_abaf3be0-05c4-4578-9ac7-4a4031924018.webp?v=1714722529"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6c61567f019370fb0d66cb2c080ae9a0c731017d_abaf3be0-05c4-4578-9ac7-4a4031924018.webp?v=1714722529","width":2000},{"alt":null,"id":23877482938467,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b2efecbb4d8841097bd60f438fa8873c9153a61f_170b2260-2b89-48ae-a4ed-28a687abf9f3.webp?v=1714722532"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b2efecbb4d8841097bd60f438fa8873c9153a61f_170b2260-2b89-48ae-a4ed-28a687abf9f3.webp?v=1714722532","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41886745985123,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118424-SB19","requires_shipping":true,"taxable":true,"featured_image":{"id":31472561061987,"product_id":7408549068899,"position":3,"created_at":"2024-05-03T15:48:32+08:00","updated_at":"2024-05-03T15:48:32+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ad871cf6d066fd2ed2cf243aaf5f42226e12431e_da3c5391-0997-4626-b761-f9a05c86394d.webp?v=1714722512","variant_ids":[41886745985123]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 mini - 【聯名設計款】 - Batman - 哥譚市 - Mod NX-黑色邊框","public_title":"Mod NX-黑色邊框","options":["Mod NX-黑色邊框"],"price":90000,"weight":980,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"NPB0118424-SB19","featured_media":{"alt":null,"id":23877478514787,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ad871cf6d066fd2ed2cf243aaf5f42226e12431e_da3c5391-0997-4626-b761-f9a05c86394d.webp?v=1714722512"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41886745985123,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118424-SB19","requires_shipping":true,"taxable":true,"featured_image":{"id":31472561061987,"product_id":7408549068899,"position":3,"created_at":"2024-05-03T15:48:32+08:00","updated_at":"2024-05-03T15:48:32+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ad871cf6d066fd2ed2cf243aaf5f42226e12431e_da3c5391-0997-4626-b761-f9a05c86394d.webp?v=1714722512","variant_ids":[41886745985123]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 mini - 【聯名設計款】 - Batman - 哥譚市 - Mod NX-黑色邊框","public_title":"Mod NX-黑色邊框","options":["Mod NX-黑色邊框"],"price":90000,"weight":980,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"NPB0118424-SB19","featured_media":{"alt":null,"id":23877478514787,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ad871cf6d066fd2ed2cf243aaf5f42226e12431e_da3c5391-0997-4626-b761-f9a05c86394d.webp?v=1714722512"}},"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: "停產" }