Derek Cunningham (39) ran out of the Ongar, West Dublin, shop first to place stolen items in the car, but couldn’t get it started and ran off on foot. His accomplice, Gavin Flanagan (32), came out a short time later and also fled when he couldn’t find the car keys.

Gardai arrived on the scene and found the €4,458 worth of stolen items and €300 cash in the car, which had been registered to Flanagan’s mother and had red tape coloured over with black marker on the registration plates to change the numbers’ appearance.

Cunningham and Flanagan, both of Fortlawn Avenue, Blanchardstown, pleaded guilty at Dublin Circuit Criminal Court to robbery at Xtra-vision at Ongar Village on January 27, 2013.

Father-of-one Cunningham has 28 previous convictions, including 15 burglaries. His most recent offence dates back to 2006.

Flanagan has 20 previous convictions, including one for robbery in 2007 dealt with at district court level.

Garda Stephen Byrne told Vincent Heneghan BL, prosecuting, that a male cashier had been working in the shop when the two robbers entered, wearing hats and scarves to hide their identities.

Cunninham had what the cashier thought was a gun, but what was later revealed to have been a hammer wrapped in a t-shirt.

The men demanded money, iPads and iPhones. The cashier told them the shop was low on stock, so the men filled their bags with other electrical items such as Xboxes, tablets and UPC sticks.

Gda Byrne told Mr Heneghan that he found Cunningham in shrubbery close to the scene after both robbers fled on foot.

Cunningham met an acquaintance on the way to hide and this man was also found in the bushes, though he had nothing to do with the crime.

Gda Byrne revealed that colleagues spotted a man matching Flanagan’s description exit a bookmakers in the village a short time after the robbery and when they asked for his name, he replied: “Mr Flanagan.”

The garda said he had already traced the getaway car to Flanagan’s mother and described the attempts to give it false numbers as “amateur”. He told Mr Heneghan that both men made full admissions and were apologetic in interview.

He agreed with John Moher BL, defending Cunningham, that his client still had one item taken from the shop “unbeknownst to him” when gardai discovered his hiding place.

He further agreed that neither man had been on bail at the time or charged with any other offence since.

Gda Byrne agreed with Fiona Murphy BL, defending Flanagan, that her client told him he’d been at a party the previous night and had been under the influence of alcohol and drugs during the robbery.

He agreed that Flanagan’s father had a criminal history and had spent long periods in jail.

Mr Moher submitted to Mr Justice Raymond Groarke that Cunningham had been homeless for a number of years, but is now primary carer for his sick partner.

Ms Murphy submitted to the judge that her client had shown victim empathy and had not held the hammer during the robbery.

Mr Justice Groarke commented that though this was “ostensibly an armed robbery” it’s execution was poor.

He gave Flanagan a two year suspended sentence and Cunningham a three year suspended sentence, because he had carried the weapon at the time.

The judge took into account both men’s lack of criminal activity prior to the offence and that neither had come to adverse garda attention since.

He suspended each sentence for two years and directed that the men undergo Probation Service supervision and follow any recommended drug treament or training and employment programmes.