MrsK you are absolutely right, it takes time.
Lots of repetition
discussion of expected behaviour before entering cafe,
making sure you are engaging child in conservation/activity so that behaviour is directed positively.
Look at that big boy sitting so nicely - can you be as grown up?
Praise for good behaviour.
Reward for good behaviour (if you sit nicely and eat your snack we will go to the park next)
Low quiet, firm voice to child explaining that their behaviour is disturbing others.
Remind child continued poor behaviour will result in removal.
If necessary take child away from table (outside if possible) for a discussion about behaviour, reminder of expectations, consequences
Finally, if child still won't behave leave and go home (not via park), Express disappointment for behaviour. Try another day.
And repeat again ad nausem