What two idioms would you use for this sentence?

She bought a present before being invited to the party.

She was counting her chickens before they hatched in the hope that her ship would come in. What would you say about buying someone a present before she got the invitation to the party? How did she know she would be invited, or was she just hoping she would?

She was just hoping she would

I think it might also be don't put the cart before the horse. Is that right?

That's another good one, yes. You've got the idea. She put her cart before the horse in this case.

Two idioms that could be used for this sentence are:

1. "Putting the cart before the horse" - This idiom means to do things in the wrong order or to do something without thinking it through properly. In the given sentence, it suggests that buying a present before being invited to the party is similar to putting the cart before the horse because the usual order of events would be receiving an invitation first and then buying a present.

2. "Jumping the gun" - This idiom means to start doing something too soon, before the appropriate time. In the given sentence, it suggests that buying a present before being invited to the party is like jumping the gun because it is an action taken prematurely, assuming one will be invited to the party without official confirmation.