Tickets can be bought at the lower station of the cable car.
To get to the Cable car from the Old City you have to go to Buža Street which leads you towards the exit from the city walls. From there you need to keep climbing towards the fire station.
Once you are at the fire station, you need to crossover the street on your right hand side and continue straight up the street. After a few moments you will see the cable car lower station on your right hand side.