Add shopping cart and product review features
Introduces Cart and CartItem models, admin, serializers, and API endpoints for shopping cart management for both authenticated and anonymous users. Adds Review model, serializers, and endpoints for product reviews, including public creation and retrieval. Updates ProductImage ordering, enhances order save logic with notification, and improves product and order endpoints with new actions and filters. Includes related migrations for commerce, configuration, social chat, and Deutsche Post integration.
This commit is contained in:
@@ -8,6 +8,9 @@ from .views import (
|
||||
DiscountCodeViewSet,
|
||||
RefundViewSet,
|
||||
RefundPublicView,
|
||||
ReviewPostPublicView,
|
||||
ReviewPublicViewSet,
|
||||
CartViewSet,
|
||||
)
|
||||
|
||||
router = DefaultRouter()
|
||||
@@ -17,10 +20,11 @@ router.register(r'categories', CategoryViewSet, basename='category')
|
||||
router.register(r'product-images', ProductImageViewSet, basename='product-image')
|
||||
router.register(r'discount-codes', DiscountCodeViewSet, basename='discount-code')
|
||||
router.register(r'refunds', RefundViewSet, basename='refund')
|
||||
router.register(r'reviews', ReviewPublicViewSet, basename='review')
|
||||
router.register(r'cart', CartViewSet, basename='cart')
|
||||
|
||||
urlpatterns = [
|
||||
path('', include(router.urls)),
|
||||
path('refunds/public/', RefundPublicView.as_view(), name='RefundPublicView'),
|
||||
path('reviews/create/', ReviewPostPublicView.as_view(), name='ReviewCreate'),
|
||||
]
|
||||
|
||||
# NOTE: Other endpoints (categories/products/discounts) can be added later
|
||||
|
||||
Reference in New Issue
Block a user