[verb た-form] + ほうがいい [verb ない-form] + ほうがいい
たほうがいい gives advice: "you should", "you'd better". The verb goes in the た-form even though the advice is about now or later, and です makes it polite.
The た here is not past: いった行ったほうがいい is "you should go", never "you should have gone".
Advice not to do something uses the plain ない-form, not the past negative.
たほうがいい is direct advice: it implies that something will go wrong if you ignore it. Between friends that is fine, and よ softens it. Said to a superior it sounds presumptuous; たらいかがですか is the polite way to suggest something.
するほうがいい, with the dictionary form, also exists. It compares options in general – "it's better to walk than drive" – rather than telling this person what to do.