I don't think I'd use the word "allegorical" with regard to the crystal glasses or the desert. I would imagine that "symbol" would be more accurate with the glasses, and the desert may be more a metaphor.
An allegory is defined as...
...an extended metaphor in which a person, abstract idea, or event stands for itself and for something else.
With an allegory, there is also the sense that hearing the story or the narrative provides a lesson or a "moral to the story." Because you have identified items, I would assume that these things might be symbolic (or metaphoric), representing something significant by which to better understand the story.
In this case, I believe that the crystal glasses are symbolic. In Paulo Coelho's The Alchemist, Santiago (the boy) is ready to give up his search for his Personal Legend. He has been robbed and he's feeling defeated. So he promises himself to get a job, save up his money, buy sheep, and return home.
Santiago goes to the crystal merchant and suggests that if he cleans the dirty crystal, perhaps the man could feed him. The man does not respond, so the boy begins to clean each glass until it sparkles. Afterward, the man says:
You didn't have to do any cleaning...The Koran requires me to feed a hungry person.
The boy is puzzled and asks:
Well then, why did you let me do it?
The merchant replies:
Because the crystal was dirty. And both you and I needed to cleanse our minds of negative thoughts.
The crystal merchant's take on the situation speaks directly to the boy's difficulty at this time in his life. The dirty glasses symbolize the boy's inability to look into the future and see the potential for success. Being without money, food or a place to live has dampened his spirit—has clouded his vision of pursing his dream and his Personal Legend. In cleaning the glasses, they become beautiful again and draw one's eye. As Santiago spends time in the company of the crystal merchant, he begins to see the wisdom of moving forward—his "vision" is cleansed (as were the glasses) so that his hopes for the future become "crystal clear" once again, and his mind's eye is drawn to his Personal Legend as the sparkling crystal draws one's physical vision.
As for the desert, I see this as a metaphor. The desert seems to represent emptiness and desolation. However, as the alchemist shows the boy, many things are hidden in the desert. Life is hidden beneath the sand. The alchemist says to the boy...
Show me where there is life out in the desert. Only those who can see such signs of life are able to find treasure.
The boy notes that he does not know how to do this. The alchemist announces:
Life attracts life.
Hearing this the boy gives free rein to his horse. Santiago notes:
I don't know the language of the desert, but my horse knows the language of life.
And the horse does, indeed, find a hole. The alchemist puts his hand inside and brings out a snake. It is disconcerting for the boy, but it shows that what is on the surface is not always what we find beneath. And while the desert may seem to hold little promise of life, it has life and allows life to prosper—in an unlikely place. And while it may seem to hold even less promise of treasure, it is a search that will prove fruitful. The desert is a metaphor: Life is sometimes a desert, holding little promise, but if one looks beneath the surface, treasure, life, may be hidden out of sight.