How does the Shield Guardian’s damage transfer work when the bearer is immune/resistant to the damage type?

It’s been asked before here what happens when a target is hit with damage a shield guardian is immune to. What about the other way around?

Say a character is immune to a type of damage and takes that damage type (they’re wearing Efreeti Chain armor and take fire damage, for example).

Does the shield guardian take half of the damage and the caster none, or should both characters take none?

Page 197 of the PHB states that resistance and vulnerability are applied after all other damage modifiers.

If the character is resistant rather than immune, does the order of operations change?