Use of a cosmetic product for fixing a hairstyle containing at least one polyamide in a cosmetic carrier, wherein the polyamide is a reaction product of at least one dimerized fatty acid and at least one diamino compound. The invention also relates to a corresponding hair treatment method, and to cosmetic products containing at least one reaction product of at least one dimerized fatty acid and at least one diamino compound, and at least one foaming agent.