Update header.php

Changed for retrieving data as well as showing it according to the configuration setting... Significant performance increase observed especially with huge product sets