Order checkout popup

This view is accessed after selecting the products and filling in the customer's data, selecting the payment method.

Main models

  • checkoutfields:
  1. Users Details
  • buyer.name: Customer Name
  • buyer.lastname: Customer Lastname
  • buyer.email: Customer Email
  • buyer.cellphone Customer Cellphone
  • buyer.city_id Customer City
  • buyer.dropdown_option_id Customer dropdown
  • buyer.address Customer address
  • buyer.zipcode Customer Zipcode
  • order.coupon Coupon if exis
  • cities Array containing all available cities
  • dropdownoptions Array that contains the dropdowns filtered by the selected city
  1. Check ASAP and Delivery / pick up time
  • preorder.date: If it is preorder the day of the order
  • preorder.time: If it is to worry about the time of the order
  • preorder.days: If it is preorder the available days to select in an array
  • preorder.times: If it is pre-order the available hours to select in an array
  • wopreorder.date
  • wopreorder.time
  • checkASAP: check if it is a current or preordered order
  1. Payment methods:
  • paymethods: contains the different payment methods available for this order.
  1. Tip: only if it's delivery type
  • driver_tips: the tip that is assigned to the driver if it is of type delivery
  1. Cart details
  • cart: all the information of the purchase
  • cart_data.subtotal
  • cart_data.tax
  • business.delivery_price: price of the address if this is a delivery type
  • order.driver_tip: tip assigned to the driver
  • cart_data.driver_tip
  • cart_data.service_fee
  • cart_data.offer.rate
  • cart_data.discount
  • cart_data.quantity
  • cart_data.total

Utility functions

  • changeDropdownopton(): It serves to update the dropdown option in the order before being confirmed
  • onAutoCompleteAddress(): autoompete la direccion con Google ??? preguntar no estoy seguro
  • showCheckAddress(): In case you want to change the address this first check if it is valid to be delivered
  • checkCoupon(): When you enter a coupon code, it checks if there is
  • changePreorderDatetime(true): change the delivery time of the order to be preordered
  • changeWopreorderDatetime(true)
  • changeCheckASAP(checkASAP): Switch between preorder and current
  • onPaymethod(item): makes a change in the view depending on the payment method that is selected
  • refreshCartData(): It serves to make changes in the calculations when a tip is selected for the user for example
  • onPlace(): confirms that the order is ready to be created, the actions depend on the selected payment method.

Example of base theme

  1. Buyer information
  2. order.coupon
  3. checkCoupon()
  4. changeCheckASAP(checkASAP)
  5. Payment methods
  6. driver_tips
  7. Cart details
  8. onPlace()
  9. onPaymethod(item)