diff --git a/Block/Widget/CategoryWidget.php b/Block/Widget/CategoryWidget.php index ed905f939cba577875e4eb457e84b4c3c56f6b77..49d7c3af4f9bfb05bc458561a3652403c16cf7ef 100755 --- a/Block/Widget/CategoryWidget.php +++ b/Block/Widget/CategoryWidget.php @@ -150,17 +150,25 @@ class CategoryWidget extends \Magento\Framework\View\Element\Template implements if ($isRelativeUrl) : $image = ltrim($image, '/media/'); else : - $image = 'catalog/category/'.$image; + $image = 'catalog/category/' . $image; endif; endif; endif; - if(is_null($width)) : - $width = $this->getCategoryImageWidth(); + if (is_null($width)) : + if (is_null($this->getCategoryImageWidth())) : + $width = 450; + else: + $width = $this->getCategoryImageWidth(); + endif; endif; if(is_null($height)): - $height = $this->getCategoryImageHeight(); + if (is_null($this->getCategoryImageHeight())) : + $height = 450; + else: + $height = $this->getCategoryImageHeight(); + endif; endif; $absolutePath = $this->_filesystem->getDirectoryRead(\Magento\Framework\App\Filesystem\DirectoryList::MEDIA)->getAbsolutePath('').$image;