Sally, buying the home initially is a residential transaction. Getting the zoning changed to commercial is a zoning change, and a commercial agent would probably be helpful to consult. I've done exactly that, as I had a doctor client that was interesting in purchasing a ranch-style home and moving her practice there. Certain cities this is easier to do than other cities. And certain locations within cities it is easier to do than others.
In my office, I have a commercial agent that I would partner with for this type of situation. He has a number of planning/zoning contacts in many Phoenix area cities, which is something you would want to explore BEFORE making a purchase, and finding out there's almost no way you could get your desired zoning change.