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 viewcurProduct.featured
: mark if the product is featuredcurProduct.inventoried
: check if the product is inventoriedcurProduct.quantity
: check if the product is inventoriedcurProduct.ingredients
: product ingredientscurNewIngredient.name
: reserved for new ingredientdeal.extras
: contains the extras of a businesscurNewExtra.name
: reserved for a new extra in the business
Utility Functions
hideMoreProductSettings()
: close this modalupdateProduct(curProduct)
: update the open product in this modalupdateIngredient(ingredient, curProduct)
: update an open product ingredient in this modalremoveIngredient(ingredient, curProduct)
: updates an ingredient, of the product opened in this modaladdIngredient(curNewIngredient, curProduct)
: Add a new ingredient to this productshowMoreProductOptionsSettings(curProduct, extra)
: A modal that manages the business extras.updateExtra(extra)
: update an extra business usually in this view is just the nameaddExtra(curNewExtra)
: add a new extra to the businessremoveExtra(extra)
: Eliminate an extra of the business
Example of base theme
hideMoreProductSettings()
curProduct.featured
curProduct.ingredients
curNewIngredient.name
addIngredient(curNewIngredient, curProduct)
deal.extras
showMoreProductOptionsSettings(curProduct, extra)
removeExtra(extra)
addExtra(curNewExtra)
curNewExtra.name
Updated almost 6 years ago