1.1 KiB
1.1 KiB
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_datefield tocatalog_productsvia migration (nullable, date). - Add
weight_gramsfield tocatalog_product_variantsvia 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_gramsfrom variants for weight-based shipping (instead of hardcoded or missing weight).
Out of scope
- Batch editing of expiry dates.
- Per-order weight tracking.
Acceptance
- Product detail page shows expiry date and weight when available.
- Admin can edit expiry date and weight_grams in the product editor.
- Shipping cost calculation uses authoritative weight from variant.
- Migration is reversible, all existing data stays valid.
verify.shgreen, typecheck green, all tests pass.