Right.
gerund I'd advise
buying...
infinitive I'd advise
you to buy... <'you' is the object>
Note that,
advise, recommend and forbid:
These are followed by a to-infinitive when there is an object as well, but with a gerund otherwise.
EX: The police advised
us not to enter the building, for a murder had occurred.
'us' is the object.