def display_products(): # for x in range(len(catalog)): # print(str(catalog[x].id) + " | "+catalog[x].title) print_header("Current catalog") for prod in catalog: print_product_info(prod)
def display_cheaper_products(): print_header("Cheapest product is") cheapest = catalog[0] for prod in catalog: if (prod.price < cheapest.price): cheapest = prod print("Cheapest product is:") print_product_info(cheapest)
def cheapest_product(): print_header("Print the cheapest product") cheapest = catalog[0] for prod in catalog: if (prod.price < cheapest.price): cheapest = prod print("Cheapest product is:") print_product_info(cheapest)
def display_no_stock(): print_header("Products out of stock") for prod in catalog: if (prod.stock == 0): print_product_info(prod)
def display_catalog(): print_header("Current Catalog") for prod in catalog: print_product_info(prod)
def display_products_equal_zero(): print_header("Stock == 0") for prod in catalog: if (prod.stock == 0): print_product_info(prod)
def display_products(): print_header("Catalog") for prod in catalog: print_product_info(prod)
def display_outofstock(): print_header("Your current Out of Stock Products") for prod in catalog: if (prod.stock == 0): print_product_info(prod)