However, you can have too much of a good thing, especially with regards to barking. It's getting a little grating on the nerves that every time someone comes to the door you eardrums are strained by the loud volley of barking.
You've tried shouting but he doesn't take the slightest notice. The only thing that makes him go quiet is if you give him a treat... but that's only because he can't bark and chew at the same time.
What hope is there to cure him of this bad habit?
Actually, you can train even a small dog not to bark, but be prepared for the long haul in order to achieve it.
As with everything to do with dog training, use reward-based methods. This relies on rewarding the dog's good behavior. He then learns that repeating certain actions on command earn him a treat, and so he repeats them willingly.
If you have a puppy, start as you mean to go on. By letting the dog know at an early age what behavior is acceptable and what isn't, then he's less likely to develop bad habits. But don't despair if you have an adult or senior dog, because you can teach an old dog new tricks--and teach them to be quiet.