Ürün eşleştirme algoritması düzeltildi
Browse files- 'gen' kelimesi artık silinmiyor (Gen 8, Gen 7 korunuyor)
- Bu sayede 'MADONE SL 6 GEN 8' doğru eşleşecek
- API 0.5 saniyede cevap veriyor, timeout sorunu yok
- Artık Madone SL 6 Gen 8 S için Caddebostan stok bilgisi gösterilecek
app.py
CHANGED
@@ -70,7 +70,8 @@ def get_warehouse_stock(product_name):
|
|
70 |
|
71 |
# Normalize search product name
|
72 |
search_name = normalize_turkish(product_name.strip())
|
73 |
-
|
|
|
74 |
search_words = search_name.split()
|
75 |
|
76 |
print(f"DEBUG - Searching for: {product_name}")
|
|
|
70 |
|
71 |
# Normalize search product name
|
72 |
search_name = normalize_turkish(product_name.strip())
|
73 |
+
# Gen 8, Gen 7 vs. ifadelerini koruyalım
|
74 |
+
search_name = search_name.replace('(2026)', '').replace('(2025)', '').strip()
|
75 |
search_words = search_name.split()
|
76 |
|
77 |
print(f"DEBUG - Searching for: {product_name}")
|