From de842320f0d54d98ebd8380df1cfc163264554fc Mon Sep 17 00:00:00 2001 From: jitendra Date: Wed, 26 Sep 2018 15:49:18 +0530 Subject: [PATCH 1/5] Checkout review page added --- packages/Webkul/Cart/src/Cart.php | 74 ++- .../2018_09_05_150444_create_cart_table.php | 13 +- ...8_09_05_150915_create_cart_items_table.php | 4 +- ...93508_create_cart_shipping_rates_table.php | 3 +- .../Http/Controllers/CheckoutController.php | 18 + packages/Webkul/Cart/src/Models/Cart.php | 17 + .../Webkul/Cart/src/Models/CartPayment.php | 10 + packages/Webkul/Core/src/Core.php | 22 + .../Webkul/Shipping/src/Carriers/FlatRate.php | 3 +- .../Webkul/Shipping/src/Carriers/Free.php | 1 + .../Shop/src/Resources/assets/sass/app.scss | 482 +----------------- .../Webkul/Shop/src/Resources/lang/en/app.php | 7 + .../views/checkout/onepage.blade.php | 125 ++++- .../views/checkout/onepage/payment.blade.php | 2 +- .../views/checkout/onepage/review.blade.php | 193 +++++++ .../views/checkout/onepage/shipping.blade.php | 4 +- .../views/checkout/onepage/summary.blade.php | 37 -- .../views/checkout/total/summary.blade.php | 31 ++ public/mix-manifest.json | 3 +- public/themes/default/assets/css/shop.css | 426 +--------------- public/themes/default/assets/js/shop.js | 4 - .../themes/default/assets/mix-manifest.json | 2 +- 22 files changed, 520 insertions(+), 961 deletions(-) create mode 100644 packages/Webkul/Cart/src/Models/CartPayment.php delete mode 100644 packages/Webkul/Shop/src/Resources/views/checkout/onepage/summary.blade.php create mode 100644 packages/Webkul/Shop/src/Resources/views/checkout/total/summary.blade.php diff --git a/packages/Webkul/Cart/src/Cart.php b/packages/Webkul/Cart/src/Cart.php index aef382642..934b5906b 100644 --- a/packages/Webkul/Cart/src/Cart.php +++ b/packages/Webkul/Cart/src/Cart.php @@ -8,6 +8,7 @@ use Webkul\Cart\Repositories\CartItemRepository; use Webkul\Cart\Repositories\CartAddressRepository; use Webkul\Customer\Repositories\CustomerRepository; use Webkul\Product\Repositories\ProductRepository; +use Webkul\Cart\Models\CartPayment; use Cookie; /** @@ -264,8 +265,8 @@ class Cart { { if(!$cart = session()->get('cart')) return false; - - return $cart; + + return $this->cart->find($cart->id); } /** @@ -322,12 +323,71 @@ class Cart { if(!$cart = $this->getCart()) return false; - foreach($cart->shipping_rates as $rate) { - if($rate->method != $shippingMethodCode) { - $rate->delete(); - } - } + $cart->shipping_method = $shippingMethodCode; + $cart->save(); + + // foreach($cart->shipping_rates as $rate) { + // if($rate->method != $shippingMethodCode) { + // $rate->delete(); + // } + // } return true; } + + /** + * Save payment method for cart + * + * @param string $payment + * @return Mixed + */ + public function savePaymentMethod($payment) + { + if(!$cart = $this->getCart()) + return false; + + if($cartPayment = $cart->payment) + $cartPayment->delete(); + + $cartPayment = new CartPayment; + + $cartPayment->method = $payment['method']; + $cartPayment->cart_id = $cart->id; + $cartPayment->save(); + + return $cartPayment; + } + + /** + * Updates cart totals + * + * @return void + */ + public function collectTotals() + { + if(!$cart = $this->getCart()) + return false; + + $cart->grand_total = 0; + $cart->base_grand_total = 0; + $cart->sub_total = 0; + $cart->base_sub_total = 0; + $cart->sub_total_with_discount = 0; + $cart->base_sub_total_with_discount = 0; + + foreach ($cart->items()->get() as $item) { + $cart->grand_total = (float) $cart->grand_total + $item->price; + $cart->base_grand_total = (float) $cart->base_grand_total + $item->base_price; + + $cart->sub_total = (float) $cart->sub_total + $item->price; + $cart->base_sub_total = (float) $cart->base_sub_total + $item->base_price; + } + + if($shipping = $cart->selected_shipping_rate) { + $cart->grand_total = (float) $cart->grand_total + $shipping->price; + $cart->base_grand_total = (float) $cart->base_grand_total + $shipping->base_price; + } + + $cart->save(); + } } \ No newline at end of file diff --git a/packages/Webkul/Cart/src/Database/Migrations/2018_09_05_150444_create_cart_table.php b/packages/Webkul/Cart/src/Database/Migrations/2018_09_05_150444_create_cart_table.php index 9809f692d..3944fc3df 100644 --- a/packages/Webkul/Cart/src/Database/Migrations/2018_09_05_150444_create_cart_table.php +++ b/packages/Webkul/Cart/src/Database/Migrations/2018_09_05_150444_create_cart_table.php @@ -20,6 +20,7 @@ class CreateCartTable extends Migration $table->string('session_id')->nullable(); $table->integer('channel_id')->unsigned(); $table->foreign('channel_id')->references('id')->on('channels'); + $table->string('shipping_method')->nullable(); $table->string('coupon_code')->nullable(); $table->boolean('is_gift')->nullable(); $table->integer('items_count')->nullable(); @@ -28,12 +29,12 @@ class CreateCartTable extends Migration $table->string('base_currency_code')->nullable(); $table->string('store_currency_code')->nullable(); $table->string('quote_currency_code')->nullable(); - $table->decimal('grand_total', 12, 4)->nullable(); - $table->decimal('base_grand_total', 12, 4)->nullable(); - $table->decimal('sub_total', 12, 4)->nullable(); - $table->decimal('base_sub_total', 12, 4)->nullable(); - $table->decimal('sub_total_with_discount', 12, 4)->nullable(); - $table->decimal('base_sub_total_with_discount', 12, 4)->nullable(); + $table->decimal('grand_total', 12, 4)->default(0)->nullable(); + $table->decimal('base_grand_total', 12, 4)->default(0)->nullable(); + $table->decimal('sub_total', 12, 4)->default(0)->nullable(); + $table->decimal('base_sub_total', 12, 4)->default(0)->nullable(); + $table->decimal('sub_total_with_discount', 12, 4)->default(0)->nullable(); + $table->decimal('base_sub_total_with_discount', 12, 4)->default(0)->nullable(); $table->string('checkout_method')->nullable(); $table->boolean('is_guest')->nullable(); $table->string('customer_full_name')->nullable(); diff --git a/packages/Webkul/Cart/src/Database/Migrations/2018_09_05_150915_create_cart_items_table.php b/packages/Webkul/Cart/src/Database/Migrations/2018_09_05_150915_create_cart_items_table.php index 5fe74cc90..a9d40a150 100644 --- a/packages/Webkul/Cart/src/Database/Migrations/2018_09_05_150915_create_cart_items_table.php +++ b/packages/Webkul/Cart/src/Database/Migrations/2018_09_05_150915_create_cart_items_table.php @@ -24,8 +24,8 @@ class CreateCartItemsTable extends Migration $table->foreign('tax_category_id')->references('id')->on('tax_categories'); $table->string('coupon_code')->nullable(); $table->decimal('weight', 12,4)->nullable(); - $table->decimal('price', 12,4)->nullable(); - $table->decimal('base_price', 12,4)->nullable(); + $table->decimal('price', 12,4)->default(0)->nullable(); + $table->decimal('base_price', 12,4)->default(0)->nullable(); $table->decimal('custom_price', 12,4)->nullable(); $table->decimal('discount_percent', 12,4)->nullable(); $table->decimal('discount_amount', 12,4)->nullable(); diff --git a/packages/Webkul/Cart/src/Database/Migrations/2018_09_19_093508_create_cart_shipping_rates_table.php b/packages/Webkul/Cart/src/Database/Migrations/2018_09_19_093508_create_cart_shipping_rates_table.php index 3b286d510..2565b846d 100644 --- a/packages/Webkul/Cart/src/Database/Migrations/2018_09_19_093508_create_cart_shipping_rates_table.php +++ b/packages/Webkul/Cart/src/Database/Migrations/2018_09_19_093508_create_cart_shipping_rates_table.php @@ -20,7 +20,8 @@ class CreateCartShippingRatesTable extends Migration $table->string('method'); $table->string('method_title'); $table->string('method_description')->nullable(); - $table->double('price')->nullable(); + $table->double('price')->default(0)->nullable(); + $table->double('base_price')->default(0)->nullable(); $table->integer('cart_address_id')->nullable()->unsigned(); $table->foreign('cart_address_id')->references('id')->on('cart_address'); $table->timestamps(); diff --git a/packages/Webkul/Cart/src/Http/Controllers/CheckoutController.php b/packages/Webkul/Cart/src/Http/Controllers/CheckoutController.php index 486067e2d..d9271ad56 100644 --- a/packages/Webkul/Cart/src/Http/Controllers/CheckoutController.php +++ b/packages/Webkul/Cart/src/Http/Controllers/CheckoutController.php @@ -70,6 +70,13 @@ class CheckoutController extends Controller */ public function saveShipping() { + $shippingMethod = request()->get('shipping_method'); + + if(!$shippingMethod || !Cart::saveShippingMethod($shippingMethod)) + return response()->json(['redirect_url' => route('shop.checkout.cart.index')], 403); + + Cart::collectTotals(); + return response()->json(Payment::getSupportedPaymentMethods()); } @@ -80,5 +87,16 @@ class CheckoutController extends Controller */ public function savePayment() { + $payment = request()->get('payment'); + + if(!$payment || !Cart::savePaymentMethod($payment)) + return response()->json(['redirect_url' => route('shop.checkout.cart.index')], 403); + + $cart = Cart::getCart(); + + return response()->json([ + 'jump_to_section' => 'review', + 'html' => view('shop::checkout.onepage.review', compact('cart'))->render() + ]); } } \ No newline at end of file diff --git a/packages/Webkul/Cart/src/Models/Cart.php b/packages/Webkul/Cart/src/Models/Cart.php index 48b7e62e9..310d16703 100644 --- a/packages/Webkul/Cart/src/Models/Cart.php +++ b/packages/Webkul/Cart/src/Models/Cart.php @@ -5,6 +5,7 @@ namespace Webkul\Cart\Models; use Illuminate\Database\Eloquent\Model; use Webkul\Product\Models\Product; use Webkul\Cart\Models\CartAddress; +use Webkul\Cart\Models\CartPayment; use Webkul\Cart\Models\CartShippingRate; class Cart extends Model @@ -66,4 +67,20 @@ class Cart extends Model { return $this->hasManyThrough(CartShippingRate::class, CartAddress::class, 'cart_id', 'cart_address_id'); } + + /** + * Get all of the attributes for the attribute groups. + */ + public function getSelectedShippingRateAttribute() + { + return $this->shipping_rates()->where('method', $this->shipping_method)->first(); + } + + /** + * Get the payment associated with the cart. + */ + public function payment() + { + return $this->hasOne(CartPayment::class); + } } \ No newline at end of file diff --git a/packages/Webkul/Cart/src/Models/CartPayment.php b/packages/Webkul/Cart/src/Models/CartPayment.php new file mode 100644 index 000000000..1d0487e40 --- /dev/null +++ b/packages/Webkul/Cart/src/Models/CartPayment.php @@ -0,0 +1,10 @@ +getCurrentCurrency()->symbol; } + /** + * Convert price with currency symbol + * + * @param float $price + * @return string + */ + public function convertPrice($price, $currencyCode = null) + { + return $price; + } + /** * Format and convert price with currency symbol * @@ -145,6 +156,17 @@ class Core return currency($price, $currencyCode); } + /** + * Format and convert price with currency symbol + * + * @param float $price + * @return string + */ + public function formatPrice($price, $currencyCode) + { + return currency($price, $currencyCode); + } + /** * Checks if current date of the given channel (in the channel timezone) is within the range * diff --git a/packages/Webkul/Shipping/src/Carriers/FlatRate.php b/packages/Webkul/Shipping/src/Carriers/FlatRate.php index 449b32e0d..715f11538 100644 --- a/packages/Webkul/Shipping/src/Carriers/FlatRate.php +++ b/packages/Webkul/Shipping/src/Carriers/FlatRate.php @@ -36,7 +36,8 @@ class FlatRate extends AbstractShipping $object->method = 'flatrate_flatrate'; $object->method_title = $this->getConfigData('title'); $object->method_description = $this->getConfigData('description'); - $object->price = 10; + $object->price = core()->convertPrice($this->getConfigData('default_rate')); + $object->base_price = $this->getConfigData('default_rate'); return $object; } diff --git a/packages/Webkul/Shipping/src/Carriers/Free.php b/packages/Webkul/Shipping/src/Carriers/Free.php index e51a1ec53..5ef07c928 100644 --- a/packages/Webkul/Shipping/src/Carriers/Free.php +++ b/packages/Webkul/Shipping/src/Carriers/Free.php @@ -37,6 +37,7 @@ class Free extends AbstractShipping $object->method_title = $this->getConfigData('title'); $object->method_description = $this->getConfigData('description'); $object->price = 0; + $object->base_price = 0; return $object; } diff --git a/packages/Webkul/Shop/src/Resources/assets/sass/app.scss b/packages/Webkul/Shop/src/Resources/assets/sass/app.scss index a59bf9439..8cc501715 100644 --- a/packages/Webkul/Shop/src/Resources/assets/sass/app.scss +++ b/packages/Webkul/Shop/src/Resources/assets/sass/app.scss @@ -19,6 +19,7 @@ body { font-family: "Montserrat", sans-serif; } +// header page responsive starts here .header { margin-top: 16px; margin-bottom: 21px; @@ -297,319 +298,6 @@ body { } } } - - -// header page responsive css start here - -@media all and (max-width: 480px) { - - .header { - // border: 1px solid black; - margin-top: 16px; - margin-bottom: 21px; - - .header-top { - margin-bottom: 16px; - display: flex; - // max-width: 92%; - width: 100%; - margin-left: auto; - margin-right: auto; - // border: 1px solid indigo; - align-items: center; - justify-content: space-between; - - div.left-content { - display: flex; - flex-direction: row; - justify-content: flex-start; - align-items: center; - - ul.logo-container { - margin-right: 12px; - - li { - display: flex; - } - } - - ul.search-container { - li.search-group { - display: none; - } - } - } - - div.right-content { - display: none; - } - - .right-responsive { - display: inherit; - } - } - - .search-suggestion { - display: none; - - .search-content { - border-top: 1px solid #e8e8e8; - border-bottom: 1px solid #e8e8e8; - height: 48px; - - .icon.search-icon { - margin-left: 15px; - margin-top: 12px; - } - - span { - font-size: 16px; - color: #242424; - margin-bottom: -7px; - margin-left: 5px; - } - - .right { - float: right; - margin-right: 15px; - } - } - - .suggestion { - margin-top: 14px; - height: 32px; - margin-bottom: 14px; - border-bottom: 1px solid #e8e8e8; - - span { - font-size: 16px; - color: #242424; - margin-left: 48px; - } - } - } - - .header-bottom { - height: 200px; - margin-left: auto; - margin-right: auto; - border-top: none; - border-bottom: none; - display: none; - - ul.nav { - width: 100%; - height: 100px; - } - - .nav > li { - float: none; - border-bottom: 1px solid #e8e8e8; - - a { - margin-left: 10px; - } - - .dropdown-right-icon{ - float: right; - margin-top: 5px; - margin-right: 5px; - } - } - - .nav > li:first-child { - border-top: 1px solid #e8e8e8; - } - - .nav > li:last-child { - float:none; - - span { - font-size: 16px; - color: #FF6472; - letter-spacing: -0.38px; - } - - img { - margin-left: 20px; - } - } - - /* submenu positioning*/ - - .nav ul { - position: absolute; - white-space: nowrap; - border: 1px solid #B1B1B1; - background-color:white; - z-index: 1; - left: -99999em; - } - - .nav > li:hover > ul { - left: auto; - min-width: 100%; - } - - .nav > li li:hover > ul { - left: 100%; - margin-left: 1px; - top: -1px; - } - - .nav > li:hover > a:first-child:nth-last-child(2):before { - margin-top:-5px - } - - .nav li li > a:first-child:nth-last-child(2):before { - margin-top: -5px - } - - .nav li li:hover > a:first-child:nth-last-child(2):before { - right: 10px; - } - } - } - -} - -@media all and (min-width: 481px) and (max-width: 920px) { - - .header { - // border: 1px solid black; - margin-top: 16px; - margin-bottom: 21px; - - .header-top { - margin-bottom: 16px; - display: flex; - // max-width: 92%; - width: 100%; - margin-left: auto; - margin-right: auto; - // border: 1px solid indigo; - align-items: center; - justify-content: space-between; - - div.left-content { - display: flex; - flex-direction: row; - justify-content: flex-start; - align-items: center; - - ul.logo-container { - margin-right: 12px; - - li { - display: flex; - } - } - - ul.search-container { - li.search-group { - display: none; - } - } - } - - div.right-content { - display: none; - } - - .right-responsive { - display: inherit; - } - } - - .search-suggestion { - display: none; - } - - .header-bottom { - height: 200px; - margin-left: auto; - margin-right: auto; - border-top: none; - border-bottom: none; - display: none; - - ul.nav { - width: 100%; - height: 100px; - } - - .nav > li { - float: none; - border-bottom: 1px solid #e8e8e8; - - a { - margin-left: 10px; - } - - .dropdown-right-icon{ - float: right; - margin-top: 5px; - margin-right: 5px; - } - } - - .nav > li:first-child { - border-top: 1px solid #e8e8e8; - } - - .nav > li:last-child { - float:none; - - span { - font-size: 16px; - color: #FF6472; - letter-spacing: -0.38px; - } - - img { - margin-left: 20px; - } - } - - /* submenu positioning*/ - - .nav ul { - position: absolute; - white-space: nowrap; - border: 1px solid #B1B1B1; - background-color:white; - z-index: 1; - left: -99999em; - } - - .nav > li:hover > ul { - left: auto; - min-width: 100%; - } - - .nav > li li:hover > ul { - left: 100%; - margin-left: 1px; - top: -1px; - } - - .nav > li:hover > a:first-child:nth-last-child(2):before { - margin-top:-5px - } - - .nav li li > a:first-child:nth-last-child(2):before { - margin-top: -5px - } - - .nav li li:hover > a:first-child:nth-last-child(2):before { - right: 10px; - } - } - } - -} - - // header page responsive ends here section.slider-block { @@ -767,7 +455,6 @@ section.slider-block { } } - .main-container-wrapper { max-width: 80%; width: auto; @@ -3241,8 +2928,8 @@ section.cart { &.completed { cursor: pointer; - img { - margin: auto; + .decorator { + background-image: url('../images/complete.svg'); } } @@ -3370,171 +3057,8 @@ section.cart { } } } - // checkout ends here -// responsive checkout start here - -@media all and (max-width: 480px) { - .checkout-process{ - width: 100%; - margin-top: 3%; - - .left-side { - width: 100%; - margin-right: 0%; - height: 60px; - - .checkout-menu { - width: 100%; - - ul.checkout-detail { - height: 60px; - width: 100%; - padding: 5px; - - li { - height: 48px; - - .wrapper { - display: flex; - - span { - display: none; - } - } - } - - .line { - margin-top: 23px; - width: 100%; - margin-left: 5px; - margin-right: 5px; - border: 1px solid #E7E7E7; - height: 1px; - } - } - - .horizontal-rule { - display: none; - } - } - } - - .right-side { - display: none; - } - } - - .order-info{ - width: 100%; - margin-right: 0%; - margin-top: 10px; - height:50px; - - .control-group { - - .control{ - width:100%; - } - } - - .different-billing-addr { - margin-top: 5%; - } - - .horizontal-rule { - margin-top: 10%; - } - - .countinue-button { - margin-top: 8%; - } - } -} - -@media all and (min-width: 481px) and (max-width: 920px) { - - .checkout-process{ - width: 100%; - margin-top:3%; - - .left-side { - width: 100%; - margin-right: 0%; - height: 60px; - - .checkout-menu { - width: 100%; - - ul.checkout-detail { - height: 60px; - width: 100%; - padding: 5px; - - li { - height: 48px; - - .wrapper { - display:flex; - - span { - display: none; - } - - } - } - - .line { - margin-top: 23px; - width: 100%; - margin-left: 10px; - margin-right: 10px; - border: 1px solid #E7E7E7; - height: 1px; - } - } - - .horizontal-rule { - display: none; - } - } - } - - .right-side { - display:none; - } - } - - .order-info{ - width: 100%; - margin-right: 0%; - margin-top: 10px; - height:50px; - - .control-group { - - .control{ - width:100%; - } - } - - .different-billing-addr { - margin-top: 3%; - } - - .horizontal-rule { - margin-top: 10%; - } - - .countinue-button { - margin-top: 5%; - } - } -} -// responsive checkout end here - - //shipment start here .ship-method { diff --git a/packages/Webkul/Shop/src/Resources/lang/en/app.php b/packages/Webkul/Shop/src/Resources/lang/en/app.php index 1ad002407..af33d2f71 100644 --- a/packages/Webkul/Shop/src/Resources/lang/en/app.php +++ b/packages/Webkul/Shop/src/Resources/lang/en/app.php @@ -88,6 +88,13 @@ return [ 'continue' => 'Continue', 'shipping-method' => 'Shipping Method', 'payment-information' => 'Payment Information' + ], + + 'total' => [ + 'order-summary' => 'Order Summary', + 'sub-total' => 'Sub Total', + 'grand-total' => 'Grand Total', + 'delivery-charges' => 'Delivery Charges' ] ] ]; \ No newline at end of file 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 9fb6fbbf0..17b2889c8 100644 --- a/packages/Webkul/Shop/src/Resources/views/checkout/onepage.blade.php +++ b/packages/Webkul/Shop/src/Resources/views/checkout/onepage.blade.php @@ -55,7 +55,7 @@
- +
@@ -69,7 +69,7 @@
- +
@@ -83,21 +83,34 @@
- @include('shop::checkout.onepage.review') + + +
+ + + +
- @include('shop::checkout.onepage.summary') +
+ + + +
- - - - - -@endpush - - - diff --git a/packages/Webkul/Shop/src/Resources/views/customers/checkout/payment-method.blade.php b/packages/Webkul/Shop/src/Resources/views/customers/checkout/payment-method.blade.php deleted file mode 100644 index 5eda20d85..000000000 --- a/packages/Webkul/Shop/src/Resources/views/customers/checkout/payment-method.blade.php +++ /dev/null @@ -1,57 +0,0 @@ - -@extends('shop::layouts.master') - -@section('content-wrapper') - -@include('shop::customers.checkout.common.common') - -
-
- - Payment Method - -
- -
-
- - Cash on Delivery -
-
- Fadex - - Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut. -
-
- -
-
- - Net Banking -
-
- Fadex - - Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut. -
-
- -
-
- - Debit / Credit Card -
-
- Fadex - - Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut. -
-
- - -
-
- -
- -
-
- -@endsection \ No newline at end of file diff --git a/packages/Webkul/Shop/src/Resources/views/customers/checkout/ship-method.blade.php b/packages/Webkul/Shop/src/Resources/views/customers/checkout/ship-method.blade.php deleted file mode 100644 index b0303e15d..000000000 --- a/packages/Webkul/Shop/src/Resources/views/customers/checkout/ship-method.blade.php +++ /dev/null @@ -1,52 +0,0 @@ - - -
-
- - Shipment Method - -
- -
-
- {{-- --}} - - $ 25.00 -
-
- Fadex - - Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut. -
-
- -
-
- - $ 25.00 -
-
- Fadex - - Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut. -
-
- -
-
- - $ 25.00 -
-
- Fadex - - Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut. -
-
- - -
-
- -
- -
-
- diff --git a/packages/Webkul/Shop/src/Resources/views/customers/checkout/signin.blade.php b/packages/Webkul/Shop/src/Resources/views/customers/checkout/signin.blade.php deleted file mode 100644 index 6d550259e..000000000 --- a/packages/Webkul/Shop/src/Resources/views/customers/checkout/signin.blade.php +++ /dev/null @@ -1,40 +0,0 @@ - -@extends('shop::layouts.master') - -@section('content-wrapper') - -@include('shop::customers.checkout.common') - - - -@endsection \ No newline at end of file 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 143fc99f6..129790e8b 100644 --- a/packages/Webkul/Shop/src/Resources/views/layouts/master.blade.php +++ b/packages/Webkul/Shop/src/Resources/views/layouts/master.blade.php @@ -21,6 +21,8 @@
+ +
@include('shop::layouts.header.index') diff --git a/public/themes/default/assets/css/shop.css b/public/themes/default/assets/css/shop.css index 660585c3c..d341e82b8 100644 --- a/public/themes/default/assets/css/shop.css +++ b/public/themes/default/assets/css/shop.css @@ -55,6 +55,18 @@ height: 24px; } +.shipping-icon { + background-image: url("../images/shipping.svg"); + width: 32px; + height: 32px; +} + +.payment-icon { + background-image: url("../images/payment.svg"); + width: 32px; + height: 32px; +} + body { margin: 0; padding: 0; @@ -289,7 +301,6 @@ body { margin-right: auto; border-top: 1px solid lightgrey; border-bottom: 1px solid lightgrey; - font-size: 16px; display: block; /* submenu positioning*/ } @@ -462,8 +473,8 @@ body { display: none; } .header .search-suggestion .search-content { - border-top: 1px solid #e8e8e8; - border-bottom: 1px solid #e8e8e8; + border-top: 1px solid #c7c7c7; + border-bottom: 1px solid #c7c7c7; height: 48px; } .header .search-suggestion .search-content .icon.search-icon { @@ -471,8 +482,6 @@ body { margin-top: 12px; } .header .search-suggestion .search-content span { - font-size: 16px; - color: #242424; margin-bottom: -7px; margin-left: 5px; } @@ -484,11 +493,9 @@ body { margin-top: 14px; height: 32px; margin-bottom: 14px; - border-bottom: 1px solid #e8e8e8; + border-bottom: 1px solid #c7c7c7; } .header .search-suggestion .suggestion span { - font-size: 16px; - color: #242424; margin-left: 48px; } .header .header-bottom { @@ -506,7 +513,7 @@ body { } .header .header-bottom .nav > li { float: none; - border-bottom: 1px solid #e8e8e8; + border-bottom: 1px solid #c7c7c7; } .header .header-bottom .nav > li a { margin-left: 10px; @@ -517,13 +524,12 @@ body { margin-right: 5px; } .header .header-bottom .nav > li:first-child { - border-top: 1px solid #e8e8e8; + border-top: 1px solid #c7c7c7; } .header .header-bottom .nav > li:last-child { float: none; } .header .header-bottom .nav > li:last-child span { - font-size: 16px; color: #FF6472; letter-spacing: -0.38px; } @@ -628,7 +634,7 @@ body { } .header .header-bottom .nav > li { float: none; - border-bottom: 1px solid #e8e8e8; + border-bottom: 1px solid #c7c7c7; } .header .header-bottom .nav > li a { margin-left: 10px; @@ -639,13 +645,12 @@ body { margin-right: 5px; } .header .header-bottom .nav > li:first-child { - border-top: 1px solid #e8e8e8; + border-top: 1px solid #c7c7c7; } .header .header-bottom .nav > li:last-child { float: none; } .header .header-bottom .nav > li:last-child span { - font-size: 16px; color: #FF6472; letter-spacing: -0.38px; } @@ -744,7 +749,7 @@ section.slider-block div.slider-content div.slider-control { } section.slider-block div.slider-content div.slider-control .dark-left-icon { - background-color: #ffffff; + background-color: #f2f2f2; height: 48px; width: 48px; max-height: 100%; @@ -752,7 +757,7 @@ section.slider-block div.slider-content div.slider-control .dark-left-icon { } section.slider-block div.slider-content div.slider-control .light-right-icon { - background-color: black; + background-color: #000; height: 48px; width: 48px; max-height: 100%; @@ -767,20 +772,18 @@ section.slider-block div.slider-content div.slider-control .light-right-icon { } .layered-filter-wrapper .filter-title { - border-bottom: 1px solid #E8E8E8; - font-size: 16px; + border-bottom: 1px solid #c7c7c7; color: #242424; padding: 10px 0; } .layered-filter-wrapper .filter-attributes .filter-attributes-item { - border-bottom: 1px solid #E8E8E8; + border-bottom: 1px solid #c7c7c7; padding-bottom: 10px; } .layered-filter-wrapper .filter-attributes .filter-attributes-item .filter-attributes-title { padding: 10px 40px 0 10px; - font-size: 16px; color: #5E5E5E; cursor: pointer; position: relative; @@ -788,7 +791,7 @@ section.slider-block div.slider-content div.slider-control .light-right-icon { .layered-filter-wrapper .filter-attributes .filter-attributes-item .filter-attributes-title .remove-filter-link { font-weight: 400; - color: #0031F0; + color: #0031f0; margin-right: 10px; } @@ -814,7 +817,6 @@ section.slider-block div.slider-content div.slider-control .light-right-icon { .layered-filter-wrapper .filter-attributes .filter-attributes-item .filter-attributes-content ol.items li.item { padding: 8px 0; - font-size: 16px; color: #5E5E5E; } @@ -893,7 +895,6 @@ section.slider-block div.slider-content div.slider-control .light-right-icon { } .main-container-wrapper .product-card .product-name { - font-size: 16px; margin-bottom: 14px; width: 100%; color: #242424; @@ -904,7 +905,6 @@ section.slider-block div.slider-content div.slider-control .light-right-icon { } .main-container-wrapper .product-card .product-description { - font-size: 16px; margin-bottom: 14px; display: none; } @@ -991,7 +991,6 @@ section.slider-block div.slider-content div.slider-control .light-right-icon { } .main-container-wrapper .top-toolbar .pager label { - font-size: 16px; margin-right: 5px; } @@ -999,7 +998,6 @@ section.slider-block div.slider-content div.slider-control .light-right-icon { background: #FFFFFF; border: 1px solid #C7C7C7; border-radius: 3px; - font-size: 16px; color: #242424; padding: 10px; } @@ -1146,7 +1144,7 @@ section.slider-block div.slider-content div.slider-control .light-right-icon { font-size: 12px; } .main-container-wrapper .top-toolbar { - border-bottom: 1px solid #E8E8E8; + border-bottom: 1px solid #c7c7c7; margin-bottom: 10px; } .main-container-wrapper .top-toolbar .page-info span:first-child { @@ -1182,7 +1180,6 @@ section.slider-block div.slider-content div.slider-control .light-right-icon { background: #FFFFFF; border: 1px solid #C7C7C7; border-radius: 3px; - font-size: 16px; color: #242424; padding: 10px; } @@ -1221,7 +1218,7 @@ section.slider-block div.slider-content div.slider-control .light-right-icon { font-size: 12px; } .main-container-wrapper .top-toolbar { - border-bottom: 1px solid #E8E8E8; + border-bottom: 1px solid #c7c7c7; margin-bottom: 10px; } .main-container-wrapper .top-toolbar .page-info span:first-child { @@ -1257,7 +1254,6 @@ section.slider-block div.slider-content div.slider-control .light-right-icon { background: #FFFFFF; border: 1px solid #C7C7C7; border-radius: 3px; - font-size: 16px; color: #242424; padding: 10px; } @@ -1267,7 +1263,6 @@ section.slider-block div.slider-content div.slider-control .light-right-icon { } .product-price { - font-size: 16px; margin-bottom: 14px; width: 100%; font-weight: 600; @@ -1279,14 +1274,12 @@ section.slider-block div.slider-content div.slider-control .light-right-icon { } .product-price .regular-price { - font-size: 16px; color: #A5A5A5; text-decoration: line-through; margin-right: 10px; } .product-price .special-price { - font-size: 16px; color: #FF6472; } @@ -1308,7 +1301,6 @@ section.slider-block div.slider-content div.slider-control .light-right-icon { } .footer .footer-content .footer-list-container .list-container .list-heading { - font-size: 16px; letter-spacing: -0.26px; text-transform: uppercase; color: #a5a5a5; @@ -1320,7 +1312,6 @@ section.slider-block div.slider-content div.slider-control .light-right-icon { .footer .footer-content .footer-list-container .list-container .list-group li { margin-bottom: 12px; - color: #242424; list-style-type: none; text-transform: uppercase; } @@ -1359,7 +1350,7 @@ section.slider-block div.slider-content div.slider-control .light-right-icon { } .footer .footer-content .footer-list-container .list-container .form-container .control-group .btn-primary { - background-color: black; + background-color: #000; margin-top: 8px; border-radius: 0px; text-align: center; @@ -1387,7 +1378,7 @@ section.slider-block div.slider-content div.slider-control .light-right-icon { display: -webkit-box; display: -ms-flexbox; display: flex; - background: #ffffff; + background: #f2f2f2; border: 1px solid #c7c7c7; -webkit-box-orient: vertical; -webkit-box-direction: normal; @@ -1463,17 +1454,15 @@ section.slider-block div.slider-content div.slider-control .light-right-icon { -webkit-box-pack: start; -ms-flex-pack: start; justify-content: flex-start; - border: 1px solid #e8e8e8; - background: #ffffff; + border: 1px solid #c7c7c7; + background: #f2f2f2; width: 25%; height: 100%; text-transform: capitalize; - font-size: 16px; color: #5e5e5e; } .account-content .account-side-menu li { - font-size: 16px; width: 95%; height: 50px; margin-left: 5%; @@ -1532,11 +1521,10 @@ section.slider-block div.slider-content div.slider-control .light-right-icon { width: 100%; height: 1px; vertical-align: middle; - background: #e8e8e8; + background: #c7c7c7; } .account-content .profile-content { - font-size: 16px; color: #5e5e5e; margin-top: 1.4%; } @@ -1567,7 +1555,7 @@ section.slider-block div.slider-content div.slider-control .light-right-icon { display: -webkit-box; display: -ms-flexbox; display: flex; - background: #ffffff; + background: #f2f2f2; border: 1px solid #c7c7c7; -webkit-box-orient: vertical; -webkit-box-direction: normal; @@ -1578,7 +1566,6 @@ section.slider-block div.slider-content div.slider-control .light-right-icon { } section.product-detail { - font-size: 16px; color: #242424; } @@ -1794,7 +1781,6 @@ section.product-detail div.layouter form .details .full-specifications td:first- } section.product-detail div.layouter form .details .accordian .accordian-header { - font-size: 16px; padding-left: 0; font-weight: 600; } @@ -1809,10 +1795,6 @@ section.product-detail div.layouter form .details .attributes { border-bottom: solid 1px rgba(162, 162, 162, 0.2); } -section.product-detail div.layouter form .details .full-description { - font-size: 16px; -} - @media all and (max-width: 480px) { section.product-detail div.category-breadcrumbs { display: none; @@ -1855,7 +1837,7 @@ section.product-detail div.layouter form .details .full-description { section.product-detail div.layouter form .details { width: 100%; margin-top: 20px; - border-bottom: 1px solid #e8e8e8e8; + border-bottom: 1px solid #c7c7c7; } section.product-detail div.layouter form .details .attributes { border-bottom: none; @@ -1904,7 +1886,7 @@ section.product-detail div.layouter form .details .full-description { section.product-detail div.layouter form .details { width: 100%; margin-top: 20px; - border-bottom: 1px solid #e8e8e8e8; + border-bottom: 1px solid #c7c7c7; } section.product-detail div.layouter form .details .attributes { border-bottom: none; @@ -1980,7 +1962,6 @@ section.product-detail div.layouter form .details .full-description { /* cart pages and elements css begins here */ section.cart { color: #242424; - font-size: 16px; margin-bottom: 80px; } @@ -2000,12 +1981,115 @@ section.cart .cart-content { flex-direction: row; } -section.cart .cart-content .left-side { +.cart .left-side { width: 68.6%; margin-right: 2.4%; } -section.cart .cart-content .left-side .item { +.cart .right-side { + width: 29%; + display: block; +} + +.cart .right-side .price-section { + width: 100%; + padding: 10px 10px 18px 18px; + margin-bottom: 20px; +} + +.cart .right-side .price-section .title { + font-weight: bold; + padding-bottom: 8px; + margin-bottom: 10px; +} + +.cart .right-side .price-section .all-item-details { + margin-bottom: 17px; +} + +.cart .right-side .price-section .all-item-details .item-details { + margin-bottom: 10px; +} + +.cart .right-side .price-section .all-item-details .item-details .price { + float: right; +} + +.cart .right-side .price-section .horizontal-rule { + width: 100%; + height: 1px; + vertical-align: middle; + background: #c7c7c7; +} + +.cart .right-side .price-section .total-details { + margin-top: 10px; +} + +.cart .right-side .price-section .total-details .amount { + float: right; +} + +.cart .right-side .coupon-section { + padding: 10px 10px 18px 18px; +} + +.cart .right-side .coupon-section .title { + font-weight: bold; + margin-bottom: 10px; +} + +.cart .right-side .coupon-section .control-group { + margin-bottom: 12px !important; +} + +.cart .right-side .coupon-section .control-group input.coupon-input::-moz-placeholder { + font-family: "montserrat", sans-serif; + color: #242424; +} + +.cart .right-side .coupon-section .control-group input.coupon-input::-webkit-input-placeholder { + font-family: "montserrat", sans-serif; + color: #242424; +} + +.cart .right-side .coupon-section button { + margin-bottom: 10px; + background-color: #000; + border-radius: 0px; +} + +.cart .right-side .coupon-section .coupon-details .coupon { + margin-bottom: 8px; +} + +.cart .right-side .coupon-section .coupon-details .coupon .discount { + float: right; +} + +.cart .right-side .coupon-section .horizontal-rule { + width: 100%; + height: 1px; + vertical-align: middle; + background: #c7c7c7; + margin-bottom: 9px; +} + +.cart .right-side .coupon-section .after-coupon-amount .name { + font-weight: bold; +} + +.cart .right-side .coupon-section .after-coupon-amount .amount { + float: right; + font-weight: bold; +} + +.cart-item-list { + margin-top: 21px; + padding: 1px; +} + +.cart-item-list .item { padding: 1.1%; margin-bottom: 20px; display: -webkit-box; @@ -2017,12 +2101,12 @@ section.cart .cart-content .left-side .item { flex-direction: row; } -section.cart .cart-content .left-side .item .item-image { +.cart-item-list .item .item-image { height: 160px; width: 160px; } -section.cart .cart-content .left-side .item .item-details { +.cart-item-list .item .item-details { display: -webkit-box; display: -ms-flexbox; display: flex; @@ -2032,35 +2116,35 @@ section.cart .cart-content .left-side .item .item-details { flex-direction: column; } -section.cart .cart-content .left-side .item .item-details .item-title { +.cart-item-list .item .item-details .item-title { font-size: 18px; margin-bottom: 10px; } -section.cart .cart-content .left-side .item .item-details .price { +.cart-item-list .item .item-details .price { margin-bottom: 10px; } -section.cart .cart-content .left-side .item .item-details .price .main-price { +.cart-item-list .item .item-details .price .main-price { font-size: 18px; margin-right: 4px; } -section.cart .cart-content .left-side .item .item-details .price .real-price { +.cart-item-list .item .item-details .price .real-price { margin-right: 4px; -webkit-text-decoration-line: line-through; text-decoration-line: line-through; } -section.cart .cart-content .left-side .item .item-details .price .discount { +.cart-item-list .item .item-details .price .discount { color: #FF6472; } -section.cart .cart-content .left-side .item .item-details .summary { +.cart-item-list .item .item-details .summary { margin-bottom: 17px; } -section.cart .cart-content .left-side .item .item-details .misc { +.cart-item-list .item .item-details .misc { display: -webkit-inline-box; display: -ms-inline-flexbox; display: inline-flex; @@ -2072,12 +2156,12 @@ section.cart .cart-content .left-side .item .item-details .misc { justify-content: flex-start; } -section.cart .cart-content .left-side .item .item-details .misc div.qty-text { +.cart-item-list .item .item-details .misc div.qty-text { color: #5E5E5E; margin-right: 10px; } -section.cart .cart-content .left-side .item .item-details .misc div.box { +.cart-item-list .item .item-details .misc div.box { height: 38px; width: 60px; text-align: center; @@ -2087,129 +2171,27 @@ section.cart .cart-content .left-side .item .item-details .misc div.box { margin-right: 30px; } -section.cart .cart-content .left-side .item .item-details .misc .remove { - color: #0031F0; +.cart-item-list .item .item-details .misc .remove { + color: #0031f0; margin-right: 30px; } -section.cart .cart-content .left-side .item .item-details .misc .towishlist { - color: #0031F0; +.cart-item-list .item .item-details .misc .towishlist { + color: #0031f0; } -section.cart .cart-content .left-side .misc-controls { +.cart-item-list .misc-controls { float: right; } -section.cart .cart-content .left-side .misc-controls span { +.cart-item-list .misc-controls span { margin-right: 15px; } -section.cart .cart-content .left-side .misc-controls button { +.cart-item-list .misc-controls button { border-radius: 0px; } -section.cart .cart-content .right-side { - width: 29%; - display: block; -} - -section.cart .cart-content .right-side .price-section { - width: 100%; - padding: 10px 10px 18px 18px; - margin-bottom: 20px; -} - -section.cart .cart-content .right-side .price-section .title { - font-size: 16px; - font-weight: bold; - padding-bottom: 8px; - margin-bottom: 10px; -} - -section.cart .cart-content .right-side .price-section .all-item-details { - margin-bottom: 17px; -} - -section.cart .cart-content .right-side .price-section .all-item-details .item-details { - margin-bottom: 10px; -} - -section.cart .cart-content .right-side .price-section .all-item-details .item-details .price { - float: right; -} - -section.cart .cart-content .right-side .price-section .horizontal-rule { - width: 100%; - height: 1px; - vertical-align: middle; - background: #e8e8e8; -} - -section.cart .cart-content .right-side .price-section .total-details { - margin-top: 10px; -} - -section.cart .cart-content .right-side .price-section .total-details .amount { - float: right; -} - -section.cart .cart-content .right-side .coupon-section { - padding: 10px 10px 18px 18px; -} - -section.cart .cart-content .right-side .coupon-section .title { - font-size: 16px; - font-weight: bold; - margin-bottom: 10px; -} - -section.cart .cart-content .right-side .coupon-section .control-group { - margin-bottom: 12px !important; -} - -section.cart .cart-content .right-side .coupon-section .control-group input.coupon-input::-moz-placeholder { - font-family: "montserrat", sans-serif; - font-size: 16px; - color: #242424; -} - -section.cart .cart-content .right-side .coupon-section .control-group input.coupon-input::-webkit-input-placeholder { - font-family: "montserrat", sans-serif; - font-size: 16px; - color: #242424; -} - -section.cart .cart-content .right-side .coupon-section button { - margin-bottom: 10px; - background-color: black; - border-radius: 0px; -} - -section.cart .cart-content .right-side .coupon-section .coupon-details .coupon { - margin-bottom: 8px; -} - -section.cart .cart-content .right-side .coupon-section .coupon-details .coupon .discount { - float: right; -} - -section.cart .cart-content .right-side .coupon-section .horizontal-rule { - width: 100%; - height: 1px; - vertical-align: middle; - background: #e8e8e8; - margin-bottom: 9px; -} - -section.cart .cart-content .right-side .coupon-section .after-coupon-amount .name { - font-weight: bold; -} - -section.cart .cart-content .right-side .coupon-section .after-coupon-amount .amount { - float: right; - font-weight: bold; -} - .attached-products-wrapper { margin-bottom: 80px; } @@ -2273,7 +2255,6 @@ section.cart .cart-content .right-side .coupon-section .after-coupon-amount .amo .order .order-section-head .order-number { font-size: 28px; - color: #242424; text-transform: capitalize; text-align: left; } @@ -2301,7 +2282,7 @@ section.cart .cart-content .right-side .coupon-section .after-coupon-amount .amo width: 100%; height: 1px; vertical-align: middle; - background: #e8e8e8; + background: #c7c7c7; } .order .order-section-head-small { @@ -2309,7 +2290,6 @@ section.cart .cart-content .right-side .coupon-section .after-coupon-amount .amo } .order .payment-place { - font-size: 16px; color: #5e5e5e; margin-top: 1.4%; } @@ -2331,7 +2311,6 @@ section.cart .cart-content .right-side .coupon-section .after-coupon-amount .amo .order .payment-place .placed-on .place-text span { color: #5E5E5E; letter-spacing: -0.12px; - font-size: 16px; } .order .payment-place .placed-on .place-text .processing { @@ -2341,7 +2320,6 @@ section.cart .cart-content .right-side .coupon-section .after-coupon-amount .amo .order .payment-place .placed-on .place-date span { color: #5E5E5E; letter-spacing: -0.12px; - font-size: 16px; } .order .payment-place .payment-status { @@ -2362,13 +2340,11 @@ section.cart .cart-content .right-side .coupon-section .after-coupon-amount .amo .order .payment-place .payment-status .payment-text span { color: #5E5E5E; letter-spacing: -0.12px; - font-size: 16px; } .order .payment-place .payment-status .status span { color: #5E5E5E; letter-spacing: -0.12px; - font-size: 16px; } .order .payment-place .horizontal-rule { @@ -2376,7 +2352,7 @@ section.cart .cart-content .right-side .coupon-section .after-coupon-amount .amo width: 100%; height: 1px; vertical-align: middle; - background: #e8e8e8; + background: #c7c7c7; } .order .order-details { @@ -2510,7 +2486,7 @@ section.cart .cart-content .right-side .coupon-section .after-coupon-amount .amo width: 100%; height: 1px; vertical-align: middle; - background: #e8e8e8; + background: #c7c7c7; } .order .order-information { @@ -2537,7 +2513,6 @@ section.cart .cart-content .right-side .coupon-section .after-coupon-amount .amo } .order .order-information p { - font-size: 16px; color: #3A3A3A; } @@ -2564,8 +2539,6 @@ section.cart .cart-content .right-side .coupon-section .after-coupon-amount .amo } .order .order-section-head-small .order-number { text-align: center; - font-size: 16px; - color: #242424; letter-spacing: -0.38px; text-align: center; margin-top: 13px; @@ -2575,19 +2548,18 @@ section.cart .cart-content .right-side .coupon-section .after-coupon-amount .amo float: right; text-align: right; font-size: 17px; - color: #0031F0; + color: #0031f0; letter-spacing: -0.11px; margin-top: 13px; margin-bottom: 13px; } .order .order-section-head-small .horizon-rule { - border: .5px solid #E8E8E8; + border: 0.5px solid #c7c7c7; width: 150%; margin-left: -10%; margin-right: -10%; } .order .payment-place { - font-size: 16px; color: #5e5e5e; margin-top: 4%; } @@ -2644,7 +2616,7 @@ section.cart .cart-content .right-side .coupon-section .after-coupon-amount .amo width: 100%; height: 1px; vertical-align: middle; - background: #e8e8e8; + background: #c7c7c7; } .order .order-details { display: none; @@ -2715,7 +2687,7 @@ section.cart .cart-content .right-side .coupon-section .after-coupon-amount .amo display: none; } .order .product-config { - border: 1px solid #E8E8E8; + border: 1px solid #c7c7c7; height: 19%; width: 100%; margin-top: 10px; @@ -2745,7 +2717,6 @@ section.cart .cart-content .right-side .coupon-section .after-coupon-amount .amo width: 50%; } .order .product-config .product-attribute .property-name span { - font-size: 16px; color: #5E5E5E; letter-spacing: -0.11px; } @@ -2792,8 +2763,6 @@ section.cart .cart-content .right-side .coupon-section .after-coupon-amount .amo } .order .order-section-head-small .order-number { text-align: center; - font-size: 16px; - color: #242424; letter-spacing: -0.38px; text-align: center; margin-top: 13px; @@ -2803,19 +2772,18 @@ section.cart .cart-content .right-side .coupon-section .after-coupon-amount .amo float: right; text-align: right; font-size: 17px; - color: #0031F0; + color: #0031f0; letter-spacing: -0.11px; margin-top: 13px; margin-bottom: 13px; } .order .order-section-head-small .horizon-rule { - border: .5px solid #E8E8E8; + border: 0.5px solid #c7c7c7; width: 150%; margin-left: -10%; margin-right: -10%; } .order .payment-place { - font-size: 16px; color: #5e5e5e; margin-top: 4%; } @@ -2872,7 +2840,7 @@ section.cart .cart-content .right-side .coupon-section .after-coupon-amount .amo width: 100%; height: 1px; vertical-align: middle; - background: #e8e8e8; + background: #c7c7c7; } .order .order-details { display: none; @@ -2943,7 +2911,7 @@ section.cart .cart-content .right-side .coupon-section .after-coupon-amount .amo display: none; } .order .product-config { - border: 1px solid #E8E8E8; + border: 1px solid #c7c7c7; height: 19%; width: 100%; margin-top: 10px; @@ -2973,7 +2941,6 @@ section.cart .cart-content .right-side .coupon-section .after-coupon-amount .amo width: 50%; } .order .product-config .product-attribute .property-name span { - font-size: 16px; color: #5E5E5E; letter-spacing: -0.11px; } @@ -3025,7 +2992,7 @@ section.cart .cart-content .right-side .coupon-section .after-coupon-amount .amo justify-content: space-between; width: 100%; padding-bottom: 15px; - border-bottom: 1px solid #E8E8E8; + border-bottom: 1px solid #c7c7c7; } .checkout-process .col-main ul.checkout-steps li { @@ -3043,7 +3010,7 @@ section.cart .cart-content .right-side .coupon-section .after-coupon-amount .amo display: -webkit-inline-box; display: -ms-inline-flexbox; display: inline-flex; - border: 1px solid #E8E8E8; + border: 1px solid #c7c7c7; background-repeat: no-repeat; background-position: center; } @@ -3076,7 +3043,6 @@ section.cart .cart-content .right-side .coupon-section .after-coupon-amount .amo margin-left: 7px; margin-top: auto; margin-bottom: auto; - font-size: 16px; } .checkout-process .col-main ul.checkout-steps li.active { @@ -3105,7 +3071,7 @@ section.cart .cart-content .right-side .coupon-section .after-coupon-amount .amo } .checkout-process .col-main .step-content .form-container { - border-bottom: 1px solid #E8E8E8; + border-bottom: 1px solid #c7c7c7; padding-top: 20px; padding-bottom: 20px; } @@ -3122,718 +3088,125 @@ section.cart .cart-content .right-side .coupon-section .after-coupon-amount .amo margin-left: 28px; } +.checkout-process .col-main .step-content .address { + display: inline-block; + width: 100%; +} + +.checkout-process .col-main .step-content .address .address-card { + width: 50%; +} + +.checkout-process .col-main .step-content .address .address-card.left { + float: left; +} + +.checkout-process .col-main .step-content .address .address-card.right { + float: right; +} + +.checkout-process .col-main .step-content .address .address-card .card-title span { + font-weight: 600; +} + +.checkout-process .col-main .step-content .address .address-card .card-content { + margin-top: 15px; + color: #121212; + line-height: 25px; +} + +.checkout-process .col-main .step-content .address .address-card .card-content .horizontal-rule { + margin: 12px 0; + display: block; + width: 25px; + background: #121212; +} + +.checkout-process .col-main .step-content .cart-item-list .item { + border: 1px solid #c7c7c7; + border-radius: 3px; + padding: 20px; +} + +.checkout-process .col-main .step-content .cart-item-list .item .row .title { + width: 100px; + display: inline-block; + color: #5E5E5E; + font-weight: 500; + margin-bottom: 10px; +} + +.checkout-process .col-main .step-content .cart-item-list .item .row .value { + font-size: 18px; + font-weight: 600; +} + +.checkout-process .col-main .step-content .order-description { + display: inline-block; + width: 100%; +} + +.checkout-process .col-main .step-content .order-description .shipping { + margin-bottom: 25px; +} + +.checkout-process .col-main .step-content .order-description .decorator { + height: 48px; + width: 48px; + border-radius: 50%; + border: 1px solid #c7c7c7; + vertical-align: middle; + display: inline-block; + text-align: center; +} + +.checkout-process .col-main .step-content .order-description .decorator .icon { + margin-top: 7px; +} + +.checkout-process .col-main .step-content .order-description .text { + font-weight: 600; + vertical-align: middle; + display: inline-block; +} + +.checkout-process .col-main .step-content .order-description .text .info { + font-weight: 500; + margin-top: 2px; +} + .checkout-process .col-right { width: 35%; padding-left: 40px; } -.checkout-process .col-right .order-summary .price span { - margin-left: 3px; +.checkout-process .order-summary h3 { font-size: 16px; - color: #242424; - font-weight: bold; } -.checkout-process .col-right .order-summary .item-detail { +.checkout-process .order-summary .item-detail { margin-top: 12px; } -.checkout-process .col-right .order-summary .item-detail span { - margin-left: 3px; -} - -.checkout-process .col-right .order-summary .item-detail span label { - font-size: 16px; - color: #242424; -} - -.checkout-process .col-right .order-summary .item-detail span .right { - float: right; - font-size: 16px; - color: #242424; -} - -.checkout-process .col-right .order-summary .horizontal-rule { - margin-top: 6%; - width: 100%; - height: 1px; - vertical-align: middle; - background: #e8e8e8; -} - -.checkout-process .col-right .order-summary .payble-amount { - margin-top: 12px; -} - -.checkout-process .col-right .order-summary .payble-amount span { - margin-left: 3px; - font-weight: bold; -} - -.checkout-process .col-right .order-summary .payble-amount span label { - font-size: 16px; - color: #242424; - font-weight: bold; -} - -.checkout-process .col-right .order-summary .payble-amount span .right { - float: right; - font-size: 16px; - color: #242424; -} - -@media all and (max-width: 480px) { - .checkout-process { - width: 100%; - margin-top: 3%; - } - .checkout-process .left-side { - width: 100%; - margin-right: 0%; - height: 60px; - } - .checkout-process .left-side .checkout-menu { - width: 100%; - } - .checkout-process .left-side .checkout-menu ul.checkout-detail { - height: 60px; - width: 100%; - padding: 5px; - } - .checkout-process .left-side .checkout-menu ul.checkout-detail li { - height: 48px; - } - .checkout-process .left-side .checkout-menu ul.checkout-detail li .wrapper { - display: -webkit-box; - display: -ms-flexbox; - display: flex; - } - .checkout-process .left-side .checkout-menu ul.checkout-detail li .wrapper span { - display: none; - } - .checkout-process .left-side .checkout-menu ul.checkout-detail .line { - margin-top: 23px; - width: 100%; - margin-left: 5px; - margin-right: 5px; - border: 1px solid #E7E7E7; - height: 1px; - } - .checkout-process .left-side .checkout-menu .horizontal-rule { - display: none; - } - .checkout-process .right-side { - display: none; - } - .order-info { - width: 100%; - margin-right: 0%; - margin-top: 10px; - height: 50px; - } - .order-info .control-group .control { - width: 100%; - } - .order-info .different-billing-addr { - margin-top: 5%; - } - .order-info .horizontal-rule { - margin-top: 10%; - } - .order-info .countinue-button { - margin-top: 8%; - } -} - -@media all and (min-width: 481px) and (max-width: 920px) { - .checkout-process { - width: 100%; - margin-top: 3%; - } - .checkout-process .left-side { - width: 100%; - margin-right: 0%; - height: 60px; - } - .checkout-process .left-side .checkout-menu { - width: 100%; - } - .checkout-process .left-side .checkout-menu ul.checkout-detail { - height: 60px; - width: 100%; - padding: 5px; - } - .checkout-process .left-side .checkout-menu ul.checkout-detail li { - height: 48px; - } - .checkout-process .left-side .checkout-menu ul.checkout-detail li .wrapper { - display: -webkit-box; - display: -ms-flexbox; - display: flex; - } - .checkout-process .left-side .checkout-menu ul.checkout-detail li .wrapper span { - display: none; - } - .checkout-process .left-side .checkout-menu ul.checkout-detail .line { - margin-top: 23px; - width: 100%; - margin-left: 10px; - margin-right: 10px; - border: 1px solid #E7E7E7; - height: 1px; - } - .checkout-process .left-side .checkout-menu .horizontal-rule { - display: none; - } - .checkout-process .right-side { - display: none; - } - .order-info { - width: 100%; - margin-right: 0%; - margin-top: 10px; - height: 50px; - } - .order-info .control-group .control { - width: 100%; - } - .order-info .different-billing-addr { - margin-top: 3%; - } - .order-info .horizontal-rule { - margin-top: 10%; - } - .order-info .countinue-button { - margin-top: 5%; - } -} - -.ship-method { - width: 67%; - margin-right: 6%; - height: 600px; - margin-top: -190px; -} - -.ship-method .ship-info .ship-text { - font-size: 24px; - color: #242424; - letter-spacing: -0.58px; - font-weight: bold; -} - -.ship-method .ship-price { - margin-top: 31px; -} - -.ship-method .ship-price .price-checkbox { - display: -webkit-box; - display: -ms-flexbox; - display: flex; -} - -.ship-method .ship-price .price-checkbox span { - margin-left: 8px; - font-size: 16px; - color: #242424; - line-height: 22px; - font-weight: bold; -} - -.ship-method .ship-price .price-checkbox-text { - margin-left: 25px; - width: 580px; - height: 44px; - margin-top: 4px; -} - -.ship-method .ship-price .price-checkbox-text b { - font-size: 16px; -} - -.ship-method .ship-price .price-checkbox-text span { - font-size: 16px; - color: #242424; - line-height: 22px; -} - -.ship-method .horizontal-rule { - margin-top: 7%; - width: 100%; - height: 1px; - vertical-align: middle; - background: #e8e8e8; -} - -.ship-method .countinue-button { - margin-top: 3%; -} - -.ship-method .countinue-button button { - background: #0031F0; - font-size: 14px; - color: #FFFFFF; - letter-spacing: -0.26px; - text-align: center; - height: 38px; - width: 137px; - border: none; -} - -.payment-method { - width: 67%; - margin-right: 6%; - height: 600px; - margin-top: -190px; -} - -.payment-method .payment-info .payment-text { - font-size: 24px; - color: #242424; - letter-spacing: -0.58px; - font-weight: bold; -} - -.payment-method .payment-price { - margin-top: 31px; -} - -.payment-method .payment-price .payment-checkbox { - display: -webkit-box; - display: -ms-flexbox; - display: flex; -} - -.payment-method .payment-price .payment-checkbox span { - margin-left: 8px; - font-size: 16px; - color: #242424; - line-height: 22px; - font-weight: bold; -} - -.payment-method .payment-price .payment-checkbox-text { - margin-left: 25px; - width: 580px; - height: 44px; - margin-top: 4px; -} - -.payment-method .payment-price .payment-checkbox-text b { - font-size: 16px; -} - -.payment-method .payment-price .payment-checkbox-text span { - font-size: 16px; - color: #242424; - line-height: 22px; -} - -.payment-method .horizontal-rule { - margin-top: 7%; - width: 100%; - height: 1px; - vertical-align: middle; - background: #e8e8e8; -} - -.payment-method .countinue-button { - margin-top: 3%; -} - -.payment-method .countinue-button button { - background: #0031F0; - font-size: 14px; - color: #FFFFFF; - letter-spacing: -0.26px; - text-align: center; - height: 38px; - width: 137px; - border: none; -} - -.payment-method .countinue-button button .horizontal-rule { - margin-top: 7%; - width: 100%; - height: 1px; - vertical-align: middle; - background: #e8e8e8; -} - -.payment-method .countinue-button button .horizontal-rule { - margin-top: 7%; - width: 100%; - height: 1px; - vertical-align: middle; - background: #e8e8e8; -} - -.complete-page { - width: 880px; - height: 1050px; -} - -.complete-page .order-summary span { - font-size: 24px; - color: #242424; - font-weight: bold; - letter-spacing: -0.58px; -} - -.complete-page .address { - display: -webkit-box; - display: -ms-flexbox; - display: flex; - -webkit-box-orient: horizontal; - -webkit-box-direction: normal; - -ms-flex-direction: row; - flex-direction: row; - margin-top: 30px; -} - -.complete-page .address .shipping-address { - height: 100px; - width: 415px; -} - -.complete-page .address .shipping-address .shipping-title span { - font-weight: bold; - font-size: 16px; - color: #242424; -} - -.complete-page .address .shipping-address .shipping-content { - margin-top: 15px; - width: 175px; -} - -.complete-page .address .shipping-address .shipping-content .addr { - margin-top: 5px; -} - -.complete-page .address .shipping-address .shipping-content .addr span { - font-size: 16px; - color: #121212; -} - -.complete-page .address .shipping-address .shipping-content .horizontal-rule { - margin-top: 7%; - width: 25px; - height: 1px; - vertical-align: middle; - background: #121212; -} - -.complete-page .address .shipping-address .shipping-content .contact { - margin-top: 10px; -} - -.complete-page .address .shipping-address .shipping-content .contact span { - font-size: 16px; - color: #121212; -} - -.complete-page .address .billing-address { - width: 415px; -} - -.complete-page .address .billing-address .shipping-title span { - font-weight: bold; - font-size: 16px; - color: #242424; -} - -.complete-page .address .billing-address .shipping-content { - margin-top: 15px; - width: 175px; -} - -.complete-page .address .billing-address .shipping-content .addr { - margin-top: 5px; -} - -.complete-page .address .billing-address .shipping-content .addr span { - font-size: 16px; - color: #121212; -} - -.complete-page .address .billing-address .shipping-content .horizontal-rule { - margin-top: 7%; - width: 25px; - height: 1px; - vertical-align: middle; - background: #121212; -} - -.complete-page .address .billing-address .shipping-content .contact { - margin-top: 10px; -} - -.complete-page .address .billing-address .shipping-content .contact span { - font-size: 16px; - color: #121212; -} - -.complete-page .product-detail { - height: 200px; - border: 1px solid #E8E8E8; - border-radius: 3px; - margin-top: 30px; - display: -webkit-box; - display: -ms-flexbox; - display: flex; - -webkit-box-orient: horizontal; - -webkit-box-direction: normal; - -ms-flex-direction: row; - flex-direction: row; - margin-top: 30px; -} - -.complete-page .product-detail .product-image { - margin: 20px 0px 20px 20px; -} - -.complete-page .product-detail .product-image img { - height: 160px; - width: 160px; -} - -.complete-page .product-detail .product-desc { - margin-top: 20px; - margin-left: 10px; -} - -.complete-page .product-detail .product-desc .product-title span { - font-size: 18px; - color: #242424; - letter-spacing: -0.43px; - font-weight: bold; -} - -.complete-page .product-detail .product-desc .price { - margin-top: 11px; -} - -.complete-page .product-detail .product-desc .price span label { - font-size: 16px; - color: #5E5E5E; -} - -.complete-page .product-detail .product-desc .price span label.bold { - margin-left: 45px; - font-weight: bold; - font-size: 18px; - color: #242424; -} - -.complete-page .product-detail .product-desc .quantity { - margin-top: 11px; -} - -.complete-page .product-detail .product-desc .quantity span label { - font-size: 16px; - color: #5E5E5E; -} - -.complete-page .product-detail .product-desc .quantity span label.quat-bold { - margin-left: 15px; - font-weight: bold; - font-size: 18px; - color: #242424; -} - -.complete-page .product-detail .product-desc .pro-attribute { - width: 413px; - margin-top: 14px; -} - -.complete-page .product-detail .product-desc .pro-attribute span { - font-size: 16px; - color: #242424; -} - -.complete-page .order-description { - height: 140px; - border-radius: 3px; - margin-top: 30px; - display: -webkit-box; - display: -ms-flexbox; - display: flex; - -webkit-box-orient: horizontal; - -webkit-box-direction: normal; - -ms-flex-direction: row; - flex-direction: row; - -webkit-box-pack: justify; - -ms-flex-pack: justify; - justify-content: space-between; -} - -.complete-page .order-description .payment .shipping { - display: -webkit-box; - display: -ms-flexbox; - display: flex; - -webkit-box-orient: horizontal; - -webkit-box-direction: normal; - -ms-flex-direction: row; - flex-direction: row; -} - -.complete-page .order-description .payment .shipping .pay-icon { - height: 48px; - width: 48px; - border-radius: 50%; - border: 1px solid #E8E8E8; -} - -.complete-page .order-description .payment .shipping .pay-icon img { - margin-left: 8px; - margin-top: 8px; -} - -.complete-page .order-description .payment .shipping .pay-icon span { - margin-left: 10px; - font-size: 16px; - color: #242424; - letter-spacing: -0.38px; -} - -.complete-page .order-description .payment .shipping .shipping-text { - display: -webkit-box; - display: -ms-flexbox; - display: flex; - -webkit-box-orient: vertical; - -webkit-box-direction: normal; - -ms-flex-direction: column; - flex-direction: column; -} - -.complete-page .order-description .payment .shipping .shipping-text .price { - margin-top: 5px; - margin-left: 5px; -} - -.complete-page .order-description .payment .shipping .shipping-text .price span { - font-size: 16px; - color: #242424; - letter-spacing: -0.38px; -} - -.complete-page .order-description .payment .shipping .shipping-text .fedex-shipping { - margin-left: 5px; -} - -.complete-page .order-description .payment .shipping .shipping-text .fedex-shipping span { - font-size: 16px; - color: #242424; - letter-spacing: -0.38px; -} - -.complete-page .order-description .payment .net-banking { - margin-top: 23px; - display: -webkit-box; - display: -ms-flexbox; - display: flex; - -webkit-box-orient: horizontal; - -webkit-box-direction: normal; - -ms-flex-direction: row; - flex-direction: row; -} - -.complete-page .order-description .payment .net-banking .pay-icon { - height: 48px; - width: 48px; - border-radius: 50%; - border: 1px solid #E8E8E8; -} - -.complete-page .order-description .payment .net-banking .pay-icon img { - margin-left: 8px; - margin-top: 8px; -} - -.complete-page .order-description .payment .net-banking span { - margin-left: 5px; - margin-top: 15px; - font-size: 16px; - color: #242424; - letter-spacing: -0.38px; -} - -.complete-page .order-description .product-bill { - height: 200px; - width: 300px; -} - -.complete-page .order-description .product-bill .sub-total span { - font-size: 16px; - color: #242424; - letter-spacing: -0.38px; -} - -.complete-page .order-description .product-bill .sub-total .right { +.checkout-process .order-summary .item-detail label.right { float: right; } -.complete-page .order-description .product-bill .charge-discount { - margin-top: 10px; +.checkout-process .order-summary .payble-amount { + margin-top: 17px; + border-top: 1px solid #c7c7c7; + padding-top: 12px; } -.complete-page .order-description .product-bill .charge-discount span { - font-size: 16px; - color: #242424; - letter-spacing: -0.38px; +.checkout-process .order-summary .payble-amount label { + font-weight: bold; } -.complete-page .order-description .product-bill .charge-discount .right { +.checkout-process .order-summary .payble-amount label.right { float: right; } -.complete-page .order-description .product-bill .horizontal-rule { - margin-top: 5%; - width: 100%; - height: 1px; - vertical-align: middle; - background: #e8e8e8; -} - -.complete-page .order-description .product-bill .amount-pay { - margin-top: 15px; -} - -.complete-page .order-description .product-bill .amount-pay span { - font-size: 16px; - color: #242424; - letter-spacing: -0.38px; -} - -.complete-page .order-description .product-bill .amount-pay .right { - float: right; -} - -.complete-page .horizontal-rule { - width: 100%; - height: 1px; - vertical-align: middle; - background: #e8e8e8; -} - -.complete-page .palce-order-button { - margin-top: 30px; -} - -.complete-page .palce-order-button button { - width: 137px; - height: 38px; - background: #0031F0; - font-size: 14px; - color: #FFFFFF; - letter-spacing: -0.26px; - text-align: center; - border: none; -} - section.review { - font-size: 16px; color: #242424; } @@ -3867,7 +3240,6 @@ section.review .review-layouter .product-info .heading { section.review .review-layouter .product-info .heading span { font-size: 24px; - color: #242424; letter-spacing: -0.58px; } @@ -3883,15 +3255,12 @@ section.review .review-layouter .product-info .price .pro-price { section.review .review-layouter .product-info .price .pro-price-not { margin-left: 10px; - font-size: 16px; color: #A5A5A5; letter-spacing: -0.26px; } section.review .review-layouter .product-info .price .offer { margin-left: 10px; - font-size: 16px; - color: #242424; letter-spacing: -0.26px; } @@ -3905,8 +3274,6 @@ section.review .review-layouter .review-info .heading { } section.review .review-layouter .review-info .heading span { - font-size: 16px; - color: #242424; letter-spacing: -0.26px; } @@ -3917,7 +3284,6 @@ section.review .review-layouter .review-info .heading .btn.btn-primary.right { section.review .review-layouter .review-info .rating { margin-top: 25px; - font-size: 16px; color: #5E5E5E; letter-spacing: -0.12px; } @@ -3963,7 +3329,7 @@ section.review .review-layouter .review-info .submit-button { } section.review .review-layouter .review-info .submit-button button { - background: #0031F0; + background: #0031f0; font-size: 14px; color: #FFFFFF; letter-spacing: -0.26px; @@ -3994,7 +3360,6 @@ section.review .review-layouter .review-info .review-detail .rating-review { section.review .review-layouter .review-info .review-detail .rating-review .avg-rating-count span { font-size: 34px; - color: #242424; letter-spacing: -0.82px; text-align: center; } @@ -4017,7 +3382,7 @@ section.review .review-layouter .review-info .review-detail .rating-calculate .p -webkit-box-direction: normal; -ms-flex-direction: row; flex-direction: row; - border-top: 1px solid #E8E8E8; + border-top: 1px solid #c7c7c7; } .cusomer-section .customer-section-info .pro-img { @@ -4036,8 +3401,7 @@ section.review .review-layouter .review-info .review-detail .rating-calculate .p } .cusomer-section .customer-section-info .pro-discription .title { - font-size: 16px; - color: #0031F0; + color: #0031f0; margin-top: 15px; } @@ -4055,5 +3419,5 @@ section.review .review-layouter .review-info .review-detail .rating-calculate .p } .cusomer-section .customer-section-info:last-child { - border-bottom: 1px solid #e8e8e8; + border-bottom: 1px solid #c7c7c7; } diff --git a/public/themes/default/assets/js/shop.js b/public/themes/default/assets/js/shop.js index eac787839..7c26cd63d 100644 --- a/public/themes/default/assets/js/shop.js +++ b/public/themes/default/assets/js/shop.js @@ -1460,10 +1460,10 @@ $(document).ready(function () { var flashes = this.$refs.flashes; flashMessages.forEach(function (flash) { - console.log(flash); flashes.addFlash(flash); }, this); }, + responsiveHeader: function responsiveHeader() {} } }); From 19775a4017020c96a8b5b86e223a74d5463d8429 Mon Sep 17 00:00:00 2001 From: jitendra Date: Thu, 27 Sep 2018 13:23:26 +0530 Subject: [PATCH 5/5] Checkout review page added --- .../2018_09_19_093453_create_cart_payment.php | 1 + packages/Webkul/Cart/src/Helpers/Checkout.php | 43 +++++++++ packages/Webkul/Cart/src/Models/Cart.php | 6 +- .../Webkul/Cart/src/Models/CartAddress.php | 8 ++ packages/Webkul/Core/src/Core.php | 18 ++++ packages/Webkul/Payment/src/Payment.php | 2 +- .../Webkul/Payment/src/Payment/Payment.php | 10 +-- .../src/Carriers/AbstractShipping.php | 11 +-- .../src/Resources/assets/sass/_variables.scss | 8 +- .../Shop/src/Resources/assets/sass/app.scss | 11 +-- .../Webkul/Shop/src/Resources/lang/en/app.php | 6 +- .../views/checkout/onepage.blade.php | 2 +- .../views/checkout/onepage/payment.blade.php | 2 +- .../views/checkout/onepage/review.blade.php | 80 +++++++++-------- .../Resources/views/products/view.blade.php | 2 +- .../view/configurable-options.blade.php | 2 + public/themes/default/assets/css/shop.css | 89 +++++++++---------- 17 files changed, 180 insertions(+), 121 deletions(-) create mode 100644 packages/Webkul/Cart/src/Helpers/Checkout.php diff --git a/packages/Webkul/Cart/src/Database/Migrations/2018_09_19_093453_create_cart_payment.php b/packages/Webkul/Cart/src/Database/Migrations/2018_09_19_093453_create_cart_payment.php index 9521ad2b6..89ab7fd4d 100644 --- a/packages/Webkul/Cart/src/Database/Migrations/2018_09_19_093453_create_cart_payment.php +++ b/packages/Webkul/Cart/src/Database/Migrations/2018_09_19_093453_create_cart_payment.php @@ -16,6 +16,7 @@ class CreateCartPayment extends Migration Schema::create('cart_payment', function (Blueprint $table) { $table->increments('id'); $table->string('method'); + $table->string('method_title')->nullable(); $table->integer('cart_id')->nullable()->unsigned(); $table->foreign('cart_id')->references('id')->on('cart'); $table->timestamps(); diff --git a/packages/Webkul/Cart/src/Helpers/Checkout.php b/packages/Webkul/Cart/src/Helpers/Checkout.php new file mode 100644 index 000000000..9e695c7db --- /dev/null +++ b/packages/Webkul/Cart/src/Helpers/Checkout.php @@ -0,0 +1,43 @@ +attributeOption = $attributeOption; + } + + /** + * Returns the allowed variants + * + * @param CartItem $item + * @return array + */ + public function getItemOptionDetails($item) + { + $data = []; + + foreach ($item->product->super_attributes as $attribute) { + + } + + return $data; + } +} \ No newline at end of file diff --git a/packages/Webkul/Cart/src/Models/Cart.php b/packages/Webkul/Cart/src/Models/Cart.php index 310d16703..e70421da3 100644 --- a/packages/Webkul/Cart/src/Models/Cart.php +++ b/packages/Webkul/Cart/src/Models/Cart.php @@ -31,7 +31,7 @@ class Cart extends Model /** * Get the biling address for the cart. */ - public function biling_address() + public function billing_address() { return $this->addresses()->where('address_type', 'billing'); } @@ -39,9 +39,9 @@ class Cart extends Model /** * Get all of the attributes for the attribute groups. */ - public function getBilingAddressAttribute() + public function getBillingAddressAttribute() { - return $this->biling_address()->first(); + return $this->billing_address()->first(); } /** diff --git a/packages/Webkul/Cart/src/Models/CartAddress.php b/packages/Webkul/Cart/src/Models/CartAddress.php index 889328d39..935b09eb0 100644 --- a/packages/Webkul/Cart/src/Models/CartAddress.php +++ b/packages/Webkul/Cart/src/Models/CartAddress.php @@ -18,4 +18,12 @@ class CartAddress extends Model { return $this->hasMany(CartShippingRate::class); } + + /** + * Get all of the attributes for the attribute groups. + */ + public function getNameAttribute() + { + return $this->first_name . ' ' . $this->last_name; + } } \ No newline at end of file diff --git a/packages/Webkul/Core/src/Core.php b/packages/Webkul/Core/src/Core.php index 35aa98a5d..2375fc466 100644 --- a/packages/Webkul/Core/src/Core.php +++ b/packages/Webkul/Core/src/Core.php @@ -8,6 +8,7 @@ use Webkul\Core\Models\Locale as LocaleModel; use Webkul\Core\Models\Currency as CurrencyModel; use Webkul\Core\Models\TaxCategory as TaxCategory; use Webkul\Core\Models\TaxRate as TaxRate; +use Illuminate\Support\Facades\Config; class Core { @@ -276,4 +277,21 @@ class Core return $date->format($format); } + + /** + * Retrieve information from payment configuration + * + * @param string $field + * @param int|string|null $channelId + * + * @return mixed + */ + public function getConfigData($field, $channelId = null) + { + if (null === $channelId) { + $channelId = $this->getCurrentChannel()->id; + } + + return Config::get($field); + } } \ No newline at end of file diff --git a/packages/Webkul/Payment/src/Payment.php b/packages/Webkul/Payment/src/Payment.php index ebbd54637..da4d78114 100644 --- a/packages/Webkul/Payment/src/Payment.php +++ b/packages/Webkul/Payment/src/Payment.php @@ -21,7 +21,7 @@ class Payment if($object->isAvailable()) { $paymentMethods[] = [ 'method' => $object->getCode(), - 'title' => $object->getTitle(), + 'method_title' => $object->getTitle(), 'description' => $object->getDescription(), ]; } diff --git a/packages/Webkul/Payment/src/Payment/Payment.php b/packages/Webkul/Payment/src/Payment/Payment.php index 6b4c0a063..4f3f5242c 100644 --- a/packages/Webkul/Payment/src/Payment/Payment.php +++ b/packages/Webkul/Payment/src/Payment/Payment.php @@ -58,14 +58,8 @@ abstract class Payment * * @return mixed */ - public function getConfigData($field, $channelId = null) + public function getConfigData($field) { - if (null === $channelId) { - $channelId = core()->getCurrentChannel()->id; - } - - $paymentConfig = Config::get('paymentmethods.' . $this->getCode()); - - return $paymentConfig[$field]; + return core()->getConfigData('paymentmethods.' . $this->getCode() . '.' . $field); } } \ No newline at end of file diff --git a/packages/Webkul/Shipping/src/Carriers/AbstractShipping.php b/packages/Webkul/Shipping/src/Carriers/AbstractShipping.php index 55cb97848..53be021ac 100644 --- a/packages/Webkul/Shipping/src/Carriers/AbstractShipping.php +++ b/packages/Webkul/Shipping/src/Carriers/AbstractShipping.php @@ -67,16 +67,9 @@ abstract class AbstractShipping * * @return mixed */ - public function getConfigData($field, $channelId = null) + public function getConfigData($field) { - if (null === $channelId) { - $channelId = core()->getCurrentChannel()->id; - } - - $shippingConfig = Config::get('carriers.' . $this->getCode()); - - return $shippingConfig[$field]; + return core()->getConfigData('carriers.' . $this->getCode() . '.' . $field); } - } ?> \ No newline at end of file diff --git a/packages/Webkul/Shop/src/Resources/assets/sass/_variables.scss b/packages/Webkul/Shop/src/Resources/assets/sass/_variables.scss index 67c473993..b9b2593e8 100644 --- a/packages/Webkul/Shop/src/Resources/assets/sass/_variables.scss +++ b/packages/Webkul/Shop/src/Resources/assets/sass/_variables.scss @@ -1,12 +1,14 @@ //shop variables $font-color: #242424; -$border-color: #E8E8E8; $font-size-base: 16px; -$border-color: #c7c7c7; +$border-color: #E8E8E8; $brand-color: #0031f0; //shop variables ends here + +//=======>Need to be removed //customer variables $profile-content-color: #5e5e5e; $horizontal-rule-color: #E8E8E8; -//customer variables ends here \ No newline at end of file +//customer variables ends here +//<=======Need to be removed \ No newline at end of file diff --git a/packages/Webkul/Shop/src/Resources/assets/sass/app.scss b/packages/Webkul/Shop/src/Resources/assets/sass/app.scss index 07fbc6dc6..970be8186 100644 --- a/packages/Webkul/Shop/src/Resources/assets/sass/app.scss +++ b/packages/Webkul/Shop/src/Resources/assets/sass/app.scss @@ -1,6 +1,4 @@ - @import url("https://fonts.googleapis.com/css?family=Montserrat:400,500"); - @import "icons"; @import "mixins"; @import "variables"; @@ -3189,14 +3187,7 @@ section.cart { .address-card { width: 50%; - - &.left { - float: left; - } - - &.right { - float: right; - } + float: left; .card-title span { font-weight: 600; diff --git a/packages/Webkul/Shop/src/Resources/lang/en/app.php b/packages/Webkul/Shop/src/Resources/lang/en/app.php index 736b6ba5e..d2ccf7be8 100644 --- a/packages/Webkul/Shop/src/Resources/lang/en/app.php +++ b/packages/Webkul/Shop/src/Resources/lang/en/app.php @@ -90,7 +90,11 @@ return [ 'payment-information' => 'Payment Information', 'summary' => 'Summary of Order', 'price' => 'Price', - 'quantity' => 'Quantity' + 'quantity' => 'Quantity', + 'billing-address' => 'Billing Address', + 'shipping-address' => 'Shipping Address', + 'contact' => 'Contact', + 'place-order' => 'Place Order' ], 'total' => [ 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 17b2889c8..11de9111c 100644 --- a/packages/Webkul/Shop/src/Resources/views/checkout/onepage.blade.php +++ b/packages/Webkul/Shop/src/Resources/views/checkout/onepage.blade.php @@ -88,7 +88,7 @@
diff --git a/packages/Webkul/Shop/src/Resources/views/checkout/onepage/payment.blade.php b/packages/Webkul/Shop/src/Resources/views/checkout/onepage/payment.blade.php index d5dba6af8..e12395dbf 100644 --- a/packages/Webkul/Shop/src/Resources/views/checkout/onepage/payment.blade.php +++ b/packages/Webkul/Shop/src/Resources/views/checkout/onepage/payment.blade.php @@ -13,7 +13,7 @@ - {{ $payment['title'] }} + {{ $payment['method_title'] }} {{ $payment['description'] }} diff --git a/packages/Webkul/Shop/src/Resources/views/checkout/onepage/review.blade.php b/packages/Webkul/Shop/src/Resources/views/checkout/onepage/review.blade.php index 6ca9b95ea..33f4b31d7 100644 --- a/packages/Webkul/Shop/src/Resources/views/checkout/onepage/review.blade.php +++ b/packages/Webkul/Shop/src/Resources/views/checkout/onepage/review.blade.php @@ -5,37 +5,41 @@
-
-
- Shipping address + @if ($billingAddress = $cart->billing_address) +
+
+ {{ __('shop::app.checkout.onepage.billing-address') }} +
+ +
+ {{ $billingAddress->name }}
+ {{ $billingAddress->address1 }}, {{ $billingAddress->address2 ? $billingAddress->address2 . ',' : '' }} {{ $billingAddress->state }}
+ {{ country()->name($billingAddress->country) }} {{ $billingAddress->postcode }}
+ + + + {{ __('shop::app.checkout.onepage.contact') }} : {{ $billingAddress->phone }} +
+ @endif -
- John Doe
- 25 , Washington
- USA 5751434
- - + @if ($shippingAddress = $cart->shipping_address) +
+
+ {{ __('shop::app.checkout.onepage.shipping-address') }} +
- Contact : 9876543210 +
+ {{ $shippingAddress->name }}
+ {{ $shippingAddress->address1 }}, {{ $shippingAddress->address2 ? $shippingAddress->address2 . ',' : '' }} , {{ $shippingAddress->state }}
+ {{ country()->name($shippingAddress->country) }} {{ $shippingAddress->postcode }}
+ + + + {{ __('shop::app.checkout.onepage.contact') }} : {{ $shippingAddress->phone }} +
-
- -
-
- Billing address -
- -
- John Doe
- 25 , Washington
- USA 5751434
- - - - Contact : 9876543210 -
-
+ @endif
@@ -79,9 +83,15 @@
-
- Color : Gray, Size : S -
+ @if ($product->type == 'configurable') +
+ @foreach ($product->super_attributes as $attribute) + + {{ $attribute->name . ' : ' . $product->{$attribute->code} }}, + + @endforeach +
+ @endif
@@ -91,7 +101,7 @@
-
+
@@ -99,10 +109,10 @@
- $ 25.00 + {{ core()->currency($cart->selected_shipping_rate->base_price) }}
- FedEx Shipping + {{ $cart->selected_shipping_rate->method_title }}
@@ -113,13 +123,13 @@
- Net banking + {{ core()->getConfigData('paymentmethods.' . $cart->payment->method . '.title') }}
-
+
@include('shop::checkout.total.summary', ['cart' => $cart]) 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 8d61b6af9..8ff545cc2 100644 --- a/packages/Webkul/Shop/src/Resources/views/products/view.blade.php +++ b/packages/Webkul/Shop/src/Resources/views/products/view.blade.php @@ -11,7 +11,7 @@ Home > Men > Slit Open Jeans
-
+ @csrf() diff --git a/packages/Webkul/Shop/src/Resources/views/products/view/configurable-options.blade.php b/packages/Webkul/Shop/src/Resources/views/products/view/configurable-options.blade.php index b22edf9f1..53e7d6939 100644 --- a/packages/Webkul/Shop/src/Resources/views/products/view/configurable-options.blade.php +++ b/packages/Webkul/Shop/src/Resources/views/products/view/configurable-options.blade.php @@ -49,6 +49,8 @@ template: '#product-options-template', + inject: ['$validator'], + data: () => ({ config: @json($config), diff --git a/public/themes/default/assets/css/shop.css b/public/themes/default/assets/css/shop.css index d341e82b8..84a0cc127 100644 --- a/public/themes/default/assets/css/shop.css +++ b/public/themes/default/assets/css/shop.css @@ -147,7 +147,7 @@ body { .header .header-top div.left-content ul.search-container li.search-group .search-field { height: 38px; - border: 2px solid #c7c7c7; + border: 2px solid #E8E8E8; border-radius: 3px; border-right: none; border-top-right-radius: 0px; @@ -162,7 +162,7 @@ body { box-sizing: border-box; height: 38px; width: 38px; - border: 2px solid #c7c7c7; + border: 2px solid #E8E8E8; border-top-right-radius: 3px; border-bottom-right-radius: 3px; } @@ -192,7 +192,7 @@ body { .header .header-top div.right-content ul.account-dropdown-container { float: right; - border-right: 2px solid #c7c7c7; + border-right: 2px solid #E8E8E8; } .header .header-top div.right-content ul.account-dropdown-container li.account-dropdown { @@ -473,8 +473,8 @@ body { display: none; } .header .search-suggestion .search-content { - border-top: 1px solid #c7c7c7; - border-bottom: 1px solid #c7c7c7; + border-top: 1px solid #E8E8E8; + border-bottom: 1px solid #E8E8E8; height: 48px; } .header .search-suggestion .search-content .icon.search-icon { @@ -493,7 +493,7 @@ body { margin-top: 14px; height: 32px; margin-bottom: 14px; - border-bottom: 1px solid #c7c7c7; + border-bottom: 1px solid #E8E8E8; } .header .search-suggestion .suggestion span { margin-left: 48px; @@ -513,7 +513,7 @@ body { } .header .header-bottom .nav > li { float: none; - border-bottom: 1px solid #c7c7c7; + border-bottom: 1px solid #E8E8E8; } .header .header-bottom .nav > li a { margin-left: 10px; @@ -524,7 +524,7 @@ body { margin-right: 5px; } .header .header-bottom .nav > li:first-child { - border-top: 1px solid #c7c7c7; + border-top: 1px solid #E8E8E8; } .header .header-bottom .nav > li:last-child { float: none; @@ -634,7 +634,7 @@ body { } .header .header-bottom .nav > li { float: none; - border-bottom: 1px solid #c7c7c7; + border-bottom: 1px solid #E8E8E8; } .header .header-bottom .nav > li a { margin-left: 10px; @@ -645,7 +645,7 @@ body { margin-right: 5px; } .header .header-bottom .nav > li:first-child { - border-top: 1px solid #c7c7c7; + border-top: 1px solid #E8E8E8; } .header .header-bottom .nav > li:last-child { float: none; @@ -772,13 +772,13 @@ section.slider-block div.slider-content div.slider-control .light-right-icon { } .layered-filter-wrapper .filter-title { - border-bottom: 1px solid #c7c7c7; + border-bottom: 1px solid #E8E8E8; color: #242424; padding: 10px 0; } .layered-filter-wrapper .filter-attributes .filter-attributes-item { - border-bottom: 1px solid #c7c7c7; + border-bottom: 1px solid #E8E8E8; padding-bottom: 10px; } @@ -1144,7 +1144,7 @@ section.slider-block div.slider-content div.slider-control .light-right-icon { font-size: 12px; } .main-container-wrapper .top-toolbar { - border-bottom: 1px solid #c7c7c7; + border-bottom: 1px solid #E8E8E8; margin-bottom: 10px; } .main-container-wrapper .top-toolbar .page-info span:first-child { @@ -1218,7 +1218,7 @@ section.slider-block div.slider-content div.slider-control .light-right-icon { font-size: 12px; } .main-container-wrapper .top-toolbar { - border-bottom: 1px solid #c7c7c7; + border-bottom: 1px solid #E8E8E8; margin-bottom: 10px; } .main-container-wrapper .top-toolbar .page-info span:first-child { @@ -1379,7 +1379,7 @@ section.slider-block div.slider-content div.slider-control .light-right-icon { display: -ms-flexbox; display: flex; background: #f2f2f2; - border: 1px solid #c7c7c7; + border: 1px solid #E8E8E8; -webkit-box-orient: vertical; -webkit-box-direction: normal; -ms-flex-direction: column; @@ -1454,7 +1454,7 @@ section.slider-block div.slider-content div.slider-control .light-right-icon { -webkit-box-pack: start; -ms-flex-pack: start; justify-content: flex-start; - border: 1px solid #c7c7c7; + border: 1px solid #E8E8E8; background: #f2f2f2; width: 25%; height: 100%; @@ -1479,7 +1479,7 @@ section.slider-block div.slider-content div.slider-control .light-right-icon { -webkit-box-align: center; -ms-flex-align: center; align-items: center; - border-bottom: 1px solid #c7c7c7; + border-bottom: 1px solid #E8E8E8; text-align: center; } @@ -1521,7 +1521,7 @@ section.slider-block div.slider-content div.slider-control .light-right-icon { width: 100%; height: 1px; vertical-align: middle; - background: #c7c7c7; + background: #E8E8E8; } .account-content .profile-content { @@ -1556,7 +1556,7 @@ section.slider-block div.slider-content div.slider-control .light-right-icon { display: -ms-flexbox; display: flex; background: #f2f2f2; - border: 1px solid #c7c7c7; + border: 1px solid #E8E8E8; -webkit-box-orient: vertical; -webkit-box-direction: normal; -ms-flex-direction: column; @@ -1837,7 +1837,7 @@ section.product-detail div.layouter form .details .attributes { section.product-detail div.layouter form .details { width: 100%; margin-top: 20px; - border-bottom: 1px solid #c7c7c7; + border-bottom: 1px solid #E8E8E8; } section.product-detail div.layouter form .details .attributes { border-bottom: none; @@ -1886,7 +1886,7 @@ section.product-detail div.layouter form .details .attributes { section.product-detail div.layouter form .details { width: 100%; margin-top: 20px; - border-bottom: 1px solid #c7c7c7; + border-bottom: 1px solid #E8E8E8; } section.product-detail div.layouter form .details .attributes { border-bottom: none; @@ -2019,7 +2019,7 @@ section.cart .cart-content { width: 100%; height: 1px; vertical-align: middle; - background: #c7c7c7; + background: #E8E8E8; } .cart .right-side .price-section .total-details { @@ -2071,7 +2071,7 @@ section.cart .cart-content { width: 100%; height: 1px; vertical-align: middle; - background: #c7c7c7; + background: #E8E8E8; margin-bottom: 9px; } @@ -2166,7 +2166,7 @@ section.cart .cart-content { width: 60px; text-align: center; line-height: 38px; - border: 1px solid #c7c7c7; + border: 1px solid #E8E8E8; border-radius: 3px; margin-right: 30px; } @@ -2282,7 +2282,7 @@ section.cart .cart-content { width: 100%; height: 1px; vertical-align: middle; - background: #c7c7c7; + background: #E8E8E8; } .order .order-section-head-small { @@ -2352,7 +2352,7 @@ section.cart .cart-content { width: 100%; height: 1px; vertical-align: middle; - background: #c7c7c7; + background: #E8E8E8; } .order .order-details { @@ -2486,7 +2486,7 @@ section.cart .cart-content { width: 100%; height: 1px; vertical-align: middle; - background: #c7c7c7; + background: #E8E8E8; } .order .order-information { @@ -2554,7 +2554,7 @@ section.cart .cart-content { margin-bottom: 13px; } .order .order-section-head-small .horizon-rule { - border: 0.5px solid #c7c7c7; + border: 0.5px solid #E8E8E8; width: 150%; margin-left: -10%; margin-right: -10%; @@ -2616,7 +2616,7 @@ section.cart .cart-content { width: 100%; height: 1px; vertical-align: middle; - background: #c7c7c7; + background: #E8E8E8; } .order .order-details { display: none; @@ -2687,7 +2687,7 @@ section.cart .cart-content { display: none; } .order .product-config { - border: 1px solid #c7c7c7; + border: 1px solid #E8E8E8; height: 19%; width: 100%; margin-top: 10px; @@ -2778,7 +2778,7 @@ section.cart .cart-content { margin-bottom: 13px; } .order .order-section-head-small .horizon-rule { - border: 0.5px solid #c7c7c7; + border: 0.5px solid #E8E8E8; width: 150%; margin-left: -10%; margin-right: -10%; @@ -2840,7 +2840,7 @@ section.cart .cart-content { width: 100%; height: 1px; vertical-align: middle; - background: #c7c7c7; + background: #E8E8E8; } .order .order-details { display: none; @@ -2911,7 +2911,7 @@ section.cart .cart-content { display: none; } .order .product-config { - border: 1px solid #c7c7c7; + border: 1px solid #E8E8E8; height: 19%; width: 100%; margin-top: 10px; @@ -2992,7 +2992,7 @@ section.cart .cart-content { justify-content: space-between; width: 100%; padding-bottom: 15px; - border-bottom: 1px solid #c7c7c7; + border-bottom: 1px solid #E8E8E8; } .checkout-process .col-main ul.checkout-steps li { @@ -3010,7 +3010,7 @@ section.cart .cart-content { display: -webkit-inline-box; display: -ms-inline-flexbox; display: inline-flex; - border: 1px solid #c7c7c7; + border: 1px solid #E8E8E8; background-repeat: no-repeat; background-position: center; } @@ -3071,7 +3071,7 @@ section.cart .cart-content { } .checkout-process .col-main .step-content .form-container { - border-bottom: 1px solid #c7c7c7; + border-bottom: 1px solid #E8E8E8; padding-top: 20px; padding-bottom: 20px; } @@ -3095,16 +3095,9 @@ section.cart .cart-content { .checkout-process .col-main .step-content .address .address-card { width: 50%; -} - -.checkout-process .col-main .step-content .address .address-card.left { float: left; } -.checkout-process .col-main .step-content .address .address-card.right { - float: right; -} - .checkout-process .col-main .step-content .address .address-card .card-title span { font-weight: 600; } @@ -3123,7 +3116,7 @@ section.cart .cart-content { } .checkout-process .col-main .step-content .cart-item-list .item { - border: 1px solid #c7c7c7; + border: 1px solid #E8E8E8; border-radius: 3px; padding: 20px; } @@ -3154,7 +3147,7 @@ section.cart .cart-content { height: 48px; width: 48px; border-radius: 50%; - border: 1px solid #c7c7c7; + border: 1px solid #E8E8E8; vertical-align: middle; display: inline-block; text-align: center; @@ -3194,7 +3187,7 @@ section.cart .cart-content { .checkout-process .order-summary .payble-amount { margin-top: 17px; - border-top: 1px solid #c7c7c7; + border-top: 1px solid #E8E8E8; padding-top: 12px; } @@ -3382,7 +3375,7 @@ section.review .review-layouter .review-info .review-detail .rating-calculate .p -webkit-box-direction: normal; -ms-flex-direction: row; flex-direction: row; - border-top: 1px solid #c7c7c7; + border-top: 1px solid #E8E8E8; } .cusomer-section .customer-section-info .pro-img { @@ -3419,5 +3412,5 @@ section.review .review-layouter .review-info .review-detail .rating-calculate .p } .cusomer-section .customer-section-info:last-child { - border-bottom: 1px solid #c7c7c7; + border-bottom: 1px solid #E8E8E8; }