You might have him create three banks. They can be simple boxes, or plastic zip top bags, or actual banks. Mark one "spending", one "saving", and the third one "charity" (or church offering, or Salvation Army Christmas Kettle, or the Red Cross, or St. Jude's Hospital, or the local animal shelter, or whatever you support or care about). Amazon.com sells several of these kinds of banks - just type in "kids spend save give banks" in Amazon's search window (without the quotations) and you'll see several.
Figure out an amount of allowance that makes sense, and have him put a portion in the spending bank, another in the savings and another in the giving bank. It can be 1/3, 1/3, 1/3, or $3 in the spending and $1 each in the other banks. He cannot touch the savings and giving banks. If he wants to get something big, like a new bike, or a video game, you and he can figure out the price together and start saving towards that. You might tell him that you'll match his saved money when he's raised half of the goal, if you like that idea.
And then, if you want to buy him something at karate or swimming lessons or from the vending machine, establish some structure that he can count on. For example, the last lesson of the week, he gets to purchase a snack with money that you will give him, or every Friday. But make it predictable, and don't waiver. Also, make sure that chore money or allowance is structured and predictable. Don't say "oh, you did a good job sweeping the porch steps, here's a dollar" and next time, you happen to have $2, so you give him $2 for the same task. List his chores on a whiteboard or poster, and what his allowance is, and when it will be paid. And stick with it.
This gives him some control - he knows he can use up the money in the spend portion, but you know that the save and donate portions are safe. And if he blows all the money in the spend bank, that's tough. But sit down with him and explain the system.
I am guessing that once he starts using his spending money to buy snacks, and figures out how fast the money goes when purchasing from a concession stand vs. the grocery store, or getting a snack from home, he'll understand the value of packing your own snacks or passing up the expensive stuff at the vending machine.