$product = {"id":7414939254883,"title":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - Look - 大自然的傑作(斯瓦爾巴冰川)","handle":"iphone-12-mini-mod-nx-magsafe-printable-af10","description":null,"published_at":"2024-06-11T17:53:37+08:00","created_at":"2024-05-05T19:52:32+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"設計師MOD NX MagSafe專區Look","tags":["20%","25%","30%","35%","40%","45%","50%","b2b","brand-Apple","designer","designer-look","device-iPhone 12 mini","merge","mod-nx-magsafe-printable","new-modnx-sku","reseller-modnx-magsafe-look","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":41910147186787,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118424-AF10","requires_shipping":true,"taxable":true,"featured_image":{"id":31487734612067,"product_id":7414939254883,"position":9,"created_at":"2024-05-05T19:52:54+08:00","updated_at":"2024-05-05T19:52:54+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c28e76f66cedb93c40b81b663b80e0ac6b65b6a0_fe7d753c-87bd-4ba5-ab93-5e511515e1f5.webp?v=1714909974","variant_ids":[41910147186787]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - Look - 大自然的傑作(斯瓦爾巴冰川) - 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-AF10","featured_media":{"alt":null,"id":23893078540387,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c28e76f66cedb93c40b81b663b80e0ac6b65b6a0_fe7d753c-87bd-4ba5-ab93-5e511515e1f5.webp?v=1714909974"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a50aceb5ba0b1cff217b40119e77b9404c954d93_f81e07d8-b508-49ba-b176-90db7098fc8b.webp?v=1714909955","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/641e781f147e6be148a5e08947999e6bea6fde3e_68203bf8-2720-42ad-a4ac-c384176a4273.webp?v=1714909957","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ef45d5237c9e814633f18daff52dbf00ad081aa8_5a04f75c-98cf-4ad5-a32b-943f8b07e0f8.webp?v=1714909959","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/26d72ef94c3239c3a074f87bfa1cbd5e592fa671_37d52ef0-e710-4503-b5c5-09d57f5fa860.webp?v=1714909962","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/549636c5559493523384fa68be8a8c9c1894c0dc_fe16e449-95d3-43bb-8898-3e51782c8f73.webp?v=1714909964","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/59c0271c2aed8604237614cacdec6f5043a4e94b_014513a2-044b-4045-82b9-12f8565f3406.webp?v=1714909967","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7649b6e1e341854cabf4058aad8ceb90f15d13a7_9fc83f1f-d7a6-41ca-af91-55642b1dbfe5.webp?v=1714909969","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b2d6d78e10b81a59198873490970e93e7c33df69_c77f8c3b-8c3b-46e2-bd40-946f53d32a65.webp?v=1714909972","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c28e76f66cedb93c40b81b663b80e0ac6b65b6a0_fe7d753c-87bd-4ba5-ab93-5e511515e1f5.webp?v=1714909974","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6fef4d56c53e35d3f27b15eb870494cabdfe855f_9e9c7fc3-80eb-49ab-9e9f-9db27933bd0d.webp?v=1714909976","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0a8333b1992fb09f596a04a2e4fd376956bed0b7_7df6559e-4afc-433c-a423-ba572100f408.webp?v=1714909979"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a50aceb5ba0b1cff217b40119e77b9404c954d93_f81e07d8-b508-49ba-b176-90db7098fc8b.webp?v=1714909955","options":["color"],"media":[{"alt":null,"id":23893073657955,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a50aceb5ba0b1cff217b40119e77b9404c954d93_f81e07d8-b508-49ba-b176-90db7098fc8b.webp?v=1714909955"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a50aceb5ba0b1cff217b40119e77b9404c954d93_f81e07d8-b508-49ba-b176-90db7098fc8b.webp?v=1714909955","width":2000},{"alt":null,"id":23893074346083,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/641e781f147e6be148a5e08947999e6bea6fde3e_68203bf8-2720-42ad-a4ac-c384176a4273.webp?v=1714909957"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/641e781f147e6be148a5e08947999e6bea6fde3e_68203bf8-2720-42ad-a4ac-c384176a4273.webp?v=1714909957","width":2000},{"alt":null,"id":23893074935907,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ef45d5237c9e814633f18daff52dbf00ad081aa8_5a04f75c-98cf-4ad5-a32b-943f8b07e0f8.webp?v=1714909959"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ef45d5237c9e814633f18daff52dbf00ad081aa8_5a04f75c-98cf-4ad5-a32b-943f8b07e0f8.webp?v=1714909959","width":2000},{"alt":null,"id":23893075394659,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/26d72ef94c3239c3a074f87bfa1cbd5e592fa671_37d52ef0-e710-4503-b5c5-09d57f5fa860.webp?v=1714909962"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/26d72ef94c3239c3a074f87bfa1cbd5e592fa671_37d52ef0-e710-4503-b5c5-09d57f5fa860.webp?v=1714909962","width":2000},{"alt":null,"id":23893075984483,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/549636c5559493523384fa68be8a8c9c1894c0dc_fe16e449-95d3-43bb-8898-3e51782c8f73.webp?v=1714909964"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/549636c5559493523384fa68be8a8c9c1894c0dc_fe16e449-95d3-43bb-8898-3e51782c8f73.webp?v=1714909964","width":2000},{"alt":null,"id":23893076377699,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/59c0271c2aed8604237614cacdec6f5043a4e94b_014513a2-044b-4045-82b9-12f8565f3406.webp?v=1714909967"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/59c0271c2aed8604237614cacdec6f5043a4e94b_014513a2-044b-4045-82b9-12f8565f3406.webp?v=1714909967","width":2000},{"alt":null,"id":23893077393507,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7649b6e1e341854cabf4058aad8ceb90f15d13a7_9fc83f1f-d7a6-41ca-af91-55642b1dbfe5.webp?v=1714909969"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7649b6e1e341854cabf4058aad8ceb90f15d13a7_9fc83f1f-d7a6-41ca-af91-55642b1dbfe5.webp?v=1714909969","width":2000},{"alt":null,"id":23893077819491,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b2d6d78e10b81a59198873490970e93e7c33df69_c77f8c3b-8c3b-46e2-bd40-946f53d32a65.webp?v=1714909972"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b2d6d78e10b81a59198873490970e93e7c33df69_c77f8c3b-8c3b-46e2-bd40-946f53d32a65.webp?v=1714909972","width":2000},{"alt":null,"id":23893078540387,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c28e76f66cedb93c40b81b663b80e0ac6b65b6a0_fe7d753c-87bd-4ba5-ab93-5e511515e1f5.webp?v=1714909974"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c28e76f66cedb93c40b81b663b80e0ac6b65b6a0_fe7d753c-87bd-4ba5-ab93-5e511515e1f5.webp?v=1714909974","width":2000},{"alt":null,"id":23893078933603,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6fef4d56c53e35d3f27b15eb870494cabdfe855f_9e9c7fc3-80eb-49ab-9e9f-9db27933bd0d.webp?v=1714909976"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6fef4d56c53e35d3f27b15eb870494cabdfe855f_9e9c7fc3-80eb-49ab-9e9f-9db27933bd0d.webp?v=1714909976","width":2000},{"alt":null,"id":23893079523427,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0a8333b1992fb09f596a04a2e4fd376956bed0b7_7df6559e-4afc-433c-a423-ba572100f408.webp?v=1714909979"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0a8333b1992fb09f596a04a2e4fd376956bed0b7_7df6559e-4afc-433c-a423-ba572100f408.webp?v=1714909979","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41910147186787,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118424-AF10","requires_shipping":true,"taxable":true,"featured_image":{"id":31487734612067,"product_id":7414939254883,"position":9,"created_at":"2024-05-05T19:52:54+08:00","updated_at":"2024-05-05T19:52:54+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c28e76f66cedb93c40b81b663b80e0ac6b65b6a0_fe7d753c-87bd-4ba5-ab93-5e511515e1f5.webp?v=1714909974","variant_ids":[41910147186787]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - Look - 大自然的傑作(斯瓦爾巴冰川) - 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-AF10","featured_media":{"alt":null,"id":23893078540387,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c28e76f66cedb93c40b81b663b80e0ac6b65b6a0_fe7d753c-87bd-4ba5-ab93-5e511515e1f5.webp?v=1714909974"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41910147186787,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118424-AF10","requires_shipping":true,"taxable":true,"featured_image":{"id":31487734612067,"product_id":7414939254883,"position":9,"created_at":"2024-05-05T19:52:54+08:00","updated_at":"2024-05-05T19:52:54+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c28e76f66cedb93c40b81b663b80e0ac6b65b6a0_fe7d753c-87bd-4ba5-ab93-5e511515e1f5.webp?v=1714909974","variant_ids":[41910147186787]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - Look - 大自然的傑作(斯瓦爾巴冰川) - 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-AF10","featured_media":{"alt":null,"id":23893078540387,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c28e76f66cedb93c40b81b663b80e0ac6b65b6a0_fe7d753c-87bd-4ba5-ab93-5e511515e1f5.webp?v=1714909974"}},"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: "停產" }