Since the 26th of November 2015, according to this ROYAL DECREE it is no longer possible to buy, sell or apply weedkillers or pesticides for professional use without having followed at least a basic relevant professional course and having obtained a ´carné´ to certify this. You will be asked to show this carné at salespoints if you buy the chemicals.
There are four levels of formation, but the basic one is sufficient for those that want to use the chemicals on their own property. You can enquire at your local Cooperativo about courses in your area and you can also do them online.
The carnés are valid for 10 years, nationwide. You need to renew no later than a month before it expires, having done a repeat course first.
Please beware that you are not allowed to use the chemicals within 50 meters of any source of water that is used for human consumption, like wells or rivers (streams) that flow towards embalses. You need to store them in a safe, well ventilated place, protected from extreme temperatures, and under lock and key.
Exceptions for chemicals sold in quantities of less then 1 liter ready to use product, or less than 500 ml concentrated product, for non professional use, so in private gardens, terraces.
If you use chemical weedkillers on your land and that land is accessible by the public and their animals, dogs included, you would be wise to warn them about this by suspending the containers from an obvious place, like a tree. Failure to warn the public and if an animal dies because of contamination with the chemicals you used will attract criminal charges if the offence is reported and the cause of death is proven to be directly related to said chemicals.