Introduced the auto_resolve_category method to streamline category resolution using Elasticsearch. This enhances category lookup efficiency and ensures seamless creation or retrieval of categories when necessary.
Added an `is_composite_pk` attribute with a default value of `False` to the admin configuration. This ensures clarity in object definition and supports better configurability for composite primary key scenarios.
Updated the API version from 2.5.0 to 2.6.0 in the DRF settings for consistency across configurations. Reformatted migration files for better readability, ensuring consistency in code style and improving maintainability. These changes do not alter functionality but enhance clarity and documentation.
Previously, an "example key" could mistakenly pass the check, leading to potential misuse. This update ensures features are disabled if the API key is invalid or set to default.
Updated email sending logic across multiple modules to utilize `django.core.mail.get_connection` for better email connection management and efficiency. Adjusted filters in `conditions.py` to correctly handle dictionary inputs when checking attribute lengths.
Added logic to handle IntegrityError by generating unique human-readable IDs for orders during creation. This ensures no duplicate order entries are created in case of integrity constraints.
Added a `human_readable_id` filter to the `OrderFilter` class and enabled ordering by this field. Updated the `create_customer_payload` method to include the `is_business` attribute, ensuring compatibility with new functionality.
Previously, the method could raise an error if `attributes` was None. This update ensures the method returns `False` when `attributes` is not defined, preventing potential runtime issues.
Previously, orders with duplicate `human_readable_id` were sorted by `id`, which could lead to inconsistencies. Updated the code to sort by `uuid` to ensure a more reliable and unique ordering. This prevents potential issues when resolving duplicate entries.
The migration script now counts duplicates based on the "uuid" field instead of "id". This ensures more accurate identification of duplicate "human_readable_id" entries.
This migration resolves duplicate human_readable_id values by assigning unique IDs where necessary. A data migration script is introduced to identify and fix duplicates before altering the field.
Updated the `human_readable_id` field in the `Order` model to support a maximum length of 8 instead of 6. Removed the redundant migration file `0019_alter_order_human_readable_id.py` for cleanup.
Alter the `human_readable_id` field to use a custom generator function and ensure uniqueness. This improves the readability and integrity of order identifiers.
Updated the field definition of `human_readable_id` to allow up to 8 characters instead of 6. This change accommodates longer identifiers as required for recent updates.
Introduced a `human_readable_id` field to the Order model to provide a concise and recognizable identifier, initialized with a default generator. Updated the field to enforce uniqueness to ensure consistent identification across orders.
Simplified field definitions and improved code consistency by consolidating and aligning styles. Added `prepare_*` methods to gracefully handle None values for fields. Enhanced multilingual support and streamlined query construction for better maintainability.
Updated DRF settings with new TOS URL and version for consistency. Corrected API URLs in B2B schema and reorganized imports in core views for better readability. These changes ensure accurate references and maintain cleaner code structure.
Enhanced the `deepl_translate` management command with improved placeholder handling, error messages, and support for missing translations. Added `human_readable_id` and `is_business` attributes to the `Order` model, updating associated admin configurations to reflect these changes.
Introduce a global config flag `DISABLED_COMMERCE` to toggle buy functionality availability. Raise specific `DisabledCommerceError` when buying is disabled, ensuring end-users are informed. Additionally, reformat code for readability and consistency, improving overall maintainability.
Change promotions to inactive instead of deleting them to maintain data integrity. Adjust Celery logging levels to be DEBUG/INFO based on the DEBUG setting, improving log granularity during development and clarity in production.
The migration alters the `slug` field to include `uuid` in its `populate_from` attributes. This ensures more robust and unique slug generation, improving data integrity and avoiding potential collisions.
Introduced slug creation using `slugify` for improved usability in search results. Extended the search results structure to include a new "posts" category alongside "products", "categories", and "brands". This enhances the flexibility and scope of the search functionality.
Removed invalid `select_related` and `prefetch_related` chaining on the product query. This resolves potential errors in fetching related data and ensures proper functionality.
Revised the `populate_from` argument of the Product model's `slug` field to use only `category__name` and `name` for generation. This simplifies the slug creation logic and aligns with the updated migration `0015_alter_product_slug`.
Introduce a Django management command to populate the `slug` field for Product instances where it is null. The command processes products in batches, handles errors gracefully, and logs issues for troubleshooting.
Changed the `slug` field in the `Product` model to allow null values by setting `null=True`. This ensures better flexibility when handling cases where a slug might not be immediately available.
Made the `slug` field nullable in migration 0013 before reverting this change in migration 0014. Additionally, altered the population logic to always include `uuid`.
This change modifies the `slug` field in the `Product` model to also populate from the `UUID` field, ensuring enhanced uniqueness and consistency. The migration file is included to apply this change to the database schema.
The slug field in the model now permits null values by adding `null=True`. This change enhances flexibility in scenarios where slugs may not always be mandatory.
Removed the UUID component from product URLs in the sitemap to enhance readability and improve user experience. This change ensures cleaner, more user-friendly links without impacting functionality.
Introduce a unique, auto-generated slug field to the Product model, populated from category, brand, and name. Update core filters, serializers, sitemaps, and GraphQL object types to support the new slug functionality. Also, enforce HTTP-only cookies for session, CSRF, and language for improved security.