In answer to your question (need to file separate application for each class), there is no requirement that when you file an application, you must include all services or goods. Jeff is correct in that you will need to file for each class you want to seek protection.
Additionally, instead of stating that "its complicated (which is assumed based on the fact that you posted your questions), see an attorney", which does not provide much information for you, consider this: if you are contemplating seeking a TM registration, why wouldn't you want to seek as much protection as possible (in your OP, you indicated services of online sales classes but cited to two classes of goods: computer software in IC 9 and t-shirts in IC 25). It would not be too costly to file for both the services and goods.
As an additional item to keep in mind, consider whether to file a single multi-class application or multiple single-class applications. The filing fee would be the same in both cases. The benefit of a single multi-class is that all the classes would be reviewed at the same time. One downside to the multi-class application would be that one class may be allowed while another class may be rejected, which causes a delay in the entire application. Additionally, if a third party files an opposition to one class, the entire application will be delayed.
As for the multiple applications, you would not have the above problems. If one class is delayed, the remainer would still proceed through the PTO. One downside is that each application would be examined on its own (more record keeping, more files to monitor/maintain).
I normally tend to lean toward not filing multi-class applications in favor of multiple single-class applications (but not all the time). There is usually more flexibility with the approach than with a single multi-class application.
I hope this helps.