$product = {"id":7408452337763,"title":"犀牛盾Mod NX手機殼 - iPhone 12 mini - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - 波巴費特-推推-幽默系列","handle":"iphone-12-mini-mod-nx-printable-pc08","description":null,"published_at":"2024-06-11T16:37:37+08:00","created_at":"2024-05-03T15:29:13+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":41885632954467,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118424-PC08","requires_shipping":true,"taxable":true,"featured_image":{"id":31472316907619,"product_id":7408452337763,"position":10,"created_at":"2024-05-03T15:29:36+08:00","updated_at":"2024-05-03T15:29:36+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/80fe600d447555715b8f5896ea91e867f9f66535_4d770442-0eca-4ed3-b110-a5d074194b1d.webp?v=1714721376","variant_ids":[41885632954467]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 mini - 【聯名設計款】 - 迪士尼-星際大戰 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":"NPB0118424-PC08","featured_media":{"alt":null,"id":23877233311843,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/80fe600d447555715b8f5896ea91e867f9f66535_4d770442-0eca-4ed3-b110-a5d074194b1d.webp?v=1714721376"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f7435a6831d5f907d799aad17db711f0b4ce5bca_06bac801-f982-4727-8056-4d62897f0eda.webp?v=1714721356","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fdf401ee9ad11fde1b552d17d7b9873943651bf0_f8391337-239c-4d58-9f06-9b2036e42299.webp?v=1714721358","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ce21773ba024f64e4697657120a97752dbf39530_e1f742a6-7e77-4770-ac60-165fbd04d384.webp?v=1714721360","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4b3da9723a36486e8aeece74a146823fd5077505_351b03ad-88b6-4de9-99a9-42a97b5cd496.webp?v=1714721362","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7c1b98b3c292fb2b9807d64b272e27d7ee63d7e5_055e5a4d-46df-4149-b881-c9159f590f59.webp?v=1714721365","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/06fe62939a13406e01e50e13b7906086b631d1e1_8dac5c0e-de87-4b56-aa88-4c726234d38d.webp?v=1714721367","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8f2715df7324784ff22e6aec210396c438653f21_4a2bc9d2-5340-45d6-b23f-dfe4a51f0669.webp?v=1714721369","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/823a801e3166c79a5d47b163a3645a8624c06881_e57ae86c-0c6a-400e-b28f-e19a60bb6f63.webp?v=1714721371","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e4445a9d338feacbe2d1b22766336d4efdda7a7e_0a9e0b55-6f85-445c-926d-ab389a75b90c.webp?v=1714721374","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/80fe600d447555715b8f5896ea91e867f9f66535_4d770442-0eca-4ed3-b110-a5d074194b1d.webp?v=1714721376","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2ce0ab67ba2d736fa36120f2c0e79afa3eb11953_32cdb84f-8981-4d7d-9cfd-6e4cea3d437c.webp?v=1714721378"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f7435a6831d5f907d799aad17db711f0b4ce5bca_06bac801-f982-4727-8056-4d62897f0eda.webp?v=1714721356","options":["color"],"media":[{"alt":null,"id":23877228953699,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f7435a6831d5f907d799aad17db711f0b4ce5bca_06bac801-f982-4727-8056-4d62897f0eda.webp?v=1714721356"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f7435a6831d5f907d799aad17db711f0b4ce5bca_06bac801-f982-4727-8056-4d62897f0eda.webp?v=1714721356","width":2000},{"alt":null,"id":23877229379683,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fdf401ee9ad11fde1b552d17d7b9873943651bf0_f8391337-239c-4d58-9f06-9b2036e42299.webp?v=1714721358"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fdf401ee9ad11fde1b552d17d7b9873943651bf0_f8391337-239c-4d58-9f06-9b2036e42299.webp?v=1714721358","width":2000},{"alt":null,"id":23877229936739,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ce21773ba024f64e4697657120a97752dbf39530_e1f742a6-7e77-4770-ac60-165fbd04d384.webp?v=1714721360"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ce21773ba024f64e4697657120a97752dbf39530_e1f742a6-7e77-4770-ac60-165fbd04d384.webp?v=1714721360","width":2000},{"alt":null,"id":23877230428259,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4b3da9723a36486e8aeece74a146823fd5077505_351b03ad-88b6-4de9-99a9-42a97b5cd496.webp?v=1714721362"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4b3da9723a36486e8aeece74a146823fd5077505_351b03ad-88b6-4de9-99a9-42a97b5cd496.webp?v=1714721362","width":2000},{"alt":null,"id":23877230919779,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7c1b98b3c292fb2b9807d64b272e27d7ee63d7e5_055e5a4d-46df-4149-b881-c9159f590f59.webp?v=1714721365"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7c1b98b3c292fb2b9807d64b272e27d7ee63d7e5_055e5a4d-46df-4149-b881-c9159f590f59.webp?v=1714721365","width":2000},{"alt":null,"id":23877231444067,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/06fe62939a13406e01e50e13b7906086b631d1e1_8dac5c0e-de87-4b56-aa88-4c726234d38d.webp?v=1714721367"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/06fe62939a13406e01e50e13b7906086b631d1e1_8dac5c0e-de87-4b56-aa88-4c726234d38d.webp?v=1714721367","width":2000},{"alt":null,"id":23877231804515,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8f2715df7324784ff22e6aec210396c438653f21_4a2bc9d2-5340-45d6-b23f-dfe4a51f0669.webp?v=1714721369"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8f2715df7324784ff22e6aec210396c438653f21_4a2bc9d2-5340-45d6-b23f-dfe4a51f0669.webp?v=1714721369","width":2000},{"alt":null,"id":23877232328803,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/823a801e3166c79a5d47b163a3645a8624c06881_e57ae86c-0c6a-400e-b28f-e19a60bb6f63.webp?v=1714721371"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/823a801e3166c79a5d47b163a3645a8624c06881_e57ae86c-0c6a-400e-b28f-e19a60bb6f63.webp?v=1714721371","width":2000},{"alt":null,"id":23877232787555,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e4445a9d338feacbe2d1b22766336d4efdda7a7e_0a9e0b55-6f85-445c-926d-ab389a75b90c.webp?v=1714721374"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e4445a9d338feacbe2d1b22766336d4efdda7a7e_0a9e0b55-6f85-445c-926d-ab389a75b90c.webp?v=1714721374","width":2000},{"alt":null,"id":23877233311843,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/80fe600d447555715b8f5896ea91e867f9f66535_4d770442-0eca-4ed3-b110-a5d074194b1d.webp?v=1714721376"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/80fe600d447555715b8f5896ea91e867f9f66535_4d770442-0eca-4ed3-b110-a5d074194b1d.webp?v=1714721376","width":2000},{"alt":null,"id":23877233705059,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2ce0ab67ba2d736fa36120f2c0e79afa3eb11953_32cdb84f-8981-4d7d-9cfd-6e4cea3d437c.webp?v=1714721378"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2ce0ab67ba2d736fa36120f2c0e79afa3eb11953_32cdb84f-8981-4d7d-9cfd-6e4cea3d437c.webp?v=1714721378","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41885632954467,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118424-PC08","requires_shipping":true,"taxable":true,"featured_image":{"id":31472316907619,"product_id":7408452337763,"position":10,"created_at":"2024-05-03T15:29:36+08:00","updated_at":"2024-05-03T15:29:36+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/80fe600d447555715b8f5896ea91e867f9f66535_4d770442-0eca-4ed3-b110-a5d074194b1d.webp?v=1714721376","variant_ids":[41885632954467]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 mini - 【聯名設計款】 - 迪士尼-星際大戰 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":"NPB0118424-PC08","featured_media":{"alt":null,"id":23877233311843,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/80fe600d447555715b8f5896ea91e867f9f66535_4d770442-0eca-4ed3-b110-a5d074194b1d.webp?v=1714721376"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41885632954467,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118424-PC08","requires_shipping":true,"taxable":true,"featured_image":{"id":31472316907619,"product_id":7408452337763,"position":10,"created_at":"2024-05-03T15:29:36+08:00","updated_at":"2024-05-03T15:29:36+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/80fe600d447555715b8f5896ea91e867f9f66535_4d770442-0eca-4ed3-b110-a5d074194b1d.webp?v=1714721376","variant_ids":[41885632954467]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 mini - 【聯名設計款】 - 迪士尼-星際大戰 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":"NPB0118424-PC08","featured_media":{"alt":null,"id":23877233311843,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/80fe600d447555715b8f5896ea91e867f9f66535_4d770442-0eca-4ed3-b110-a5d074194b1d.webp?v=1714721376"}},"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: "停產" }