Solomon speaks about events that he thinks could happen in the future. The events that he describes in verese 46-48 are conditions for his requests in verses 49-50.
The idiom "with all ... heart" means "completely" and "with all ... soul" means "with all ... being." These two phrases have similar meanings. See how you translated this in [1 Kings 2:4](../02/04.md). Alternate translation: "with all their being" or "with all their energy" (See: [[rc://en/ta/man/translate/figs-idiom]] and [[rc://en/ta/man/translate/figs-doublet]])
The word "name" is a metonym for the person, and "for ... name" refers to worshiping the person. See how you translated similar words in [1 Kings 3:2](../03/02.md). Alternate translation: "in which people will worship you" (See: [[rc://en/ta/man/translate/figs-metonymy]])