A HOMELESS man could not believe his luck when a "magic cash card" allowed him to go on a £60k trolley dash at Tesco stores across the North.

Shameless rogue Allah Ditta, 49, has been jailed for two years and three months for spotting a software glitch and "milking it for all it was worth".

He realised something was up when a £68 transaction at Tesco went through even though he did not have a penny in his account.

The skint druggie and his pals then used the card to raid Tesco stores across the North 167 times, piling their trolleys with luxuries worth £56,683.

Prosecutor Sophie Drake told Bradford Crown Court a software error meant transactions were approved when they should have been declined.

"The person on the checkout wasn't aware of the fault and the transactions were approved," she added.

Dad of two Ditta, from Bradford, realised something was wrong and dashed to another store in Bradford to try the same trick again.

The court heard he also loaned the card to pals and together they bought electric items, phones, computers, gift cards and obtained cash back in store.

The card was used 167 times at 14 Tesco shops in Bradford, Leeds, Garforth, Oldham and Manchester.

Mrs Drake said Ditta carried on spending from January 21 last year until he was arrested at a Tesco store in Bradford on February 15.

The shameless rogue told cops he was not aware he had done anything wrong, adding: "Who wouldn't? who is honest these days?"

Geraldine Kelly, mitigating, said her client was going through a tough period in his life and was homeless.

She added: "This period of offending represents a very sorry time in his life.

"He has been a drug addict for 30 years, but despite that had been married for 40 years.

"As it was, that drug addiction led to the breakdown of his marriage."

He was unable to see his wife and daughter and was homeless.

Ditta has a long list of previous convictions, including three in the last year for shoplifting, burglary and theft.

He admitted fraud and was jailed for two years and three months by Judge Robert Bartfield, who said: "You were not slow to see the opportunity because it dawned on you that if it was going to malfunction on this occasion, it was going to malfunction again and you milked it for all it was worth.

"Either yourself or people who were acting with you visited Tesco stores across the North of England.

"Altogether there was some 14 different branches or towns approached and 167 transactions.

"It was not clear if the software fault was at Tesco stores or with the bank."