diff --git a/packages/Webkul/Shop/src/Config/system.php b/packages/Webkul/Shop/src/Config/system.php new file mode 100644 index 000000000..b2d435f39 --- /dev/null +++ b/packages/Webkul/Shop/src/Config/system.php @@ -0,0 +1,20 @@ + 'general.content.shop', + 'name' => 'shop::app.products.settings', + 'sort' => 1, + 'fields' => [ + [ + 'name' => 'compare_option', + 'title' => 'shop::app.products.compare_options', + 'type' => 'boolean', + 'locale_based' => true, + 'channel_based' => true, + ], + ], + ] +]; + +?> \ No newline at end of file diff --git a/packages/Webkul/Shop/src/Providers/ShopServiceProvider.php b/packages/Webkul/Shop/src/Providers/ShopServiceProvider.php index 900537edf..ff4f4a67e 100755 --- a/packages/Webkul/Shop/src/Providers/ShopServiceProvider.php +++ b/packages/Webkul/Shop/src/Providers/ShopServiceProvider.php @@ -81,5 +81,9 @@ class ShopServiceProvider extends ServiceProvider $this->mergeConfigFrom( dirname(__DIR__) . '/Config/menu.php', 'menu.customer' ); + + $this->mergeConfigFrom( + dirname(__DIR__) . '/Config/system.php', 'core' + ); } } \ No newline at end of file diff --git a/packages/Webkul/Shop/src/Resources/lang/en/app.php b/packages/Webkul/Shop/src/Resources/lang/en/app.php index 6a7438308..aad2e995a 100755 --- a/packages/Webkul/Shop/src/Resources/lang/en/app.php +++ b/packages/Webkul/Shop/src/Resources/lang/en/app.php @@ -417,7 +417,9 @@ return [ 'your-customization' => 'Your Customization', 'total-amount' => 'Total Amount', 'none' => 'None', - 'available-for-order' => 'Available for Order' + 'available-for-order' => 'Available for Order', + 'settings' => 'Settings', + 'compare_options' => 'Compare Options', ], // 'reviews' => [ diff --git a/packages/Webkul/Velocity/src/Helpers/Helper.php b/packages/Webkul/Velocity/src/Helpers/Helper.php index 92d5b86ff..15aee35b6 100644 --- a/packages/Webkul/Velocity/src/Helpers/Helper.php +++ b/packages/Webkul/Velocity/src/Helpers/Helper.php @@ -335,13 +335,18 @@ class Helper extends Review 'priceHTML' => view('shop::products.price', ['product' => $product])->render(), 'defaultAddToCart' => view('shop::products.add-buttons', ['product' => $product])->render(), 'addToCartHtml' => view('shop::products.add-to-cart', [ - 'showCompare' => true, 'product' => $product, 'addWishlistClass' => ! (isset($list) && $list) ? '' : '', + + 'showCompare' => core()->getConfigData('general.content.shop.compare_option') == "1" + ? true : false, + 'btnText' => (isset($metaInformation['btnText']) && $metaInformation['btnText']) ? $metaInformation['btnText'] : null, + 'moveToCart' => (isset($metaInformation['moveToCart']) && $metaInformation['moveToCart']) ? $metaInformation['moveToCart'] : null, + 'addToCartBtnClass' => ! (isset($list) && $list) ? 'small-padding' : '', ])->render(), ]; diff --git a/packages/Webkul/Velocity/src/Resources/assets/sass/components/app.scss b/packages/Webkul/Velocity/src/Resources/assets/sass/components/app.scss index 0e42fe43b..00c0051ba 100755 --- a/packages/Webkul/Velocity/src/Resources/assets/sass/components/app.scss +++ b/packages/Webkul/Velocity/src/Resources/assets/sass/components/app.scss @@ -2552,6 +2552,7 @@ .term-list a { padding: 5px 8px; + margin-top: 10px; background: #fff; margin-right: 10px; } diff --git a/packages/Webkul/Velocity/src/Resources/assets/sass/components/media.scss b/packages/Webkul/Velocity/src/Resources/assets/sass/components/media.scss index 80abc64a0..b2e4cea29 100644 --- a/packages/Webkul/Velocity/src/Resources/assets/sass/components/media.scss +++ b/packages/Webkul/Velocity/src/Resources/assets/sass/components/media.scss @@ -939,4 +939,17 @@ .wishlist-icon { margin-left: 0; } + + .image-search-result { + .searched-terms { + margin-left: 0; + margin-top: 20px; + + .term-list { + a { + line-height: 40px; + } + } + } + } } \ No newline at end of file diff --git a/packages/Webkul/Velocity/src/Resources/views/shop/UI/header.blade.php b/packages/Webkul/Velocity/src/Resources/views/shop/UI/header.blade.php index cb33d02a1..b2007ec52 100644 --- a/packages/Webkul/Velocity/src/Resources/views/shop/UI/header.blade.php +++ b/packages/Webkul/Velocity/src/Resources/views/shop/UI/header.blade.php @@ -302,23 +302,29 @@ + @php + $showCompare = core()->getConfigData('general.content.shop.compare_option') == "1" ? true : false + @endphp +
- + @guest('customer') + href="{{ route('velocity.product.compare') }}" + @endguest + > -
- -
- compare_arrows -
+
+ +
+ compare_arrows + + @endif
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 5dc01b03b..0b792ea4e 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 @@ -129,24 +129,30 @@ @include('shop::checkout.cart.mini-cart') {!! view_render_event('bagisto.shop.layout.header.cart-item.after') !!} + @php + $showCompare = core()->getConfigData('general.content.shop.compare_option') == "1" ? true : false + @endphp + {!! view_render_event('bagisto.shop.layout.header.compare.before') !!} - + @guest('customer') + href="{{ route('velocity.product.compare') }}" + @endguest + > - compare_arrows -
- -
- {{ __('velocity::app.customer.compare.text') }} -
+ compare_arrows +
+ +
+ {{ __('velocity::app.customer.compare.text') }} + + @endif {!! view_render_event('bagisto.shop.layout.header.compare.after') !!} {!! view_render_event('bagisto.shop.layout.header.wishlist.before') !!} diff --git a/packages/Webkul/Velocity/src/Resources/views/shop/products/list/card.blade.php b/packages/Webkul/Velocity/src/Resources/views/shop/products/list/card.blade.php index 1fd90bf66..637c9a938 100644 --- a/packages/Webkul/Velocity/src/Resources/views/shop/products/list/card.blade.php +++ b/packages/Webkul/Velocity/src/Resources/views/shop/products/list/card.blade.php @@ -1,7 +1,6 @@ -@inject ('productImageHelper', 'Webkul\Product\Helpers\ProductImage') @inject ('reviewHelper', 'Webkul\Product\Helpers\Review') @inject ('toolbarHelper', 'Webkul\Product\Helpers\Toolbar') -{{-- @include('shop::UI.product-quick-view') --}} +@inject ('productImageHelper', 'Webkul\Product\Helpers\ProductImage') @push('css') +@endpush + @section('content-wrapper') -
-
+
+
@if (request('image-search')) @endif @if ($results && $results->count()) -
+
@include ('shop::products.list.toolbar')
@endif