diff --git a/packages/Webkul/Shop/src/Resources/assets/sass/app.scss b/packages/Webkul/Shop/src/Resources/assets/sass/app.scss index 03189a737..b5e7d6337 100644 --- a/packages/Webkul/Shop/src/Resources/assets/sass/app.scss +++ b/packages/Webkul/Shop/src/Resources/assets/sass/app.scss @@ -17,7 +17,113 @@ display: block; } + // product card, requires no changes for responsiveness. + .product-grid-4 { + display: grid; + grid-template-columns: repeat(auto-fill, minmax(235px, 1fr)); + grid-auto-rows: auto; + grid-column-gap: 48px; + grid-row-gap: 15px; + } + + .product-grid-3 { + display: grid; + grid-template-columns: repeat(auto-fill, minmax(235px, 1fr)); + grid-gap: 27px; + grid-auto-rows: auto; + } + + @media only screen and (max-width: 854px) { + .product-grid-4 { + grid-template-columns: 29.5% 29.5% 29.5%; + grid-column-gap: 35px; + } + } + + @media only screen and (max-width: 653px) { + .product-grid-4 { + grid-template-columns: 48.5% 48.5%; + grid-column-gap: 17px; + } + } + + .product-card { + position: relative; + + .product-image { + max-height: 350px; + max-width: 280px; + margin-bottom: 10px; + background: #F2F2F2; + + img { + display: block; + width: 100%; + } + } + + .product-name { + margin-bottom: 14px; + width: 100%; + color: $font-color; + + a { + color: $font-color; + } + } + + .product-description { + display: none; + } + + .product-ratings { + width: 100%; + + .icon { + width: 16px; + height: 16px; + } + } + + .cart-wish-wrap { + display: inline-flex; + justify-content: flex-start; + align-items: center; + height: 40px; + + .addtocart { + margin-right: 10px; + text-transform: uppercase; + } + + .add-to-wishlist { + margin-top: 5px; + } + } + + .sticker { + border-radius: 100px; + position: absolute; + top: 10px; + left: 10px; + text-transform: uppercase; + padding: 4px 13px; + font-size: 14px; + color: #fff; + + &.sale { + background: #FF6472; + } + + &.new { + background: #2ED04C; + } + } + } + .product-list { + min-height: 200px; + .product-card { width: 100%; display: inline-block; @@ -43,6 +149,12 @@ margin-bottom: 0; } } + + &.empty { + h2 { + font-size: 20px; + } + } } section.featured-products { @@ -182,11 +294,8 @@ section.slider-block { //responsive css for slider @media only screen and (max-width: 770px) { - section.slider-block { - div.slider-content { - div.slider-control { display: flex; justify-content:space-between; @@ -997,6 +1106,7 @@ section.product-detail { width: 49%; background: black; white-space: nowrap; + text-transform: uppercase; } .buynow { @@ -1004,6 +1114,7 @@ section.product-detail { width: 49%; float:right; white-space: nowrap; + text-transform: uppercase; } } } diff --git a/packages/Webkul/Shop/src/Resources/assets/sass/components.scss b/packages/Webkul/Shop/src/Resources/assets/sass/components.scss index de24f9f32..b4c9bfa0a 100644 --- a/packages/Webkul/Shop/src/Resources/assets/sass/components.scss +++ b/packages/Webkul/Shop/src/Resources/assets/sass/components.scss @@ -1,86 +1,4 @@ -.product-card { - .product-image { - max-height: 350px; - max-width: 280px; - margin-bottom: 10px; - background: #F2F2F2; - - img { - display: block; - width: 100%; - } - } - - .product-name { - margin-bottom: 14px; - width: 100%; - color: $font-color; - - a { - color: $font-color; - } - } - - .product-description { - display: none; - } - - .product-ratings { - width: 100%; - - .icon { - width: 16px; - height: 16px; - } - } - - .cart-wish-wrap { - display: inline-flex; - justify-content: flex-start; - align-items: center; - height: 40px; - - .addtocart { - margin-right: 10px; - text-transform: uppercase; - } - - .add-to-wishlist { - margin-top: 5px; - } - } -} - -// product card, requires no changes for responsiveness. -.product-grid-4 { - display: grid; - grid-template-columns: repeat(auto-fill, minmax(235px, 1fr)); - grid-auto-rows: auto; - grid-column-gap: 48px; - grid-row-gap: 15px; -} - -.product-grid-3 { - display: grid; - grid-template-columns: repeat(auto-fill, minmax(235px, 1fr)); - grid-gap: 27px; - grid-auto-rows: auto; -} - -@media only screen and (max-width: 854px) { - .product-grid-4 { - grid-template-columns: 29.5% 29.5% 29.5%; - grid-column-gap: 35px; - } -} - -@media only screen and (max-width: 653px) { - .product-grid-4 { - grid-template-columns: 48.5% 48.5%; - grid-column-gap: 17px; - } -} @media only screen and (max-width: 425px) { .product-card { diff --git a/packages/Webkul/Shop/src/Resources/lang/en/app.php b/packages/Webkul/Shop/src/Resources/lang/en/app.php index 894a5ab36..eba7c0777 100644 --- a/packages/Webkul/Shop/src/Resources/lang/en/app.php +++ b/packages/Webkul/Shop/src/Resources/lang/en/app.php @@ -4,11 +4,7 @@ return [ 'home' => [ 'page-title' => 'Bagisto - Home', 'featured-products' => 'Featured Products', - 'new-products' => 'New Products', - - 'product-card' => [ - 'add-to-cart' => 'ADD TO CART' - ] + 'new-products' => 'New Products' ], 'footer' => [ @@ -198,7 +194,13 @@ return [ 'up-sell-title' => 'We found other products you might like!', 'reviews-title' => 'Ratings & Reviews', 'write-review-btn' => 'Write Review', - 'choose-option' => 'Choose an option' + 'choose-option' => 'Choose an option', + 'sale' => 'Sale', + 'new' => 'New', + 'empty' => 'No products available in this category.', + 'add-to-cart' => 'Add To Cart', + 'buy-now' => 'Buy Now', + 'whoops' => 'Whoops!' ], 'wishlist' => [ @@ -219,7 +221,8 @@ return [ ], 'title' => 'Shopping Cart', - 'empty' => 'Shopping Cart Is Empty', + 'empty' => 'Your shopping cart is empty.', + 'update-cart' => 'Update Cart', 'continue-shopping' => 'Continue Shopping', 'proceed-to-checkout' => 'Proceed To Checkout', 'remove' => 'Remove', diff --git a/packages/Webkul/Shop/src/Resources/views/checkout/cart/index.blade.php b/packages/Webkul/Shop/src/Resources/views/checkout/cart/index.blade.php index 53ac65869..f8b072085 100644 --- a/packages/Webkul/Shop/src/Resources/views/checkout/cart/index.blade.php +++ b/packages/Webkul/Shop/src/Resources/views/checkout/cart/index.blade.php @@ -22,7 +22,9 @@
+ @csrf + @foreach($cart->items as $item) @endforeach
+
{{ __('shop::app.checkout.cart.continue-shopping') }}
- + @if (!cart()->hasError()) @@ -96,9 +101,21 @@ @include('shop::checkout.total.summary', ['cart' => $cart])
+ @else +
- {{ __('shop::app.checkout.cart.empty') }} + {{ __('shop::app.checkout.cart.title') }} +
+ +
+

+ {{ __('shop::app.checkout.cart.empty') }} +

+ +

+ {{ __('shop::app.checkout.cart.continue-shopping') }} +

@endif diff --git a/packages/Webkul/Shop/src/Resources/views/layouts/master.blade.php b/packages/Webkul/Shop/src/Resources/views/layouts/master.blade.php index c158bcb57..1893f295e 100644 --- a/packages/Webkul/Shop/src/Resources/views/layouts/master.blade.php +++ b/packages/Webkul/Shop/src/Resources/views/layouts/master.blade.php @@ -1,5 +1,5 @@ - + @@ -13,12 +13,15 @@ @yield('head') + @section('seo') + + @show + @yield('css') -
diff --git a/packages/Webkul/Shop/src/Resources/views/products/add-to-cart.blade.php b/packages/Webkul/Shop/src/Resources/views/products/add-to-cart.blade.php index 67e0e56fa..569ae11f4 100644 --- a/packages/Webkul/Shop/src/Resources/views/products/add-to-cart.blade.php +++ b/packages/Webkul/Shop/src/Resources/views/products/add-to-cart.blade.php @@ -1 +1,3 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/packages/Webkul/Shop/src/Resources/views/products/buy-now.blade.php b/packages/Webkul/Shop/src/Resources/views/products/buy-now.blade.php index a46559ed5..115754deb 100644 --- a/packages/Webkul/Shop/src/Resources/views/products/buy-now.blade.php +++ b/packages/Webkul/Shop/src/Resources/views/products/buy-now.blade.php @@ -1 +1,3 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/packages/Webkul/Shop/src/Resources/views/products/index.blade.php b/packages/Webkul/Shop/src/Resources/views/products/index.blade.php index e9eb00dc5..fa3a1c718 100644 --- a/packages/Webkul/Shop/src/Resources/views/products/index.blade.php +++ b/packages/Webkul/Shop/src/Resources/views/products/index.blade.php @@ -1,40 +1,64 @@ @extends('shop::layouts.master') -@section('content-wrapper') +@section('page_title') + {{ $category->meta_title ?? $category->name }} +@stop + +@section('seo') + + +@stop + +@section('content-wrapper') + @inject ('productRepository', 'Webkul\Product\Repositories\ProductRepository') -@inject ('productRepository', 'Webkul\Product\Repositories\ProductRepository')
+ @include ('shop::products.list.layered-navigation')
- +
findAllByCategory($category->id); ?> + + @if ($products->count()) - @include ('shop::products.list.toolbar') + @include ('shop::products.list.toolbar') - @inject ('toolbarHelper', 'Webkul\Product\Helpers\Toolbar') + @inject ('toolbarHelper', 'Webkul\Product\Helpers\Toolbar') - @if ($toolbarHelper->getCurrentMode() == 'grid') -
- @foreach ($products as $product) - @include ('shop::products.list.card', ['product' => $product]) - @endforeach + @if ($toolbarHelper->getCurrentMode() == 'grid') +
+ @foreach ($products as $product) + @include ('shop::products.list.card', ['product' => $product]) + @endforeach +
+ @else +
+ @foreach ($products as $product) + @include ('shop::products.list.card', ['product' => $product]) + @endforeach +
+ @endif + +
+ {{ $products->appends(request()->input())->links() }}
+ @else -
- @foreach ($products as $product) - @include ('shop::products.list.card', ['product' => $product]) - @endforeach -
- @endif -
- {{ $products->appends(request()->input())->links() }} -
+
+

{{ __('shop::app.products.whoops') }}

+ +

+ {{ __('shop::app.products.empty') }} +

+
+ + @endif
@@ -48,42 +72,42 @@ var sortLimit = document.getElementsByClassName('reponsive-sorter-limiter')[0]; var layerFilter = document.getElementsByClassName('responsive-layred-filter')[0]; - if(sort && filter){ + if(sort && filter) { sort.addEventListener("click", sortFilter); filter.addEventListener("click", sortFilter); } - function sortFilter(){ + function sortFilter() { var className = document.getElementById(this.id).className; - if(className === 'icon sort-icon'){ + if(className === 'icon sort-icon') { sort.classList.remove("sort-icon"); sort.classList.add("icon-menu-close-adj"); filter.classList.remove("icon-menu-close-adj"); filter.classList.add("filter-icon"); - sortLimit.style.display ="flex"; - sortLimit.style.justifyContent="space-between"; + sortLimit.style.display = "flex"; + sortLimit.style.justifyContent = "space-between"; layerFilter.style.display ="none"; - }else if(className === 'icon filter-icon'){ + } else if(className === 'icon filter-icon') { filter.classList.remove("filter-icon"); filter.classList.add("icon-menu-close-adj"); sort.classList.remove("icon-menu-close-adj"); sort.classList.add("sort-icon"); - layerFilter.style.display ="block"; - sortLimit.style.display ="none"; - }else{ + layerFilter.style.display = "block"; + sortLimit.style.display = "none"; + } else { sort.classList.remove("icon-menu-close-adj"); sort.classList.add("sort-icon"); filter.classList.remove("icon-menu-close-adj"); filter.classList.add("filter-icon"); - sortLimit.style.display ="none"; - layerFilter.style.display ="none"; + sortLimit.style.display = "none"; + layerFilter.style.display = "none"; } } }); diff --git a/packages/Webkul/Shop/src/Resources/views/products/list/card.blade.php b/packages/Webkul/Shop/src/Resources/views/products/list/card.blade.php index 7ab65e6eb..e3ed3934e 100644 --- a/packages/Webkul/Shop/src/Resources/views/products/list/card.blade.php +++ b/packages/Webkul/Shop/src/Resources/views/products/list/card.blade.php @@ -4,6 +4,12 @@ getProductBaseImage($product); ?> + @if($product->new) +
+ {{ __('shop::app.products.new') }} +
+ @endif +
@@ -32,7 +38,7 @@ @include ('shop::products.add-to', ['product' => $product]) @else @if($product->type == "configurable") - {{ __('shop::app.home.product-card.add-to-cart') }} + {{ __('shop::app.products.add-to-cart') }} @include('shop::products.wishlist') @else
@@ -41,7 +47,7 @@ - + @include('shop::products.wishlist')
diff --git a/packages/Webkul/Shop/src/Resources/views/products/price.blade.php b/packages/Webkul/Shop/src/Resources/views/products/price.blade.php index 9a17ee063..610cc632c 100644 --- a/packages/Webkul/Shop/src/Resources/views/products/price.blade.php +++ b/packages/Webkul/Shop/src/Resources/views/products/price.blade.php @@ -12,6 +12,10 @@ @if ($priceHelper->haveSpecialPrice($product)) +
+ {{ __('shop::app.products.sale') }} +
+ {{ core()->currency($product->price) }} {{ core()->currency($priceHelper->getSpecialPrice($product)) }} diff --git a/packages/Webkul/Shop/src/Resources/views/products/view.blade.php b/packages/Webkul/Shop/src/Resources/views/products/view.blade.php index 913ab6911..8cdf3c963 100644 --- a/packages/Webkul/Shop/src/Resources/views/products/view.blade.php +++ b/packages/Webkul/Shop/src/Resources/views/products/view.blade.php @@ -1,14 +1,20 @@ @extends('shop::layouts.master') @section('page_title') - {{ $product->name }} + {{ $product->meta_title ?? $product->name }} +@stop + +@section('seo') + + @stop @section('content-wrapper')
-
+ +
@csrf() @@ -23,13 +29,12 @@ {{ $product->name }}
- {{-- @include ('shop::products.review', ['product' => $product]) --}} + @include ('shop::products.review', ['product' => $product]) @include ('shop::products.price', ['product' => $product]) @include ('shop::products.view.stock') -
{{ $product->short_description }}
diff --git a/public/themes/default/assets/css/shop.css b/public/themes/default/assets/css/shop.css index 607334527..b181cfa3e 100644 --- a/public/themes/default/assets/css/shop.css +++ b/public/themes/default/assets/css/shop.css @@ -120,92 +120,6 @@ height: 18px; } -.product-card .product-image { - max-height: 350px; - max-width: 280px; - margin-bottom: 10px; - background: #F2F2F2; -} - -.product-card .product-image img { - display: block; - width: 100%; -} - -.product-card .product-name { - margin-bottom: 14px; - width: 100%; - color: #242424; -} - -.product-card .product-name a { - color: #242424; -} - -.product-card .product-description { - display: none; -} - -.product-card .product-ratings { - width: 100%; -} - -.product-card .product-ratings .icon { - width: 16px; - height: 16px; -} - -.product-card .cart-wish-wrap { - display: -webkit-inline-box; - display: -ms-inline-flexbox; - display: inline-flex; - -webkit-box-pack: start; - -ms-flex-pack: start; - justify-content: flex-start; - -webkit-box-align: center; - -ms-flex-align: center; - align-items: center; - height: 40px; -} - -.product-card .cart-wish-wrap .addtocart { - margin-right: 10px; - text-transform: uppercase; -} - -.product-card .cart-wish-wrap .add-to-wishlist { - margin-top: 5px; -} - -.product-grid-4 { - display: grid; - grid-template-columns: repeat(auto-fill, minmax(235px, 1fr)); - grid-auto-rows: auto; - grid-column-gap: 48px; - grid-row-gap: 15px; -} - -.product-grid-3 { - display: grid; - grid-template-columns: repeat(auto-fill, minmax(235px, 1fr)); - grid-gap: 27px; - grid-auto-rows: auto; -} - -@media only screen and (max-width: 854px) { - .product-grid-4 { - grid-template-columns: 29.5% 29.5% 29.5%; - grid-column-gap: 35px; - } -} - -@media only screen and (max-width: 653px) { - .product-grid-4 { - grid-template-columns: 48.5% 48.5%; - grid-column-gap: 17px; - } -} - @media only screen and (max-width: 425px) { .product-card { font-size: 90%; @@ -616,6 +530,119 @@ body { display: block; } +.main-container-wrapper .product-grid-4 { + display: grid; + grid-template-columns: repeat(auto-fill, minmax(235px, 1fr)); + grid-auto-rows: auto; + grid-column-gap: 48px; + grid-row-gap: 15px; +} + +.main-container-wrapper .product-grid-3 { + display: grid; + grid-template-columns: repeat(auto-fill, minmax(235px, 1fr)); + grid-gap: 27px; + grid-auto-rows: auto; +} + +@media only screen and (max-width: 854px) { + .main-container-wrapper .product-grid-4 { + grid-template-columns: 29.5% 29.5% 29.5%; + grid-column-gap: 35px; + } +} + +@media only screen and (max-width: 653px) { + .main-container-wrapper .product-grid-4 { + grid-template-columns: 48.5% 48.5%; + grid-column-gap: 17px; + } +} + +.main-container-wrapper .product-card { + position: relative; +} + +.main-container-wrapper .product-card .product-image { + max-height: 350px; + max-width: 280px; + margin-bottom: 10px; + background: #F2F2F2; +} + +.main-container-wrapper .product-card .product-image img { + display: block; + width: 100%; +} + +.main-container-wrapper .product-card .product-name { + margin-bottom: 14px; + width: 100%; + color: #242424; +} + +.main-container-wrapper .product-card .product-name a { + color: #242424; +} + +.main-container-wrapper .product-card .product-description { + display: none; +} + +.main-container-wrapper .product-card .product-ratings { + width: 100%; +} + +.main-container-wrapper .product-card .product-ratings .icon { + width: 16px; + height: 16px; +} + +.main-container-wrapper .product-card .cart-wish-wrap { + display: -webkit-inline-box; + display: -ms-inline-flexbox; + display: inline-flex; + -webkit-box-pack: start; + -ms-flex-pack: start; + justify-content: flex-start; + -webkit-box-align: center; + -ms-flex-align: center; + align-items: center; + height: 40px; +} + +.main-container-wrapper .product-card .cart-wish-wrap .addtocart { + margin-right: 10px; + text-transform: uppercase; +} + +.main-container-wrapper .product-card .cart-wish-wrap .add-to-wishlist { + margin-top: 5px; +} + +.main-container-wrapper .product-card .sticker { + border-radius: 100px; + position: absolute; + top: 10px; + left: 10px; + text-transform: uppercase; + padding: 4px 13px; + font-size: 14px; + color: #fff; +} + +.main-container-wrapper .product-card .sticker.sale { + background: #FF6472; +} + +.main-container-wrapper .product-card .sticker.new { + background: #2ED04C; +} + +.main-container-wrapper .product-list { + min-height: 200px; +} + .main-container-wrapper .product-list .product-card { width: 100%; display: inline-block; @@ -642,6 +669,10 @@ body { margin-bottom: 0; } +.main-container-wrapper .product-list.empty h2 { + font-size: 20px; +} + .main-container-wrapper section.featured-products { display: block; margin-bottom: 5%; @@ -1685,6 +1716,7 @@ section.product-detail div.layouter form div.product-image-group .add-to-buttons width: 49%; background: black; white-space: nowrap; + text-transform: uppercase; } section.product-detail div.layouter form div.product-image-group .add-to-buttons .buynow { @@ -1692,6 +1724,7 @@ section.product-detail div.layouter form div.product-image-group .add-to-buttons width: 49%; float: right; white-space: nowrap; + text-transform: uppercase; } section.product-detail div.layouter form .details {