The invention relates to novel optionally quaternized or protonated condensation polymers having at least one heterocyclic end-group connected to the polymer backbone through a unit derived from an alkylamide, the connection comprising an optionally substituted ethylene group and to the use thereof in body care products and household products.