At first, I sugget you print 2 arrays on listing_details.tpl file:
Code:
Only registered members can view the code.
maybe the information which you need already exists there.