diff --git a/common/modules/product/models/Category.php b/common/modules/product/models/Category.php index 2b6c773..9c63b0b 100755 --- a/common/modules/product/models/Category.php +++ b/common/modules/product/models/Category.php @@ -177,15 +177,28 @@ class Category extends \yii\db\ActiveRecord return empty($this->categoryName) ? null : $this->categoryName->value; } - public function getImageFile() { - return empty($this->image) ? null : Yii::getAlias('@storage/category/'. $this->image); + + + /** + * fetch stored image file name with complete path + * @return string + */ + public function getImageFile() + { + return isset($this->image) ? '/images/category/' . $this->image : null; } + /** + * fetch stored image url + * @return string + */ public function getImageUrl() { - return empty($this->image) ? null : '/storage/category/' . $this->image; + // return a default image placeholder if your source image is not found + return isset($this->image) ? '/images/category/'. $this->image : '/images/no_photo.png'; } + public function beforeSave($insert) { if (parent::beforeSave($insert)) { diff --git a/frontend/web/css/concat_all.css b/frontend/web/css/concat_all.css index 0c25688..53744c9 100755 --- a/frontend/web/css/concat_all.css +++ b/frontend/web/css/concat_all.css @@ -1741,7 +1741,6 @@ span.red { .modal_wrapper_reg .modal_window { text-align: right; - height: 428px; width: 560px; background-color: #fff; padding: 20px; @@ -1851,7 +1850,6 @@ span.red { .modal_wrapper_login .modal_window { text-align: right; - height: 247px; width: 459px; background-color: #fff; padding: 20px; @@ -1864,6 +1862,7 @@ span.red { overflow: hidden; z-index:999; } +.modal_window form#w1, .modal_window form#w0{padding-bottom: 11px;} .modal_wrapper_login .modal_window .title { font-size: 18px; -- libgit2 0.21.4