add to favorites function now checks for exisiting product id in db