Every city, in addition to all other powers given the city by law or charter, may by ordinance regulate, control, and license transient merchants and provide for the punishment of persons violating such ordinances.