The incident occurred at a Walmart store in Washington Township Aug. 12, 2012.

That wasn’t the first time Kammerer has targeted children. According to New Jersey Department of Corrections records, he served approximately 11 months in prison from 2007 to 2008 for two counts of endangering the welfare of a child.

Then, he served a term from June 24, 2010, to June 18, 2011, on another endangering conviction, related to child pornography. The maximum terms were three years for the first conviction and one year for the second.

On Friday, Superior Court Judge Walter L. Marshall Jr. imposed the maximum sentence for the Walmart offense. He noted, among other concerns, Kammerer’s sordid history and the need to protect the public.

When Marshall asked him if he had anything to say, Kammerer simply shook his head and may have said something brief but inaudible.

On the day of the incident, a customer told police he’d seen a man trying to take video with his cellphone of one of his two children in an adjacent stall. The customer said he saw the accused immediately leave the store when he tried to confront him.

Investigators said they identified Kammerer as the peeper after viewing Walmart surveillance video and working with other law enforcement.