$product = {"id":7414972940387,"title":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - Pixel Jeff 皮傑 - Lollipop","handle":"iphone-12-mini-mod-nx-magsafe-printable-hq04","description":null,"published_at":"2024-06-11T17:54:32+08:00","created_at":"2024-05-05T19:58:32+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"設計師MOD NX MagSafe專區Pixel Jeff 皮傑","tags":["20%","25%","30%","35%","40%","45%","50%","b2b","brand-Apple","designer","designer-pixeljeff","device-iPhone 12 mini","merge","mod-nx-magsafe-printable","new-modnx-sku","reseller-modnx-magsafe-pixeljeff","Top50","type-Mod NX Printable MagSafe Printable"],"price":110000,"price_min":110000,"price_max":110000,"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":41910507765859,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118424-HQ04","requires_shipping":true,"taxable":true,"featured_image":{"id":31487815712867,"product_id":7414972940387,"position":4,"created_at":"2024-05-05T19:58:42+08:00","updated_at":"2024-05-05T19:58:42+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ff3d58eedcc61cfca2f8fc18570db45d61f956c6_ef12181b-3f1b-4261-8f0e-9820d6ffe12d.webp?v=1714910322","variant_ids":[41910507765859]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - Pixel Jeff 皮傑 - Lollipop - Mod NX-黑色邊框","public_title":"Mod NX-黑色邊框","options":["Mod NX-黑色邊框"],"price":110000,"weight":1380,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"MPB0118424-HQ04","featured_media":{"alt":null,"id":23893159739491,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ff3d58eedcc61cfca2f8fc18570db45d61f956c6_ef12181b-3f1b-4261-8f0e-9820d6ffe12d.webp?v=1714910322"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6292a1bf7ecd24de6f35abdc601b432bda58b676_708077c4-b8b2-45c4-b8be-8222fcd5376c.webp?v=1714910315","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7aae5664f3a70cc44eb05eec3f31a6adc5c93208_02c541d6-ba3b-42d7-a698-176c4bad957d.webp?v=1714910317","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/96bb9309e500f603ac46a96ea12561a47e5ff25c_ca30cc34-717f-4641-99c5-fdf212bf2b57.webp?v=1714910319","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ff3d58eedcc61cfca2f8fc18570db45d61f956c6_ef12181b-3f1b-4261-8f0e-9820d6ffe12d.webp?v=1714910322","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/23ccf0675dde79aeda92d9b2a516227b5a45ff22_fe6adf81-eb80-4033-bce6-b2e6e1c1a163.webp?v=1714910324","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7993e01f44ecb24598628f2aab36ed220696d0cd_75c75d4d-d2f8-43ae-b69d-0f77f03c9114.webp?v=1714910327","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4944e4c05397e830b2831380548fe2d880695f91_3f6638f7-3957-42aa-839a-15da00e7a027.webp?v=1714910329","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3938da8a201ee44089447c42a05439b0319c3244_6bdfa95d-71e0-407f-9dfe-29e233f9a68f.webp?v=1714910332","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b971547088f8df32367bdf24f23605e0fc0293bc_548f5d4f-8c9c-4fa7-bbc3-5c474f8abf8b.webp?v=1714910334","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e24d92d5dcd16f311825e9b8c9c9ed2950eb4305_2e37d28a-7569-4500-a333-034386dc16f2.webp?v=1714910336","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4ba3b166455db4250af84323a87821e9e2d01e8e_b8300e97-8d2f-4dd3-8152-b1751847738f.webp?v=1714910339"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6292a1bf7ecd24de6f35abdc601b432bda58b676_708077c4-b8b2-45c4-b8be-8222fcd5376c.webp?v=1714910315","options":["color"],"media":[{"alt":null,"id":23893157970019,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6292a1bf7ecd24de6f35abdc601b432bda58b676_708077c4-b8b2-45c4-b8be-8222fcd5376c.webp?v=1714910315"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6292a1bf7ecd24de6f35abdc601b432bda58b676_708077c4-b8b2-45c4-b8be-8222fcd5376c.webp?v=1714910315","width":2000},{"alt":null,"id":23893158363235,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7aae5664f3a70cc44eb05eec3f31a6adc5c93208_02c541d6-ba3b-42d7-a698-176c4bad957d.webp?v=1714910317"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7aae5664f3a70cc44eb05eec3f31a6adc5c93208_02c541d6-ba3b-42d7-a698-176c4bad957d.webp?v=1714910317","width":2000},{"alt":null,"id":23893159018595,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/96bb9309e500f603ac46a96ea12561a47e5ff25c_ca30cc34-717f-4641-99c5-fdf212bf2b57.webp?v=1714910319"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/96bb9309e500f603ac46a96ea12561a47e5ff25c_ca30cc34-717f-4641-99c5-fdf212bf2b57.webp?v=1714910319","width":2000},{"alt":null,"id":23893159739491,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ff3d58eedcc61cfca2f8fc18570db45d61f956c6_ef12181b-3f1b-4261-8f0e-9820d6ffe12d.webp?v=1714910322"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ff3d58eedcc61cfca2f8fc18570db45d61f956c6_ef12181b-3f1b-4261-8f0e-9820d6ffe12d.webp?v=1714910322","width":2000},{"alt":null,"id":23893160231011,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/23ccf0675dde79aeda92d9b2a516227b5a45ff22_fe6adf81-eb80-4033-bce6-b2e6e1c1a163.webp?v=1714910324"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/23ccf0675dde79aeda92d9b2a516227b5a45ff22_fe6adf81-eb80-4033-bce6-b2e6e1c1a163.webp?v=1714910324","width":2000},{"alt":null,"id":23893160656995,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7993e01f44ecb24598628f2aab36ed220696d0cd_75c75d4d-d2f8-43ae-b69d-0f77f03c9114.webp?v=1714910327"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7993e01f44ecb24598628f2aab36ed220696d0cd_75c75d4d-d2f8-43ae-b69d-0f77f03c9114.webp?v=1714910327","width":2000},{"alt":null,"id":23893161148515,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4944e4c05397e830b2831380548fe2d880695f91_3f6638f7-3957-42aa-839a-15da00e7a027.webp?v=1714910329"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4944e4c05397e830b2831380548fe2d880695f91_3f6638f7-3957-42aa-839a-15da00e7a027.webp?v=1714910329","width":2000},{"alt":null,"id":23893161672803,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3938da8a201ee44089447c42a05439b0319c3244_6bdfa95d-71e0-407f-9dfe-29e233f9a68f.webp?v=1714910332"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3938da8a201ee44089447c42a05439b0319c3244_6bdfa95d-71e0-407f-9dfe-29e233f9a68f.webp?v=1714910332","width":2000},{"alt":null,"id":23893162557539,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b971547088f8df32367bdf24f23605e0fc0293bc_548f5d4f-8c9c-4fa7-bbc3-5c474f8abf8b.webp?v=1714910334"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b971547088f8df32367bdf24f23605e0fc0293bc_548f5d4f-8c9c-4fa7-bbc3-5c474f8abf8b.webp?v=1714910334","width":2000},{"alt":null,"id":23893162983523,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e24d92d5dcd16f311825e9b8c9c9ed2950eb4305_2e37d28a-7569-4500-a333-034386dc16f2.webp?v=1714910336"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e24d92d5dcd16f311825e9b8c9c9ed2950eb4305_2e37d28a-7569-4500-a333-034386dc16f2.webp?v=1714910336","width":2000},{"alt":null,"id":23893163606115,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4ba3b166455db4250af84323a87821e9e2d01e8e_b8300e97-8d2f-4dd3-8152-b1751847738f.webp?v=1714910339"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4ba3b166455db4250af84323a87821e9e2d01e8e_b8300e97-8d2f-4dd3-8152-b1751847738f.webp?v=1714910339","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41910507765859,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118424-HQ04","requires_shipping":true,"taxable":true,"featured_image":{"id":31487815712867,"product_id":7414972940387,"position":4,"created_at":"2024-05-05T19:58:42+08:00","updated_at":"2024-05-05T19:58:42+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ff3d58eedcc61cfca2f8fc18570db45d61f956c6_ef12181b-3f1b-4261-8f0e-9820d6ffe12d.webp?v=1714910322","variant_ids":[41910507765859]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - Pixel Jeff 皮傑 - Lollipop - Mod NX-黑色邊框","public_title":"Mod NX-黑色邊框","options":["Mod NX-黑色邊框"],"price":110000,"weight":1380,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"MPB0118424-HQ04","featured_media":{"alt":null,"id":23893159739491,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ff3d58eedcc61cfca2f8fc18570db45d61f956c6_ef12181b-3f1b-4261-8f0e-9820d6ffe12d.webp?v=1714910322"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41910507765859,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118424-HQ04","requires_shipping":true,"taxable":true,"featured_image":{"id":31487815712867,"product_id":7414972940387,"position":4,"created_at":"2024-05-05T19:58:42+08:00","updated_at":"2024-05-05T19:58:42+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ff3d58eedcc61cfca2f8fc18570db45d61f956c6_ef12181b-3f1b-4261-8f0e-9820d6ffe12d.webp?v=1714910322","variant_ids":[41910507765859]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - Pixel Jeff 皮傑 - Lollipop - Mod NX-黑色邊框","public_title":"Mod NX-黑色邊框","options":["Mod NX-黑色邊框"],"price":110000,"weight":1380,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"MPB0118424-HQ04","featured_media":{"alt":null,"id":23893159739491,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ff3d58eedcc61cfca2f8fc18570db45d61f956c6_ef12181b-3f1b-4261-8f0e-9820d6ffe12d.webp?v=1714910322"}},"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: "停產" }