Discuss and learn French: French vocabulary, French grammar, French culture etc.
Il faut que j'achète tout : I 've to buy everything
Il faut que j'achète de tout : I've to buy some pieces of everything.
De does mean "some of" to indicate partitive of something* OR negatively mean "any" or "any of"**.
** Like in English: "I don't have any shirt." "I don't have any of the stuffs."
"Il faut que j'achète de tout." could be strictly translate as "I've to buy some (part or portion) of everything."
De is a tricky, but very powerful, French adposition.
Little addition to Erwan's answer (almost a palindrom, wow !) : you must understand "de tout" as a contraction of "un peu de tout" (a little bit of everything).