Order rest menu

This view is the one that opens when you select a specific business. select products with their options to be added to the cart:

Main models

  • business: This model contains all the business information available to a use
  • preorder: Mark if the way in which the order is made is to preorder, fill it with an object.
  • filterCategory: Useful to section the products by category and has 2 reserved values and can also be the identifier of the category
  • “”: to list all products
  • featured: To list the products that are featured
  • filterProduct: list of filtered products
  • cart: contains the selected products with their options and ingredients to make an order
  • create_order: mark if the order is being created for the same business from the editor.
  • cart_data: contains cart information as discounts, total acomulated in products, rates and taxes.

Utility functions

  • openPreorder(business): This function opens a modal where it shows what schedules are available for each menu in Preorder the modal that opens is theme/preorder-popup.html if one is selected
  • removePreorder(): this function resets preoder that is, it changes its status, it also resets the cart if there is any product added to this
  • selectCategory($event, category): change the value of filterCategory and re-filter the products in filterProduct
  • goToCart():
  • newCreateOrder(): reset the cart to create a new order
  • goCheckout(): send to the customer data confirmation page once the products are selected
  • removeProduct(product): Remove a product from the cart
  • moreInfo():
  • onProductOption(product, true):

Example of base theme

  • moreInfo()
  • openPreorder(business)
  • selectCategory($event, category)
  • filter
  • filterProduct
  • goCheckout()
  • cart
  • onProductOption(product, true)
  • removeProduct(product)
  • cart_data