The person who was hit is not at fault because they were not responsible for the actions of the other driver. They could not have reasonably anticipated that the other driver would open their door in traffic, and they were therefore not able to take any steps to avoid the collision.
In some cases, the person who was hit may be partially at fault if they were speeding or driving recklessly. However, this does not mean that the person who opened the door is not also at fault. Their negligence was the primary cause of the collision, and they are therefore still liable for damages.
If you are ever in a situation where someone opens their car door in traffic and you are hit, you should immediately contact the police and your insurance company. You may also want to consider hiring a personal injury attorney to help you recover damages from the other driver.