Editor - more product settings

In this view you manage everything you have to do with the product, its ingredients, your extras and if it is inventoried. this view opens with the function showMoreProductSettings(product) in the view theme/views/editor/business.html

Main Model

  • curProduct: Contains the product opened in this view
  • curProduct.featured: mark if the product is featured
  • curProduct.inventoried: check if the product is inventoried
  • curProduct.quantity: check if the product is inventoried
  • curProduct.ingredients: product ingredients
  • curNewIngredient.name: reserved for new ingredient
  • deal.extras: contains the extras of a business
  • curNewExtra.name: reserved for a new extra in the business

Utility Functions

  • hideMoreProductSettings(): close this modal
  • updateProduct(curProduct): update the open product in this modal
  • updateIngredient(ingredient, curProduct): update an open product ingredient in this modal
  • removeIngredient(ingredient, curProduct): updates an ingredient, of the product opened in this modal
  • addIngredient(curNewIngredient, curProduct): Add a new ingredient to this product
  • showMoreProductOptionsSettings(curProduct, extra): A modal that manages the business extras.
  • updateExtra(extra): update an extra business usually in this view is just the name
  • addExtra(curNewExtra): add a new extra to the business
  • removeExtra(extra): Eliminate an extra of the business

Example of base theme

553
  1. hideMoreProductSettings()
  2. curProduct.featured
  3. curProduct.ingredients
  4. curNewIngredient.name
  5. addIngredient(curNewIngredient, curProduct)
  6. deal.extras
  7. showMoreProductOptionsSettings(curProduct, extra)
  8. removeExtra(extra)
  9. addExtra(curNewExtra)
  10. curNewExtra.name