matej / gravatar
Gravatar implementation for Magento2
Installs: 0
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
Language:HTML
Type:magento2-module
Requires
- magento/framework: ~100.0.0|~100.1.0
This package is auto-updated.
Last update: 2020-01-24 08:48:31 UTC
README
This extension implements Gravatar service in Magento 2! This module uses customer e-mail for generating Gravatar URL and it is complatible with Magento 2.
Requirements
Magento 2.0+
How to install
Installation is pretty easy just use Composer for it and viola! If you can't install it via Composer just create Matej\Gravatar folders in app folder. Your folder structure should look like:
app/code/
├── Matej/
│ │ ├──Gravatar/
│ │ │ ├── ...
│ │ │ ├── ...
How to use
There is optional Block code that you can use in templates:
echo Matej\Gravatar\Helper\Data::getCustomerAvatarByMail($email); echo Matej\Gravatar\Helper\Data::getCustomerAvatarById($customer_id);
It automatically create block and put Gravatar URL (use those echo's for images src)!
You can use custom PHP code for creating Gravatar URL based on custom params:
$url = $this ->setGravatarSize(80) // Optional (default is 80) ->setGravatarSecured(false) // Optional (default is false) ->setGravatarDefaultImage('identico', false) // Optional (default is mm) ->setGravatarRating('g') // Optional (default is g) ->getGravatarURL('example@example.com'); echo $url; // Prints out: http://www.gravatar.com/avatar/55502f40dc8b7c769880b10874abc9d0?s=60&r=g&d=mm
That's all!