$product = {"id":7407745073251,"title":"犀牛盾Mod NX手機殼 - iPhone 14 Plus - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - Sticker-藍","handle":"iphone-14-plus-mod-nx-printable-pb32","description":null,"published_at":"2024-06-11T16:22:41+08:00","created_at":"2024-05-03T10:47:15+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 14 Plus","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":41878331916387,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0126124-PB32","requires_shipping":true,"taxable":true,"featured_image":{"id":31470313242723,"product_id":7407745073251,"position":7,"created_at":"2024-05-03T10:47:34+08:00","updated_at":"2024-05-03T10:47:34+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f67896fa64df215d0e3e70d4823970bbe90d4407_a32018c6-1bf1-4364-9449-377681debe29.webp?v=1714704454","variant_ids":[41878331916387]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 14 Plus - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - Sticker-藍 - 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":"NPB0126124-PB32","featured_media":{"alt":null,"id":23875216441443,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f67896fa64df215d0e3e70d4823970bbe90d4407_a32018c6-1bf1-4364-9449-377681debe29.webp?v=1714704454"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b945d54a86473aa49cd4095b04dceee6884c0010_84a765eb-d317-443e-891f-fe718178abd0.webp?v=1714704438","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f1c1fde0f488ab80c20471185ecbc27dfe470e33_80cf8c23-b1d3-42ef-a03b-7cfb201eff3d.webp?v=1714704440","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0e94542647d1413ba145223fe605d19265ff01da_c21c8125-39b1-437d-a433-30805735275e.webp?v=1714704443","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d33df332ce9503fc283d71124b952880479390c5_29b6a380-9a6c-4577-8a02-e336254850ad.webp?v=1714704445","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/00a9e55536725da776c0921138acf3c289932479_8e9e8204-b7fe-465a-8b60-6e848c26d17b.webp?v=1714704448","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d25725c992a11c34e5632a10a75056b485f0a996_8725621a-952c-4022-8196-39d5d01c7e1b.webp?v=1714704451","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f67896fa64df215d0e3e70d4823970bbe90d4407_a32018c6-1bf1-4364-9449-377681debe29.webp?v=1714704454","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b5d1e9d38dc133097a8ba42f3a120ba0751ee61e_40479805-3f4f-4ba5-ae03-45cb93a5c227.webp?v=1714704456","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dea1256d8157b1f0273ecdf177a6f85a2ea656ac_0429d76b-be69-4cd3-a390-28f4e5a866a5.webp?v=1714704459","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2807f5c4d54dbbcd3c293d30d80040071bb9af52_73e6b346-705f-48b4-8979-1c8ff48d32d3.webp?v=1714704461"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b945d54a86473aa49cd4095b04dceee6884c0010_84a765eb-d317-443e-891f-fe718178abd0.webp?v=1714704438","options":["color"],"media":[{"alt":null,"id":23875211296867,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b945d54a86473aa49cd4095b04dceee6884c0010_84a765eb-d317-443e-891f-fe718178abd0.webp?v=1714704438"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b945d54a86473aa49cd4095b04dceee6884c0010_84a765eb-d317-443e-891f-fe718178abd0.webp?v=1714704438","width":2000},{"alt":null,"id":23875211984995,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f1c1fde0f488ab80c20471185ecbc27dfe470e33_80cf8c23-b1d3-42ef-a03b-7cfb201eff3d.webp?v=1714704440"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f1c1fde0f488ab80c20471185ecbc27dfe470e33_80cf8c23-b1d3-42ef-a03b-7cfb201eff3d.webp?v=1714704440","width":2000},{"alt":null,"id":23875212804195,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0e94542647d1413ba145223fe605d19265ff01da_c21c8125-39b1-437d-a433-30805735275e.webp?v=1714704443"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0e94542647d1413ba145223fe605d19265ff01da_c21c8125-39b1-437d-a433-30805735275e.webp?v=1714704443","width":2000},{"alt":null,"id":23875213492323,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d33df332ce9503fc283d71124b952880479390c5_29b6a380-9a6c-4577-8a02-e336254850ad.webp?v=1714704445"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d33df332ce9503fc283d71124b952880479390c5_29b6a380-9a6c-4577-8a02-e336254850ad.webp?v=1714704445","width":2000},{"alt":null,"id":23875214114915,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/00a9e55536725da776c0921138acf3c289932479_8e9e8204-b7fe-465a-8b60-6e848c26d17b.webp?v=1714704448"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/00a9e55536725da776c0921138acf3c289932479_8e9e8204-b7fe-465a-8b60-6e848c26d17b.webp?v=1714704448","width":2000},{"alt":null,"id":23875215523939,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d25725c992a11c34e5632a10a75056b485f0a996_8725621a-952c-4022-8196-39d5d01c7e1b.webp?v=1714704451"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d25725c992a11c34e5632a10a75056b485f0a996_8725621a-952c-4022-8196-39d5d01c7e1b.webp?v=1714704451","width":2000},{"alt":null,"id":23875216441443,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f67896fa64df215d0e3e70d4823970bbe90d4407_a32018c6-1bf1-4364-9449-377681debe29.webp?v=1714704454"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f67896fa64df215d0e3e70d4823970bbe90d4407_a32018c6-1bf1-4364-9449-377681debe29.webp?v=1714704454","width":2000},{"alt":null,"id":23875217195107,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b5d1e9d38dc133097a8ba42f3a120ba0751ee61e_40479805-3f4f-4ba5-ae03-45cb93a5c227.webp?v=1714704456"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b5d1e9d38dc133097a8ba42f3a120ba0751ee61e_40479805-3f4f-4ba5-ae03-45cb93a5c227.webp?v=1714704456","width":2000},{"alt":null,"id":23875217686627,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dea1256d8157b1f0273ecdf177a6f85a2ea656ac_0429d76b-be69-4cd3-a390-28f4e5a866a5.webp?v=1714704459"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dea1256d8157b1f0273ecdf177a6f85a2ea656ac_0429d76b-be69-4cd3-a390-28f4e5a866a5.webp?v=1714704459","width":2000},{"alt":null,"id":23875218538595,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2807f5c4d54dbbcd3c293d30d80040071bb9af52_73e6b346-705f-48b4-8979-1c8ff48d32d3.webp?v=1714704461"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2807f5c4d54dbbcd3c293d30d80040071bb9af52_73e6b346-705f-48b4-8979-1c8ff48d32d3.webp?v=1714704461","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41878331916387,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0126124-PB32","requires_shipping":true,"taxable":true,"featured_image":{"id":31470313242723,"product_id":7407745073251,"position":7,"created_at":"2024-05-03T10:47:34+08:00","updated_at":"2024-05-03T10:47:34+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f67896fa64df215d0e3e70d4823970bbe90d4407_a32018c6-1bf1-4364-9449-377681debe29.webp?v=1714704454","variant_ids":[41878331916387]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 14 Plus - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - Sticker-藍 - 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":"NPB0126124-PB32","featured_media":{"alt":null,"id":23875216441443,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f67896fa64df215d0e3e70d4823970bbe90d4407_a32018c6-1bf1-4364-9449-377681debe29.webp?v=1714704454"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41878331916387,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0126124-PB32","requires_shipping":true,"taxable":true,"featured_image":{"id":31470313242723,"product_id":7407745073251,"position":7,"created_at":"2024-05-03T10:47:34+08:00","updated_at":"2024-05-03T10:47:34+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f67896fa64df215d0e3e70d4823970bbe90d4407_a32018c6-1bf1-4364-9449-377681debe29.webp?v=1714704454","variant_ids":[41878331916387]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 14 Plus - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - Sticker-藍 - 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":"NPB0126124-PB32","featured_media":{"alt":null,"id":23875216441443,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f67896fa64df215d0e3e70d4823970bbe90d4407_a32018c6-1bf1-4364-9449-377681debe29.webp?v=1714704454"}},"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: "停產" }