While reading about modules over PIDs, I saw the following example. Let $R$ be a PID and $I = Rx$. Factor the generator $x$ into prime element powers and a unit $u$ in $R$ $$x = u p_1^{e_1}\cdots p_t^{e_t}.$$ Then $R/I = R/(x)= R/(p_1^{e_1}) \oplus \dots\oplus R/(p_t^{e_t})$.
While I've seen a proof showing that for a general ring, if $I, J$ are ideals such that $I + J = 1$ then $R/IJ \cong R/I \oplus R/J$.
However, I've got a couple of questions with this. First off, to be able to say this, we need to know that $(p_1^{e_1}) +\dots+ (p_t^{e_t}) = R$. Why is this the case? Secondly, how is the two-ideal case extended to the $t$ ideals case?
Thank you for your clarifications!