Can you explain this in more detail? Are you saying that the sun's magnetic or sunspot influence stops at the earth? And, by the way, the claim is not being made that earth and Mars are being warmed "the same way." Just that they are both being warmed and Mars and Earth, for instance, have experienced periodic ice ages throughout their histories.. You may have noticed that the earth and Mars are not identical. For one thing, Martian poles are not covered by frozen H2O but by frozen CO2.
But there are certainly plenty of other ways the sun could affect both planets in different ways. One is the cosmic ray changes found in the lab to increase cloud nucleae. The atmosphere on Mars could warm by cosmic rays somehow too, but I have yet to hear any explanation of how that could happen (water vapor is out of the question).
The fact that both earth and mars have glacial cycles is an entirely different effect. On earth it is milankovitch cycles and Mars apparantly has them too. Those are due to changes in the planet (tilt, orbit, etc) not the sun and they are very slow. Powerful, but slow, so they do explain any significant amount of warming except over 1000's of years.