$product = {"id":7407934111843,"title":"犀牛盾Mod NX手機殼 - iPhone 14 Plus - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - 鈦戰機-線條黑","handle":"iphone-14-plus-mod-nx-printable-pb17","description":null,"published_at":"2024-06-11T16:26:57+08:00","created_at":"2024-05-03T11:18:49+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":41880721195107,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0126124-PB17","requires_shipping":true,"taxable":true,"featured_image":{"id":31470737784931,"product_id":7407934111843,"position":6,"created_at":"2024-05-03T11:19:02+08:00","updated_at":"2024-05-03T11:19:02+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/628b911dae87bec79d6f14d0f8ce444a116f477d_4ce9fd07-8d49-4677-a66b-d465869c123f.webp?v=1714706342","variant_ids":[41880721195107]},"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-PB17","featured_media":{"alt":null,"id":23875642130531,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/628b911dae87bec79d6f14d0f8ce444a116f477d_4ce9fd07-8d49-4677-a66b-d465869c123f.webp?v=1714706342"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f44bb4ebacae1c3361467dfad8a1d56f8dc6b8d8_43fa18bd-98ce-4d34-ad15-db3b8fb462bf.webp?v=1714706331","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ad7e37edd71f56c8f5b4272eac23123fc2057500_342a9194-aec0-40f3-b4b4-167604c25d42.webp?v=1714706333","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/345af511b85c40b88014f6a1bb7efd6f076a7651_ea48c5ae-0cb7-46b2-a154-0a432701f83b.webp?v=1714706335","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1f122519638505eae32c51abe2b4e194562c0bb0_062a0ff9-3b13-479a-99db-4a6ccbc4bd75.webp?v=1714706337","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/93be7a50fd0d7e453db8915d5c3a37c326064dd2_241f8197-7edc-47a9-bab0-a09d3f2c336d.webp?v=1714706340","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/628b911dae87bec79d6f14d0f8ce444a116f477d_4ce9fd07-8d49-4677-a66b-d465869c123f.webp?v=1714706342","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8bf62b875188f6711e73b505586091d0701bf885_9c4c8ed0-3f26-4b4c-a366-11daa8eaa82b.webp?v=1714706345","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/80f216128a7f33bbcfbab8ddc74ba11837e92651_294c6729-cfe4-409b-9e31-80ffa37d2e61.webp?v=1714706347","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/34123423b5f4c9d5e1a26855319b819c834f11b0_899818e6-bb1b-4427-8b2e-3286f06ceaf5.webp?v=1714706349","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/82d41605bb0ecf84a54965fc644e7d06702a9351_6fad9b75-3af2-4d75-987f-3499b5ea5e60.webp?v=1714706352"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f44bb4ebacae1c3361467dfad8a1d56f8dc6b8d8_43fa18bd-98ce-4d34-ad15-db3b8fb462bf.webp?v=1714706331","options":["color"],"media":[{"alt":null,"id":23875639476323,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f44bb4ebacae1c3361467dfad8a1d56f8dc6b8d8_43fa18bd-98ce-4d34-ad15-db3b8fb462bf.webp?v=1714706331"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f44bb4ebacae1c3361467dfad8a1d56f8dc6b8d8_43fa18bd-98ce-4d34-ad15-db3b8fb462bf.webp?v=1714706331","width":2000},{"alt":null,"id":23875639869539,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ad7e37edd71f56c8f5b4272eac23123fc2057500_342a9194-aec0-40f3-b4b4-167604c25d42.webp?v=1714706333"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ad7e37edd71f56c8f5b4272eac23123fc2057500_342a9194-aec0-40f3-b4b4-167604c25d42.webp?v=1714706333","width":2000},{"alt":null,"id":23875640295523,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/345af511b85c40b88014f6a1bb7efd6f076a7651_ea48c5ae-0cb7-46b2-a154-0a432701f83b.webp?v=1714706335"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/345af511b85c40b88014f6a1bb7efd6f076a7651_ea48c5ae-0cb7-46b2-a154-0a432701f83b.webp?v=1714706335","width":2000},{"alt":null,"id":23875640918115,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1f122519638505eae32c51abe2b4e194562c0bb0_062a0ff9-3b13-479a-99db-4a6ccbc4bd75.webp?v=1714706337"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1f122519638505eae32c51abe2b4e194562c0bb0_062a0ff9-3b13-479a-99db-4a6ccbc4bd75.webp?v=1714706337","width":2000},{"alt":null,"id":23875641376867,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/93be7a50fd0d7e453db8915d5c3a37c326064dd2_241f8197-7edc-47a9-bab0-a09d3f2c336d.webp?v=1714706340"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/93be7a50fd0d7e453db8915d5c3a37c326064dd2_241f8197-7edc-47a9-bab0-a09d3f2c336d.webp?v=1714706340","width":2000},{"alt":null,"id":23875642130531,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/628b911dae87bec79d6f14d0f8ce444a116f477d_4ce9fd07-8d49-4677-a66b-d465869c123f.webp?v=1714706342"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/628b911dae87bec79d6f14d0f8ce444a116f477d_4ce9fd07-8d49-4677-a66b-d465869c123f.webp?v=1714706342","width":2000},{"alt":null,"id":23875642523747,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8bf62b875188f6711e73b505586091d0701bf885_9c4c8ed0-3f26-4b4c-a366-11daa8eaa82b.webp?v=1714706345"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8bf62b875188f6711e73b505586091d0701bf885_9c4c8ed0-3f26-4b4c-a366-11daa8eaa82b.webp?v=1714706345","width":2000},{"alt":null,"id":23875643244643,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/80f216128a7f33bbcfbab8ddc74ba11837e92651_294c6729-cfe4-409b-9e31-80ffa37d2e61.webp?v=1714706347"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/80f216128a7f33bbcfbab8ddc74ba11837e92651_294c6729-cfe4-409b-9e31-80ffa37d2e61.webp?v=1714706347","width":2000},{"alt":null,"id":23875643768931,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/34123423b5f4c9d5e1a26855319b819c834f11b0_899818e6-bb1b-4427-8b2e-3286f06ceaf5.webp?v=1714706349"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/34123423b5f4c9d5e1a26855319b819c834f11b0_899818e6-bb1b-4427-8b2e-3286f06ceaf5.webp?v=1714706349","width":2000},{"alt":null,"id":23875644260451,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/82d41605bb0ecf84a54965fc644e7d06702a9351_6fad9b75-3af2-4d75-987f-3499b5ea5e60.webp?v=1714706352"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/82d41605bb0ecf84a54965fc644e7d06702a9351_6fad9b75-3af2-4d75-987f-3499b5ea5e60.webp?v=1714706352","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41880721195107,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0126124-PB17","requires_shipping":true,"taxable":true,"featured_image":{"id":31470737784931,"product_id":7407934111843,"position":6,"created_at":"2024-05-03T11:19:02+08:00","updated_at":"2024-05-03T11:19:02+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/628b911dae87bec79d6f14d0f8ce444a116f477d_4ce9fd07-8d49-4677-a66b-d465869c123f.webp?v=1714706342","variant_ids":[41880721195107]},"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-PB17","featured_media":{"alt":null,"id":23875642130531,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/628b911dae87bec79d6f14d0f8ce444a116f477d_4ce9fd07-8d49-4677-a66b-d465869c123f.webp?v=1714706342"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41880721195107,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0126124-PB17","requires_shipping":true,"taxable":true,"featured_image":{"id":31470737784931,"product_id":7407934111843,"position":6,"created_at":"2024-05-03T11:19:02+08:00","updated_at":"2024-05-03T11:19:02+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/628b911dae87bec79d6f14d0f8ce444a116f477d_4ce9fd07-8d49-4677-a66b-d465869c123f.webp?v=1714706342","variant_ids":[41880721195107]},"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-PB17","featured_media":{"alt":null,"id":23875642130531,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/628b911dae87bec79d6f14d0f8ce444a116f477d_4ce9fd07-8d49-4677-a66b-d465869c123f.webp?v=1714706342"}},"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: "停產" }