At this age 'throwing fits' is actually very developmentally appropriate as your child does not yet possess the language skills to express his emotions. He is merely telling you with his actions and screams what he cannot express through language. Of course that doesn't mean it's not frustrating for parents! I'm not trying to say that his behavior is 'acceptable' (or 'unacceptable' for that matter) - just providing a developmental perspective to help you understand what is going on with him. It usually helps me quite a bit when I understand my daughter's behavior from a developmental standpoint.
These moments provide a perfect opportunity to model language for your child thereby helping him on the road to being able to express his emotions when he does begin speaking. When my daughter has 'thrown fits' in the past, I try to empathize, identify her feelings, and provide an explanation of the rule she's protesting (and an acceptable alternative if one exists) by saying something like, "I'm sorry you're upset that you can't stand up on the chair, it's not safe. You may sit on the chair." Of course, this doesn't always end the 'fit', but I believe if language modeling is consistently applied, a foundation is laid for future ability to successfully express emotions.
After my explanation, I diligently rely on distraction techniques. I offer to read a book with her, do a puzzle together, maybe look for our family cat, etc. etc.. Each child has a favorite activity, so this part relies on mom's knowledge of her child's interests. If distraction doesn't work, I tell say, "I'm sorry you're upset, I'll be right over here when you'd like to join me."
And then take myself a bit of a distance from her and shift my attention to a book or a chore.
You can do this in stores as well if you don't have a problem with your child behaving like this in public. Personally I don't have a problem with it (other people in the store might
I know that it's easy to offer advice and by no means do I think my suggestions are a cure-all - I do hope they will help a bit though.