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:
- Users Details
buyer.name
: Customer Namebuyer.lastname
: Customer Lastnamebuyer.email
: Customer Emailbuyer.cellphone
Customer Cellphonebuyer.city_id
Customer Citybuyer.dropdown_option_id
Customer dropdownbuyer.address
Customer addressbuyer.zipcode
Customer Zipcodeorder.coupon
Coupon if exiscities
Array containing all available citiesdropdownoptions
Array that contains the dropdowns filtered by the selected city
- Check ASAP and Delivery / pick up time
preorder.date
: If it is preorder the day of the orderpreorder.time
: If it is to worry about the time of the orderpreorder.days
: If it is preorder the available days to select in an arraypreorder.times
: If it is pre-order the available hours to select in an arraywopreorder.date
wopreorder.time
checkASAP
: check if it is a current or preordered order
- Payment methods:
paymethods
: contains the different payment methods available for this order.
- Tip: only if it's delivery type
driver_tips
: the tip that is assigned to the driver if it is of type delivery
- Cart details
cart
: all the information of the purchasecart_data.subtotal
cart_data.tax
business.delivery_price
: price of the address if this is a delivery typeorder.driver_tip
: tip assigned to the drivercart_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 confirmedonAutoCompleteAddress()
: autoompete la direccion con Google ??? preguntar no estoy seguroshowCheckAddress()
: In case you want to change the address this first check if it is valid to be deliveredcheckCoupon()
: When you enter a coupon code, it checks if there ischangePreorderDatetime(true)
: change the delivery time of the order to be preorderedchangeWopreorderDatetime(true)
changeCheckASAP(checkASAP)
: Switch between preorder and currentonPaymethod(item)
: makes a change in the view depending on the payment method that is selectedrefreshCartData()
: It serves to make changes in the calculations when a tip is selected for the user for exampleonPlace()
: confirms that the order is ready to be created, the actions depend on the selected payment method.
Example of base theme
- Buyer information
order.coupon
checkCoupon()
changeCheckASAP(checkASAP)
- Payment methods
driver_tips
- Cart details
onPlace()
onPaymethod(item)
Updated almost 6 years ago