Legislation regulating minimum prices on food products and limiting promotional sales by retailers has been passed by the French parliament.