This one is difficult to explain with grammar.
Both "You cannot buy all you like" and "You cannot buy what you like" are grammatically correct. I think the first is pretty much identical in meaning to "You cannot buy all that you like" which means "You cannot buy everything you like." But the second has a slightly different meaning, namely that some things you like are not available. It concerns absolute availability rather than quantity.
I think the grammatical problem with "You cannot buy all what you like" begins with the fact that what is a relative pronoun which marks the phrase "what you like" as a relative clause and the object of buy. When you try to use "all" as a modifier, the question that pops into one's mind is whether "all" modifies what (apparently correct based on proximity, but grammatically impossible) or the whole relative clause. That uncertainty is my best explanation for why "all what" is nowadays considered wrong.
That being said, there are two things to add. First, it is easy to imagine Dickens putting "all what you like" into the mouths of certain of his characters, and also it may be acceptable usage in some modern dialects, for example cockney. I don't know for certain. The second thing is that I doubt my poor attempt at grammatical explanation has helped you much. It would probably have been just as useful and a lot simpler to say: it is idiom and you just have to remember it.