$product = {"id":7407753756771,"title":"犀牛盾Mod NX手機殼 - iPhone 14 Plus - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - R2D2-噴漆黑","handle":"iphone-14-plus-mod-nx-printable-pb07","description":null,"published_at":"2024-06-11T16:22:47+08:00","created_at":"2024-05-03T10:48:10+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":41878436348003,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0126124-PB07","requires_shipping":true,"taxable":true,"featured_image":{"id":31470329462883,"product_id":7407753756771,"position":8,"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\/35f0acdd7d66d0632e69c4cd2e71f31326cd620b_bc89040f-2d7c-4442-bca6-bdec4a1ed04b.webp?v=1714704510","variant_ids":[41878436348003]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 14 Plus - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - R2D2-噴漆黑 - 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-PB07","featured_media":{"alt":null,"id":23875232727139,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/35f0acdd7d66d0632e69c4cd2e71f31326cd620b_bc89040f-2d7c-4442-bca6-bdec4a1ed04b.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\/b35420a9b9824f004dd8f5276065258ec50c2a16_862237c9-2d69-4df9-a8d4-c4b405de4097.webp?v=1714704493","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3b0f84cfa87c04e6fbdcbf85472d137a63895708_ac73b528-0f7f-43e4-aa1d-75ae59741009.webp?v=1714704495","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6f2bd8d24da84142d5b0bdfc157f6e17c348f49f_6101f5ea-2f7f-4e40-a018-be598a8c8c76.webp?v=1714704498","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bd82d9ceb614df90fe3978e18650d3b7e514c91c_202544e5-975f-41b0-9722-96483f8e3225.webp?v=1714704500","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/87d31bbda98ec857b549b18ff3f6cb84ad3f82f8_d59b2c51-c23b-4e99-875f-f488d8a10ebe.webp?v=1714704503","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/05379b98d40cb95cc36e7473b077e52a0687d226_131fcbc4-f938-4290-96c4-c1289a8621b0.webp?v=1714704506","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dd456706e95fd6c9b902aea962c70b27d4c42c1b_5d9b1022-3d61-46a6-9ed8-ce3709941891.webp?v=1714704508","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/35f0acdd7d66d0632e69c4cd2e71f31326cd620b_bc89040f-2d7c-4442-bca6-bdec4a1ed04b.webp?v=1714704510","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0402e6a1e2ed94da2c1ee5bda73520e0c50b5ecf_0301baed-8446-4110-adc7-2cb84486f9eb.webp?v=1714704513","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dfcae63fef97dc16cfc8c0a9143d7d14e89959de_2003f81d-8b07-4459-8825-3d5fd3a00591.webp?v=1714704516"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b35420a9b9824f004dd8f5276065258ec50c2a16_862237c9-2d69-4df9-a8d4-c4b405de4097.webp?v=1714704493","options":["color"],"media":[{"alt":null,"id":23875228237923,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b35420a9b9824f004dd8f5276065258ec50c2a16_862237c9-2d69-4df9-a8d4-c4b405de4097.webp?v=1714704493"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b35420a9b9824f004dd8f5276065258ec50c2a16_862237c9-2d69-4df9-a8d4-c4b405de4097.webp?v=1714704493","width":2000},{"alt":null,"id":23875229057123,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3b0f84cfa87c04e6fbdcbf85472d137a63895708_ac73b528-0f7f-43e4-aa1d-75ae59741009.webp?v=1714704495"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3b0f84cfa87c04e6fbdcbf85472d137a63895708_ac73b528-0f7f-43e4-aa1d-75ae59741009.webp?v=1714704495","width":2000},{"alt":null,"id":23875229515875,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6f2bd8d24da84142d5b0bdfc157f6e17c348f49f_6101f5ea-2f7f-4e40-a018-be598a8c8c76.webp?v=1714704498"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6f2bd8d24da84142d5b0bdfc157f6e17c348f49f_6101f5ea-2f7f-4e40-a018-be598a8c8c76.webp?v=1714704498","width":2000},{"alt":null,"id":23875230072931,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bd82d9ceb614df90fe3978e18650d3b7e514c91c_202544e5-975f-41b0-9722-96483f8e3225.webp?v=1714704500"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bd82d9ceb614df90fe3978e18650d3b7e514c91c_202544e5-975f-41b0-9722-96483f8e3225.webp?v=1714704500","width":2000},{"alt":null,"id":23875230793827,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/87d31bbda98ec857b549b18ff3f6cb84ad3f82f8_d59b2c51-c23b-4e99-875f-f488d8a10ebe.webp?v=1714704503"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/87d31bbda98ec857b549b18ff3f6cb84ad3f82f8_d59b2c51-c23b-4e99-875f-f488d8a10ebe.webp?v=1714704503","width":2000},{"alt":null,"id":23875231318115,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/05379b98d40cb95cc36e7473b077e52a0687d226_131fcbc4-f938-4290-96c4-c1289a8621b0.webp?v=1714704506"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/05379b98d40cb95cc36e7473b077e52a0687d226_131fcbc4-f938-4290-96c4-c1289a8621b0.webp?v=1714704506","width":2000},{"alt":null,"id":23875231973475,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dd456706e95fd6c9b902aea962c70b27d4c42c1b_5d9b1022-3d61-46a6-9ed8-ce3709941891.webp?v=1714704508"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dd456706e95fd6c9b902aea962c70b27d4c42c1b_5d9b1022-3d61-46a6-9ed8-ce3709941891.webp?v=1714704508","width":2000},{"alt":null,"id":23875232727139,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/35f0acdd7d66d0632e69c4cd2e71f31326cd620b_bc89040f-2d7c-4442-bca6-bdec4a1ed04b.webp?v=1714704510"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/35f0acdd7d66d0632e69c4cd2e71f31326cd620b_bc89040f-2d7c-4442-bca6-bdec4a1ed04b.webp?v=1714704510","width":2000},{"alt":null,"id":23875233448035,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0402e6a1e2ed94da2c1ee5bda73520e0c50b5ecf_0301baed-8446-4110-adc7-2cb84486f9eb.webp?v=1714704513"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0402e6a1e2ed94da2c1ee5bda73520e0c50b5ecf_0301baed-8446-4110-adc7-2cb84486f9eb.webp?v=1714704513","width":2000},{"alt":null,"id":23875234168931,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dfcae63fef97dc16cfc8c0a9143d7d14e89959de_2003f81d-8b07-4459-8825-3d5fd3a00591.webp?v=1714704516"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dfcae63fef97dc16cfc8c0a9143d7d14e89959de_2003f81d-8b07-4459-8825-3d5fd3a00591.webp?v=1714704516","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41878436348003,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0126124-PB07","requires_shipping":true,"taxable":true,"featured_image":{"id":31470329462883,"product_id":7407753756771,"position":8,"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\/35f0acdd7d66d0632e69c4cd2e71f31326cd620b_bc89040f-2d7c-4442-bca6-bdec4a1ed04b.webp?v=1714704510","variant_ids":[41878436348003]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 14 Plus - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - R2D2-噴漆黑 - 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-PB07","featured_media":{"alt":null,"id":23875232727139,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/35f0acdd7d66d0632e69c4cd2e71f31326cd620b_bc89040f-2d7c-4442-bca6-bdec4a1ed04b.webp?v=1714704510"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41878436348003,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0126124-PB07","requires_shipping":true,"taxable":true,"featured_image":{"id":31470329462883,"product_id":7407753756771,"position":8,"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\/35f0acdd7d66d0632e69c4cd2e71f31326cd620b_bc89040f-2d7c-4442-bca6-bdec4a1ed04b.webp?v=1714704510","variant_ids":[41878436348003]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 14 Plus - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - R2D2-噴漆黑 - 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-PB07","featured_media":{"alt":null,"id":23875232727139,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/35f0acdd7d66d0632e69c4cd2e71f31326cd620b_bc89040f-2d7c-4442-bca6-bdec4a1ed04b.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: "停產" }