  We give a geometric method for determining the cohomology groups and the
product structure of a polyhedral product, under suitable freeness conditions
or with coefficients taken in a field. This is done by considering first a
special class of CW pairs for which we derive a decomposition of the polyhedral
product resembling a Cartan formula. The result is then generalized to
arbitrary CW pairs of finite type. This leads to a direct computation of the
Hilbert-Poincar\'e series and to other applications.
  The product structure on the cohomology of the polyhedral product is computed
in terms of the additive generators, labelled via the Cartan decomposition. The
description given suffices to enable explicit calculations.
