Commit graph

35 commits

Author SHA1 Message Date
beb1673cbb Fixes: OrderViewSet fixes 2025-06-07 19:08:04 +03:00
affe75c0af Fixes: Order model orderproducts operations 2025-06-07 18:00:39 +03:00
e76d5c1732 Fixes: __str__ for OrderProduct 2025-06-07 17:49:58 +03:00
1f5481d47b Fixes: __str__ for Order 2025-06-07 17:39:35 +03:00
39989aa1d4 Fixes: buy_without_registration for Order 2025-06-07 17:33:26 +03:00
10effefff5 Fixes: add_product for Order 2025-06-07 17:27:30 +03:00
2d96ec9637 Fixes: add_product for Order 2025-06-07 17:27:12 +03:00
44e8ad6307 Fixes: add_product for Order 2025-06-07 17:26:41 +03:00
56e33474dc Fixes: buy_without_registration... 2025-06-07 17:21:15 +03:00
2b181b18cd Fixes: I18N 2025-06-07 17:15:55 +03:00
2022797834 Fixes: buy_unregistered in Order model fix 2025-06-07 16:44:30 +03:00
9e06fa3419 Fixes: save() method for Order model fix 2025-06-07 16:33:55 +03:00
613cbc50e1 Features: Prometheus addons 2025-06-05 16:05:15 +03:00
79c97b7e5a Features: 1) Add address_line field to Address model for enhanced customer address representation; 2) Extend serializers with address_line_1 and address_line_2 fields; 3) Update address parsing logic to include house number in street and support address_line storage;
Fixes: None;

Extra: Refactor address manager to construct `address_line` from parsed data;
2025-05-28 22:07:06 +03:00
4e269dc801 Features: 1) Add BulkOrderAction mutation to handle bulk addition/removal of order products; 2) Introduce bulk_add_order_products and bulk_remove_order_products endpoints in viewset; 3) Add BulkAddOrderProductsSerializer and BulkRemoveOrderProductsSerializer.
Fixes: 1) Update `remove_product` model method to handle zero quantity removal; 2) Correct permission check in order product removal.

Extra: 1) Add `autocomplete_fields` for products in admin; 2) Enhance docs with bulk add/remove schemas; 3) Various code refactorings and minor tweaks for improved maintainability.
2025-05-28 14:48:16 +03:00
d86a6ed3c8 RUFF 2025-05-26 16:12:59 +03:00
41f8cf55b5 Features: 1) Allow skipping address validation for fully digital products;
Fixes: 1) Correct improper logic when checking for missing addresses;

Extra: 1) Minor structural improvement to conditional logic for clarity;
2025-05-22 18:30:24 +03:00
71cb0fc2db Features: 1) Add AutoSlugField "slug" to Category model with unique and auto-populating behavior; 2) Include "slug" field in CategoryFilter and relevant serializers (detail and simple); 3) Add "slug" to GraphQL object type for categories;
Fixes: None;

Extra: Add migration for new "slug" field in Category model.
2025-05-21 12:37:30 +03:00
4f4d4c5c10 Features: 1) Add AddressViewSet to API routing; 2) Add is_publicly_visible attribute to Address model;
Fixes:

Extra: 1) Minor import addition for AddressViewSet in api_urls.py;
2025-05-20 14:12:32 +03:00
0ab8738520 Features: 1) None;
Fixes: 1) None;

Extra: 1) Removed the entire "geo" module, including migrations, model definitions, admin configurations, utilities, documentation, templates, translations, and related files. Moved functionality to "core".
2025-05-20 08:00:44 +03:00
564ce0706b Features: Full Geo rework.
Fixes: 1) Address redundant migration logic by dropping stale migrations; 2) Cleanup swapper-based dependencies in Geo models;

Extra: Streamlined database initialization by resetting all previous migrations.
2025-05-19 14:45:53 +03:00
43c8df0c05 Features: 1) Add support for shipping and billing addresses in serializers, mutations, and models; 2) Validate address inputs during order purchasing; 3) Auto-fill billing address if only shipping address is provided and vice-versa;
Fixes: 1) Correct redundant variable and file handling in geo management commands; 2) Fix formatting inconsistencies in tqdm loops across geo management commands; 3) Remove unnecessary decorator in token verification view;

Extra: Clean up imports, line breaks, and redundant code for better readability and maintainability in multiple files;
2025-05-16 01:47:45 +03:00
11071996af Features: 1) Add return self to bulk_add_products; 2) Add return self to bulk_remove_products;
Fixes: None;

Extra: None;
2025-05-14 12:38:40 +03:00
8375ef41db Features: 1) Add save method to enforce single pending order per user in Order model;
Fixes: 1) Adjust import order in `core/models.py` for better consistency;

Extra: Refactor formatting for better readability in `core/models.py`; Update `pyproject.toml` version to 2.6.2; Update compiled translation file `cs_CZ/LC_MESSAGES/django.mo`.
2025-05-13 23:02:16 +03:00
3e53224092 Add support for human_readable_id in filters and models
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.
2025-05-06 17:29:02 +03:00
65812190a2 Fix is_business property to handle missing attributes
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.
2025-05-06 17:22:48 +03:00
4deece673f Increase max_length of human_readable_id to 8.
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.
2025-05-06 17:01:55 +03:00
76d490f2e2 Refactor translation command and improve order model.
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.
2025-05-06 03:28:06 +03:00
85a49c4e8b Add "DISABLED_COMMERCE" feature to disable buying functionality
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.
2025-05-05 17:32:57 +03:00
4e04caf91d Update Product slug generation to include UUID
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.
2025-05-05 15:56:21 +03:00
b924797869 Update Product slug field to use simpler populate_from sources
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`.
2025-04-30 17:03:53 +03:00
f2e319f477 Update product slug field to include UUID in generation logic
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.
2025-04-30 16:42:42 +03:00
d4928db393 Set slug field to allow null values
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.
2025-04-30 16:39:28 +03:00
3ec0991aa6 Add slug field to Product and update related functionalities
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.
2025-04-30 16:31:54 +03:00
68febcdb08 Initial Commit 2025-04-29 22:40:30 +03:00