I don't think it is illegal to sell dogs on retail premises, the animal welfare act just states that the premises have to be licensed by the council. There is a large pet store in my area which rents out a back room to a comapnay that sell puppies. The conditons are like that described in Spain by the OP but the glass tanks are larger, there is no natural light, no fresh air and in the summer the room is boiling and full of noisy kids ataring at the poor pups

I think it is terrible that these poor pups are kept like this and they must come from puppy farms as I can't see where else they get them. The prices they charge are ridiculous, £700 for a Rottie with no health checks, vacs or history!
Edit to add the info from the DEFRA site:
The Pet Animals Act 1951 (as amended in 1983) protects the welfare of animals sold as pets. The Act requires any person keeping a pet shop to be licensed by the local authority. Before granting a licence the local authority must be satisfied that the animals are kept in accommodation that is both suitable and clean; that they are supplied with appropriate food and drink; and are adequately protected from disease and fire. The local authority may attach any conditions to the licence, may inspect the licensed premises at all reasonable times and may refuse a licence if the conditions at the premises are unsatisfactory or if the terms of the licence are not being complied with.
Local authorities are responsible for enforcing the law in this area and anyone who has reason to believe that a pet shop is keeping animals in inadequate conditions should raise the matter with the local authority who will decide what action to take within the range of its powers.
Under s.2 pets cannot be sold in the street, including on barrows and markets.
Pet sales
There will be new regulations on pet vending. At present, we are considering making the following changes. These will, of course, be subject to public consultation and Parliamentary approval.
Animal wefare act 2006: Pet shops should continue to be licensed with renewal every three years rather than annually, with inspections on a risk managed basis.
Local Authorities will issue licences and will have powers to inspect, and to withhold or revoke licences.
Businesses that use internet sites for selling should be licensed in the same way as conventional pet shops.
Pet shops and commercial premises where animals are kept prior to sale will be subject to a code of practice, approved by Parliament and enforced by the Local Authority.
A member of the management of a pet shop or animal internet selling site should have a suitable animal welfare qualification (for new entrants only).
Written advice addressing the welfare needs of the animal being sold will be made available to buyers at pet shops and on internet selling sites