This article was originally published a few years ago. The information, tips and techniques explained may outdated. Examples shown on this page may no longer work. Please consider this when viewing the below content.
Recently I had an enquiry on how to add a customer's Gravatar image to their Account page in Opencart. With a little bit of research I found out that you can "get" the following customer details: $this->customer->isLogged()
So we can use "getEmail" to extract the email address, and we then simply add the code into the account.tpl file to complete the Gravatar url as shown below, which will then display the Gravatar image.<img src="http://www.gravatar.com/avatar/<?php echo md5(strtolower(trim($this->customer->getEmail()))); ?>" />
So if your client is using their Gravatar email address as their account email address, then their accompanying image will be displayed, otherwise a default Gravatar image will be shown.For those who prefer to use VQMOD, I've put together a VQMOD XML file that is available as a download below. Simply unzip the file and upload the dtwdshowgravataraccountpage.xml file to your vqmod > vqcache folder. [wdsm_ad id="1487" class=" " ][dtwd-related-posts-sc title="more ideas for Opencart websites" count=3]