Merge pull request #1549 from rahulshukla-webkul/development
Issue #1548
This commit is contained in:
commit
fc920e14c5
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
|
@ -1,4 +1,4 @@
|
|||
{
|
||||
"/js/admin.js": "/js/admin.js?id=0afa8deaa3ea01b81abf",
|
||||
"/css/admin.css": "/css/admin.css?id=e9178754dd7096a8f7a0"
|
||||
"/js/admin.js": "/js/admin.js?id=d27aed3da0c62eb237be",
|
||||
"/css/admin.css": "/css/admin.css?id=15ccc108fec211bb2af2"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,7 +6,6 @@
|
|||
// buttons
|
||||
.btn.btn-primary{
|
||||
background: $btn-primary-bg;
|
||||
color: $btn-primary-bg !important;
|
||||
}
|
||||
|
||||
.fixed-action {
|
||||
|
|
|
|||
|
|
@ -166,7 +166,7 @@ class CustomerController extends Controller
|
|||
*/
|
||||
public function reviews()
|
||||
{
|
||||
$reviews = auth()->guard('customer')->user()->all_reviews;
|
||||
$reviews = $this->productReview->getCustomerReview();
|
||||
|
||||
return view($this->_config['view'], compact('reviews'));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -48,10 +48,7 @@ class WishlistController extends Controller
|
|||
* Displays the listing resources if the customer having items in wishlist.
|
||||
*/
|
||||
public function index() {
|
||||
$wishlistItems = $this->wishlist->findWhere([
|
||||
'channel_id' => core()->getCurrentChannel()->id,
|
||||
'customer_id' => auth()->guard('customer')->user()->id]
|
||||
);
|
||||
$wishlistItems = $this->wishlist->getCustomerWhishlist();
|
||||
|
||||
return view($this->_config['view'])->with('items', $wishlistItems);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -61,4 +61,17 @@ class WishlistRepository extends Repository
|
|||
public function getItemsWithProducts($id) {
|
||||
return $this->model->find($id)->item_wishlist;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* get customer wishlist Items.
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
public function getCustomerWhishlist() {
|
||||
return $this->model->where([
|
||||
'channel_id' => core()->getCurrentChannel()->id,
|
||||
'customer_id' => auth()->guard('customer')->user()->id
|
||||
])->paginate(5);
|
||||
}
|
||||
}
|
||||
|
|
@ -55,7 +55,7 @@ class ProductReviewRepository extends Repository
|
|||
{
|
||||
$customerId = auth()->guard('customer')->user()->id;
|
||||
|
||||
$reviews = $this->model->where(['customer_id'=> $customerId])->with('product')->get();
|
||||
$reviews = $this->model->where(['customer_id'=> $customerId])->with('product')->paginate(5);
|
||||
|
||||
return $reviews;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -65,6 +65,10 @@
|
|||
</div>
|
||||
<div class="horizontal-rule mb-10 mt-10"></div>
|
||||
@endforeach
|
||||
|
||||
<div class="bottom-toolbar">
|
||||
{{ $reviews->links() }}
|
||||
</div>
|
||||
@else
|
||||
<div class="empty mt-15">
|
||||
{{ __('customer::app.reviews.empty') }}
|
||||
|
|
|
|||
|
|
@ -25,39 +25,42 @@
|
|||
<div class="account-items-list">
|
||||
|
||||
@if ($items->count())
|
||||
@foreach ($items as $item)
|
||||
<div class="account-item-card mt-15 mb-15">
|
||||
<div class="media-info">
|
||||
@php
|
||||
$image = $productImageHelper->getProductBaseImage($item->product);
|
||||
@endphp
|
||||
@foreach ($items as $item)
|
||||
<div class="account-item-card mt-15 mb-15">
|
||||
<div class="media-info">
|
||||
@php
|
||||
$image = $productImageHelper->getProductBaseImage($item->product);
|
||||
@endphp
|
||||
|
||||
<img class="media" src="{{ $image['small_image_url'] }}" />
|
||||
<img class="media" src="{{ $image['small_image_url'] }}" />
|
||||
|
||||
<div class="info">
|
||||
<div class="product-name">
|
||||
{{$item->product->name}}
|
||||
<div class="info">
|
||||
<div class="product-name">
|
||||
{{$item->product->name}}
|
||||
</div>
|
||||
|
||||
@inject ('reviewHelper', 'Webkul\Product\Helpers\Review')
|
||||
|
||||
<span class="stars" style="display: inline">
|
||||
@for($i=1;$i<=$reviewHelper->getAverageRating($item->product);$i++)
|
||||
<span class="icon star-icon"></span>
|
||||
@endfor
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@inject ('reviewHelper', 'Webkul\Product\Helpers\Review')
|
||||
<div class="operations">
|
||||
<a class="mb-50" href="{{ route('customer.wishlist.remove', $item->id) }}"><span class="icon trash-icon"></span></a>
|
||||
|
||||
<span class="stars" style="display: inline">
|
||||
@for($i=1;$i<=$reviewHelper->getAverageRating($item->product);$i++)
|
||||
<span class="icon star-icon"></span>
|
||||
@endfor
|
||||
</span>
|
||||
<a href="{{ route('customer.wishlist.move', $item->id) }}" class="btn btn-primary btn-md">{{ __('shop::app.wishlist.move-to-cart') }}</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="horizontal-rule mb-10 mt-10"></div>
|
||||
@endforeach
|
||||
|
||||
<div class="operations">
|
||||
<a class="mb-50" href="{{ route('customer.wishlist.remove', $item->id) }}"><span class="icon trash-icon"></span></a>
|
||||
|
||||
<a href="{{ route('customer.wishlist.move', $item->id) }}" class="btn btn-primary btn-md">{{ __('shop::app.wishlist.move-to-cart') }}</a>
|
||||
</div>
|
||||
<div class="bottom-toolbar">
|
||||
{{ $items->links() }}
|
||||
</div>
|
||||
<div class="horizontal-rule mb-10 mt-10"></div>
|
||||
@endforeach
|
||||
|
||||
@else
|
||||
<div class="empty">
|
||||
{{ __('customer::app.wishlist.empty') }}
|
||||
|
|
|
|||
Loading…
Reference in New Issue