$product = {"id":7408479600739,"title":"犀牛盾Mod NX手機殼 - iPhone 12 mini - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - POP全載具3","handle":"iphone-12-mini-mod-nx-printable-pb26","description":null,"published_at":"2024-06-11T16:38:23+08:00","created_at":"2024-05-03T15:34:46+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"設計師MOD NX專區-迪士尼-星際大戰 Star Wars","tags":["20%","25%","30%","35%","40%","45%","50%","b2b","brand-Apple","designer","designer-starwars","device-iPhone 12 mini","merge","mod-nx-printable","new-modnx-sku","reseller-modnx-star-wars","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":41885949526115,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118424-PB26","requires_shipping":true,"taxable":true,"featured_image":{"id":31472382115939,"product_id":7408479600739,"position":1,"created_at":"2024-05-03T15:34:49+08:00","updated_at":"2024-05-03T15:34:49+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/34cbef1c85a43c89882b1bd560367381ee76667e_b13657c7-8696-4833-8e2c-2c1bb2512404.webp?v=1714721689","variant_ids":[41885949526115]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 mini - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - POP全載具3 - 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-PB26","featured_media":{"alt":null,"id":23877299011683,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/34cbef1c85a43c89882b1bd560367381ee76667e_b13657c7-8696-4833-8e2c-2c1bb2512404.webp?v=1714721689"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/34cbef1c85a43c89882b1bd560367381ee76667e_b13657c7-8696-4833-8e2c-2c1bb2512404.webp?v=1714721689","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d05ec13f1ea1d903748157d47bc16f51c5bfafba_c7c6121d-7c49-4be0-9bc9-51ecbd26935a.webp?v=1714721691","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bd036efe2baf8c0330265b819792e8053bfaf996_0341148d-49f6-4397-a92c-739b59721824.webp?v=1714721693","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9192af6783884defe3e3dd32e80079125dc9c094_e9644a4d-454d-40ce-8a8e-82bdd5c8ca95.webp?v=1714721696","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/10dc62ef91d3afe939713d19880f4aec60651fc9_53f5ca6a-395d-485c-925c-3e5e6a5fd2cf.webp?v=1714721698","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0b2697a8901d2ef396820a95a048290400d48e24_2342a2f2-48f5-4f3a-921e-1f653c02ffd7.webp?v=1714721701","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c2f29647d7882a06ff2baaebd15e21268f750779_db61082e-09e1-4cab-a185-7fba4c2e778e.webp?v=1714721703","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/48c8d68f4e8226596992f25d3bad1ceefcf62f99_a72df790-9c2e-4d99-8030-293d0e4b6f75.webp?v=1714721706","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e58b1d24ba824572ad14fbda91326895531427a5_1a61c2e5-234b-4c68-93ff-0632bd53c943.webp?v=1714721708","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0a2b6ae4ffe111d9fce0267673aba482eb61cf0a_7adee9b5-eb80-4b22-b4cc-6c7b00563b97.webp?v=1714721711","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1226df7acb260e2b88e305778d21cce0a4446a4b_3cac36b8-91a0-4e92-a768-09b8a575c73e.webp?v=1714721713"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/34cbef1c85a43c89882b1bd560367381ee76667e_b13657c7-8696-4833-8e2c-2c1bb2512404.webp?v=1714721689","options":["color"],"media":[{"alt":null,"id":23877299011683,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/34cbef1c85a43c89882b1bd560367381ee76667e_b13657c7-8696-4833-8e2c-2c1bb2512404.webp?v=1714721689"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/34cbef1c85a43c89882b1bd560367381ee76667e_b13657c7-8696-4833-8e2c-2c1bb2512404.webp?v=1714721689","width":2000},{"alt":null,"id":23877299470435,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d05ec13f1ea1d903748157d47bc16f51c5bfafba_c7c6121d-7c49-4be0-9bc9-51ecbd26935a.webp?v=1714721691"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d05ec13f1ea1d903748157d47bc16f51c5bfafba_c7c6121d-7c49-4be0-9bc9-51ecbd26935a.webp?v=1714721691","width":2000},{"alt":null,"id":23877299961955,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bd036efe2baf8c0330265b819792e8053bfaf996_0341148d-49f6-4397-a92c-739b59721824.webp?v=1714721693"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bd036efe2baf8c0330265b819792e8053bfaf996_0341148d-49f6-4397-a92c-739b59721824.webp?v=1714721693","width":2000},{"alt":null,"id":23877300453475,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9192af6783884defe3e3dd32e80079125dc9c094_e9644a4d-454d-40ce-8a8e-82bdd5c8ca95.webp?v=1714721696"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9192af6783884defe3e3dd32e80079125dc9c094_e9644a4d-454d-40ce-8a8e-82bdd5c8ca95.webp?v=1714721696","width":2000},{"alt":null,"id":23877300977763,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/10dc62ef91d3afe939713d19880f4aec60651fc9_53f5ca6a-395d-485c-925c-3e5e6a5fd2cf.webp?v=1714721698"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/10dc62ef91d3afe939713d19880f4aec60651fc9_53f5ca6a-395d-485c-925c-3e5e6a5fd2cf.webp?v=1714721698","width":2000},{"alt":null,"id":23877301436515,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0b2697a8901d2ef396820a95a048290400d48e24_2342a2f2-48f5-4f3a-921e-1f653c02ffd7.webp?v=1714721701"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0b2697a8901d2ef396820a95a048290400d48e24_2342a2f2-48f5-4f3a-921e-1f653c02ffd7.webp?v=1714721701","width":2000},{"alt":null,"id":23877301960803,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c2f29647d7882a06ff2baaebd15e21268f750779_db61082e-09e1-4cab-a185-7fba4c2e778e.webp?v=1714721703"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c2f29647d7882a06ff2baaebd15e21268f750779_db61082e-09e1-4cab-a185-7fba4c2e778e.webp?v=1714721703","width":2000},{"alt":null,"id":23877302452323,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/48c8d68f4e8226596992f25d3bad1ceefcf62f99_a72df790-9c2e-4d99-8030-293d0e4b6f75.webp?v=1714721706"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/48c8d68f4e8226596992f25d3bad1ceefcf62f99_a72df790-9c2e-4d99-8030-293d0e4b6f75.webp?v=1714721706","width":2000},{"alt":null,"id":23877302976611,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e58b1d24ba824572ad14fbda91326895531427a5_1a61c2e5-234b-4c68-93ff-0632bd53c943.webp?v=1714721708"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e58b1d24ba824572ad14fbda91326895531427a5_1a61c2e5-234b-4c68-93ff-0632bd53c943.webp?v=1714721708","width":2000},{"alt":null,"id":23877303533667,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0a2b6ae4ffe111d9fce0267673aba482eb61cf0a_7adee9b5-eb80-4b22-b4cc-6c7b00563b97.webp?v=1714721711"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0a2b6ae4ffe111d9fce0267673aba482eb61cf0a_7adee9b5-eb80-4b22-b4cc-6c7b00563b97.webp?v=1714721711","width":2000},{"alt":null,"id":23877304090723,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1226df7acb260e2b88e305778d21cce0a4446a4b_3cac36b8-91a0-4e92-a768-09b8a575c73e.webp?v=1714721713"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1226df7acb260e2b88e305778d21cce0a4446a4b_3cac36b8-91a0-4e92-a768-09b8a575c73e.webp?v=1714721713","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41885949526115,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118424-PB26","requires_shipping":true,"taxable":true,"featured_image":{"id":31472382115939,"product_id":7408479600739,"position":1,"created_at":"2024-05-03T15:34:49+08:00","updated_at":"2024-05-03T15:34:49+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/34cbef1c85a43c89882b1bd560367381ee76667e_b13657c7-8696-4833-8e2c-2c1bb2512404.webp?v=1714721689","variant_ids":[41885949526115]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 mini - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - POP全載具3 - 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-PB26","featured_media":{"alt":null,"id":23877299011683,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/34cbef1c85a43c89882b1bd560367381ee76667e_b13657c7-8696-4833-8e2c-2c1bb2512404.webp?v=1714721689"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41885949526115,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118424-PB26","requires_shipping":true,"taxable":true,"featured_image":{"id":31472382115939,"product_id":7408479600739,"position":1,"created_at":"2024-05-03T15:34:49+08:00","updated_at":"2024-05-03T15:34:49+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/34cbef1c85a43c89882b1bd560367381ee76667e_b13657c7-8696-4833-8e2c-2c1bb2512404.webp?v=1714721689","variant_ids":[41885949526115]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 mini - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - POP全載具3 - 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-PB26","featured_media":{"alt":null,"id":23877299011683,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/34cbef1c85a43c89882b1bd560367381ee76667e_b13657c7-8696-4833-8e2c-2c1bb2512404.webp?v=1714721689"}},"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: "停產" }