28 litres! That might be part of the problem. That's too small to keep fish in really, small tanks are so hard to maintain good water quality in. It annoys me that tiny tanks are sold but there's no law against it. I wouldn't keep any fish in anything less than about 50 litres.
Your shop has not given you very accurate information, they ought to have told you to do a fishless cycle and then you wouldn't have had problems with ammonia levels and lost the tetras. I doubt it was the earwigs that killed them. Adding 3 platys would have caused an ammonia spike again, especially in such a small tank.
If your tank has been set up for 6 weeks then I imagine the cycle will have just finished. This probably means the nitrAte level is sky-high which is what would be causing your green water.
Another problem is that platys and tetras need different water conditions so they're not really compatible anyway. I think you need to start going to a different shop!
If you want to keep your fish I would suggest getting a much larger tank for a start. If you've got neon tetras then a tank of 60 litres plus would be OK for a shoal of 6 (shoaling fish need to be in a group of 6+) Platys are larger so would need a bigger tank.
Here are some articles you might find useful-
Choosing a tank and filter
Nitrogen cycle
As for the earwigs, they would probably cause a small ammonia spike but nothing compared to what the fish are producing. Your fish will probably try and eat them, I don't think it will do them any harm.