Cranberries: they're a source of Vitamin C, replete in antioxidants, and, given the right ingredients, a rich source of symbolism. Superfruit indeed.
When Bartholomew heads for town, he "carrie[s] a basket of cranberries to sell at the market" and is "anxious to sell them quickly and bring the money back home to his parents" (6). After his arrest for lack of hat removal, though, the basket of cranberries tumbles into the gutter, making them far too dirty to sell, even at a local co-op (39).
At the end of the novel, after Bartholomew's been through his ordeal, he heads home to his parents with "no basket on his arm, no hat on his head, but with five hundred pieces of gold in a bag" (147).
Like many fairy tales, The 500 Hats uses the cranberries and coins as very simple symbols to show the change in the main character's luck and lifestyle. It's just like in "Hansel and Gretel." At the end of that story, the children receive either a vase full of riches or a candy-coated house—depending on which version you read. Either way, they are clearly trading up, given the abusive mother and woodcutter's shack they started the story with.
In the same way, Bartholomew returns with more money than cranberries should have purchased, and we realize this symbolizes a change in Bartholomew's life and social standing (see "The View" symbol for more on that).
And we're right. When Bartholomew and King Derwin return in Bartholomew and the Oobleck, the boy has become the King's page and has clearly risen in social standing. He's even able to talk with the King in a way the lower class Bartholomew of this book could never dream. Kudos, B.C. Just don't forget your roots.