The product of a path can only be known when all its nodes have been visited and no partial path is decisive. So you have to traverse the entire tree. Arrange a standard tree traversal, but keep a trace of the products along the partial paths, and on every node update the maximum so far.
(Your solution abandons some paths prematurely.)
A simple solution:
if (is_leaf(t)) return t->value; else return max(t->value * product(t->left), t->value * product(t->right));
CLICK HERE to find out more related problems solutions.