From 90fd1d45e5c46d6a81f846f9eef5808fa3c4e404 Mon Sep 17 00:00:00 2001 From: rahul shukla Date: Thu, 12 Dec 2019 17:09:50 +0530 Subject: [PATCH] Issue #1463 --- .../src/Http/Controllers/WishlistController.php | 7 ++----- .../Customer/src/Repositories/WishlistRepository.php | 3 +-- .../src/Resources/views/checkout/onepage.blade.php | 6 +++--- .../customers/account/wishlist/wishlist.blade.php | 10 +++++++--- 4 files changed, 13 insertions(+), 13 deletions(-) diff --git a/packages/Webkul/Customer/src/Http/Controllers/WishlistController.php b/packages/Webkul/Customer/src/Http/Controllers/WishlistController.php index 24790355f..9e6fa86b5 100755 --- a/packages/Webkul/Customer/src/Http/Controllers/WishlistController.php +++ b/packages/Webkul/Customer/src/Http/Controllers/WishlistController.php @@ -59,15 +59,12 @@ class WishlistController extends Controller /** * Displays the listing resources if the customer having items in wishlist. - * + * * @return \Illuminate\View\View */ public function index() { - $wishlistItems = $this->wishlistRepository->findWhere([ - 'channel_id' => core()->getCurrentChannel()->id, - 'customer_id' => auth()->guard('customer')->user()->id] - ); + $wishlistItems = $this->wishlistRepository->getCustomerWhishlist(); return view($this->_config['view'])->with('items', $wishlistItems); } diff --git a/packages/Webkul/Customer/src/Repositories/WishlistRepository.php b/packages/Webkul/Customer/src/Repositories/WishlistRepository.php index cd25ef3ed..a491d3828 100755 --- a/packages/Webkul/Customer/src/Repositories/WishlistRepository.php +++ b/packages/Webkul/Customer/src/Repositories/WishlistRepository.php @@ -62,8 +62,7 @@ class WishlistRepository extends Repository return $this->model->find($id)->item_wishlist; } - - /** + /** * get customer wishlist Items. * * @return mixed diff --git a/packages/Webkul/Shop/src/Resources/views/checkout/onepage.blade.php b/packages/Webkul/Shop/src/Resources/views/checkout/onepage.blade.php index b7b243670..0433dbf2a 100755 --- a/packages/Webkul/Shop/src/Resources/views/checkout/onepage.blade.php +++ b/packages/Webkul/Shop/src/Resources/views/checkout/onepage.blade.php @@ -296,7 +296,7 @@ else paymentHtml = Vue.compile(response.data.html) - this_this.completed_step = this_this.step_numbers[response.data.jump_to_section] + 1; + this_this.completed_step = this_this.step_numbers[response.data.jump_to_section] - 1; this_this.current_step = this_this.step_numbers[response.data.jump_to_section]; shippingMethods = response.data.shippingMethods; @@ -320,7 +320,7 @@ this_this.disable_button = false; paymentHtml = Vue.compile(response.data.html) - this_this.completed_step = this_this.step_numbers[response.data.jump_to_section] + 1; + this_this.completed_step = this_this.step_numbers[response.data.jump_to_section] - 1; this_this.current_step = this_this.step_numbers[response.data.jump_to_section]; paymentMethods = response.data.paymentMethods; @@ -344,7 +344,7 @@ this_this.disable_button = false; reviewHtml = Vue.compile(response.data.html) - this_this.completed_step = this_this.step_numbers[response.data.jump_to_section] + 1; + this_this.completed_step = this_this.step_numbers[response.data.jump_to_section] - 1; this_this.current_step = this_this.step_numbers[response.data.jump_to_section]; this_this.getOrderSummary(); diff --git a/packages/Webkul/Shop/src/Resources/views/customers/account/wishlist/wishlist.blade.php b/packages/Webkul/Shop/src/Resources/views/customers/account/wishlist/wishlist.blade.php index fb9e29bc7..a738302f8 100755 --- a/packages/Webkul/Shop/src/Resources/views/customers/account/wishlist/wishlist.blade.php +++ b/packages/Webkul/Shop/src/Resources/views/customers/account/wishlist/wishlist.blade.php @@ -22,7 +22,7 @@ {{ __('shop::app.customer.account.wishlist.deleteall') }} @endif - +
@@ -43,10 +43,10 @@
{{ $item->product->name }} - + @if (isset($item->additional['attributes']))
- + @foreach ($item->additional['attributes'] as $attribute) {{ $attribute['attribute_name'] }} : {{ $attribute['option_label'] }}
@endforeach @@ -76,6 +76,10 @@
@endforeach + +
+ {{ $items->links() }} +
@else
{{ __('customer::app.wishlist.empty') }}