Files
mercadodevida/work/current.md
2026-08-23 07:58:50 +02:00

23 lines
1.1 KiB
Markdown

# F-193 — Show product expiry and shipping weight on storefront
Display expiry and weight in frontend product views and use authoritative product weight in shipping calculations.
## Scope
- Add `expiry_date` field to `catalog_products` via migration (nullable, date).
- Add `weight_grams` field to `catalog_product_variants` via migration (nullable, integer, grams).
- Backend: expose these fields via the product API (GET /products/search, GET /productos/:slug).
- Admin product editor: show expiry_date and weight_grams fields in the appropriate sections.
- Storefront product detail page: display expiry date and weight.
- Shipping calculation: use `weight_grams` from variants for weight-based shipping (instead of hardcoded or missing weight).
## Out of scope
- Batch editing of expiry dates.
- Per-order weight tracking.
## Acceptance
1. Product detail page shows expiry date and weight when available.
2. Admin can edit expiry date and weight_grams in the product editor.
3. Shipping cost calculation uses authoritative weight from variant.
4. Migration is reversible, all existing data stays valid.
5. `verify.sh` green, typecheck green, all tests pass.