My order detail

This is a fashion that opens to see the details of an order with the function orderViewMore(order) in the view theme/my-account-profile.html

Main Models

  • order.status
  • order.customer.cellphone
  • order.customer.address
  • order.customer.address_notes
  • order.customer.zipcode
  • order.products
  • order.delivery_zone_price
  • order.offer_rate
  • order.service_fee

Utility Functions

  • getOrderState(order.status): returns the status text of the order
  • hide(): Close this modal
  • calcTotalProduct(product): calculates the total of a product taking into account its extras
  • calcSubtotal(order): calculates the sum of the total of each product
  • calcTax(order): calculate the tax if it is a percentage based on the subtotal
  • calcDriverTip(order): calculate the driver's tip if this is delivery type and if the percentage is different from 0
  • calcServiceFee(order): calculates the total service if this is a percentage
  • calcTotalOrder(order): calculates the total order taking into account tips, taxes, service value and discounts
  • track(): opens a modal that allows real-time tracking of the order if it is a delivery type

Example of base theme