$product = {"id":7408455614563,"title":"犀牛盾Mod NX手機殼 - iPhone 12 mini - 【聯名設計款】 - Weiweiboy - 讓世界再可愛一點","handle":"iphone-12-mini-mod-nx-printable-eo02","description":null,"published_at":"2024-06-11T16:37:42+08:00","created_at":"2024-05-03T15:29:59+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"設計師MOD NX專區-Weiweiboy","tags":["20%","25%","30%","35%","40%","45%","50%","b2b","brand-Apple","designer","designer-weiweiboy","device-iPhone 12 mini","merge","mod-nx-printable","new-modnx-sku","reseller-modnx-weiweiboy","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":41885673422947,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118424-EO02","requires_shipping":true,"taxable":true,"featured_image":{"id":31472326869091,"product_id":7408455614563,"position":9,"created_at":"2024-05-03T15:30:22+08:00","updated_at":"2024-05-03T15:30:22+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c16b2ed5431307f9b122f587ddf7e77c8d32448a_b5a0a644-3733-4e72-84fe-be10b763b912.webp?v=1714721422","variant_ids":[41885673422947]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 mini - 【聯名設計款】 - Weiweiboy - 讓世界再可愛一點 - Mod NX-黑色邊框","public_title":"Mod NX-黑色邊框","options":["Mod NX-黑色邊框"],"price":90000,"weight":860,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"NPB0118424-EO02","featured_media":{"alt":null,"id":23877243273315,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c16b2ed5431307f9b122f587ddf7e77c8d32448a_b5a0a644-3733-4e72-84fe-be10b763b912.webp?v=1714721422"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/819e7d949011f0c8f196cff825578b8345195ade_74581620-3cf4-4ac4-9f72-9ca9b97e61fb.webp?v=1714721402","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ef79695222a805d5961bb49dfbf0c3dc99c129a3_90c3b111-8507-4631-a53a-62f826435cdc.webp?v=1714721404","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fbe81a81e57b7921fdcd5bb3d93fa37ad0323686_15edb6bb-d900-49a0-8add-05a2be004a24.webp?v=1714721407","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dd8d3727762cd7f27f9da5ca4c05c70cc19da544_9681b667-814a-4a01-a814-386bc7110c19.webp?v=1714721409","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e48863209877f2996894d92e006e35580efa6c8c_1006ff03-ebf1-4f4c-891c-46e57e145779.webp?v=1714721412","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d5b2bd4c7119688eec939b780e3da93824d3dc6e_753ebf4b-78be-45e7-b3e6-bee3938afeee.webp?v=1714721414","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a02111ecce7636bf8f69ab09ca0fa86fd9fa8d1c_117edfc3-f0c8-4315-a04c-b3a1461a0e66.webp?v=1714721417","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2ed809251f1032e52c8a5b5dbb54860fe49b4230_5e015db6-1bcb-46da-9fb4-01a46012c63f.webp?v=1714721419","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c16b2ed5431307f9b122f587ddf7e77c8d32448a_b5a0a644-3733-4e72-84fe-be10b763b912.webp?v=1714721422","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fd8891c0ac5dfaf2270c9056f6950fe7fbfcdf14_c5d592ea-599b-4a8b-979b-1069ff67a443.webp?v=1714721424","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/aecc501f6b3b48c9e41278b8026cc9c151782928_770fbcd6-e0e7-41fc-98a5-3aa62bf4db53.webp?v=1714721426"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/819e7d949011f0c8f196cff825578b8345195ade_74581620-3cf4-4ac4-9f72-9ca9b97e61fb.webp?v=1714721402","options":["color"],"media":[{"alt":null,"id":23877239308387,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/819e7d949011f0c8f196cff825578b8345195ade_74581620-3cf4-4ac4-9f72-9ca9b97e61fb.webp?v=1714721402"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/819e7d949011f0c8f196cff825578b8345195ade_74581620-3cf4-4ac4-9f72-9ca9b97e61fb.webp?v=1714721402","width":2000},{"alt":null,"id":23877239832675,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ef79695222a805d5961bb49dfbf0c3dc99c129a3_90c3b111-8507-4631-a53a-62f826435cdc.webp?v=1714721404"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ef79695222a805d5961bb49dfbf0c3dc99c129a3_90c3b111-8507-4631-a53a-62f826435cdc.webp?v=1714721404","width":2000},{"alt":null,"id":23877240225891,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fbe81a81e57b7921fdcd5bb3d93fa37ad0323686_15edb6bb-d900-49a0-8add-05a2be004a24.webp?v=1714721407"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fbe81a81e57b7921fdcd5bb3d93fa37ad0323686_15edb6bb-d900-49a0-8add-05a2be004a24.webp?v=1714721407","width":2000},{"alt":null,"id":23877240815715,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dd8d3727762cd7f27f9da5ca4c05c70cc19da544_9681b667-814a-4a01-a814-386bc7110c19.webp?v=1714721409"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dd8d3727762cd7f27f9da5ca4c05c70cc19da544_9681b667-814a-4a01-a814-386bc7110c19.webp?v=1714721409","width":2000},{"alt":null,"id":23877241372771,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e48863209877f2996894d92e006e35580efa6c8c_1006ff03-ebf1-4f4c-891c-46e57e145779.webp?v=1714721412"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e48863209877f2996894d92e006e35580efa6c8c_1006ff03-ebf1-4f4c-891c-46e57e145779.webp?v=1714721412","width":2000},{"alt":null,"id":23877241864291,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d5b2bd4c7119688eec939b780e3da93824d3dc6e_753ebf4b-78be-45e7-b3e6-bee3938afeee.webp?v=1714721414"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d5b2bd4c7119688eec939b780e3da93824d3dc6e_753ebf4b-78be-45e7-b3e6-bee3938afeee.webp?v=1714721414","width":2000},{"alt":null,"id":23877242388579,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a02111ecce7636bf8f69ab09ca0fa86fd9fa8d1c_117edfc3-f0c8-4315-a04c-b3a1461a0e66.webp?v=1714721417"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a02111ecce7636bf8f69ab09ca0fa86fd9fa8d1c_117edfc3-f0c8-4315-a04c-b3a1461a0e66.webp?v=1714721417","width":2000},{"alt":null,"id":23877242781795,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2ed809251f1032e52c8a5b5dbb54860fe49b4230_5e015db6-1bcb-46da-9fb4-01a46012c63f.webp?v=1714721419"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2ed809251f1032e52c8a5b5dbb54860fe49b4230_5e015db6-1bcb-46da-9fb4-01a46012c63f.webp?v=1714721419","width":2000},{"alt":null,"id":23877243273315,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c16b2ed5431307f9b122f587ddf7e77c8d32448a_b5a0a644-3733-4e72-84fe-be10b763b912.webp?v=1714721422"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c16b2ed5431307f9b122f587ddf7e77c8d32448a_b5a0a644-3733-4e72-84fe-be10b763b912.webp?v=1714721422","width":2000},{"alt":null,"id":23877243764835,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fd8891c0ac5dfaf2270c9056f6950fe7fbfcdf14_c5d592ea-599b-4a8b-979b-1069ff67a443.webp?v=1714721424"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fd8891c0ac5dfaf2270c9056f6950fe7fbfcdf14_c5d592ea-599b-4a8b-979b-1069ff67a443.webp?v=1714721424","width":2000},{"alt":null,"id":23877244190819,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/aecc501f6b3b48c9e41278b8026cc9c151782928_770fbcd6-e0e7-41fc-98a5-3aa62bf4db53.webp?v=1714721426"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/aecc501f6b3b48c9e41278b8026cc9c151782928_770fbcd6-e0e7-41fc-98a5-3aa62bf4db53.webp?v=1714721426","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41885673422947,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118424-EO02","requires_shipping":true,"taxable":true,"featured_image":{"id":31472326869091,"product_id":7408455614563,"position":9,"created_at":"2024-05-03T15:30:22+08:00","updated_at":"2024-05-03T15:30:22+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c16b2ed5431307f9b122f587ddf7e77c8d32448a_b5a0a644-3733-4e72-84fe-be10b763b912.webp?v=1714721422","variant_ids":[41885673422947]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 mini - 【聯名設計款】 - Weiweiboy - 讓世界再可愛一點 - Mod NX-黑色邊框","public_title":"Mod NX-黑色邊框","options":["Mod NX-黑色邊框"],"price":90000,"weight":860,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"NPB0118424-EO02","featured_media":{"alt":null,"id":23877243273315,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c16b2ed5431307f9b122f587ddf7e77c8d32448a_b5a0a644-3733-4e72-84fe-be10b763b912.webp?v=1714721422"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41885673422947,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118424-EO02","requires_shipping":true,"taxable":true,"featured_image":{"id":31472326869091,"product_id":7408455614563,"position":9,"created_at":"2024-05-03T15:30:22+08:00","updated_at":"2024-05-03T15:30:22+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c16b2ed5431307f9b122f587ddf7e77c8d32448a_b5a0a644-3733-4e72-84fe-be10b763b912.webp?v=1714721422","variant_ids":[41885673422947]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 mini - 【聯名設計款】 - Weiweiboy - 讓世界再可愛一點 - Mod NX-黑色邊框","public_title":"Mod NX-黑色邊框","options":["Mod NX-黑色邊框"],"price":90000,"weight":860,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"NPB0118424-EO02","featured_media":{"alt":null,"id":23877243273315,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c16b2ed5431307f9b122f587ddf7e77c8d32448a_b5a0a644-3733-4e72-84fe-be10b763b912.webp?v=1714721422"}},"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: "停產" }