Commit graph

601 commits

Author SHA1 Message Date
38b22704b1 Features: 1) Enhance product filter to support Elasticsearch ranking with preserved order; 2) Add personal_orders_only field to ProductDocument; 3) Introduce "name_exact" analyzer for case-insensitive exact matching in Elasticsearch;
Fixes: 1) Fix Elasticsearch document mapping to include missing "ci" field; 2) Correct slug field index setting from index=False to indexed; 3) Update Elasticsearch search weights and sizes for improved relevance and pagination;

Extra: 1) Refactor product search logic to prioritize partnumber > sku > slug > name.ci; 2) Add new analyzer "name_exact" for case-insensitive exact matching; 3) Adjust stock model to allow blank system_attributes; 4) Update migration to reflect JSONField changes; 5) Adjust Elasticsearch boosting weights for better ranking; 6) Increase category search size to 33 for consistency; 7) Add missing personal_orders_only field to ProductDocument.
2025-11-02 03:09:16 +03:00
0cec8b0380 Features: 1) Replace DigitalAssetDownload creation logic with get_or_create.
Fixes: 1) Remove unnecessary conditional check for DigitalAssetDownload existence.

Extra: 1) Simplify flow for processing order products with digital assets.
2025-10-29 12:43:12 +03:00
9412b0dd7a Features: 1) Enforce currency validation when resolving price with no provided currency; 2) Update async logger initialization to use "vendors" scope;
Fixes: 1) Correct typo in error message “probider” to “provider”;

Extra: 1) Remove redundant initialization log during vendor setup; 2) Minor code cleanup in `resolve_price_with_currency` method.
2025-10-27 01:17:29 +03:00
6d4d651320 Features: 1) Add logging on initialization for vendor instances; 2) Introduce safe parameter to get_vendor_instance method to handle inactive or nonexistent vendors gracefully;
Fixes: 1) Modify `__str__` method to use `get_vendor_instance` with `safe=True` for improved error handling;

Extra: 1) Minor code structure improvements in `get_vendor_instance` method.
2025-10-27 01:03:17 +03:00
0c990291a4 Features: 1) Add currency handling logic in resolve_price_with_currency method to ensure correct conversion when the currency matches the provider or default currency;
Fixes: 1) None;

Extra: 1) None;
2025-10-26 22:37:38 +03:00
b4292fde53 Features: 1) Add JSONField system_attributes to stock model with default as an empty dictionary; 2) Extend sitemaps for Category and Brand to include slug in queried fields;
Fixes: None;

Extra: 1) Standardize quotes in migration dependencies and field declarations; 2) Break down queryset methods in sitemaps for improved readability;
2025-10-26 22:34:01 +03:00
0cd2e417cb Features: 1) Add form attribute to StockInline class to use StockForm.
Fixes: None;

Extra: None;
2025-10-26 20:09:05 +03:00
d2b3dccda9 Features: 1) Add system_attributes JSONField to Stock model; 2) Introduce StockForm with system_attributes widget; 3) Integrate StockForm into StockAdmin in Django admin panel.
Fixes: None;

Extra: 1) Update migrations to include addition of `system_attributes`; 2) Modify admin interface to display `system_attributes` in additional_fields.
2025-10-26 19:59:43 +03:00
753a2059d4 Features: 1) Add discount_price field to ProductDetailSerializer, PromotionDetailSerializer, and Product GraphQL type; 2) Introduce promos and discount_price properties in the Product model;
Fixes: None;

Extra: 1) Update field inclusion lists and methods in serializers to reflect the new `discount_price` field; 2) Add model property caching for `discount_price`;
2025-10-26 19:51:41 +03:00
75cc74e592 Features: n/a;
Fixes: n/a;

Extra: 1) Update locale files for Portuguese and French translations; 2) Correct PO creation date for alignment with new translations; 3) Translated strings for transaction view operations (list and retrieve).
2025-10-26 19:27:12 +03:00
c0fcde4bb4 Features: 1) Introduced extend_schema for multiple viewsets to improve OpenAPI documentation; 2) Added detailed schema definitions for blog and payments viewsets using drf-spectacular; 3) Transitioned download_digital_asset functionality to class-based DownloadDigitalAssetView for better modularity.
Fixes: 1) Standardized error responses in `DownloadDigitalAssetView`.

Extra: Improved maintainability by refactoring serializers and schema definitions into modular components; updated API URLs to use new class-based view.
2025-10-26 18:44:19 +03:00
c9fd4b4f98 Features: 1) Remove categories field from attribute model via migration;
Fixes: 1) Ensure database schema aligns with updated model definitions;

Extra: 1) Auto-generated migration script for database changes.
2025-10-26 17:11:07 +03:00
95a0958292 Features: 1) Enforce LF line endings for .sh files using .gitattributes; 2) Add filtering of attributes and products based on active status in querysets.
Fixes: none;

Extra: none;
2025-10-26 16:56:34 +03:00
8d2ce5b013 Features: None;
Fixes: None;

Extra: 1) Remove unnecessary blank line in `CategoryDetailListSerializer`; 2) Simplify queryset methods in `core/admin.py` by restructuring `.select_related` calls;
2025-10-26 16:40:34 +03:00
bccf67970f Fixes: 1) Remove prefetch_related for "attributes" in queryset to fix redundant data loading;
Extra: None;
2025-10-26 16:38:53 +03:00
b8f68cf1bd Fixes: 1) Remove unused categories field from autocomplete_fields;
Extra: 1) Minor cleanup to simplify field declaration;
2025-10-26 16:28:56 +03:00
2114c8bb76 Features: 1) Add bulk_prefetch_filterable_attributes for optimized attribute fetching; 2) Introduce FilterableAttribute typing for standardizing attribute data across serializers and models; 3) Enhance CategoryDetailSerializer with custom list_serializer_class for bulk operations.
Fixes: 1) Replace redundant `get_filterable_attributes` logic with `filterable_attributes` property to avoid duplications; 2) Remove unnecessary imports and redundant comments in various modules.

Extra: Refactor admin queryset methods for optimization; remove unused `categories` field in `Attribute` model; improve clarity and maintainability of Graphene resolvers and related logic.
2025-10-26 16:21:34 +03:00
fa46e3ad9c Features: 1) Introduced refined formatting for translation files across multiple locales to ensure unified structure and readability; 2) Added a new translatable string under payments/admin.py for enhanced application functionality.
Fixes: 1) Addressed line-break inconsistencies in multi-line strings across various language files to ensure proper display; 2) Fixed minor spacing in `django.po` entries for Italian, Swedish, and Turkish locales.

Extra: Optimized file headers and metadata in all updated locale files by syncing timestamps and project information for uniform tracking.
2025-10-25 20:54:51 +03:00
b815d70d54 Features: 1) Migrate from gunicorn to uvicorn. 2) Add skeleton for chat functionality;
Fixes: None;
Extra: Add missing translations;
2025-10-25 19:36:34 +03:00
d07e724934 Features: 1) Add LogLevel Enum to standardize logging levels; 2) Introduce generalized logging utility in VendorManager with Celery runtime context support; 3) Add support for attribute group warnings using the new logging method;
Fixes: 1) Ensure logging conditions are guarded by proper vendor and attribute checks; 2) Correct `__str__` method fallback logic for `VendorManager`;

Extra: 1) Update dependencies including `docutils` to 0.21.2, `psutil` to 7.1.2, and `pip` to >=25.3; 2) Clean up `pyproject.toml` and `uv.lock` with refined version specifications and added new entries; 3) Refactor import statements and remove redundant code; 4) Upgrade Python version to 3.13 in config.
2025-10-25 15:51:25 +03:00
ae1d16edda Features: Move from poetry to uv.
Fixes: Removed naive datetime warning

Extra: Correct import in elasticsearch submodule.
2025-10-25 02:18:41 +03:00
202964aea6 Features: 1) Add _in_celery_task utility function to detect task execution context; 2) Enhance vendor integration retrieval with context-specific logging (async/sync); 3) Improve error handling in vendor integration loading with exception logging;
Fixes: None;

Extra: 1) Refactor vendor filtering logic for clarity; 2) Add imports for logging, contextlib, and Celery utilities;
2025-10-21 12:44:19 +03:00
45d20bc17e Features: 1) Add integration_path filter to active vendor query in get_vendors_integrations;
Fixes: 1) Ensure only vendors with a valid integration_path are included in the results;

Extra: 1) Adjust query formatting for improved readability.
2025-10-21 12:40:21 +03:00
5384fa494d Features: 1) Add get_integration_class_object method to Transaction for dynamic gateway class instantiation;
Fixes: 1) Validate gateway presence in `process_transaction_changes` signal; 2) Add missing imports for `Type`, `create_object`, and `AbstractGateway`;

Extra: 1) Cleanup unused diff lines in migrations files; 2) Improve JSONField, FloatField, and PositiveIntegerField declarations by consolidating into single lines; 3) Remove redundant match-case logic in `signals.py`.
2025-10-21 12:33:17 +03:00
a87cb31d7e Features: 1) Add Gateway model with fields for UUID, activation status, currency details, limits, and integration variables; 2) Add gateway foreign key to Transaction model; 3) Introduce is_static_page field to Post model to differentiate static pages; 4) Add integration_path field to Vendor model.
Fixes: 1) Correct import order in `payments.admin`.

Extra: 1) Update `productimage.priority` field in `core` app with default value and help text; 2) Include `integration_path` in `Vendor` admin additional fields.
2025-10-21 12:25:24 +03:00
3b7c405e84 Features: 1) Add GatewayForm to manage Gateway model; 2) Enhance GatewayAdmin with list display, search, and ordering; 3) Introduce integration_variables field in the Gateway model; 4) Expand support for currencies with symbols via CURRENCIES_WITH_SYMBOLS;
Fixes: 1) Add missing Gateway import in forms and admin modules; 2) Correct maximum lengths for currency fields in the Gateway model;

Extra: 1) Refactor README for clarity and conciseness; 2) Adjust formatting in `core/sitemaps.py` for readability.
2025-10-21 12:23:02 +03:00
4757634ce5 Merge branch 'feature/update-center' 2025-10-21 11:58:27 +03:00
06290c0278 Features: 1) Add dynamic static page generation in StaticPagesSitemap by integrating active blog posts marked as static pages; 2) Introduce SitemapLanguageMixin to handle language-based URL generation across sitemaps; 3) Add is_static_page field to Post model for designating posts as static pages;
Fixes: 1) Correct router naming in `blog/urls.py` from `payment_router` to `blog_router` for clarity;

Extra: 1) Refactor obsolete `StaticPagesSitemap.PAGES` structure with a dynamic `items` method; 2) Create placeholder 404 URLs for non-existent slugs; 3) Update and simplify docstring for `Post` class, replacing inline details with a concise translation-aware docstring.
2025-10-20 22:56:11 +03:00
2712ccdeb7 Features: 1) Add retry mechanism with exponential backoff for saving attributes to handle deadlocks.
Fixes: 1) Remove unused `traceback` import; 2) Add missing import for `OperationalError`; 3) Prevent redundant saves for unchanged attributes.

Extra: 1) Simplify attribute save logic and improve efficiency; 2) Code cleanup for better readability.
2025-10-19 01:44:28 +03:00
1fed75584e Features: 1) Add migration to enforce unique constraint on Attribute model for fields name, group, and value_type;
Fixes: 1) Remove redundant traceback logging in `core/vendors/__init__.py`;

Extra: 1) Update Attribute model's `unique_together` to include `value_type`.
2025-10-19 00:16:57 +03:00
2212a7ccb6 Features: (none);
Fixes: 1) Remove unnecessary blank line in migration file;

Extra: (none);
2025-10-18 23:16:49 +03:00
a700a1c7e6 Features: 1) Update attribute.name and its localized variants to remove the unique constraint and set null=True for optional fields;
Fixes: 1) Correct field attributes in `attribute` model to align with database requirements;

Extra: 1) Generated migration file `0046_alter_attribute_name_alter_attribute_name_ar_ar_and_more.py`.
2025-10-18 22:41:43 +03:00
44e5e74044 Features: 1) Add async logger initialization in core/vendors and log warnings for missing attribute values, groups, and integrity errors; 2) Add traceback logging for attribute-related errors in core/vendors;
Fixes: 1) Add missing `sku` to readonly fields in `core/admin`;

Extra: 1) Remove unnecessary import of `AnonymousUser` from `core/serializers/detail.py`.
2025-10-18 16:19:39 +03:00
efeab3e426 Features: 1) Add multiple database indexes to enhance query performance for models order, orderproduct, and product.
Fixes: 1) Remove redundant blank line in migration file.

Extra: 1) Simplify index definition formatting for better readability.
2025-10-18 11:48:40 +03:00
ef8fdd6347 Fixes: 1) Correct ordering logic in final_ordering to prepend "personal_order_tail" instead of appending. 2025-10-18 11:45:27 +03:00
f67319ba5a Features: 1) None;
Fixes: 1) Correct conditional check for cached filterable results to handle `None` values; 2) Remove unnecessary permission checks for attribute filtering;

Extra: 1) Update cache expiry time from 86400 seconds to 3600 seconds.
2025-10-18 11:35:55 +03:00
c78e0e8137 Features: 1) Add database indices for improved query performance on order, orderproduct, product, and vendor models; 2) Update name fields across multiple languages in product model to include db_index and enhanced help text.
Fixes: None;

Extra: Generated new migration `0045_alter_product_name_alter_product_name_ar_ar_and_more`.
2025-10-17 14:28:08 +03:00
c263182414 Features: 1) Add seen_keys mechanism to avoid duplicate hits in Elasticsearch query results; 2) Introduce _collect_hits helper function for processing and storing hits; 3) Add exact-match queries for categories, brands, and products to improve search accuracy.
Fixes: 1) Prevent duplicate entries in hit processing by checking `seen_keys`.

Extra: Refactor query-building logic for consistency and readability; minor performance optimizations in query execution.
2025-10-16 15:19:13 +03:00
e894affad7 Features: 1) Add with_related method to managers for optimized prefetching; 2) Add indexes to models for enhanced query performance; 3) Introduce cached_property for feedback count and product quantity; 4) Implement Exists and OuterRef filters for active stock validation in viewsets.
Fixes: 1) Simplify rating and feedback count logic by removing caching layers; 2) Refactor price and quantity calculations for improved accuracy and simplicity; 3) Optimize total price and quantity aggregations in orders by leveraging Django ORM tools.

Extra: Adjusted import statements, removed redundant cache logic, and cleaned up methods for better readability and maintainability.
2025-10-16 14:04:18 +03:00
00e94a2b29 Features: 1) Add validation to ensure order_product_uuid is required in download_digital_asset_view.
Fixes: 1) Remove unnecessary blank line in `core/viewsets.py`.

Extra: 1) Minor cleanup in `core/views.py` to improve clarity.
2025-10-16 10:01:34 +03:00
0bfc4c2984 Features: 1) Add detailed error responses with exception messages for Order.DoesNotExist and ValueError in order-related actions; 2) Improve create_promocode_on_user_referring with stricter type check for user attributes;
Fixes: 1) Move `get_object()` call into `try` block to prevent unhandled exceptions during order retrieval;

Extra: 1) Minor code reformatting for improved readability.
2025-10-16 09:58:13 +03:00
8889429a02 Features: 1) Delete vendor's last processing response if present before saving new data;
Fixes: none;

Extra: none;
2025-10-15 17:17:36 +03:00
3b1d20ff14 Features: 1) Import gzip, BytesIO, datetime, and ContentFile at the top level for consolidation and reuse;
Fixes: 1) Remove redundant in-function imports for `gzip`, `BytesIO`, `datetime`, and `ContentFile`;

Extra: 1) Minor reorganization to improve readability and adhere to import best practices.
2025-10-15 16:21:35 +03:00
d355045755 Features: 1) Update save_response method to support data as both dictionary or list;
Fixes: ;

Extra: ;
2025-10-15 16:17:03 +03:00
996362d9f1 Features: 1) Add save_response method to save vendor responses with optional gzip compression; 2) Introduce VendorDebuggingError for debugging-specific exceptions; 3) Add imports for config and settings for enhanced configuration support;
Fixes: None;

Extra: Improve exception handling with `suppress(Exception)` block; add detailed docstring to `VendorDebuggingError`.
2025-10-15 16:15:23 +03:00
20d5f5db21 Features: 1) Add support for linking Gateway to transactions including constraints and limits; 2) Implement new Gateway model with transactional rules and currency configurations; 3) Add integration_path field to Vendor for dynamic integrations; 4) Improve task logic to dynamically use vendor integrations for stock updates and order statuses.
Fixes: 1) Replace `IntegerField` with `PositiveIntegerField` for product image priority to enforce positive values.

Extra: 1) Optimize imports for consistent formatting; 2) Clarify logging messages in tasks; 3) Minor docstring and help text updates.
2025-10-15 14:25:58 +03:00
6fa037390c Features: 1) Add get_gateways_integrations utility for payment gateway integrations; 2) Add get_vendors_integrations utility for vendor integrations; 3) Add version API endpoint to return eVibes version; 4) Implement __str__ method for AbstractVendor;
Fixes: 1) Update return type of `create_object` to `Any`;

Extra: 1) Remove unused fields (`icon`, `priority`, `hide`) from `blog.apps`; 2) Update API URLs to include `version` endpoint; 3) Miscellaneous cleanup and comments.
2025-10-15 14:25:10 +03:00
e7a859ad0a Fixes: 1) Ensure get_parameters handles missing configuration keys gracefully by adding a check for None values;
Extra: Update `cache.get` default value in `get_parameters` method for better safety.
2025-10-14 19:48:46 +03:00
20b4efec90 Fixes: 1) Add "last_processing_response" to additional_fields in admin configuration;
Extra: Adjust admin display fields for improved traceability;
2025-10-14 17:55:03 +03:00
5fcb9e7547 Fixes: 1) Replace "additional_fields" with "last_processing_response" in additional_fields list for better clarity; 2025-10-14 17:54:42 +03:00