Checkout

Certainly! Here's a documentation for the checkout in your e-commerce script:
1: Cart Summary:
  • After adding products to the cart, users can proceed to the checkout page.
  • On the checkout page, users can view a summary of the cart items, including the product details, quantity, and subtotal.
  • The total price of the cart is displayed, taking into account the selected currency and conversion rates if applicable.
2: User Authentication:
  • If the user is logged in, their shipping addresses are fetched from the database.
  • The user can see a list of their saved addresses, including a single default address.
  • The default address is pre-selected, but the user can choose a different address if desired.
  • The user has the option to add or delete addresses in their account settings.
3: Guest Shipping Details:
  • If the user is not logged in, they can enter their shipping details directly on the checkout page.
  • The guest user can provide their shipping address, contact information, and any additional details required for shipping.
4: Selecting Payment Option:
  • After providing shipping details, the user proceeds to the payment options step.
  • Two payment options are available: "Pay by Credit Card" and "Cash on Delivery.
  • The user can choose the preferred payment option by selecting the corresponding radio button.
5: Placing the Order:
  • Once the user has selected the payment option, they can proceed to place the order.
  • Upon order placement, the user receives an email confirmation containing the order details.
  • The order details, including the purchased products, shipping address, payment method, and total price, are displayed to the user on the order confirmation page.
6: Order Management and Fulfillment:
  • After placing the order, the order details are stored in the database for future reference and order management.
  • The admin dashboard provides to manage and fulfill orders, including updating order statuses, tracking shipments, and generating invoices if applicable.