feat: enable color selection for cart items and enhance UI integration
All checks were successful
Build and Push Docker Image / build (push) Successful in 38s

- Added `selected_color` field to `CartItem` model with migration
- Updated color swatch behavior on product detail page with selection logic and disabled button handling
- Improved cart templates to display selected color alongside item details
- Modified `add_item_to_cart` service and `add` view to handle color selection
- Enhanced styles for active swatches and cart item color display
This commit is contained in:
2026-05-26 03:12:00 +02:00
parent af129309ab
commit 56af404dc9
8 changed files with 79 additions and 5 deletions

View File

@@ -67,6 +67,13 @@
line-height: 1.1;
}
.cart-item__color {
display: block;
color: #63768d;
font-size: 14px;
margin-top: 4px;
}
.cart-item__price {
margin-top: 24px;
color: var(--dark);

View File

@@ -491,10 +491,14 @@ aside {
height: 46px;
border-radius: 50%;
display: block;
border: 2px solid rgba(54, 33, 62, 0.18);
cursor: pointer;
transition: box-shadow 0.15s, border-color 0.15s;
}
.product-summary__swatch--active {
box-shadow: 0 0 0 2px #ffffff, 0 0 0 4px #554971;
border-color: #554971;
}
.product-summary__description {