$product = {"id":7408452173923,"title":"犀牛盾Mod NX手機殼 - iPhone 12 mini - 【獨家設計款】 - 兔子電腦","handle":"iphone-12-mini-mod-nx-printable-mw06","description":null,"published_at":"2024-06-11T16:37:36+08:00","created_at":"2024-05-03T15:29:12+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"MOD NX 客製化","tags":["20%","25%","30%","35%","40%","45%","50%","b2b","brand-Apple","designer","device-iPhone 12 mini","discountable-item","member","merge","mod-nx-printable","new-modnx-sku","reseller","reseller-modnx-chi-po-lin-series","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":41885632266339,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118424-MW06","requires_shipping":true,"taxable":true,"featured_image":{"id":31472317235299,"product_id":7408452173923,"position":11,"created_at":"2024-05-03T15:29:38+08:00","updated_at":"2024-05-03T15:29:38+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bbcdf19fb20f18ffaf3fd9c289c0622153600e33_d470be3c-a6c9-42e0-b932-c1b345f656b0.webp?v=1714721378","variant_ids":[41885632266339]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 mini - 【獨家設計款】 - 兔子電腦 - 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-MW06","featured_media":{"alt":null,"id":23877233639523,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bbcdf19fb20f18ffaf3fd9c289c0622153600e33_d470be3c-a6c9-42e0-b932-c1b345f656b0.webp?v=1714721378"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8e30e205bfb88b72dfa19be5058e6d3bc943d189_4f974a28-0fd7-4c26-8866-4ee713c2b66b.webp?v=1714721355","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c74ffef907d7b011c459f837756047c55ed953f9_5c324e3f-cc77-4991-a62c-7cf7fb803b73.webp?v=1714721357","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/acf1218318a3f4d2273025debb0e4332daf780c1_79c723ac-34db-4b2f-b32e-16642e95bb47.webp?v=1714721360","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5bb1b53d70545bc0a9be5c07aea3a79c632af2a1_413e032f-d5c9-4685-b96f-90e7592fd7ae.webp?v=1714721362","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1b5d3798131d86e6f24b4c33f7d502333199e65b_eb00a714-0203-4a88-aeb4-549ee75ad8de.webp?v=1714721364","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5bcd72700655de8be04ceebbd76b964039da7906_d6d08a6a-1128-40cf-bb55-c6d5d75935c3.webp?v=1714721366","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7b4fe95be687150caec30c8aed7b0ec3147d3d5f_33e45fca-f2c0-4d9e-b541-d122b13d3f97.webp?v=1714721369","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e3fd0506bd866ad717ceeda1b566d0bf26c4a515_6972e5b4-3d84-4724-b072-fb90ace4d2e4.webp?v=1714721371","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3172082645cb7bd1abb141d63bfb90d748b46f5b_95c39e26-1eb8-4a2c-9af3-c53fb74e0fb5.webp?v=1714721373","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8e4428a85602ba59bc4113d27fd7f79b18330e61_81a2ca93-45a8-4003-b45e-a11002778d34.webp?v=1714721376","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bbcdf19fb20f18ffaf3fd9c289c0622153600e33_d470be3c-a6c9-42e0-b932-c1b345f656b0.webp?v=1714721378"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8e30e205bfb88b72dfa19be5058e6d3bc943d189_4f974a28-0fd7-4c26-8866-4ee713c2b66b.webp?v=1714721355","options":["color"],"media":[{"alt":null,"id":23877228658787,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8e30e205bfb88b72dfa19be5058e6d3bc943d189_4f974a28-0fd7-4c26-8866-4ee713c2b66b.webp?v=1714721355"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8e30e205bfb88b72dfa19be5058e6d3bc943d189_4f974a28-0fd7-4c26-8866-4ee713c2b66b.webp?v=1714721355","width":2000},{"alt":null,"id":23877229248611,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c74ffef907d7b011c459f837756047c55ed953f9_5c324e3f-cc77-4991-a62c-7cf7fb803b73.webp?v=1714721357"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c74ffef907d7b011c459f837756047c55ed953f9_5c324e3f-cc77-4991-a62c-7cf7fb803b73.webp?v=1714721357","width":2000},{"alt":null,"id":23877229740131,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/acf1218318a3f4d2273025debb0e4332daf780c1_79c723ac-34db-4b2f-b32e-16642e95bb47.webp?v=1714721360"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/acf1218318a3f4d2273025debb0e4332daf780c1_79c723ac-34db-4b2f-b32e-16642e95bb47.webp?v=1714721360","width":2000},{"alt":null,"id":23877230362723,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5bb1b53d70545bc0a9be5c07aea3a79c632af2a1_413e032f-d5c9-4685-b96f-90e7592fd7ae.webp?v=1714721362"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5bb1b53d70545bc0a9be5c07aea3a79c632af2a1_413e032f-d5c9-4685-b96f-90e7592fd7ae.webp?v=1714721362","width":2000},{"alt":null,"id":23877230657635,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1b5d3798131d86e6f24b4c33f7d502333199e65b_eb00a714-0203-4a88-aeb4-549ee75ad8de.webp?v=1714721364"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1b5d3798131d86e6f24b4c33f7d502333199e65b_eb00a714-0203-4a88-aeb4-549ee75ad8de.webp?v=1714721364","width":2000},{"alt":null,"id":23877231312995,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5bcd72700655de8be04ceebbd76b964039da7906_d6d08a6a-1128-40cf-bb55-c6d5d75935c3.webp?v=1714721366"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5bcd72700655de8be04ceebbd76b964039da7906_d6d08a6a-1128-40cf-bb55-c6d5d75935c3.webp?v=1714721366","width":2000},{"alt":null,"id":23877231673443,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7b4fe95be687150caec30c8aed7b0ec3147d3d5f_33e45fca-f2c0-4d9e-b541-d122b13d3f97.webp?v=1714721369"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7b4fe95be687150caec30c8aed7b0ec3147d3d5f_33e45fca-f2c0-4d9e-b541-d122b13d3f97.webp?v=1714721369","width":2000},{"alt":null,"id":23877232263267,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e3fd0506bd866ad717ceeda1b566d0bf26c4a515_6972e5b4-3d84-4724-b072-fb90ace4d2e4.webp?v=1714721371"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e3fd0506bd866ad717ceeda1b566d0bf26c4a515_6972e5b4-3d84-4724-b072-fb90ace4d2e4.webp?v=1714721371","width":2000},{"alt":null,"id":23877232722019,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3172082645cb7bd1abb141d63bfb90d748b46f5b_95c39e26-1eb8-4a2c-9af3-c53fb74e0fb5.webp?v=1714721373"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3172082645cb7bd1abb141d63bfb90d748b46f5b_95c39e26-1eb8-4a2c-9af3-c53fb74e0fb5.webp?v=1714721373","width":2000},{"alt":null,"id":23877233213539,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8e4428a85602ba59bc4113d27fd7f79b18330e61_81a2ca93-45a8-4003-b45e-a11002778d34.webp?v=1714721376"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8e4428a85602ba59bc4113d27fd7f79b18330e61_81a2ca93-45a8-4003-b45e-a11002778d34.webp?v=1714721376","width":2000},{"alt":null,"id":23877233639523,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bbcdf19fb20f18ffaf3fd9c289c0622153600e33_d470be3c-a6c9-42e0-b932-c1b345f656b0.webp?v=1714721378"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bbcdf19fb20f18ffaf3fd9c289c0622153600e33_d470be3c-a6c9-42e0-b932-c1b345f656b0.webp?v=1714721378","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41885632266339,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118424-MW06","requires_shipping":true,"taxable":true,"featured_image":{"id":31472317235299,"product_id":7408452173923,"position":11,"created_at":"2024-05-03T15:29:38+08:00","updated_at":"2024-05-03T15:29:38+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bbcdf19fb20f18ffaf3fd9c289c0622153600e33_d470be3c-a6c9-42e0-b932-c1b345f656b0.webp?v=1714721378","variant_ids":[41885632266339]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 mini - 【獨家設計款】 - 兔子電腦 - 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-MW06","featured_media":{"alt":null,"id":23877233639523,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bbcdf19fb20f18ffaf3fd9c289c0622153600e33_d470be3c-a6c9-42e0-b932-c1b345f656b0.webp?v=1714721378"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41885632266339,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118424-MW06","requires_shipping":true,"taxable":true,"featured_image":{"id":31472317235299,"product_id":7408452173923,"position":11,"created_at":"2024-05-03T15:29:38+08:00","updated_at":"2024-05-03T15:29:38+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bbcdf19fb20f18ffaf3fd9c289c0622153600e33_d470be3c-a6c9-42e0-b932-c1b345f656b0.webp?v=1714721378","variant_ids":[41885632266339]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 mini - 【獨家設計款】 - 兔子電腦 - 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-MW06","featured_media":{"alt":null,"id":23877233639523,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bbcdf19fb20f18ffaf3fd9c289c0622153600e33_d470be3c-a6c9-42e0-b932-c1b345f656b0.webp?v=1714721378"}},"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: "停產" }