diff --git a/packages/Webkul/Product/src/Models/Product.php b/packages/Webkul/Product/src/Models/Product.php index 1367c8c4d..71d92be7f 100755 --- a/packages/Webkul/Product/src/Models/Product.php +++ b/packages/Webkul/Product/src/Models/Product.php @@ -108,6 +108,16 @@ class Product extends Model return $this->hasMany(ProductImage::class, 'product_id'); } + /** + * The images that belong to the product. + */ + public function getBaseImageUrlAttribute() + { + $image = $this->images()->first(); + + return $image ? $image->url : null; + } + /** * The related products that belong to the product. */ diff --git a/packages/Webkul/Shop/src/Resources/lang/en/app.php b/packages/Webkul/Shop/src/Resources/lang/en/app.php index 14b66ab5f..dcf8bc036 100755 --- a/packages/Webkul/Shop/src/Resources/lang/en/app.php +++ b/packages/Webkul/Shop/src/Resources/lang/en/app.php @@ -292,6 +292,7 @@ return [ 'description' => 'Description', 'specification' => 'Specification', 'total-reviews' => ':total Reviews', + 'total-rating' => ':total_rating Ratings & :total_reviews Reviews', 'by' => 'By :name', 'up-sell-title' => 'We found other products you might like!', 'reviews-title' => 'Ratings & Reviews', diff --git a/packages/Webkul/Shop/src/Resources/views/products/review.blade.php b/packages/Webkul/Shop/src/Resources/views/products/review.blade.php index 8d6abd661..979108d71 100755 --- a/packages/Webkul/Shop/src/Resources/views/products/review.blade.php +++ b/packages/Webkul/Shop/src/Resources/views/products/review.blade.php @@ -12,6 +12,13 @@