From 3e2dd34dddca2b33b14f9f46affa44c8774d0985 Mon Sep 17 00:00:00 2001 From: "shubhammehrotra.symfony@webkul.com" Date: Thu, 19 Mar 2020 17:57:52 +0530 Subject: [PATCH] #2592 --- .../Webkul/Velocity/src/Http/front-routes.php | 6 + .../views/shop/UI/particals.blade.php | 24 +- .../customers/account/compare/index.blade.php | 19 ++ .../account/partials/sidemenu.blade.php | 2 +- .../guest/compare/compare-products.blade.php | 201 +++++++++++++++++ .../views/shop/guest/compare/index.blade.php | 206 +----------------- .../layouts/top-nav/login-section.blade.php | 2 +- 7 files changed, 253 insertions(+), 207 deletions(-) create mode 100644 packages/Webkul/Velocity/src/Resources/views/shop/customers/account/compare/index.blade.php create mode 100644 packages/Webkul/Velocity/src/Resources/views/shop/guest/compare/compare-products.blade.php diff --git a/packages/Webkul/Velocity/src/Http/front-routes.php b/packages/Webkul/Velocity/src/Http/front-routes.php index 363a38eff..12d9fa4d8 100644 --- a/packages/Webkul/Velocity/src/Http/front-routes.php +++ b/packages/Webkul/Velocity/src/Http/front-routes.php @@ -34,6 +34,12 @@ Route::group(['middleware' => ['web', 'locale', 'theme', 'currency']], function 'view' => 'shop::guest.compare.index' ]); + Route::get('/customer/account/comparison', 'ComparisonController@getComparisonList') + ->name('velocity.customer.product.compare') + ->defaults('_config', [ + 'view' => 'shop::customers.account.compare.index' + ]); + Route::put('/comparison', 'ComparisonController@addCompareProduct') ->name('customer.product.add.compare'); diff --git a/packages/Webkul/Velocity/src/Resources/views/shop/UI/particals.blade.php b/packages/Webkul/Velocity/src/Resources/views/shop/UI/particals.blade.php index ca50896ba..1078ad5a1 100644 --- a/packages/Webkul/Velocity/src/Resources/views/shop/UI/particals.blade.php +++ b/packages/Webkul/Velocity/src/Resources/views/shop/UI/particals.blade.php @@ -120,7 +120,17 @@ {!! view_render_event('bagisto.shop.layout.header.cart-item.after') !!} {!! view_render_event('bagisto.shop.layout.header.compare.before') !!} - + + compare_arrows
@@ -444,7 +454,17 @@
- + +
diff --git a/packages/Webkul/Velocity/src/Resources/views/shop/customers/account/compare/index.blade.php b/packages/Webkul/Velocity/src/Resources/views/shop/customers/account/compare/index.blade.php new file mode 100644 index 000000000..8c669d10e --- /dev/null +++ b/packages/Webkul/Velocity/src/Resources/views/shop/customers/account/compare/index.blade.php @@ -0,0 +1,19 @@ +@extends('shop::customers.account.index') + +@include('velocity::guest.compare.compare-products') + +@section('page_title') + {{ __('velocity::app.customer.compare.compare_similar_items') }} +@endsection + +@push('css') + +@endpush + +@section('page-detail-wrapper') + +@endsection diff --git a/packages/Webkul/Velocity/src/Resources/views/shop/customers/account/partials/sidemenu.blade.php b/packages/Webkul/Velocity/src/Resources/views/shop/customers/account/partials/sidemenu.blade.php index 406a831df..060bb8925 100644 --- a/packages/Webkul/Velocity/src/Resources/views/shop/customers/account/partials/sidemenu.blade.php +++ b/packages/Webkul/Velocity/src/Resources/views/shop/customers/account/partials/sidemenu.blade.php @@ -20,7 +20,7 @@ $subMenuCollection['wishlist'] = $menuItem['children']['wishlist']; $subMenuCollection['compare'] = [ 'key' => 'account.compare', - 'url' => route('velocity.product.compare'), + 'url' => route('velocity.customer.product.compare'), 'name' => 'velocity::app.customer.compare.text', ]; $subMenuCollection['reviews'] = $menuItem['children']['reviews']; diff --git a/packages/Webkul/Velocity/src/Resources/views/shop/guest/compare/compare-products.blade.php b/packages/Webkul/Velocity/src/Resources/views/shop/guest/compare/compare-products.blade.php new file mode 100644 index 000000000..c47e18fbb --- /dev/null +++ b/packages/Webkul/Velocity/src/Resources/views/shop/guest/compare/compare-products.blade.php @@ -0,0 +1,201 @@ +@php + $attributeRepository = app('\Webkul\Attribute\Repositories\AttributeRepository'); + $comparableAttributes = $attributeRepository->findByField('is_comparable', 1); +@endphp + +@push('scripts') + + + +@endpush \ No newline at end of file diff --git a/packages/Webkul/Velocity/src/Resources/views/shop/guest/compare/index.blade.php b/packages/Webkul/Velocity/src/Resources/views/shop/guest/compare/index.blade.php index 161078f64..78b233fee 100644 --- a/packages/Webkul/Velocity/src/Resources/views/shop/guest/compare/index.blade.php +++ b/packages/Webkul/Velocity/src/Resources/views/shop/guest/compare/index.blade.php @@ -1,211 +1,11 @@ @extends('shop::layouts.master') +@include('shop::guest.compare.compare-products') + @section('page_title') {{ __('velocity::app.customer.compare.compare_similar_items') }} @endsection @section('content-wrapper') - @php - $attributeRepository = app('\Webkul\Attribute\Repositories\AttributeRepository'); - $comparableAttributes = $attributeRepository->findByField('is_comparable', 1); - @endphp - -@endsection - -@push('scripts') - - - -@endpush \ No newline at end of file +@endsection \ No newline at end of file diff --git a/packages/Webkul/Velocity/src/Resources/views/shop/layouts/top-nav/login-section.blade.php b/packages/Webkul/Velocity/src/Resources/views/shop/layouts/top-nav/login-section.blade.php index 8523618dd..1125f0e95 100644 --- a/packages/Webkul/Velocity/src/Resources/views/shop/layouts/top-nav/login-section.blade.php +++ b/packages/Webkul/Velocity/src/Resources/views/shop/layouts/top-nav/login-section.blade.php @@ -87,7 +87,7 @@
  • - {{ __('velocity::app.customer.compare.text') }} + {{ __('velocity::app.customer.compare.text') }}