Pour tout problème contactez-nous par mail : support@froggit.fr | La FAQ :grey_question: | Rejoignez-nous sur le Chat :speech_balloon:

Skip to content
Snippets Groups Projects
Commit 0d68547e authored by Nicolas BEJEAN's avatar Nicolas BEJEAN
Browse files

Gestion de la taille par défaut des images

parent e4cbc5a2
No related branches found
No related tags found
No related merge requests found
...@@ -150,17 +150,25 @@ class CategoryWidget extends \Magento\Framework\View\Element\Template implements ...@@ -150,17 +150,25 @@ class CategoryWidget extends \Magento\Framework\View\Element\Template implements
if ($isRelativeUrl) : if ($isRelativeUrl) :
$image = ltrim($image, '/media/'); $image = ltrim($image, '/media/');
else : else :
$image = 'catalog/category/'.$image; $image = 'catalog/category/' . $image;
endif; endif;
endif; endif;
endif; endif;
if(is_null($width)) : if (is_null($width)) :
$width = $this->getCategoryImageWidth(); if (is_null($this->getCategoryImageWidth())) :
$width = 450;
else:
$width = $this->getCategoryImageWidth();
endif;
endif; endif;
if(is_null($height)): if(is_null($height)):
$height = $this->getCategoryImageHeight(); if (is_null($this->getCategoryImageHeight())) :
$height = 450;
else:
$height = $this->getCategoryImageHeight();
endif;
endif; endif;
$absolutePath = $this->_filesystem->getDirectoryRead(\Magento\Framework\App\Filesystem\DirectoryList::MEDIA)->getAbsolutePath('').$image; $absolutePath = $this->_filesystem->getDirectoryRead(\Magento\Framework\App\Filesystem\DirectoryList::MEDIA)->getAbsolutePath('').$image;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment