No pharmaceutical advertising to the general public is illegal in almost every country except the United States. You can advertise over the counter drugs in Ireland, but if it requires a prescription then it can only be advertised to medical professionals who have the knowledge and authority to prescribe it appropriately.
But in the USA pharmaceutical companies advertise these drugs to the general public telling them to pester their doctor about prescribing it to them.