Merge pull request #427 from jitendra-webkul/jitendra
Review view updated
This commit is contained in:
commit
14760df0cc
|
|
@ -108,6 +108,16 @@ class Product extends Model
|
||||||
return $this->hasMany(ProductImage::class, 'product_id');
|
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.
|
* The related products that belong to the product.
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -292,6 +292,7 @@ return [
|
||||||
'description' => 'Description',
|
'description' => 'Description',
|
||||||
'specification' => 'Specification',
|
'specification' => 'Specification',
|
||||||
'total-reviews' => ':total Reviews',
|
'total-reviews' => ':total Reviews',
|
||||||
|
'total-rating' => ':total_rating Ratings & :total_reviews Reviews',
|
||||||
'by' => 'By :name',
|
'by' => 'By :name',
|
||||||
'up-sell-title' => 'We found other products you might like!',
|
'up-sell-title' => 'We found other products you might like!',
|
||||||
'reviews-title' => 'Ratings & Reviews',
|
'reviews-title' => 'Ratings & Reviews',
|
||||||
|
|
|
||||||
|
|
@ -12,6 +12,13 @@
|
||||||
|
|
||||||
<div class="total-reviews">
|
<div class="total-reviews">
|
||||||
{{ __('shop::app.products.total-reviews', ['total' => $total]) }}
|
{{ __('shop::app.products.total-reviews', ['total' => $total]) }}
|
||||||
|
|
||||||
|
{{
|
||||||
|
__('shop::app.products.total-rating', [
|
||||||
|
'total_rating' => $reviewHelper->getTotalRating($product),
|
||||||
|
'total_reviews' => $total,
|
||||||
|
])
|
||||||
|
}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@endif
|
@endif
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue