diff --git a/packages/Webkul/Cart/src/Cart.php b/packages/Webkul/Cart/src/Cart.php index 322c571ea..9145f8c18 100644 --- a/packages/Webkul/Cart/src/Cart.php +++ b/packages/Webkul/Cart/src/Cart.php @@ -292,7 +292,8 @@ class Cart { * and sync the cookies products * with the existing data of cart * in the cart tables; - */ + */ + public function mergeCart() { if(Cookie::has('cart_session_id')) { diff --git a/packages/Webkul/Customer/src/Http/Controllers/SessionController.php b/packages/Webkul/Customer/src/Http/Controllers/SessionController.php index d3017ed64..1ad764b39 100644 --- a/packages/Webkul/Customer/src/Http/Controllers/SessionController.php +++ b/packages/Webkul/Customer/src/Http/Controllers/SessionController.php @@ -71,6 +71,9 @@ class SessionController extends Controller public function destroy($id) { auth()->guard('customer')->logout(); + + Event::fire('customer.after.logout', 1); + return redirect()->route($this->_config['redirect']); } } \ No newline at end of file diff --git a/packages/Webkul/Customer/src/Http/Listeners/CustomerEventsHandler.php b/packages/Webkul/Customer/src/Http/Listeners/CustomerEventsHandler.php index c14b422d2..bb6bba8ec 100644 --- a/packages/Webkul/Customer/src/Http/Listeners/CustomerEventsHandler.php +++ b/packages/Webkul/Customer/src/Http/Listeners/CustomerEventsHandler.php @@ -30,6 +30,10 @@ class CustomerEventsHandler { Cart::mergeCart(); } + //use this when there is very uttermost need to use it. + public function onCustomerLogout($event) { + } + /** * Register the listeners for the subscriber. * @@ -39,5 +43,7 @@ class CustomerEventsHandler { public function subscribe($events) { $events->listen('customer.after.login', 'Webkul\Customer\Http\Listeners\CustomerEventsHandler@onCustomerLogin'); + + $events->listen('customer.after.logout', 'Webkul\Customer\Http\Listeners\CustomerEventsHandler@onCustomerLogout'); } } \ No newline at end of file diff --git a/packages/Webkul/Shop/src/Http/routes.php b/packages/Webkul/Shop/src/Http/routes.php index f37645460..2f4382ce2 100644 --- a/packages/Webkul/Shop/src/Http/routes.php +++ b/packages/Webkul/Shop/src/Http/routes.php @@ -23,9 +23,9 @@ Route::group(['middleware' => ['web']], function () { // //Routes for product cart - Route::post('products/guest/cart/add/{id}', 'Webkul\Cart\Http\Controllers\CartController@add')->name('cart.add'); + Route::post('products/add/{id}', 'Webkul\Cart\Http\Controllers\CartController@add')->name('cart.add'); - Route::post('product/guest/cart/remove/{id}', 'Webkul\Cart\Http\Controllers\CartController@remove')->name('cart.remove'); + Route::post('product/remove/{id}', 'Webkul\Cart\Http\Controllers\CartController@remove')->name('cart.remove'); // Route::post('product/customer/cart/add/{id}', 'Webkul\Cart\Http\Controllers\CartController@add')->name('cart.customer.add'); diff --git a/packages/Webkul/Shop/src/Resources/assets/sass/app.scss b/packages/Webkul/Shop/src/Resources/assets/sass/app.scss index 575420e13..2fbcbcb14 100644 --- a/packages/Webkul/Shop/src/Resources/assets/sass/app.scss +++ b/packages/Webkul/Shop/src/Resources/assets/sass/app.scss @@ -1313,347 +1313,337 @@ section.product-detail { } div.layouter { + display: block; margin-top: 20px; margin-bottom: 20px; - display: inline-block; - width: 100%; - .mixed-group { + form { + display: flex; + flex-direction: row; + justify-content: space-between; + width: 100%; - .single-image { - padding: 2px; + div.product-image-group { + margin-right: 36px; - img { - height: 280px; - width: 280px; + div { + display: flex; + flex-direction: row; + + .thumb-list { + display: flex; + flex-direction: column; + margin-right: 4px; + height: 480px; + width: 120px; + overflow: hidden; + position: relative; + justify-content: flex-start; + + .thumb-frame { + border: 2px solid transparent; + background: #F2F2F2; + max-width: 120px; + width: auto; + height: 120px; + + &.active { + border-color: #979797; + } + + img { + width: 100%; + height: 100%; + } + } + + .gallery-control { + width: 100%; + position: absolute; + text-align: center; + cursor: pointer; + z-index: 1; + + .overlay { + opacity: 0.3; + background: #000000; + width: 100%; + height: 18px; + position: absolute; + left: 0; + z-index: -1; + } + + .icon { + z-index: 2; + } + + &.top { + top: 0; + } + + &.bottom { + bottom: 0; + } + } + } + + .product-hero-image { + display: block; + position: relative; + background: #F2F2F2; + width: 480px; + max-height: 480px; + + .wishlist { + position: absolute; + top: 10px; + right: 12px; + } + + .share { + position: absolute; + top: 10px; + right: 45px; + } + } + } + + .cart-fav-seg { + display: block; + float: right; } } .details { - - .product-name { - margin-top: 20px; - font-size: 24px; - margin-bottom: 20px; - } + width: 50%; .product-price { margin-bottom: 14px; } - } - } - .rating-reviews { - margin-top: 0px; - width: 50%; - margin-left: 20px; - - .title-inline { - display: inline-flex; - align-items: center; - justify-content: space-between; - margin-bottom: 20px; - width: 100%; - - button { - float: right; - border-radius: 0px !important; - } - } - - .overall { - display: flex; - flex-direction: row; - align-items: center; - justify-content: space-between; - height: 150px; - - .left-side { + .product-ratings { margin-bottom: 20px; - .number{ - font-size: 34px; - } - } - - .right-side { - display: block; - - .rater { - display: inline-flex; - align-items: center; - - .star { - width: 50px; - height: 20px; - padding: 1px; - margin-right: 8px; - } - - .line-bar { - height: 4px; - width: 158px; - margin-right: 12px; - background: $bar-color; - - .line-value { - background-color: $dark-blue-shade; - } - } - } - } - } - - .reviews { - margin-top: 34px; - margin-bottom: 90px; - - .review { - margin-bottom: 25px; - - .title { - margin-bottom: 5px; - } - - .stars { - margin-bottom: 15px; - } - .message { - margin-bottom: 10px; - } - } - .view-all { - margin-top:15px; - color: $logo-color; - margin-bottom:15px; - } - } - } - - div.product-image-group { - width: 43%; - float: left; - min-height: 1px; - position: relative; - - .thumb-list { - display: flex; - flex-direction: column; - margin-right: 4px; - height: 480px; - overflow: hidden; - position: relative; - float: left; - - .thumb-frame { - border: 2px solid transparent; - background: #F2F2F2; - width: 120px; - height: 120px; - - &.active { - border-color: #979797; - } - - img { - width: 100%; - height: 100%; - } - } - - .gallery-control { - width: 100%; - position: absolute; - text-align: center; - cursor: pointer; - z-index: 1; - - .overlay { - opacity: 0.3; - background: #000000; - width: 100%; - height: 18px; - position: absolute; - left: 0; - z-index: -1; - } - .icon { - z-index: 2; + width: 16px; + height: 16px; } - &.top { - top: 0; - } - - &.bottom { - bottom: 0; + .total-reviews { + display: inline-block; + margin-left: 15px; } } - } - .product-hero-image { - display: block; - position: relative; - background: #F2F2F2; - width: 480px; - max-height: 480px; - float: left; - - .wishlist { - position: absolute; - top: 10px; - right: 12px; - } - - .share { - position: absolute; - top: 10px; - right: 45px; - } - } - } - - .details { - width: 57%; - float: left; - - .product-price { - margin-bottom: 14px; - } - - .product-ratings { - margin-bottom: 20px; - - .icon { - width: 16px; - height: 16px; - } - - .total-reviews { - display: inline-block; - margin-left: 15px; - } - } - - .product-heading { - font-size: 24px; - color: $product-font-color; - margin-bottom: 15px; - } - - .product-price { - margin-bottom: 15px; - font-size: 24px; - - .special-price { + .product-heading { font-size: 24px; + color: $product-font-color; + margin-bottom: 15px; } - } - .stock-status { - margin-bottom: 15px; - } + .product-price { + margin-bottom: 15px; + font-size: 24px; - .description { - margin-bottom: 15px; - padding-bottom: 15px; - border-bottom: solid 1px rgba(162, 162, 162, 0.2) - } - - .full-specifications { - td { - padding: 10px 0; - color: #5E5E5E; - - &:first-child { - padding-right: 40px; + .special-price { + font-size: 24px; } } + + .stock-status { + margin-bottom: 15px; + } + + .description { + margin-bottom: 15px; + padding-bottom: 15px; + border-bottom: solid 1px rgba(162, 162, 162, 0.2) + } + + .full-specifications { + td { + padding: 10px 0; + color: #5E5E5E; + + &:first-child { + padding-right: 40px; + } + } + } + + .accordian .accordian-header { + font-size: 16px; + padding-left: 0; + font-weight: 600; + } + + .attributes { + display: block; + width: 100%; + border-bottom: solid 1px rgba(162, 162, 162, 0.2); + } + + .full-description { + font-size: 16px; + } } - .accordian .accordian-header { - font-size: 16px; - padding-left: 0; - font-weight: 600; - } + // .rating-reviews { + // margin-top: 0px; + // width: 50%; + // margin-left: 20px; + + // .title-inline { + // display: inline-flex; + // align-items: center; + // justify-content: space-between; + // margin-bottom: 20px; + // width: 100%; + + // button { + // float: right; + // border-radius: 0px !important; + // } + // } + + // .overall { + // display: flex; + // flex-direction: row; + // align-items: center; + // justify-content: space-between; + // height: 150px; + + // .left-side { + // margin-bottom: 20px; + + // .number{ + // font-size: 34px; + // } + // } + + // .right-side { + // display: block; + + // .rater { + // display: inline-flex; + // align-items: center; + + // .star { + // width: 50px; + // height: 20px; + // padding: 1px; + // margin-right: 8px; + // } + + // .line-bar { + // height: 4px; + // width: 158px; + // margin-right: 12px; + // background: $bar-color; + + // .line-value { + // background-color: $dark-blue-shade; + // } + // } + // } + // } + // } + + // .reviews { + // margin-top: 34px; + // margin-bottom: 90px; + + // .review { + // margin-bottom: 25px; + + // .title { + // margin-bottom: 5px; + // } + + // .stars { + // margin-bottom: 15px; + // } + // .message { + // margin-bottom: 10px; + // } + // } + // .view-all { + // margin-top:15px; + // color: $logo-color; + // margin-bottom:15px; + // } + // } + // } - .attributes { - display: block; - width: 100%; - border-bottom: solid 1px rgba(162, 162, 162, 0.2); - } - .full-description { - font-size: 16px; - } } } } -.rating-reviews { +// .rating-reviews { - .rating-header { - font-weight: 600; - padding: 20px 0; - } +// .rating-header { +// font-weight: 600; +// padding: 20px 0; +// } - .stars { - .icon { - width: 16px; - height: 16px; - } - } +// .stars { +// .icon { +// width: 16px; +// height: 16px; +// } +// } - .overall { - display: flex; - flex-direction: row; - align-items: center; - justify-content: space-between; +// .overall { +// display: flex; +// flex-direction: row; +// align-items: center; +// justify-content: space-between; - .review-info { - .number { - font-size: 34px; - } +// .review-info { +// .number { +// font-size: 34px; +// } - .total-reviews { - margin-top: 10px; - } - } - } +// .total-reviews { +// margin-top: 10px; +// } +// } +// } - .reviews { - margin-top: 40px; - margin-bottom: 40px; +// .reviews { +// margin-top: 40px; +// margin-bottom: 40px; - .review { - margin-bottom: 25px; +// .review { +// margin-bottom: 25px; - .title { - margin-bottom: 5px; - } +// .title { +// margin-bottom: 5px; +// } - .stars { - margin-bottom: 15px; - display: inline-block; - } +// .stars { +// margin-bottom: 15px; +// display: inline-block; +// } - .message { - margin-bottom: 10px; - } +// .message { +// margin-bottom: 10px; +// } - .reviewer-details { - color: #5E5E5E; - } - } +// .reviewer-details { +// color: #5E5E5E; +// } +// } - .view-all { - margin-top:15px; - color: $logo-color; - margin-bottom:15px; - } - } -} +// .view-all { +// margin-top:15px; +// color: $logo-color; +// margin-bottom:15px; +// } +// } +// } /* cart pages and elements css begins here */ section.cart { diff --git a/packages/Webkul/Shop/src/Resources/views/products/view/gallery.blade.php b/packages/Webkul/Shop/src/Resources/views/products/view/gallery.blade.php index acd1e6dbc..54c605929 100644 --- a/packages/Webkul/Shop/src/Resources/views/products/view/gallery.blade.php +++ b/packages/Webkul/Shop/src/Resources/views/products/view/gallery.blade.php @@ -5,9 +5,7 @@