added product template rendering logic