You're limited to 2 packs of 16 tablets each (for a total of 32 tablets) per transaction, in an effort to reduce the incidence of spontaneous suicide attempts.
Direct consumer advertisement of drugs is also illegal in Germany. (I think there's only 3 or 4 countries on the planet where this isn't the case)
Also, they are allowed to advertise for things like cold medicine, when I still had a TV (log time ago, admittedly) I remember seeing lots and lots of such ads: "WICK MediNait cold medicinefor the night", list of ingredients: https://www.aponet.de/wissen/arzneimitteldatenbank/suchergeb... (active ingredients Paracetamol, doxylamine hydrogen succinate, ephedrine hemisulfate, Dextromethorphan hydrobromide-1-water)
Only for prescription drugs ("verschreibungspflichtig"), so no "ask your doctor if XYZ is right for you" bullshit.
Non-prescription drugs ("apothekenpflichtig") are heavily advertised in pharmacies, sometimes on billboards, and on TV. Most TV ads for drugs are running on ARD and ZDF [1] since that's what old people watch.
[1] Though only between 18:00 and 20:00, which is when the public broadcasters are allowed to air ads.
What is interesting is that if you really interesting is that a certain large pharmacy does a 200/12 ibuprofen + codeine combo.
I once had a prolapsed lower disc (from sport) and neck spasm (from stupidity) at the same time. Whilst I couldn't take naproxen (lots of reflux even with omeprazole), that and 500/15 cocodes with diazepam was the only way to get to sleep.