Hattingh, a father-of-three, was shot and killed while escorting a truck to Motherwell during July 2014.
At the time he was doing extra private work to supplement his income.
Nqaba Charles, 26, was sentenced in the Port Elizabeth High Court on Wednesday after he was convicted on charges of murder, attempted murder and unlawful possession of firearm and ammunition earlier in March.
A co-accused, Jabulani Makaba, was acquitted on all charges. Prior to sentencing, Charles lashed out at photographers and reporters for taking his picture.
"They making me nervous! They must stop!" he said.
In passing down sentence, Judge Phakamisa Tshiki, said that it was his view that Hattingh's family had lost a bread winner who had been trying to earn an extra income.
"The accused was not honest with the court, he didn't take the court into confidence and did not say why he killed the deceased," said Tshiki.
On the count of murder, Charles was sentenced to 18 years imprisonment, on the charge of attempted murder he received 10 years, a further 15 years for the possession of an unlicensed firearm and 10 years for possession of ammunition.
The sentences will run concurrently. At the time of his murder, Hattingh was stationed at Mount Road police station, together with his wife Blanche.
On the day of his killing the couple had worked their last shift together. Speaking after court proceedings, Hattingh's father, John, said that he was glad the case was over, however he was unsatisfied with the sentence.
"I feel that he could at least got 25 years, 18 years for murder is not enough," he said.
African News Agency