The term "peddler" for the purpose of this chapter includes all persons, both principals and agents, who go from place to place and house to house, carrying for sale and offering for sale or exposal for sale, goods, wares, or merchandise except agricultural, horticultural, or farm products, which they may grow or raise, and except vendors of books, periodicals, or newspapers: PROVIDED, That nothing in this chapter shall apply to peddlers within the limits of any city or town which by ordinance regulates the sale of goods, wares, or merchandise by peddlers.