Most dogs sold in the media are from puppy mills, these are extremely cruel places where dogs are brutally abused and fed the bare minimum of food. So I say yes to banning online or media induced puppy mill dogs. Adopting would be a much better way for you to get a dog.
I'm sure that most pets would rather live in a home with owners and in most cases better care.
Obviously the buyer/owner could turn out to be bad, it's much more likely that the animal will be better off in an owners home rather that in a pound. Make sure you always think through your options when considering buying a pet because it is a lot of work.
Why bother? Are the problems of puppy production really a priority? Banning commercial sale of pets would be unpopular and generally ignored, making criminals of lawful citizens. We created pet adoption agencies as an alternative, and now most puppy mills just mask their sales behind adoption facades. Prohibition never works.