Skip to content

Basket Page #6

@ligiabicalho

Description

@ligiabicalho

Overview

This issue tracks the implementation and improvements for the Basket (shopping cart) page. Several features are partially implemented and require validation or completion for a smooth checkout flow.


What's Implemented (or Partial)

  • Page title with icon
    • (Currently duplicated; keep only the basket icon)
  • List of items with total quantity:
    • Product listed with: image, name, price and unit, button to change quantity, total value per product (synchronized with navbar and total value; needs validation), and remove button (trash can icon; consider adding a removal confirmation pop-up)
    • Separate line to display shipping value per product (currently returning NaN; logic and display need to be fixed)
  • Order summary:
    • Subtotal with item values
    • Total delivery value (currently returning NaN; needs fix)
    • Field for entering coupon (needs integration for validation and applying discount)
    • Tag showing how many points will be earned with the order (logic not implemented, currently NaN)
    • Buttons: return to shopping or proceed to checkout

What Needs Implementation

  • Remove duplicate icon from page title (keep only basket)
  • Validate and synchronize item quantities and total values between basket, navbar, and summary
  • Fix shipping value logic and display for each product (resolve NaN issue)

    The calculation of delivery/shipping cost is only possible if the user has already provided their location (e.g., zip code/CEP) on the marketplace page. If the location is missing, prompt the user to enter it before attempting to calculate or display delivery costs.

  • Fix total delivery value in the order summary (resolve NaN issue)
  • Integrate coupon validation and apply respective discount
  • Implement logic for displaying earned points (replace NaN with correct calculation)
  • Add confirmation pop-up when removing an item from the basket
  • Backend integration for fetching/updating basket data (replace any mock data)
  • Refactor components for maintainability
  • Mobile-first responsiveness check

Backend - Basket (Cart) Service

  • Store and update the user's basket, including item quantities, prices, and selected options.
  • Support for both logged-in and guest users (using session or temporary tokens).
  • Synchronize basket state across devices and sessions.
  • Calculate totals, taxes, shipping, and discounts server-side for accuracy and security.
  • Handle coupon validation and application.
    Expose API endpoints for CRUD operations on basket items (add, update, remove, clear)

Observations

  • Validate all calculations (subtotal, shipping, points, discounts) with real data and backend integration
  • Ensure user feedback is clear for all actions (removal, coupon application, errors)
  • Maintain consistency with the basket icon throughout the marketplace

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions