$product = {"id":7407756345443,"title":"犀牛盾Mod NX手機殼 - iPhone 14 Plus - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - 風暴兵-經典","handle":"iphone-14-plus-mod-nx-printable-pb22","description":null,"published_at":"2024-06-11T16:22:49+08:00","created_at":"2024-05-03T10:48:25+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":41878464921699,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0126124-PB22","requires_shipping":true,"taxable":true,"featured_image":{"id":31470329331811,"product_id":7407756345443,"position":2,"created_at":"2024-05-03T10:48:30+08:00","updated_at":"2024-05-03T10:48:30+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a2b2ed0e11c48e0eb1fa10a9321617c01107cb9f_c10fd46d-f0b7-4ca0-b11f-c7ace4c42dd2.webp?v=1714704510","variant_ids":[41878464921699]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 14 Plus - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - 風暴兵-經典 - 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-PB22","featured_media":{"alt":null,"id":23875232563299,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a2b2ed0e11c48e0eb1fa10a9321617c01107cb9f_c10fd46d-f0b7-4ca0-b11f-c7ace4c42dd2.webp?v=1714704510"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4a90c1559e93991bdf7788b884fba1f3810618ce_697ffd2f-e032-481e-be0c-3b628816e8fc.webp?v=1714704508","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a2b2ed0e11c48e0eb1fa10a9321617c01107cb9f_c10fd46d-f0b7-4ca0-b11f-c7ace4c42dd2.webp?v=1714704510","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e65d45c4bf625da9723871648c60d14c15252833_4167e534-34a3-4026-9384-7aa67daf997a.webp?v=1714704512","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d789340a80d3604bbcf775c55c1c58c2042914df_2026887e-37ec-4564-8783-916e89c66497.webp?v=1714704515","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0bb251361fd9f5691c9f61684b497b5080d8fd21_ddab0714-c34c-4825-9009-bc8846a17b8f.webp?v=1714704517","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/af7abc36b5e7e5e5d7514f3e1c264e8f333c75a8_f76ede51-c757-4e44-a7ae-775740a81510.webp?v=1714704520","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ef73de1422f3d691811dafdc1594755039833459_38f0cee2-953c-45ce-9cca-402e68b8d906.webp?v=1714704523","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3c0a6a98a7b3d841ff99afe05a32f21b5d39e761_1cadda3b-66b1-4270-9287-77f41d4557c8.webp?v=1714704525","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/eb2f4e2cade1c5de0a63f6154eb270d61832b776_1b7e5278-a148-48f4-81cd-1518c3e234aa.webp?v=1714704527","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/84552fbc261c2cd75a10148c0d2e6b373b20e46e_bfa5451a-3c80-4f5f-a1bf-e12254c67387.webp?v=1714704530"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4a90c1559e93991bdf7788b884fba1f3810618ce_697ffd2f-e032-481e-be0c-3b628816e8fc.webp?v=1714704508","options":["color"],"media":[{"alt":null,"id":23875231907939,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4a90c1559e93991bdf7788b884fba1f3810618ce_697ffd2f-e032-481e-be0c-3b628816e8fc.webp?v=1714704508"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4a90c1559e93991bdf7788b884fba1f3810618ce_697ffd2f-e032-481e-be0c-3b628816e8fc.webp?v=1714704508","width":2000},{"alt":null,"id":23875232563299,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a2b2ed0e11c48e0eb1fa10a9321617c01107cb9f_c10fd46d-f0b7-4ca0-b11f-c7ace4c42dd2.webp?v=1714704510"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a2b2ed0e11c48e0eb1fa10a9321617c01107cb9f_c10fd46d-f0b7-4ca0-b11f-c7ace4c42dd2.webp?v=1714704510","width":2000},{"alt":null,"id":23875233284195,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e65d45c4bf625da9723871648c60d14c15252833_4167e534-34a3-4026-9384-7aa67daf997a.webp?v=1714704512"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e65d45c4bf625da9723871648c60d14c15252833_4167e534-34a3-4026-9384-7aa67daf997a.webp?v=1714704512","width":2000},{"alt":null,"id":23875233808483,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d789340a80d3604bbcf775c55c1c58c2042914df_2026887e-37ec-4564-8783-916e89c66497.webp?v=1714704515"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d789340a80d3604bbcf775c55c1c58c2042914df_2026887e-37ec-4564-8783-916e89c66497.webp?v=1714704515","width":2000},{"alt":null,"id":23875234529379,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0bb251361fd9f5691c9f61684b497b5080d8fd21_ddab0714-c34c-4825-9009-bc8846a17b8f.webp?v=1714704517"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0bb251361fd9f5691c9f61684b497b5080d8fd21_ddab0714-c34c-4825-9009-bc8846a17b8f.webp?v=1714704517","width":2000},{"alt":null,"id":23875235938403,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/af7abc36b5e7e5e5d7514f3e1c264e8f333c75a8_f76ede51-c757-4e44-a7ae-775740a81510.webp?v=1714704520"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/af7abc36b5e7e5e5d7514f3e1c264e8f333c75a8_f76ede51-c757-4e44-a7ae-775740a81510.webp?v=1714704520","width":2000},{"alt":null,"id":23875236659299,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ef73de1422f3d691811dafdc1594755039833459_38f0cee2-953c-45ce-9cca-402e68b8d906.webp?v=1714704523"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ef73de1422f3d691811dafdc1594755039833459_38f0cee2-953c-45ce-9cca-402e68b8d906.webp?v=1714704523","width":2000},{"alt":null,"id":23875237412963,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3c0a6a98a7b3d841ff99afe05a32f21b5d39e761_1cadda3b-66b1-4270-9287-77f41d4557c8.webp?v=1714704525"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3c0a6a98a7b3d841ff99afe05a32f21b5d39e761_1cadda3b-66b1-4270-9287-77f41d4557c8.webp?v=1714704525","width":2000},{"alt":null,"id":23875238002787,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/eb2f4e2cade1c5de0a63f6154eb270d61832b776_1b7e5278-a148-48f4-81cd-1518c3e234aa.webp?v=1714704527"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/eb2f4e2cade1c5de0a63f6154eb270d61832b776_1b7e5278-a148-48f4-81cd-1518c3e234aa.webp?v=1714704527","width":2000},{"alt":null,"id":23875238428771,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/84552fbc261c2cd75a10148c0d2e6b373b20e46e_bfa5451a-3c80-4f5f-a1bf-e12254c67387.webp?v=1714704530"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/84552fbc261c2cd75a10148c0d2e6b373b20e46e_bfa5451a-3c80-4f5f-a1bf-e12254c67387.webp?v=1714704530","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41878464921699,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0126124-PB22","requires_shipping":true,"taxable":true,"featured_image":{"id":31470329331811,"product_id":7407756345443,"position":2,"created_at":"2024-05-03T10:48:30+08:00","updated_at":"2024-05-03T10:48:30+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a2b2ed0e11c48e0eb1fa10a9321617c01107cb9f_c10fd46d-f0b7-4ca0-b11f-c7ace4c42dd2.webp?v=1714704510","variant_ids":[41878464921699]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 14 Plus - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - 風暴兵-經典 - 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-PB22","featured_media":{"alt":null,"id":23875232563299,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a2b2ed0e11c48e0eb1fa10a9321617c01107cb9f_c10fd46d-f0b7-4ca0-b11f-c7ace4c42dd2.webp?v=1714704510"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41878464921699,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0126124-PB22","requires_shipping":true,"taxable":true,"featured_image":{"id":31470329331811,"product_id":7407756345443,"position":2,"created_at":"2024-05-03T10:48:30+08:00","updated_at":"2024-05-03T10:48:30+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a2b2ed0e11c48e0eb1fa10a9321617c01107cb9f_c10fd46d-f0b7-4ca0-b11f-c7ace4c42dd2.webp?v=1714704510","variant_ids":[41878464921699]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 14 Plus - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - 風暴兵-經典 - 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-PB22","featured_media":{"alt":null,"id":23875232563299,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a2b2ed0e11c48e0eb1fa10a9321617c01107cb9f_c10fd46d-f0b7-4ca0-b11f-c7ace4c42dd2.webp?v=1714704510"}},"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: "停產" }