From 03e18ca3987c7429007ca6a6df9cd9e42bcbcc6e Mon Sep 17 00:00:00 2001 From: rahul shukla Date: Wed, 20 Mar 2019 10:29:13 +0530 Subject: [PATCH 001/678] changes & fixes in installer --- public/installer/Admin.php | 20 +- public/installer/Classes/Permission.php | 112 --------- public/installer/Environment.php | 148 ++++++----- public/installer/Finish.php | 17 +- public/installer/Migration.php | 25 +- public/installer/Seeder.php | 2 +- public/installer/Views/permission.blade.php | 61 ----- public/installer/Views/requirements.blade.php | 25 +- public/installer/Views/welcome.blade.php | 14 +- public/installer/index.php | 229 ++++++++++-------- 10 files changed, 227 insertions(+), 426 deletions(-) delete mode 100755 public/installer/Classes/Permission.php delete mode 100755 public/installer/Views/permission.blade.php diff --git a/public/installer/Admin.php b/public/installer/Admin.php index 8234dc7eb..9c279dfd1 100755 --- a/public/installer/Admin.php +++ b/public/installer/Admin.php @@ -1,18 +1,9 @@ - - - Bagisto Installer - - - - -
-
- +

Admin Details

@@ -49,10 +40,6 @@
-
@@ -63,7 +50,6 @@ $.validate({}); - - - -
-
- +

Environment Configuration

-
-
-
+ +
+
+
+
+
+ +
-
-
- - -
-
- - -
+
+ + +
-
- - -
+
+ + +
-
- - -
+
+ + +
-
- - -
+
+ + +
-
- - -
+
+ + +
-
- - -
+
+ + +
-
- - -
+
+ +
-
- -
- back -
+
+
+ +
+ back
- +
+
- -
@@ -128,10 +114,12 @@ }; + var target = window.location.href.concat('/EnvConfig.php'); + // process the form $.ajax({ type : 'POST', - url : 'EnvConfig.php', + url : target, data : formData, dataType : 'json', encode : true diff --git a/public/installer/Finish.php b/public/installer/Finish.php index 6f3a72dbd..7ccf136ed 100755 --- a/public/installer/Finish.php +++ b/public/installer/Finish.php @@ -1,16 +1,9 @@ - - - Bagisto Installer - - -
-
- +

Finish Installment

@@ -23,10 +16,6 @@
-
@@ -37,8 +26,8 @@ function finish() { lastIndex = window.location.href.lastIndexOf("/"); - secondlast = window.location.href.slice(0,lastIndex).lastIndexOf("/"); - next = window.location.href.slice(0,secondlast); + secondlast = window.location.href.slice(0, lastIndex).lastIndexOf("/"); + next = window.location.href.slice(0, secondlast); next = next.concat('/admin/login'); window.location.href = next; } diff --git a/public/installer/Migration.php b/public/installer/Migration.php index e9fae10f4..e3d346063 100755 --- a/public/installer/Migration.php +++ b/public/installer/Migration.php @@ -1,10 +1,4 @@ - - - Bagisto Installer - - - - - - -
-
-

Migration & Seed

- -
-
- -
-
-
-
-
-
-
-
-
-
-
- -
-
- Click the below button to run following : -
-
- Database Migartion -
-
- Database Seeder -
-
- Publishing Vendor -
-
- Generating Application Key -
-
- - Checking Composer Dependency - Migrating Database - Seeding Data -
- -
-
- - -
-
- back -
-
- -
-
- - - - - - \ No newline at end of file diff --git a/public/installer/MigrationRun.php b/public/installer/MigrationRun.php deleted file mode 100755 index fcb9bb1c1..000000000 --- a/public/installer/MigrationRun.php +++ /dev/null @@ -1,14 +0,0 @@ -&1'; -$seeder = 'cd ../.. && php artisan db:seed 2>&1'; -$publish = 'cd ../.. && php artisan vendor:publish --all --force 2>&1'; - -$key_output = exec($key, $data['key'], $data['key_results']); -$seeder_output = exec($seeder, $data['seeder'], $data['seeder_results']); -$publish = exec($publish, $data['publish'], $data['publish_results']); - -// return a response -//return all our data to an AJAX call - -echo json_encode($data); \ No newline at end of file diff --git a/public/installer/Views/requirements.blade.php b/public/installer/Views/requirements.blade.php deleted file mode 100755 index a746ac2a4..000000000 --- a/public/installer/Views/requirements.blade.php +++ /dev/null @@ -1,70 +0,0 @@ - - - - - - -
-
-

Requirement

- -
-
- Please wait while we are checking the requirements -
- -
- - - - PHP - ( or Higher) -
- - $require): ?> - - $enabled) : ?> -
- - - - - ( Required) -
- - - - - - - - Composer - - - -
- - - -
- -
- - -
- -
- - - -
-
- - - - diff --git a/public/installer/Views/welcome.blade.php b/public/installer/Views/welcome.blade.php deleted file mode 100755 index 4230adedd..000000000 --- a/public/installer/Views/welcome.blade.php +++ /dev/null @@ -1,44 +0,0 @@ - - - - -
-
-

Welcome to Bagisto

- -
-
- - Have you ever heard of an old saying, “No man is an island”? We probably heard that a million times. That saying is actually true because when we became successful, we usually achieve that because someone has helped us. And our thank-you speech skills could be the best thing we can do in return. You may also see - - -
- INTRODUCTION -
- - - Have you ever heard of an old saying, “No man is an island”? We probably heard that a million times. That saying is actually true because when we became successful, we usually achieve that because someone has helped us. And our thank-you speech skills could be the best thing we can do in return. You may also see - -
-
- -
- -
-
-
- - - - - - - - - - - - - - - diff --git a/public/installer/index.php b/public/installer/index.php deleted file mode 100755 index 46853c3f3..000000000 --- a/public/installer/index.php +++ /dev/null @@ -1,139 +0,0 @@ - - - - - - - Bagisto Installer - - - - - - - - -
-
- -
- - -
- - connect_error) { - // retrieving admin entry - $sql = "SELECT id, name FROM admins"; - $result = $conn->query($sql); - - if ($result) { - $installed = true; - } - } - - $conn->close(); - } else { - $installed = true; - } - } - - if (!$installed) { - - // including classes - include __DIR__ . '/Classes/Requirement.php'; - - // including php files - include __DIR__ . '/Environment.php'; - include __DIR__ . '/Migration.php'; - include __DIR__ . '/Admin.php'; - include __DIR__ . '/Finish.php'; - - // including js - include __DIR__ . '/JS/script'; - - // object creation - $requirement = new Requirement(); - echo $requirement->render(); - } else { - // getting url - $actual_link = (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] === 'on' ? "https" : "http") . "://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]"; - - $url = explode("/", $actual_link); - array_pop($url); - array_pop($url); - $url = implode("/", $url); - $url = $url . '/404'; - - // redirecting to 404 error page - header("Location: $url"); - } - ?> - - - diff --git a/public/installer/install.php b/public/installer/install.php deleted file mode 100755 index 4378aacef..000000000 --- a/public/installer/install.php +++ /dev/null @@ -1,88 +0,0 @@ -connect_error) { - // retrieving admin entry - $sql = "SELECT id, name FROM admins"; - $result = $conn->query($sql); - - if ($result) { - $installed = true; - } - } - - $conn->close(); - } else { - $installed = true; - } - } - - if (!$installed) { - // getting url - $actual_link = (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] === 'on' ? "https" : "http") . "://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]"; - - $url = explode("/", $actual_link); - array_pop($url); - $url = implode("/", $url); - $url = $url . '/installer'; - - return $url; - } else { - return null; - } -?> - - - From 4ab1e86d984e9ad8d466aa25b884dcf583727fb2 Mon Sep 17 00:00:00 2001 From: Prashant Singh Date: Fri, 24 May 2019 20:07:58 +0530 Subject: [PATCH 260/678] designing process to get suitable discount rules --- .../Seeders/CustomerGroupTableSeeder.php | 4 + .../Http/Controllers/CustomerController.php | 1 - .../Webkul/Discount/src/Helpers/Discount.php | 33 ++++++ .../Http/Controllers/CartRuleController.php | 5 + .../src/Http/Controllers/HomeController.php | 67 ++++++++++- .../Shop/src/Resources/assets/sass/app.scss | 110 ++++++++++++++++++ .../views/checkout/onepage/review.blade.php | 2 - .../views/checkout/total/summary.blade.php | 8 ++ .../views/layouts/footer/footer.blade.php | 27 +---- .../views/products/add-buttons.blade.php | 39 ++++--- .../Resources/views/products/index.blade.php | 8 +- .../Resources/views/products/view.blade.php | 2 + .../views/products/view/gallery.blade.php | 50 +++++--- .../views/products/wishlist.blade.php | 2 +- 14 files changed, 289 insertions(+), 69 deletions(-) create mode 100644 packages/Webkul/Discount/src/Helpers/Discount.php diff --git a/packages/Webkul/Customer/src/Database/Seeders/CustomerGroupTableSeeder.php b/packages/Webkul/Customer/src/Database/Seeders/CustomerGroupTableSeeder.php index b4457f230..6a83e7b4d 100755 --- a/packages/Webkul/Customer/src/Database/Seeders/CustomerGroupTableSeeder.php +++ b/packages/Webkul/Customer/src/Database/Seeders/CustomerGroupTableSeeder.php @@ -19,6 +19,10 @@ class CustomerGroupTableSeeder extends Seeder 'id' => 2, 'name' => 'Wholesale', 'is_user_defined' => 0, + ], [ + 'id' => 3, + 'name' => 'Not Logged In', + 'is_user_defined' => 0, ]); } } \ No newline at end of file diff --git a/packages/Webkul/Customer/src/Http/Controllers/CustomerController.php b/packages/Webkul/Customer/src/Http/Controllers/CustomerController.php index d2befe446..a2270025d 100755 --- a/packages/Webkul/Customer/src/Http/Controllers/CustomerController.php +++ b/packages/Webkul/Customer/src/Http/Controllers/CustomerController.php @@ -67,7 +67,6 @@ class CustomerController extends Controller */ public function index() { - dd(auth()->guard('customer')->user()->group); $customer = $this->customer->find(auth()->guard('customer')->user()->id); return view($this->_config['view'], compact('customer')); diff --git a/packages/Webkul/Discount/src/Helpers/Discount.php b/packages/Webkul/Discount/src/Helpers/Discount.php new file mode 100644 index 000000000..d490199cd --- /dev/null +++ b/packages/Webkul/Discount/src/Helpers/Discount.php @@ -0,0 +1,33 @@ +cartRule = $cartRule; + } + + public function checkCoupon() + { + foreach($this->cartRule->all() as $rule) { + return $rule->name; + } + } + + public function findAllRules() + { + $rules = $this->cartRule->all(); + + $channel = core()->getCurrentChannel(); + $locales = $channel->locales; + } +} \ No newline at end of file diff --git a/packages/Webkul/Discount/src/Http/Controllers/CartRuleController.php b/packages/Webkul/Discount/src/Http/Controllers/CartRuleController.php index 7094c8c83..dd076665a 100644 --- a/packages/Webkul/Discount/src/Http/Controllers/CartRuleController.php +++ b/packages/Webkul/Discount/src/Http/Controllers/CartRuleController.php @@ -124,6 +124,11 @@ class CartRuleController extends Controller $data = request()->all(); + if ($data['starts_from'] == "" || $data['ends_till'] == "") { + $data['starts_from'] = null; + $data['ends_till'] = null; + } + unset($data['_token']); $channels = $data['channels']; diff --git a/packages/Webkul/Shop/src/Http/Controllers/HomeController.php b/packages/Webkul/Shop/src/Http/Controllers/HomeController.php index dc4f55dac..50e40b9b0 100755 --- a/packages/Webkul/Shop/src/Http/Controllers/HomeController.php +++ b/packages/Webkul/Shop/src/Http/Controllers/HomeController.php @@ -6,7 +6,8 @@ use Webkul\Shop\Http\Controllers\Controller; use Illuminate\Http\Request; use Illuminate\Http\Response; use Webkul\Core\Repositories\SliderRepository; - +use Webkul\Discount\Repositories\CartRuleRepository as CartRule; +use Carbon\Carbon; /** * Home page controller * @@ -21,11 +22,15 @@ use Webkul\Core\Repositories\SliderRepository; protected $current_channel; - public function __construct(SliderRepository $sliderRepository) + protected $cartRule; + + public function __construct(SliderRepository $sliderRepository, CartRule $cartRule) { $this->_config = request('_config'); $this->sliderRepository = $sliderRepository; + + $this->cartRule = $cartRule; } /** @@ -35,6 +40,64 @@ use Webkul\Core\Repositories\SliderRepository; { $currentChannel = core()->getCurrentChannel(); + $rules = $this->cartRule->findWhere(['status' => 1, 'end_other_rules' => 1]); + + $suitableRules = array(); + if ($rules->count() == 0) { + $rules = $this->cartRule->findWhere(['status' => 1]); + } else { + foreach ($rules as $rule) { + foreach($rule->channels as $channel) { + if ($channel->channel_id == $currentChannel->id) { + if (auth()->guard('customer')->check()) { + foreach ($rule->customer_groups as $customerGroup) { + if (auth()->guard('customer')->user()->customer_group_id == $customerGroup->customer_group_id) + array_push($suitableRules, $rule); + } + } + } + } + } + + // suitable rules will now be checked against the + if (count($suitableRules) == 1) { + $rule = reset($suitableRules); + } else if (count($suitableRules) > 1) { + $priorities = array(); + + $leastPriority = 999999999999; + foreach ($suitableRules as $rule) { + if ($leastPriority > $rule->priority) { + $leastPriority = $rule->priority; + } + } + + $leastId = 999999999999; + foreach ($suitableRules as $rule) { + if ($rule->id < $leastId) { + $leastId = $rule->id; + } + } + + if ($leastId != 999999999999) { + $rule = $this->cartRule->find($leastId); + } + } + // foreach($rules as $rule) { + // foreach($rule->channels as $channel) { + + // } + // $starts_from = Carbon::parse($rule->starts_from); + // $ends_till = Carbon::parse($rule->ends_till); + + // $now = Carbon::now(); + + // if ($now->greaterThanOrEqualTo($starts_from) && $now->lessThanOrEqualTo($ends_till)) { + // dd('date time matched'); + // } + // } + } + $sliderData = $this->sliderRepository->findByField('channel_id', $currentChannel->id)->toArray(); return view($this->_config['view'], compact('sliderData')); diff --git a/packages/Webkul/Shop/src/Resources/assets/sass/app.scss b/packages/Webkul/Shop/src/Resources/assets/sass/app.scss index f84567e73..69ce21f6b 100755 --- a/packages/Webkul/Shop/src/Resources/assets/sass/app.scss +++ b/packages/Webkul/Shop/src/Resources/assets/sass/app.scss @@ -38,6 +38,116 @@ input { border-radius: 0px !important; } +//margin bottom classes +.mb-10 { + margin-bottom: 10px; +} + +.mb-15 { + margin-bottom: 15px; +} + +.mb-20 { + margin-bottom: 20px; +} + +.mb-25 { + margin-bottom: 25px; +} + +.mb-30 { + margin-bottom: 30px; +} + +.mb-35 { + margin-bottom: 35px; +} + +.mb-40 { + margin-bottom: 40px; +} + +.mb-45 { + margin-bottom: 45px; +} + +.mb-50 { + margin-bottom: 50px; +} + +.mb-60 { + margin-bottom: 60px; +} + +.mb-70 { + margin-bottom: 70px; +} + +.mb-80 { + margin-bottom: 80px; +} + +.mb-90 { + margin-bottom: 90px; +} + +//margin-top +.mt-5 { + margin-top: 5px; +} + +.mt-10 { + margin-top: 10px; +} + +.mt-15 { + margin-top: 15px; +} + +.mt-20 { + margin-top: 20px; +} + +.mt-25 { + margin-top: 25px; +} + +.mt-30 { + margin-top: 30px; +} + +.mt-35 { + margin-top: 35px; +} + +.mt-40 { + margin-top: 40px; +} + +.mt-45 { + margin-top: 45px; +} + +.mt-50 { + margin-top: 50px; +} + +.mt-60 { + margin-top: 60px; +} + +.mt-70 { + margin-top: 70px; +} + +.mt-80 { + margin-top: 80px; +} + +.mt-90 { + margin-top: 90px; +} + //pagination .pagination.shop{ display: flex; 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 8ef912c1c..a49052d8b 100755 --- a/packages/Webkul/Shop/src/Resources/views/checkout/onepage/review.blade.php +++ b/packages/Webkul/Shop/src/Resources/views/checkout/onepage/review.blade.php @@ -165,9 +165,7 @@
- @include('shop::checkout.total.summary', ['cart' => $cart]) -
diff --git a/packages/Webkul/Shop/src/Resources/views/checkout/total/summary.blade.php b/packages/Webkul/Shop/src/Resources/views/checkout/total/summary.blade.php index 941772b4c..3befaa793 100755 --- a/packages/Webkul/Shop/src/Resources/views/checkout/total/summary.blade.php +++ b/packages/Webkul/Shop/src/Resources/views/checkout/total/summary.blade.php @@ -28,4 +28,12 @@
+ +
+
+ @inject('cart_rule', 'Webkul\Discount\Helpers\Discount') + + {{ $cart_rule->findAllRules() }} +
+
\ No newline at end of file diff --git a/packages/Webkul/Shop/src/Resources/views/layouts/footer/footer.blade.php b/packages/Webkul/Shop/src/Resources/views/layouts/footer/footer.blade.php index 805301757..4eb458ef2 100755 --- a/packages/Webkul/Shop/src/Resources/views/layouts/footer/footer.blade.php +++ b/packages/Webkul/Shop/src/Resources/views/layouts/footer/footer.blade.php @@ -75,38 +75,19 @@
+
- @if(count(core()->getCurrentChannel()->currencies) > 1) -
- {{ __('shop::app.footer.currency') }} -
-
- -
-
-
- @endif
diff --git a/packages/Webkul/Shop/src/Resources/views/products/add-buttons.blade.php b/packages/Webkul/Shop/src/Resources/views/products/add-buttons.blade.php index 1df4f75dd..22c22ef3a 100644 --- a/packages/Webkul/Shop/src/Resources/views/products/add-buttons.blade.php +++ b/packages/Webkul/Shop/src/Resources/views/products/add-buttons.blade.php @@ -1,21 +1,22 @@ -@if ($product->type == "configurable") -
- - {{ __('shop::app.products.add-to-cart') }} - - @include('shop::products.wishlist') -
-@else -
-
- @csrf - - - - -
+ @if ($product->type == "configurable") +
+ + {{ __('shop::app.products.add-to-cart') }} + - @include('shop::products.wishlist') -
-@endif \ No newline at end of file + @include('shop::products.wishlist') +
+ @else +
+
+ @csrf + + + + +
+ + @include('shop::products.wishlist') +
+ @endif \ No newline at end of file diff --git a/packages/Webkul/Shop/src/Resources/views/products/index.blade.php b/packages/Webkul/Shop/src/Resources/views/products/index.blade.php index 24ec87752..95a1b6cc0 100755 --- a/packages/Webkul/Shop/src/Resources/views/products/index.blade.php +++ b/packages/Webkul/Shop/src/Resources/views/products/index.blade.php @@ -70,7 +70,9 @@ {!! view_render_event('bagisto.shop.products.index.pagination.after') !!} + @else +

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

@@ -78,6 +80,7 @@ {{ __('shop::app.products.empty') }}

+ @endif @endif @@ -91,16 +94,13 @@ + @endpush \ No newline at end of file diff --git a/packages/Webkul/Shop/src/Resources/views/products/wishlist.blade.php b/packages/Webkul/Shop/src/Resources/views/products/wishlist.blade.php index 05dcffea9..8c6448ac5 100755 --- a/packages/Webkul/Shop/src/Resources/views/products/wishlist.blade.php +++ b/packages/Webkul/Shop/src/Resources/views/products/wishlist.blade.php @@ -6,4 +6,4 @@ {!! view_render_event('bagisto.shop.products.wishlist.after') !!} -@endauth \ No newline at end of file +@endauth From 6f14ad7a42f759e5e100b542c4de7b9cef33a4b6 Mon Sep 17 00:00:00 2001 From: Prashant Singh Date: Mon, 27 May 2019 03:59:37 +0530 Subject: [PATCH 261/678] cart rule form completed --- .../Admin/src/Resources/lang/en/app.php | 3 +- .../promotions/cart-rule/create.blade.php | 91 ++--- .../views/promotions/cart-rule/edit.blade.php | 223 +++++++----- .../Discount/src/Config/rule-conditions.php | 7 + ...5_07_184255_create_catalog_rules_table.php | 9 +- ...19_05_13_024326_create_cart_rule_table.php | 7 +- .../Webkul/Discount/src/Helpers/Discount.php | 89 ++++- .../Http/Controllers/CartRuleController.php | 337 +++++++++++------- .../Webkul/Discount/src/Models/CartRule.php | 14 + .../Discount/src/Models/CartRuleCoupons.php | 5 + .../src/Models/CartRuleCouponsUsage.php | 5 - .../src/Models/CartRuleCouponsUsageProxy.php | 1 - ...{CartRuleLables.php => CartRuleLabels.php} | 14 + .../src/Repositories/CartRuleRepository.php | 5 + .../src/Http/Controllers/HomeController.php | 78 +--- 15 files changed, 529 insertions(+), 359 deletions(-) rename packages/Webkul/Discount/src/Models/{CartRuleLables.php => CartRuleLabels.php} (57%) diff --git a/packages/Webkul/Admin/src/Resources/lang/en/app.php b/packages/Webkul/Admin/src/Resources/lang/en/app.php index 06dab7d1d..3967ef6a1 100755 --- a/packages/Webkul/Admin/src/Resources/lang/en/app.php +++ b/packages/Webkul/Admin/src/Resources/lang/en/app.php @@ -815,7 +815,8 @@ return [ 'false' => 'false', 'limit' => 'Usage Limit', 'specific-coupon' => 'Specific Coupon(Check) / Auto Generated(Unheck)', - 'free-shipping' => 'Free Shipping' + 'free-shipping' => 'Free Shipping', + 'is-guest' => 'For Guests' ], 'status' => [ diff --git a/packages/Webkul/Admin/src/Resources/views/promotions/cart-rule/create.blade.php b/packages/Webkul/Admin/src/Resources/views/promotions/cart-rule/create.blade.php index ee41dfd35..d8340e6b9 100644 --- a/packages/Webkul/Admin/src/Resources/views/promotions/cart-rule/create.blade.php +++ b/packages/Webkul/Admin/src/Resources/views/promotions/cart-rule/create.blade.php @@ -77,7 +77,7 @@
- @foreach(app('Webkul\Customer\Repositories\CustomerGroupRepository')->all() as $channel) @@ -90,7 +90,7 @@
- @foreach(app('Webkul\Core\Repositories\ChannelRepository')->all() as $channel) @@ -140,6 +140,17 @@ @{{ errors.first('per_customer') }}
+
+ + + + + @{{ errors.first('is_guest') }} +
+
@@ -161,14 +172,12 @@
-
+
- - - @{{ errors.first('criteria') }}
Add Condition @@ -185,18 +194,18 @@
-
-
- @@ -205,7 +214,7 @@
- @@ -215,7 +224,7 @@
- @@ -289,7 +298,7 @@
- + @@ -297,7 +306,7 @@
- + @@ -305,7 +314,7 @@
-
+
@@ -323,7 +332,7 @@
- + @{{ errors.first('label') }}
@@ -335,7 +344,7 @@
- + @{{ errors.first('label') }}
@@ -358,8 +367,8 @@ data () { return { - name: 'somethign', - description: 'Enter Some Description', + name: null, + description: null, conditions_list: [], channels: [], customer_groups: [], @@ -369,7 +378,9 @@ per_customer: 0, status: null, use_coupon: null, - auto_generation: null, + auto_generation: 1, + usage_limit: 0, + is_guest: 0, action_type: null, apply: null, @@ -383,7 +394,6 @@ end_other_rules: null, coupon_type: null, free_shipping: null, - auto_generated: null, all_conditions: null, @@ -391,9 +401,7 @@ suffix: null, prefix: null, dedicated_label: true, - usage_limit: null, - global_label: null, label: { global: null, @foreach(core()->getAllChannels() as $channel) @@ -421,7 +429,6 @@ }, mounted () { - this.use_coupon = 0; }, methods: { @@ -471,9 +478,9 @@ }, useCoupon() { - if (this.use_coupon == 1) { - this.auto_generation = 1; - } + // if (this.use_coupon == 1) { + // this.auto_generation = 1; + // } }, removeCartAttr(index) { @@ -491,29 +498,29 @@ } }); - for (index in this.conditions_list) { - if (this.conditions_list[index].condition == null || this.conditions_list[index].condition == "" || this.conditions_list[index].condition == undefined) { - window.flashMessages = [{'type': 'alert-error', 'message': "{{ __('admin::app.promotion.catalog.condition-missing') }}" }]; + // for (index in this.conditions_list) { + // if (this.conditions_list[index].condition == null || this.conditions_list[index].condition == "" || this.conditions_list[index].condition == undefined) { + // window.flashMessages = [{'type': 'alert-error', 'message': "{{ __('admin::app.promotion.catalog.condition-missing') }}" }]; - this.$root.addFlashMessages(); + // this.$root.addFlashMessages(); - return false; - } else if (this.conditions_list[index].value == null || this.conditions_list[index].value == "" || this.conditions_list[index].value == undefined) { - window.flashMessages = [{'type': 'alert-error', 'message': "{{ __('admin::app.promotion.catalog.condition-missing') }}" }]; + // return false; + // } else if (this.conditions_list[index].value == null || this.conditions_list[index].value == "" || this.conditions_list[index].value == undefined) { + // window.flashMessages = [{'type': 'alert-error', 'message': "{{ __('admin::app.promotion.catalog.condition-missing') }}" }]; - this.$root.addFlashMessages(); + // this.$root.addFlashMessages(); - return false; - } - } + // return false; + // } + // } - if (this.conditions_list.length == 0) { - window.flashMessages = [{'type': 'alert-error', 'message': "{{ __('admin::app.promotion.catalog.condition-missing') }}" }]; + // if (this.conditions_list.length == 0) { + // window.flashMessages = [{'type': 'alert-error', 'message': "{{ __('admin::app.promotion.catalog.condition-missing') }}" }]; - this.$root.addFlashMessages(); + // this.$root.addFlashMessages(); - return false; - } + // return false; + // } this.all_conditions = JSON.stringify(this.conditions_list); }, diff --git a/packages/Webkul/Admin/src/Resources/views/promotions/cart-rule/edit.blade.php b/packages/Webkul/Admin/src/Resources/views/promotions/cart-rule/edit.blade.php index f408a9073..88399c936 100644 --- a/packages/Webkul/Admin/src/Resources/views/promotions/cart-rule/edit.blade.php +++ b/packages/Webkul/Admin/src/Resources/views/promotions/cart-rule/edit.blade.php @@ -1,7 +1,7 @@ @extends('admin::layouts.content') @section('page_title') - {{ __('admin::app.promotion.add-cart-rule') }} + {{ __('admin::app.promotion.edit-cart-rule') }} @stop @section('content') @@ -12,7 +12,7 @@ @push('scripts') diff --git a/packages/Webkul/Shop/src/Resources/views/checkout/total/summary.blade.php b/packages/Webkul/Shop/src/Resources/views/checkout/total/summary.blade.php index 3befaa793..b7f09ba67 100755 --- a/packages/Webkul/Shop/src/Resources/views/checkout/total/summary.blade.php +++ b/packages/Webkul/Shop/src/Resources/views/checkout/total/summary.blade.php @@ -33,7 +33,13 @@
@inject('cart_rule', 'Webkul\Discount\Helpers\Discount') - {{ $cart_rule->findAllRules() }} +
+
+ + + +
+
\ No newline at end of file From c4a9d04e7235c7b0da723d3b6830f99c117fd8f8 Mon Sep 17 00:00:00 2001 From: rahul shukla Date: Mon, 27 May 2019 16:51:27 +0530 Subject: [PATCH 264/678] file & image attribute --- .../Admin/src/Resources/lang/en/app.php | 4 +++- .../views/catalog/attributes/create.blade.php | 2 ++ .../views/catalog/attributes/edit.blade.php | 6 ++++++ .../products/field-types/file.blade.php | 18 ++++++++++++++++ .../products/field-types/image.blade.php | 18 ++++++++++++++++ packages/Webkul/Product/src/Helpers/View.php | 1 + .../Product/src/Listeners/ProductFlat.php | 2 ++ .../src/Models/ProductAttributeValue.php | 2 ++ .../src/Repositories/ProductRepository.php | 13 ++++++++++++ .../Webkul/Shop/publishable/assets/js/shop.js | 2 +- .../Shop/publishable/assets/mix-manifest.json | 2 +- .../views/products/view/attributes.blade.php | 21 +++++++++++++++++-- .../Webkul/Ui/publishable/assets/js/ui.js | 2 +- .../Ui/publishable/assets/mix-manifest.json | 4 ++-- .../Http/Controllers/SessionController.php | 5 ----- 15 files changed, 89 insertions(+), 13 deletions(-) create mode 100644 packages/Webkul/Admin/src/Resources/views/catalog/products/field-types/file.blade.php create mode 100644 packages/Webkul/Admin/src/Resources/views/catalog/products/field-types/image.blade.php diff --git a/packages/Webkul/Admin/src/Resources/lang/en/app.php b/packages/Webkul/Admin/src/Resources/lang/en/app.php index 5ac1ad0f1..31dd14f9c 100755 --- a/packages/Webkul/Admin/src/Resources/lang/en/app.php +++ b/packages/Webkul/Admin/src/Resources/lang/en/app.php @@ -433,7 +433,9 @@ return [ 'color-swatch' => 'Color Swatch', 'image-swatch' => 'Image Swatch', 'text-swatch' => 'Text Swatch', - 'swatch' => 'Swatch' + 'swatch' => 'Swatch', + 'image' => 'Image', + 'file' => 'File' ], 'families' => [ 'title' => 'Families', diff --git a/packages/Webkul/Admin/src/Resources/views/catalog/attributes/create.blade.php b/packages/Webkul/Admin/src/Resources/views/catalog/attributes/create.blade.php index 9af085ca5..4880699a3 100755 --- a/packages/Webkul/Admin/src/Resources/views/catalog/attributes/create.blade.php +++ b/packages/Webkul/Admin/src/Resources/views/catalog/attributes/create.blade.php @@ -52,6 +52,8 @@ + +
diff --git a/packages/Webkul/Admin/src/Resources/views/catalog/attributes/edit.blade.php b/packages/Webkul/Admin/src/Resources/views/catalog/attributes/edit.blade.php index 690a77712..b1a10d63b 100755 --- a/packages/Webkul/Admin/src/Resources/views/catalog/attributes/edit.blade.php +++ b/packages/Webkul/Admin/src/Resources/views/catalog/attributes/edit.blade.php @@ -71,6 +71,12 @@ + +
diff --git a/packages/Webkul/Admin/src/Resources/views/catalog/products/field-types/file.blade.php b/packages/Webkul/Admin/src/Resources/views/catalog/products/field-types/file.blade.php new file mode 100644 index 000000000..eebd50a23 --- /dev/null +++ b/packages/Webkul/Admin/src/Resources/views/catalog/products/field-types/file.blade.php @@ -0,0 +1,18 @@ +@if ($product[$attribute->code]) + + + +@endif + + + +@if ($product[$attribute->code]) +
+ + + + + {{ __('admin::app.configuration.delete') }} + +
+@endif \ No newline at end of file diff --git a/packages/Webkul/Admin/src/Resources/views/catalog/products/field-types/image.blade.php b/packages/Webkul/Admin/src/Resources/views/catalog/products/field-types/image.blade.php new file mode 100644 index 000000000..0cc3c63d9 --- /dev/null +++ b/packages/Webkul/Admin/src/Resources/views/catalog/products/field-types/image.blade.php @@ -0,0 +1,18 @@ +@if ($product[$attribute->code]) + + + +@endif + + + +@if ($product[$attribute->code]) +
+ + + + + {{ __('admin::app.configuration.delete') }} + +
+@endif \ No newline at end of file diff --git a/packages/Webkul/Product/src/Helpers/View.php b/packages/Webkul/Product/src/Helpers/View.php index abbf961de..6d82df9ae 100755 --- a/packages/Webkul/Product/src/Helpers/View.php +++ b/packages/Webkul/Product/src/Helpers/View.php @@ -30,6 +30,7 @@ class View extends AbstractProduct 'label' => $attribute->name, 'value' => $value, 'admin_name' => $attribute->admin_name, + 'type' => $attribute->type, ]; } diff --git a/packages/Webkul/Product/src/Listeners/ProductFlat.php b/packages/Webkul/Product/src/Listeners/ProductFlat.php index 7f2951844..9634a53b1 100644 --- a/packages/Webkul/Product/src/Listeners/ProductFlat.php +++ b/packages/Webkul/Product/src/Listeners/ProductFlat.php @@ -66,6 +66,8 @@ class ProductFlat 'multiselect' => 'text', 'datetime' => 'datetime', 'date' => 'date', + 'file' => 'text', + 'image' => 'text', ]; /** diff --git a/packages/Webkul/Product/src/Models/ProductAttributeValue.php b/packages/Webkul/Product/src/Models/ProductAttributeValue.php index 1ce420902..858e49c8e 100755 --- a/packages/Webkul/Product/src/Models/ProductAttributeValue.php +++ b/packages/Webkul/Product/src/Models/ProductAttributeValue.php @@ -25,6 +25,8 @@ class ProductAttributeValue extends Model implements ProductAttributeValueContra 'multiselect' => 'text_value', 'datetime' => 'datetime_value', 'date' => 'date_value', + 'file' => 'text_value', + 'image' => 'text_value', ]; protected $fillable = [ diff --git a/packages/Webkul/Product/src/Repositories/ProductRepository.php b/packages/Webkul/Product/src/Repositories/ProductRepository.php index 9c8a28f16..df5ba2997 100755 --- a/packages/Webkul/Product/src/Repositories/ProductRepository.php +++ b/packages/Webkul/Product/src/Repositories/ProductRepository.php @@ -164,6 +164,15 @@ class ProductRepository extends Repository $data[$attribute->code] = implode(",", $data[$attribute->code]); } + if ($attribute->type == 'image' || $attribute->type == 'file') { + $dir = 'test'; + if (gettype($data[$attribute->code]) == 'object') { + $data[$attribute->code] = request()->file($attribute->code)->store($dir); + } else { + $data[$attribute->code] = NULL; + } + } + $attributeValue = $this->attributeValue->findOneWhere([ 'product_id' => $product->id, 'attribute_id' => $attribute->id, @@ -184,6 +193,10 @@ class ProductRepository extends Repository ProductAttributeValue::$attributeTypeFields[$attribute->type] => $data[$attribute->code] ], $attributeValue->id ); + + if ($attribute->type == 'image' || $attribute->type == 'file') { + Storage::delete($attributeValue->text_value); + } } } diff --git a/packages/Webkul/Shop/publishable/assets/js/shop.js b/packages/Webkul/Shop/publishable/assets/js/shop.js index 3e1873c98..470e08dad 100755 --- a/packages/Webkul/Shop/publishable/assets/js/shop.js +++ b/packages/Webkul/Shop/publishable/assets/js/shop.js @@ -1 +1 @@ -!function(e){var t={};function n(i){if(t[i])return t[i].exports;var r=t[i]={i:i,l:!1,exports:{}};return e[i].call(r.exports,r,r.exports,n),r.l=!0,r.exports}n.m=e,n.c=t,n.d=function(e,t,i){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:i})},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="/",n(n.s=0)}({0:function(e,t,n){n("J66Q"),e.exports=n("MT9B")},"162o":function(e,t,n){(function(e){var i=void 0!==e&&e||"undefined"!=typeof self&&self||window,r=Function.prototype.apply;function o(e,t){this._id=e,this._clearFn=t}t.setTimeout=function(){return new o(r.call(setTimeout,i,arguments),clearTimeout)},t.setInterval=function(){return new o(r.call(setInterval,i,arguments),clearInterval)},t.clearTimeout=t.clearInterval=function(e){e&&e.close()},o.prototype.unref=o.prototype.ref=function(){},o.prototype.close=function(){this._clearFn.call(i,this._id)},t.enroll=function(e,t){clearTimeout(e._idleTimeoutId),e._idleTimeout=t},t.unenroll=function(e){clearTimeout(e._idleTimeoutId),e._idleTimeout=-1},t._unrefActive=t.active=function(e){clearTimeout(e._idleTimeoutId);var t=e._idleTimeout;t>=0&&(e._idleTimeoutId=setTimeout(function(){e._onTimeout&&e._onTimeout()},t))},n("mypn"),t.setImmediate="undefined"!=typeof self&&self.setImmediate||void 0!==e&&e.setImmediate||this&&this.setImmediate,t.clearImmediate="undefined"!=typeof self&&self.clearImmediate||void 0!==e&&e.clearImmediate||this&&this.clearImmediate}).call(t,n("DuR2"))},"21It":function(e,t,n){"use strict";var i=n("FtD3");e.exports=function(e,t,n){var r=n.config.validateStatus;n.status&&r&&!r(n.status)?t(i("Request failed with status code "+n.status,n.config,null,n.request,n)):e(n)}},"4TI/":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={props:{slides:{type:Array,required:!0,default:function(){return[]}},public_path:{type:String,required:!0}},data:function(){return{images:[],currentIndex:-1,content:[],current:!1,images_loaded:!1}},mounted:function(){this.getProps()},methods:{getProps:function(){this.setProps()},setProps:function(){var e=this;this.slides.forEach(function(t){e.images.push(e.public_path+"/storage/"+t.path),e.content.push(t.content)}),this.currentIndex=0,0==this.images.length?this.images.push="vendor/webkul/shop/assets/images/banner.png":this.images_loaded=!0},changeIndexLeft:function(){this.currentIndex>0?this.currentIndex--:0==this.currentIndex&&(this.currentIndex=this.images.length-1)},changeIndexRight:function(){this.currentIndex0&&t-1 in e)}_.fn=_.prototype={jquery:"3.4.0",constructor:_,length:0,toArray:function(){return l.call(this)},get:function(e){return null==e?l.call(this):e<0?this[e+this.length]:this[e]},pushStack:function(e){var t=_.merge(this.constructor(),e);return t.prevObject=this,t},each:function(e){return _.each(this,e)},map:function(e){return this.pushStack(_.map(this,function(t,n){return e.call(t,n,t)}))},slice:function(){return this.pushStack(l.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(e){var t=this.length,n=+e+(e<0?t:0);return this.pushStack(n>=0&&n+~]|"+j+")"+j+"*"),V=new RegExp(j+"|>"),U=new RegExp(H),Y=new RegExp("^"+F+"$"),Z={ID:new RegExp("^#("+F+")"),CLASS:new RegExp("^\\.("+F+")"),TAG:new RegExp("^("+F+"|[*])"),ATTR:new RegExp("^"+I),PSEUDO:new RegExp("^"+H),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+j+"*(even|odd|(([+-]|)(\\d*)n|)"+j+"*(?:([+-]|)"+j+"*(\\d+)|))"+j+"*\\)|)","i"),bool:new RegExp("^(?:"+N+")$","i"),needsContext:new RegExp("^"+j+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+j+"*((?:-\\d)?\\d*)"+j+"*\\)|)(?=[^-]|$)","i")},G=/HTML$/i,X=/^(?:input|select|textarea|button)$/i,K=/^h\d$/i,J=/^[^{]+\{\s*\[native \w/,Q=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ee=/[+~]/,te=new RegExp("\\\\([\\da-f]{1,6}"+j+"?|("+j+")|.)","ig"),ne=function(e,t,n){var i="0x"+t-65536;return i!=i||n?t:i<0?String.fromCharCode(i+65536):String.fromCharCode(i>>10|55296,1023&i|56320)},ie=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,re=function(e,t){return t?"\0"===e?"�":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},oe=function(){f()},se=be(function(e){return!0===e.disabled&&"fieldset"===e.nodeName.toLowerCase()},{dir:"parentNode",next:"legend"});try{E.apply(D=W.call(x.childNodes),x.childNodes),D[x.childNodes.length].nodeType}catch(e){E={apply:D.length?function(e,t){L.apply(e,W.call(t))}:function(e,t){for(var n=e.length,i=0;e[n++]=t[i++];);e.length=n-1}}}function ae(e,t,i,r){var o,a,u,c,d,p,g,y=t&&t.ownerDocument,T=t?t.nodeType:9;if(i=i||[],"string"!=typeof e||!e||1!==T&&9!==T&&11!==T)return i;if(!r&&((t?t.ownerDocument||t:x)!==h&&f(t),t=t||h,v)){if(11!==T&&(d=Q.exec(e)))if(o=d[1]){if(9===T){if(!(u=t.getElementById(o)))return i;if(u.id===o)return i.push(u),i}else if(y&&(u=y.getElementById(o))&&w(t,u)&&u.id===o)return i.push(u),i}else{if(d[2])return E.apply(i,t.getElementsByTagName(e)),i;if((o=d[3])&&n.getElementsByClassName&&t.getElementsByClassName)return E.apply(i,t.getElementsByClassName(o)),i}if(n.qsa&&!$[e+" "]&&(!m||!m.test(e))&&(1!==T||"object"!==t.nodeName.toLowerCase())){if(g=e,y=t,1===T&&V.test(e)){for((c=t.getAttribute("id"))?c=c.replace(ie,re):t.setAttribute("id",c=b),a=(p=s(e)).length;a--;)p[a]="#"+c+" "+we(p[a]);g=p.join(","),y=ee.test(e)&&ge(t.parentNode)||t}try{return E.apply(i,y.querySelectorAll(g)),i}catch(t){$(e,!0)}finally{c===b&&t.removeAttribute("id")}}}return l(e.replace(P,"$1"),t,i,r)}function le(){var e=[];return function t(n,r){return e.push(n+" ")>i.cacheLength&&delete t[e.shift()],t[n+" "]=r}}function ue(e){return e[b]=!0,e}function ce(e){var t=h.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function de(e,t){for(var n=e.split("|"),r=n.length;r--;)i.attrHandle[n[r]]=t}function fe(e,t){var n=t&&e,i=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(i)return i;if(n)for(;n=n.nextSibling;)if(n===t)return-1;return e?1:-1}function he(e){return function(t){return"input"===t.nodeName.toLowerCase()&&t.type===e}}function pe(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}function ve(e){return function(t){return"form"in t?t.parentNode&&!1===t.disabled?"label"in t?"label"in t.parentNode?t.parentNode.disabled===e:t.disabled===e:t.isDisabled===e||t.isDisabled!==!e&&se(t)===e:t.disabled===e:"label"in t&&t.disabled===e}}function me(e){return ue(function(t){return t=+t,ue(function(n,i){for(var r,o=e([],n.length,t),s=o.length;s--;)n[r=o[s]]&&(n[r]=!(i[r]=n[r]))})})}function ge(e){return e&&void 0!==e.getElementsByTagName&&e}for(t in n=ae.support={},o=ae.isXML=function(e){var t=e.namespaceURI,n=(e.ownerDocument||e).documentElement;return!G.test(t||n&&n.nodeName||"HTML")},f=ae.setDocument=function(e){var t,r,s=e?e.ownerDocument||e:x;return s!==h&&9===s.nodeType&&s.documentElement?(p=(h=s).documentElement,v=!o(h),x!==h&&(r=h.defaultView)&&r.top!==r&&(r.addEventListener?r.addEventListener("unload",oe,!1):r.attachEvent&&r.attachEvent("onunload",oe)),n.attributes=ce(function(e){return e.className="i",!e.getAttribute("className")}),n.getElementsByTagName=ce(function(e){return e.appendChild(h.createComment("")),!e.getElementsByTagName("*").length}),n.getElementsByClassName=J.test(h.getElementsByClassName),n.getById=ce(function(e){return p.appendChild(e).id=b,!h.getElementsByName||!h.getElementsByName(b).length}),n.getById?(i.filter.ID=function(e){var t=e.replace(te,ne);return function(e){return e.getAttribute("id")===t}},i.find.ID=function(e,t){if(void 0!==t.getElementById&&v){var n=t.getElementById(e);return n?[n]:[]}}):(i.filter.ID=function(e){var t=e.replace(te,ne);return function(e){var n=void 0!==e.getAttributeNode&&e.getAttributeNode("id");return n&&n.value===t}},i.find.ID=function(e,t){if(void 0!==t.getElementById&&v){var n,i,r,o=t.getElementById(e);if(o){if((n=o.getAttributeNode("id"))&&n.value===e)return[o];for(r=t.getElementsByName(e),i=0;o=r[i++];)if((n=o.getAttributeNode("id"))&&n.value===e)return[o]}return[]}}),i.find.TAG=n.getElementsByTagName?function(e,t){return void 0!==t.getElementsByTagName?t.getElementsByTagName(e):n.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,i=[],r=0,o=t.getElementsByTagName(e);if("*"===e){for(;n=o[r++];)1===n.nodeType&&i.push(n);return i}return o},i.find.CLASS=n.getElementsByClassName&&function(e,t){if(void 0!==t.getElementsByClassName&&v)return t.getElementsByClassName(e)},g=[],m=[],(n.qsa=J.test(h.querySelectorAll))&&(ce(function(e){p.appendChild(e).innerHTML="",e.querySelectorAll("[msallowcapture^='']").length&&m.push("[*^$]="+j+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||m.push("\\["+j+"*(?:value|"+N+")"),e.querySelectorAll("[id~="+b+"-]").length||m.push("~="),e.querySelectorAll(":checked").length||m.push(":checked"),e.querySelectorAll("a#"+b+"+*").length||m.push(".#.+[+~]")}),ce(function(e){e.innerHTML="";var t=h.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&m.push("name"+j+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&m.push(":enabled",":disabled"),p.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&m.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),m.push(",.*:")})),(n.matchesSelector=J.test(y=p.matches||p.webkitMatchesSelector||p.mozMatchesSelector||p.oMatchesSelector||p.msMatchesSelector))&&ce(function(e){n.disconnectedMatch=y.call(e,"*"),y.call(e,"[s!='']:x"),g.push("!=",H)}),m=m.length&&new RegExp(m.join("|")),g=g.length&&new RegExp(g.join("|")),t=J.test(p.compareDocumentPosition),w=t||J.test(p.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,i=t&&t.parentNode;return e===i||!(!i||1!==i.nodeType||!(n.contains?n.contains(i):e.compareDocumentPosition&&16&e.compareDocumentPosition(i)))}:function(e,t){if(t)for(;t=t.parentNode;)if(t===e)return!0;return!1},A=t?function(e,t){if(e===t)return d=!0,0;var i=!e.compareDocumentPosition-!t.compareDocumentPosition;return i||(1&(i=(e.ownerDocument||e)===(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!n.sortDetached&&t.compareDocumentPosition(e)===i?e===h||e.ownerDocument===x&&w(x,e)?-1:t===h||t.ownerDocument===x&&w(x,t)?1:c?M(c,e)-M(c,t):0:4&i?-1:1)}:function(e,t){if(e===t)return d=!0,0;var n,i=0,r=e.parentNode,o=t.parentNode,s=[e],a=[t];if(!r||!o)return e===h?-1:t===h?1:r?-1:o?1:c?M(c,e)-M(c,t):0;if(r===o)return fe(e,t);for(n=e;n=n.parentNode;)s.unshift(n);for(n=t;n=n.parentNode;)a.unshift(n);for(;s[i]===a[i];)i++;return i?fe(s[i],a[i]):s[i]===x?-1:a[i]===x?1:0},h):h},ae.matches=function(e,t){return ae(e,null,null,t)},ae.matchesSelector=function(e,t){if((e.ownerDocument||e)!==h&&f(e),n.matchesSelector&&v&&!$[t+" "]&&(!g||!g.test(t))&&(!m||!m.test(t)))try{var i=y.call(e,t);if(i||n.disconnectedMatch||e.document&&11!==e.document.nodeType)return i}catch(e){$(t,!0)}return ae(t,h,null,[e]).length>0},ae.contains=function(e,t){return(e.ownerDocument||e)!==h&&f(e),w(e,t)},ae.attr=function(e,t){(e.ownerDocument||e)!==h&&f(e);var r=i.attrHandle[t.toLowerCase()],o=r&&k.call(i.attrHandle,t.toLowerCase())?r(e,t,!v):void 0;return void 0!==o?o:n.attributes||!v?e.getAttribute(t):(o=e.getAttributeNode(t))&&o.specified?o.value:null},ae.escape=function(e){return(e+"").replace(ie,re)},ae.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},ae.uniqueSort=function(e){var t,i=[],r=0,o=0;if(d=!n.detectDuplicates,c=!n.sortStable&&e.slice(0),e.sort(A),d){for(;t=e[o++];)t===e[o]&&(r=i.push(o));for(;r--;)e.splice(i[r],1)}return c=null,e},r=ae.getText=function(e){var t,n="",i=0,o=e.nodeType;if(o){if(1===o||9===o||11===o){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=r(e)}else if(3===o||4===o)return e.nodeValue}else for(;t=e[i++];)n+=r(t);return n},(i=ae.selectors={cacheLength:50,createPseudo:ue,match:Z,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(te,ne),e[3]=(e[3]||e[4]||e[5]||"").replace(te,ne),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||ae.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&ae.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return Z.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&U.test(n)&&(t=s(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(te,ne).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=S[e+" "];return t||(t=new RegExp("(^|"+j+")"+e+"("+j+"|$)"))&&S(e,function(e){return t.test("string"==typeof e.className&&e.className||void 0!==e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(e,t,n){return function(i){var r=ae.attr(i,e);return null==r?"!="===t:!t||(r+="","="===t?r===n:"!="===t?r!==n:"^="===t?n&&0===r.indexOf(n):"*="===t?n&&r.indexOf(n)>-1:"$="===t?n&&r.slice(-n.length)===n:"~="===t?(" "+r.replace(R," ")+" ").indexOf(n)>-1:"|="===t&&(r===n||r.slice(0,n.length+1)===n+"-"))}},CHILD:function(e,t,n,i,r){var o="nth"!==e.slice(0,3),s="last"!==e.slice(-4),a="of-type"===t;return 1===i&&0===r?function(e){return!!e.parentNode}:function(t,n,l){var u,c,d,f,h,p,v=o!==s?"nextSibling":"previousSibling",m=t.parentNode,g=a&&t.nodeName.toLowerCase(),y=!l&&!a,w=!1;if(m){if(o){for(;v;){for(f=t;f=f[v];)if(a?f.nodeName.toLowerCase()===g:1===f.nodeType)return!1;p=v="only"===e&&!p&&"nextSibling"}return!0}if(p=[s?m.firstChild:m.lastChild],s&&y){for(w=(h=(u=(c=(d=(f=m)[b]||(f[b]={}))[f.uniqueID]||(d[f.uniqueID]={}))[e]||[])[0]===T&&u[1])&&u[2],f=h&&m.childNodes[h];f=++h&&f&&f[v]||(w=h=0)||p.pop();)if(1===f.nodeType&&++w&&f===t){c[e]=[T,h,w];break}}else if(y&&(w=h=(u=(c=(d=(f=t)[b]||(f[b]={}))[f.uniqueID]||(d[f.uniqueID]={}))[e]||[])[0]===T&&u[1]),!1===w)for(;(f=++h&&f&&f[v]||(w=h=0)||p.pop())&&((a?f.nodeName.toLowerCase()!==g:1!==f.nodeType)||!++w||(y&&((c=(d=f[b]||(f[b]={}))[f.uniqueID]||(d[f.uniqueID]={}))[e]=[T,w]),f!==t)););return(w-=r)===i||w%i==0&&w/i>=0}}},PSEUDO:function(e,t){var n,r=i.pseudos[e]||i.setFilters[e.toLowerCase()]||ae.error("unsupported pseudo: "+e);return r[b]?r(t):r.length>1?(n=[e,e,"",t],i.setFilters.hasOwnProperty(e.toLowerCase())?ue(function(e,n){for(var i,o=r(e,t),s=o.length;s--;)e[i=M(e,o[s])]=!(n[i]=o[s])}):function(e){return r(e,0,n)}):r}},pseudos:{not:ue(function(e){var t=[],n=[],i=a(e.replace(P,"$1"));return i[b]?ue(function(e,t,n,r){for(var o,s=i(e,null,r,[]),a=e.length;a--;)(o=s[a])&&(e[a]=!(t[a]=o))}):function(e,r,o){return t[0]=e,i(t,null,o,n),t[0]=null,!n.pop()}}),has:ue(function(e){return function(t){return ae(e,t).length>0}}),contains:ue(function(e){return e=e.replace(te,ne),function(t){return(t.textContent||r(t)).indexOf(e)>-1}}),lang:ue(function(e){return Y.test(e||"")||ae.error("unsupported lang: "+e),e=e.replace(te,ne).toLowerCase(),function(t){var n;do{if(n=v?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return(n=n.toLowerCase())===e||0===n.indexOf(e+"-")}while((t=t.parentNode)&&1===t.nodeType);return!1}}),target:function(t){var n=e.location&&e.location.hash;return n&&n.slice(1)===t.id},root:function(e){return e===p},focus:function(e){return e===h.activeElement&&(!h.hasFocus||h.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:ve(!1),disabled:ve(!0),checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,!0===e.selected},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!i.pseudos.empty(e)},header:function(e){return K.test(e.nodeName)},input:function(e){return X.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||"text"===t.toLowerCase())},first:me(function(){return[0]}),last:me(function(e,t){return[t-1]}),eq:me(function(e,t,n){return[n<0?n+t:n]}),even:me(function(e,t){for(var n=0;nt?t:n;--i>=0;)e.push(i);return e}),gt:me(function(e,t,n){for(var i=n<0?n+t:n;++i1?function(t,n,i){for(var r=e.length;r--;)if(!e[r](t,n,i))return!1;return!0}:e[0]}function Te(e,t,n,i,r){for(var o,s=[],a=0,l=e.length,u=null!=t;a-1&&(o[u]=!(s[u]=d))}}else g=Te(g===s?g.splice(p,g.length):g),r?r(null,s,g,l):E.apply(s,g)})}function Se(e){for(var t,n,r,o=e.length,s=i.relative[e[0].type],a=s||i.relative[" "],l=s?1:0,c=be(function(e){return e===t},a,!0),d=be(function(e){return M(t,e)>-1},a,!0),f=[function(e,n,i){var r=!s&&(i||n!==u)||((t=n).nodeType?c(e,n,i):d(e,n,i));return t=null,r}];l1&&xe(f),l>1&&we(e.slice(0,l-1).concat({value:" "===e[l-2].type?"*":""})).replace(P,"$1"),n,l0,r=e.length>0,o=function(o,s,a,l,c){var d,p,m,g=0,y="0",w=o&&[],b=[],x=u,_=o||r&&i.find.TAG("*",c),S=T+=null==x?1:Math.random()||.1,C=_.length;for(c&&(u=s===h||s||c);y!==C&&null!=(d=_[y]);y++){if(r&&d){for(p=0,s||d.ownerDocument===h||(f(d),a=!v);m=e[p++];)if(m(d,s||h,a)){l.push(d);break}c&&(T=S)}n&&((d=!m&&d)&&g--,o&&w.push(d))}if(g+=y,n&&y!==g){for(p=0;m=t[p++];)m(w,b,s,a);if(o){if(g>0)for(;y--;)w[y]||b[y]||(b[y]=O.call(l));b=Te(b)}E.apply(l,b),c&&!o&&b.length>0&&g+t.length>1&&ae.uniqueSort(l)}return c&&(T=S,u=x),w};return n?ue(o):o}(o,r))).selector=e}return a},l=ae.select=function(e,t,n,r){var o,l,u,c,d,f="function"==typeof e&&e,h=!r&&s(e=f.selector||e);if(n=n||[],1===h.length){if((l=h[0]=h[0].slice(0)).length>2&&"ID"===(u=l[0]).type&&9===t.nodeType&&v&&i.relative[l[1].type]){if(!(t=(i.find.ID(u.matches[0].replace(te,ne),t)||[])[0]))return n;f&&(t=t.parentNode),e=e.slice(l.shift().value.length)}for(o=Z.needsContext.test(e)?0:l.length;o--&&(u=l[o],!i.relative[c=u.type]);)if((d=i.find[c])&&(r=d(u.matches[0].replace(te,ne),ee.test(l[0].type)&&ge(t.parentNode)||t))){if(l.splice(o,1),!(e=r.length&&we(l)))return E.apply(n,r),n;break}}return(f||a(e,h))(r,t,!v,n,!t||ee.test(e)&&ge(t.parentNode)||t),n},n.sortStable=b.split("").sort(A).join("")===b,n.detectDuplicates=!!d,f(),n.sortDetached=ce(function(e){return 1&e.compareDocumentPosition(h.createElement("fieldset"))}),ce(function(e){return e.innerHTML="","#"===e.firstChild.getAttribute("href")})||de("type|href|height|width",function(e,t,n){if(!n)return e.getAttribute(t,"type"===t.toLowerCase()?1:2)}),n.attributes&&ce(function(e){return e.innerHTML="",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")})||de("value",function(e,t,n){if(!n&&"input"===e.nodeName.toLowerCase())return e.defaultValue}),ce(function(e){return null==e.getAttribute("disabled")})||de(N,function(e,t,n){var i;if(!n)return!0===e[t]?t.toLowerCase():(i=e.getAttributeNode(t))&&i.specified?i.value:null}),ae}(n);_.find=z,_.expr=z.selectors,_.expr[":"]=_.expr.pseudos,_.uniqueSort=_.unique=z.uniqueSort,_.text=z.getText,_.isXMLDoc=z.isXML,_.contains=z.contains,_.escapeSelector=z.escape;var $=function(e,t,n){for(var i=[],r=void 0!==n;(e=e[t])&&9!==e.nodeType;)if(1===e.nodeType){if(r&&_(e).is(n))break;i.push(e)}return i},A=function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n},k=_.expr.match.needsContext;function D(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()}var O=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function L(e,t,n){return y(t)?_.grep(e,function(e,i){return!!t.call(e,i,e)!==n}):t.nodeType?_.grep(e,function(e){return e===t!==n}):"string"!=typeof t?_.grep(e,function(e){return d.call(t,e)>-1!==n}):_.filter(t,e,n)}_.filter=function(e,t,n){var i=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===i.nodeType?_.find.matchesSelector(i,e)?[i]:[]:_.find.matches(e,_.grep(t,function(e){return 1===e.nodeType}))},_.fn.extend({find:function(e){var t,n,i=this.length,r=this;if("string"!=typeof e)return this.pushStack(_(e).filter(function(){for(t=0;t1?_.uniqueSort(n):n},filter:function(e){return this.pushStack(L(this,e||[],!1))},not:function(e){return this.pushStack(L(this,e||[],!0))},is:function(e){return!!L(this,"string"==typeof e&&k.test(e)?_(e):e||[],!1).length}});var E,W=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/;(_.fn.init=function(e,t,n){var i,r;if(!e)return this;if(n=n||E,"string"==typeof e){if(!(i="<"===e[0]&&">"===e[e.length-1]&&e.length>=3?[null,e,null]:W.exec(e))||!i[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(i[1]){if(t=t instanceof _?t[0]:t,_.merge(this,_.parseHTML(i[1],t&&t.nodeType?t.ownerDocument||t:s,!0)),O.test(i[1])&&_.isPlainObject(t))for(i in t)y(this[i])?this[i](t[i]):this.attr(i,t[i]);return this}return(r=s.getElementById(i[2]))&&(this[0]=r,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):y(e)?void 0!==n.ready?n.ready(e):e(_):_.makeArray(e,this)}).prototype=_.fn,E=_(s);var M=/^(?:parents|prev(?:Until|All))/,N={children:!0,contents:!0,next:!0,prev:!0};function j(e,t){for(;(e=e[t])&&1!==e.nodeType;);return e}_.fn.extend({has:function(e){var t=_(e,this),n=t.length;return this.filter(function(){for(var e=0;e-1:1===n.nodeType&&_.find.matchesSelector(n,e))){o.push(n);break}return this.pushStack(o.length>1?_.uniqueSort(o):o)},index:function(e){return e?"string"==typeof e?d.call(_(e),this[0]):d.call(this,e.jquery?e[0]:e):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(_.uniqueSort(_.merge(this.get(),_(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),_.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return $(e,"parentNode")},parentsUntil:function(e,t,n){return $(e,"parentNode",n)},next:function(e){return j(e,"nextSibling")},prev:function(e){return j(e,"previousSibling")},nextAll:function(e){return $(e,"nextSibling")},prevAll:function(e){return $(e,"previousSibling")},nextUntil:function(e,t,n){return $(e,"nextSibling",n)},prevUntil:function(e,t,n){return $(e,"previousSibling",n)},siblings:function(e){return A((e.parentNode||{}).firstChild,e)},children:function(e){return A(e.firstChild)},contents:function(e){return void 0!==e.contentDocument?e.contentDocument:(D(e,"template")&&(e=e.content||e),_.merge([],e.childNodes))}},function(e,t){_.fn[e]=function(n,i){var r=_.map(this,t,n);return"Until"!==e.slice(-5)&&(i=n),i&&"string"==typeof i&&(r=_.filter(i,r)),this.length>1&&(N[e]||_.uniqueSort(r),M.test(e)&&r.reverse()),this.pushStack(r)}});var F=/[^\x20\t\r\n\f]+/g;function I(e){return e}function H(e){throw e}function R(e,t,n,i){var r;try{e&&y(r=e.promise)?r.call(e).done(t).fail(n):e&&y(r=e.then)?r.call(e,t,n):t.apply(void 0,[e].slice(i))}catch(e){n.apply(void 0,[e])}}_.Callbacks=function(e){e="string"==typeof e?function(e){var t={};return _.each(e.match(F)||[],function(e,n){t[n]=!0}),t}(e):_.extend({},e);var t,n,i,r,o=[],s=[],a=-1,l=function(){for(r=r||e.once,i=t=!0;s.length;a=-1)for(n=s.shift();++a-1;)o.splice(n,1),n<=a&&a--}),this},has:function(e){return e?_.inArray(e,o)>-1:o.length>0},empty:function(){return o&&(o=[]),this},disable:function(){return r=s=[],o=n="",this},disabled:function(){return!o},lock:function(){return r=s=[],n||t||(o=n=""),this},locked:function(){return!!r},fireWith:function(e,n){return r||(n=[e,(n=n||[]).slice?n.slice():n],s.push(n),t||l()),this},fire:function(){return u.fireWith(this,arguments),this},fired:function(){return!!i}};return u},_.extend({Deferred:function(e){var t=[["notify","progress",_.Callbacks("memory"),_.Callbacks("memory"),2],["resolve","done",_.Callbacks("once memory"),_.Callbacks("once memory"),0,"resolved"],["reject","fail",_.Callbacks("once memory"),_.Callbacks("once memory"),1,"rejected"]],i="pending",r={state:function(){return i},always:function(){return o.done(arguments).fail(arguments),this},catch:function(e){return r.then(null,e)},pipe:function(){var e=arguments;return _.Deferred(function(n){_.each(t,function(t,i){var r=y(e[i[4]])&&e[i[4]];o[i[1]](function(){var e=r&&r.apply(this,arguments);e&&y(e.promise)?e.promise().progress(n.notify).done(n.resolve).fail(n.reject):n[i[0]+"With"](this,r?[e]:arguments)})}),e=null}).promise()},then:function(e,i,r){var o=0;function s(e,t,i,r){return function(){var a=this,l=arguments,u=function(){var n,u;if(!(e=o&&(i!==H&&(a=void 0,l=[n]),t.rejectWith(a,l))}};e?c():(_.Deferred.getStackHook&&(c.stackTrace=_.Deferred.getStackHook()),n.setTimeout(c))}}return _.Deferred(function(n){t[0][3].add(s(0,n,y(r)?r:I,n.notifyWith)),t[1][3].add(s(0,n,y(e)?e:I)),t[2][3].add(s(0,n,y(i)?i:H))}).promise()},promise:function(e){return null!=e?_.extend(e,r):r}},o={};return _.each(t,function(e,n){var s=n[2],a=n[5];r[n[1]]=s.add,a&&s.add(function(){i=a},t[3-e][2].disable,t[3-e][3].disable,t[0][2].lock,t[0][3].lock),s.add(n[3].fire),o[n[0]]=function(){return o[n[0]+"With"](this===o?void 0:this,arguments),this},o[n[0]+"With"]=s.fireWith}),r.promise(o),e&&e.call(o,o),o},when:function(e){var t=arguments.length,n=t,i=Array(n),r=l.call(arguments),o=_.Deferred(),s=function(e){return function(n){i[e]=this,r[e]=arguments.length>1?l.call(arguments):n,--t||o.resolveWith(i,r)}};if(t<=1&&(R(e,o.done(s(n)).resolve,o.reject,!t),"pending"===o.state()||y(r[n]&&r[n].then)))return o.then();for(;n--;)R(r[n],s(n),o.reject);return o.promise()}});var P=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;_.Deferred.exceptionHook=function(e,t){n.console&&n.console.warn&&e&&P.test(e.name)&&n.console.warn("jQuery.Deferred exception: "+e.message,e.stack,t)},_.readyException=function(e){n.setTimeout(function(){throw e})};var B=_.Deferred();function q(){s.removeEventListener("DOMContentLoaded",q),n.removeEventListener("load",q),_.ready()}_.fn.ready=function(e){return B.then(e).catch(function(e){_.readyException(e)}),this},_.extend({isReady:!1,readyWait:1,ready:function(e){(!0===e?--_.readyWait:_.isReady)||(_.isReady=!0,!0!==e&&--_.readyWait>0||B.resolveWith(s,[_]))}}),_.ready.then=B.then,"complete"===s.readyState||"loading"!==s.readyState&&!s.documentElement.doScroll?n.setTimeout(_.ready):(s.addEventListener("DOMContentLoaded",q),n.addEventListener("load",q));var V=function(e,t,n,i,r,o,s){var a=0,l=e.length,u=null==n;if("object"===T(n))for(a in r=!0,n)V(e,t,a,n[a],!0,o,s);else if(void 0!==i&&(r=!0,y(i)||(s=!0),u&&(s?(t.call(e,i),t=null):(u=t,t=function(e,t,n){return u.call(_(e),n)})),t))for(;a1,null,!0)},removeData:function(e){return this.each(function(){Q.remove(this,e)})}}),_.extend({queue:function(e,t,n){var i;if(e)return t=(t||"fx")+"queue",i=J.get(e,t),n&&(!i||Array.isArray(n)?i=J.access(e,t,_.makeArray(n)):i.push(n)),i||[]},dequeue:function(e,t){t=t||"fx";var n=_.queue(e,t),i=n.length,r=n.shift(),o=_._queueHooks(e,t);"inprogress"===r&&(r=n.shift(),i--),r&&("fx"===t&&n.unshift("inprogress"),delete o.stop,r.call(e,function(){_.dequeue(e,t)},o)),!i&&o&&o.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return J.get(e,n)||J.access(e,n,{empty:_.Callbacks("once memory").add(function(){J.remove(e,[t+"queue",n])})})}}),_.fn.extend({queue:function(e,t){var n=2;return"string"!=typeof e&&(t=e,e="fx",n--),arguments.length\x20\t\r\n\f]*)/i,ge=/^$|^module$|\/(?:java|ecma)script/i,ye={option:[1,""],thead:[1,"","
"],col:[2,"","
"],tr:[2,"","
"],td:[3,"","
"],_default:[0,"",""]};function we(e,t){var n;return n=void 0!==e.getElementsByTagName?e.getElementsByTagName(t||"*"):void 0!==e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&D(e,t)?_.merge([e],n):n}function be(e,t){for(var n=0,i=e.length;n-1)r&&r.push(o);else if(u=ae(o),s=we(d.appendChild(o),"script"),u&&be(s),n)for(c=0;o=s[c++];)ge.test(o.type||"")&&n.push(o);return d}xe=s.createDocumentFragment().appendChild(s.createElement("div")),(Te=s.createElement("input")).setAttribute("type","radio"),Te.setAttribute("checked","checked"),Te.setAttribute("name","t"),xe.appendChild(Te),g.checkClone=xe.cloneNode(!0).cloneNode(!0).lastChild.checked,xe.innerHTML="",g.noCloneChecked=!!xe.cloneNode(!0).lastChild.defaultValue;var Ce=/^key/,ze=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,$e=/^([^.]*)(?:\.(.+)|)/;function Ae(){return!0}function ke(){return!1}function De(e,t){return e===function(){try{return s.activeElement}catch(e){}}()==("focus"===t)}function Oe(e,t,n,i,r,o){var s,a;if("object"==typeof t){for(a in"string"!=typeof n&&(i=i||n,n=void 0),t)Oe(e,a,n,i,t[a],o);return e}if(null==i&&null==r?(r=n,i=n=void 0):null==r&&("string"==typeof n?(r=i,i=void 0):(r=i,i=n,n=void 0)),!1===r)r=ke;else if(!r)return e;return 1===o&&(s=r,(r=function(e){return _().off(e),s.apply(this,arguments)}).guid=s.guid||(s.guid=_.guid++)),e.each(function(){_.event.add(this,t,r,i,n)})}function Le(e,t,n){n?(J.set(e,t,!1),_.event.add(e,t,{namespace:!1,handler:function(e){var i,r,o=J.get(this,t);if(1&e.isTrigger&&this[t]){if(o)(_.event.special[t]||{}).delegateType&&e.stopPropagation();else if(o=l.call(arguments),J.set(this,t,o),i=n(this,t),this[t](),o!==(r=J.get(this,t))||i?J.set(this,t,!1):r=void 0,o!==r)return e.stopImmediatePropagation(),e.preventDefault(),r}else o&&(J.set(this,t,_.event.trigger(_.extend(o.shift(),_.Event.prototype),o,this)),e.stopImmediatePropagation())}})):_.event.add(e,t,Ae)}_.event={global:{},add:function(e,t,n,i,r){var o,s,a,l,u,c,d,f,h,p,v,m=J.get(e);if(m)for(n.handler&&(n=(o=n).handler,r=o.selector),r&&_.find.matchesSelector(se,r),n.guid||(n.guid=_.guid++),(l=m.events)||(l=m.events={}),(s=m.handle)||(s=m.handle=function(t){return void 0!==_&&_.event.triggered!==t.type?_.event.dispatch.apply(e,arguments):void 0}),u=(t=(t||"").match(F)||[""]).length;u--;)h=v=(a=$e.exec(t[u])||[])[1],p=(a[2]||"").split(".").sort(),h&&(d=_.event.special[h]||{},h=(r?d.delegateType:d.bindType)||h,d=_.event.special[h]||{},c=_.extend({type:h,origType:v,data:i,handler:n,guid:n.guid,selector:r,needsContext:r&&_.expr.match.needsContext.test(r),namespace:p.join(".")},o),(f=l[h])||((f=l[h]=[]).delegateCount=0,d.setup&&!1!==d.setup.call(e,i,p,s)||e.addEventListener&&e.addEventListener(h,s)),d.add&&(d.add.call(e,c),c.handler.guid||(c.handler.guid=n.guid)),r?f.splice(f.delegateCount++,0,c):f.push(c),_.event.global[h]=!0)},remove:function(e,t,n,i,r){var o,s,a,l,u,c,d,f,h,p,v,m=J.hasData(e)&&J.get(e);if(m&&(l=m.events)){for(u=(t=(t||"").match(F)||[""]).length;u--;)if(h=v=(a=$e.exec(t[u])||[])[1],p=(a[2]||"").split(".").sort(),h){for(d=_.event.special[h]||{},f=l[h=(i?d.delegateType:d.bindType)||h]||[],a=a[2]&&new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"),s=o=f.length;o--;)c=f[o],!r&&v!==c.origType||n&&n.guid!==c.guid||a&&!a.test(c.namespace)||i&&i!==c.selector&&("**"!==i||!c.selector)||(f.splice(o,1),c.selector&&f.delegateCount--,d.remove&&d.remove.call(e,c));s&&!f.length&&(d.teardown&&!1!==d.teardown.call(e,p,m.handle)||_.removeEvent(e,h,m.handle),delete l[h])}else for(h in l)_.event.remove(e,h+t[u],n,i,!0);_.isEmptyObject(l)&&J.remove(e,"handle events")}},dispatch:function(e){var t,n,i,r,o,s,a=_.event.fix(e),l=new Array(arguments.length),u=(J.get(this,"events")||{})[a.type]||[],c=_.event.special[a.type]||{};for(l[0]=a,t=1;t=1))for(;u!==this;u=u.parentNode||this)if(1===u.nodeType&&("click"!==e.type||!0!==u.disabled)){for(o=[],s={},n=0;n-1:_.find(r,this,null,[u]).length),s[r]&&o.push(i);o.length&&a.push({elem:u,handlers:o})}return u=this,l\x20\t\r\n\f]*)[^>]*)\/>/gi,We=/\s*$/g;function je(e,t){return D(e,"table")&&D(11!==t.nodeType?t:t.firstChild,"tr")&&_(e).children("tbody")[0]||e}function Fe(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function Ie(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function He(e,t){var n,i,r,o,s,a,l,u;if(1===t.nodeType){if(J.hasData(e)&&(o=J.access(e),s=J.set(t,o),u=o.events))for(r in delete s.handle,s.events={},u)for(n=0,i=u[r].length;n1&&"string"==typeof p&&!g.checkClone&&Me.test(p))return e.each(function(r){var o=e.eq(r);v&&(t[0]=p.call(this,r,o.html())),Re(o,t,n,i)});if(f&&(o=(r=Se(t,e[0].ownerDocument,!1,e,i)).firstChild,1===r.childNodes.length&&(r=o),o||i)){for(a=(s=_.map(we(r,"script"),Fe)).length;d")},clone:function(e,t,n){var i,r,o,s,a,l,u,c=e.cloneNode(!0),d=ae(e);if(!(g.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||_.isXMLDoc(e)))for(s=we(c),i=0,r=(o=we(e)).length;i0&&be(s,!d&&we(e,"script")),c},cleanData:function(e){for(var t,n,i,r=_.event.special,o=0;void 0!==(n=e[o]);o++)if(X(n)){if(t=n[J.expando]){if(t.events)for(i in t.events)r[i]?_.event.remove(n,i):_.removeEvent(n,i,t.handle);n[J.expando]=void 0}n[Q.expando]&&(n[Q.expando]=void 0)}}}),_.fn.extend({detach:function(e){return Pe(this,e,!0)},remove:function(e){return Pe(this,e)},text:function(e){return V(this,function(e){return void 0===e?_.text(this):this.empty().each(function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=e)})},null,e,arguments.length)},append:function(){return Re(this,arguments,function(e){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||je(this,e).appendChild(e)})},prepend:function(){return Re(this,arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=je(this,e);t.insertBefore(e,t.firstChild)}})},before:function(){return Re(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return Re(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},empty:function(){for(var e,t=0;null!=(e=this[t]);t++)1===e.nodeType&&(_.cleanData(we(e,!1)),e.textContent="");return this},clone:function(e,t){return e=null!=e&&e,t=null==t?e:t,this.map(function(){return _.clone(this,e,t)})},html:function(e){return V(this,function(e){var t=this[0]||{},n=0,i=this.length;if(void 0===e&&1===t.nodeType)return t.innerHTML;if("string"==typeof e&&!We.test(e)&&!ye[(me.exec(e)||["",""])[1].toLowerCase()]){e=_.htmlPrefilter(e);try{for(;n=0&&(l+=Math.max(0,Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-o-l-a-.5))||0),l}function rt(e,t,n){var i=qe(e),r=(!g.boxSizingReliable()||n)&&"border-box"===_.css(e,"boxSizing",!1,i),o=r,s=Ue(e,t,i),a="offset"+t[0].toUpperCase()+t.slice(1);if(Be.test(s)){if(!n)return s;s="auto"}return(!g.boxSizingReliable()&&r||"auto"===s||!parseFloat(s)&&"inline"===_.css(e,"display",!1,i))&&e.getClientRects().length&&(r="border-box"===_.css(e,"boxSizing",!1,i),(o=a in e)&&(s=e[a])),(s=parseFloat(s)||0)+it(e,t,n||(r?"border":"content"),o,i,s)+"px"}function ot(e,t,n,i,r){return new ot.prototype.init(e,t,n,i,r)}_.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=Ue(e,"opacity");return""===n?"1":n}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,gridArea:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnStart:!0,gridRow:!0,gridRowEnd:!0,gridRowStart:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{},style:function(e,t,n,i){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var r,o,s,a=G(t),l=Qe.test(t),u=e.style;if(l||(t=Ke(a)),s=_.cssHooks[t]||_.cssHooks[a],void 0===n)return s&&"get"in s&&void 0!==(r=s.get(e,!1,i))?r:u[t];"string"===(o=typeof n)&&(r=re.exec(n))&&r[1]&&(n=de(e,t,r),o="number"),null!=n&&n==n&&("number"!==o||l||(n+=r&&r[3]||(_.cssNumber[a]?"":"px")),g.clearCloneStyle||""!==n||0!==t.indexOf("background")||(u[t]="inherit"),s&&"set"in s&&void 0===(n=s.set(e,n,i))||(l?u.setProperty(t,n):u[t]=n))}},css:function(e,t,n,i){var r,o,s,a=G(t);return Qe.test(t)||(t=Ke(a)),(s=_.cssHooks[t]||_.cssHooks[a])&&"get"in s&&(r=s.get(e,!0,n)),void 0===r&&(r=Ue(e,t,i)),"normal"===r&&t in tt&&(r=tt[t]),""===n||n?(o=parseFloat(r),!0===n||isFinite(o)?o||0:r):r}}),_.each(["height","width"],function(e,t){_.cssHooks[t]={get:function(e,n,i){if(n)return!Je.test(_.css(e,"display"))||e.getClientRects().length&&e.getBoundingClientRect().width?rt(e,t,i):ce(e,et,function(){return rt(e,t,i)})},set:function(e,n,i){var r,o=qe(e),s=!g.scrollboxSize()&&"absolute"===o.position,a=(s||i)&&"border-box"===_.css(e,"boxSizing",!1,o),l=i?it(e,t,i,a,o):0;return a&&s&&(l-=Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-parseFloat(o[t])-it(e,t,"border",!1,o)-.5)),l&&(r=re.exec(n))&&"px"!==(r[3]||"px")&&(e.style[t]=n,n=_.css(e,t)),nt(0,n,l)}}}),_.cssHooks.marginLeft=Ye(g.reliableMarginLeft,function(e,t){if(t)return(parseFloat(Ue(e,"marginLeft"))||e.getBoundingClientRect().left-ce(e,{marginLeft:0},function(){return e.getBoundingClientRect().left}))+"px"}),_.each({margin:"",padding:"",border:"Width"},function(e,t){_.cssHooks[e+t]={expand:function(n){for(var i=0,r={},o="string"==typeof n?n.split(" "):[n];i<4;i++)r[e+oe[i]+t]=o[i]||o[i-2]||o[0];return r}},"margin"!==e&&(_.cssHooks[e+t].set=nt)}),_.fn.extend({css:function(e,t){return V(this,function(e,t,n){var i,r,o={},s=0;if(Array.isArray(t)){for(i=qe(e),r=t.length;s1)}}),_.Tween=ot,ot.prototype={constructor:ot,init:function(e,t,n,i,r,o){this.elem=e,this.prop=n,this.easing=r||_.easing._default,this.options=t,this.start=this.now=this.cur(),this.end=i,this.unit=o||(_.cssNumber[n]?"":"px")},cur:function(){var e=ot.propHooks[this.prop];return e&&e.get?e.get(this):ot.propHooks._default.get(this)},run:function(e){var t,n=ot.propHooks[this.prop];return this.options.duration?this.pos=t=_.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):this.pos=t=e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):ot.propHooks._default.set(this),this}},ot.prototype.init.prototype=ot.prototype,ot.propHooks={_default:{get:function(e){var t;return 1!==e.elem.nodeType||null!=e.elem[e.prop]&&null==e.elem.style[e.prop]?e.elem[e.prop]:(t=_.css(e.elem,e.prop,""))&&"auto"!==t?t:0},set:function(e){_.fx.step[e.prop]?_.fx.step[e.prop](e):1!==e.elem.nodeType||!_.cssHooks[e.prop]&&null==e.elem.style[Ke(e.prop)]?e.elem[e.prop]=e.now:_.style(e.elem,e.prop,e.now+e.unit)}}},ot.propHooks.scrollTop=ot.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},_.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2},_default:"swing"},_.fx=ot.prototype.init,_.fx.step={};var st,at,lt=/^(?:toggle|show|hide)$/,ut=/queueHooks$/;function ct(){at&&(!1===s.hidden&&n.requestAnimationFrame?n.requestAnimationFrame(ct):n.setTimeout(ct,_.fx.interval),_.fx.tick())}function dt(){return n.setTimeout(function(){st=void 0}),st=Date.now()}function ft(e,t){var n,i=0,r={height:e};for(t=t?1:0;i<4;i+=2-t)r["margin"+(n=oe[i])]=r["padding"+n]=e;return t&&(r.opacity=r.width=e),r}function ht(e,t,n){for(var i,r=(pt.tweeners[t]||[]).concat(pt.tweeners["*"]),o=0,s=r.length;o1)},removeAttr:function(e){return this.each(function(){_.removeAttr(this,e)})}}),_.extend({attr:function(e,t,n){var i,r,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return void 0===e.getAttribute?_.prop(e,t,n):(1===o&&_.isXMLDoc(e)||(r=_.attrHooks[t.toLowerCase()]||(_.expr.match.bool.test(t)?vt:void 0)),void 0!==n?null===n?void _.removeAttr(e,t):r&&"set"in r&&void 0!==(i=r.set(e,n,t))?i:(e.setAttribute(t,n+""),n):r&&"get"in r&&null!==(i=r.get(e,t))?i:null==(i=_.find.attr(e,t))?void 0:i)},attrHooks:{type:{set:function(e,t){if(!g.radioValue&&"radio"===t&&D(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},removeAttr:function(e,t){var n,i=0,r=t&&t.match(F);if(r&&1===e.nodeType)for(;n=r[i++];)e.removeAttribute(n)}}),vt={set:function(e,t,n){return!1===t?_.removeAttr(e,n):e.setAttribute(n,n),n}},_.each(_.expr.match.bool.source.match(/\w+/g),function(e,t){var n=mt[t]||_.find.attr;mt[t]=function(e,t,i){var r,o,s=t.toLowerCase();return i||(o=mt[s],mt[s]=r,r=null!=n(e,t,i)?s:null,mt[s]=o),r}});var gt=/^(?:input|select|textarea|button)$/i,yt=/^(?:a|area)$/i;function wt(e){return(e.match(F)||[]).join(" ")}function bt(e){return e.getAttribute&&e.getAttribute("class")||""}function xt(e){return Array.isArray(e)?e:"string"==typeof e&&e.match(F)||[]}_.fn.extend({prop:function(e,t){return V(this,_.prop,e,t,arguments.length>1)},removeProp:function(e){return this.each(function(){delete this[_.propFix[e]||e]})}}),_.extend({prop:function(e,t,n){var i,r,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return 1===o&&_.isXMLDoc(e)||(t=_.propFix[t]||t,r=_.propHooks[t]),void 0!==n?r&&"set"in r&&void 0!==(i=r.set(e,n,t))?i:e[t]=n:r&&"get"in r&&null!==(i=r.get(e,t))?i:e[t]},propHooks:{tabIndex:{get:function(e){var t=_.find.attr(e,"tabindex");return t?parseInt(t,10):gt.test(e.nodeName)||yt.test(e.nodeName)&&e.href?0:-1}}},propFix:{for:"htmlFor",class:"className"}}),g.optSelected||(_.propHooks.selected={get:function(e){var t=e.parentNode;return t&&t.parentNode&&t.parentNode.selectedIndex,null},set:function(e){var t=e.parentNode;t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex)}}),_.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){_.propFix[this.toLowerCase()]=this}),_.fn.extend({addClass:function(e){var t,n,i,r,o,s,a,l=0;if(y(e))return this.each(function(t){_(this).addClass(e.call(this,t,bt(this)))});if((t=xt(e)).length)for(;n=this[l++];)if(r=bt(n),i=1===n.nodeType&&" "+wt(r)+" "){for(s=0;o=t[s++];)i.indexOf(" "+o+" ")<0&&(i+=o+" ");r!==(a=wt(i))&&n.setAttribute("class",a)}return this},removeClass:function(e){var t,n,i,r,o,s,a,l=0;if(y(e))return this.each(function(t){_(this).removeClass(e.call(this,t,bt(this)))});if(!arguments.length)return this.attr("class","");if((t=xt(e)).length)for(;n=this[l++];)if(r=bt(n),i=1===n.nodeType&&" "+wt(r)+" "){for(s=0;o=t[s++];)for(;i.indexOf(" "+o+" ")>-1;)i=i.replace(" "+o+" "," ");r!==(a=wt(i))&&n.setAttribute("class",a)}return this},toggleClass:function(e,t){var n=typeof e,i="string"===n||Array.isArray(e);return"boolean"==typeof t&&i?t?this.addClass(e):this.removeClass(e):y(e)?this.each(function(n){_(this).toggleClass(e.call(this,n,bt(this),t),t)}):this.each(function(){var t,r,o,s;if(i)for(r=0,o=_(this),s=xt(e);t=s[r++];)o.hasClass(t)?o.removeClass(t):o.addClass(t);else void 0!==e&&"boolean"!==n||((t=bt(this))&&J.set(this,"__className__",t),this.setAttribute&&this.setAttribute("class",t||!1===e?"":J.get(this,"__className__")||""))})},hasClass:function(e){var t,n,i=0;for(t=" "+e+" ";n=this[i++];)if(1===n.nodeType&&(" "+wt(bt(n))+" ").indexOf(t)>-1)return!0;return!1}});var Tt=/\r/g;_.fn.extend({val:function(e){var t,n,i,r=this[0];return arguments.length?(i=y(e),this.each(function(n){var r;1===this.nodeType&&(null==(r=i?e.call(this,n,_(this).val()):e)?r="":"number"==typeof r?r+="":Array.isArray(r)&&(r=_.map(r,function(e){return null==e?"":e+""})),(t=_.valHooks[this.type]||_.valHooks[this.nodeName.toLowerCase()])&&"set"in t&&void 0!==t.set(this,r,"value")||(this.value=r))})):r?(t=_.valHooks[r.type]||_.valHooks[r.nodeName.toLowerCase()])&&"get"in t&&void 0!==(n=t.get(r,"value"))?n:"string"==typeof(n=r.value)?n.replace(Tt,""):null==n?"":n:void 0}}),_.extend({valHooks:{option:{get:function(e){var t=_.find.attr(e,"value");return null!=t?t:wt(_.text(e))}},select:{get:function(e){var t,n,i,r=e.options,o=e.selectedIndex,s="select-one"===e.type,a=s?null:[],l=s?o+1:r.length;for(i=o<0?l:s?o:0;i-1)&&(n=!0);return n||(e.selectedIndex=-1),o}}}}),_.each(["radio","checkbox"],function(){_.valHooks[this]={set:function(e,t){if(Array.isArray(t))return e.checked=_.inArray(_(e).val(),t)>-1}},g.checkOn||(_.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})}),g.focusin="onfocusin"in n;var _t=/^(?:focusinfocus|focusoutblur)$/,St=function(e){e.stopPropagation()};_.extend(_.event,{trigger:function(e,t,i,r){var o,a,l,u,c,d,f,h,v=[i||s],m=p.call(e,"type")?e.type:e,g=p.call(e,"namespace")?e.namespace.split("."):[];if(a=h=l=i=i||s,3!==i.nodeType&&8!==i.nodeType&&!_t.test(m+_.event.triggered)&&(m.indexOf(".")>-1&&(m=(g=m.split(".")).shift(),g.sort()),c=m.indexOf(":")<0&&"on"+m,(e=e[_.expando]?e:new _.Event(m,"object"==typeof e&&e)).isTrigger=r?2:3,e.namespace=g.join("."),e.rnamespace=e.namespace?new RegExp("(^|\\.)"+g.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,e.result=void 0,e.target||(e.target=i),t=null==t?[e]:_.makeArray(t,[e]),f=_.event.special[m]||{},r||!f.trigger||!1!==f.trigger.apply(i,t))){if(!r&&!f.noBubble&&!w(i)){for(u=f.delegateType||m,_t.test(u+m)||(a=a.parentNode);a;a=a.parentNode)v.push(a),l=a;l===(i.ownerDocument||s)&&v.push(l.defaultView||l.parentWindow||n)}for(o=0;(a=v[o++])&&!e.isPropagationStopped();)h=a,e.type=o>1?u:f.bindType||m,(d=(J.get(a,"events")||{})[e.type]&&J.get(a,"handle"))&&d.apply(a,t),(d=c&&a[c])&&d.apply&&X(a)&&(e.result=d.apply(a,t),!1===e.result&&e.preventDefault());return e.type=m,r||e.isDefaultPrevented()||f._default&&!1!==f._default.apply(v.pop(),t)||!X(i)||c&&y(i[m])&&!w(i)&&((l=i[c])&&(i[c]=null),_.event.triggered=m,e.isPropagationStopped()&&h.addEventListener(m,St),i[m](),e.isPropagationStopped()&&h.removeEventListener(m,St),_.event.triggered=void 0,l&&(i[c]=l)),e.result}},simulate:function(e,t,n){var i=_.extend(new _.Event,n,{type:e,isSimulated:!0});_.event.trigger(i,null,t)}}),_.fn.extend({trigger:function(e,t){return this.each(function(){_.event.trigger(e,t,this)})},triggerHandler:function(e,t){var n=this[0];if(n)return _.event.trigger(e,t,n,!0)}}),g.focusin||_.each({focus:"focusin",blur:"focusout"},function(e,t){var n=function(e){_.event.simulate(t,e.target,_.event.fix(e))};_.event.special[t]={setup:function(){var i=this.ownerDocument||this,r=J.access(i,t);r||i.addEventListener(e,n,!0),J.access(i,t,(r||0)+1)},teardown:function(){var i=this.ownerDocument||this,r=J.access(i,t)-1;r?J.access(i,t,r):(i.removeEventListener(e,n,!0),J.remove(i,t))}}});var Ct=n.location,zt=Date.now(),$t=/\?/;_.parseXML=function(e){var t;if(!e||"string"!=typeof e)return null;try{t=(new n.DOMParser).parseFromString(e,"text/xml")}catch(e){t=void 0}return t&&!t.getElementsByTagName("parsererror").length||_.error("Invalid XML: "+e),t};var At=/\[\]$/,kt=/\r?\n/g,Dt=/^(?:submit|button|image|reset|file)$/i,Ot=/^(?:input|select|textarea|keygen)/i;function Lt(e,t,n,i){var r;if(Array.isArray(t))_.each(t,function(t,r){n||At.test(e)?i(e,r):Lt(e+"["+("object"==typeof r&&null!=r?t:"")+"]",r,n,i)});else if(n||"object"!==T(t))i(e,t);else for(r in t)Lt(e+"["+r+"]",t[r],n,i)}_.param=function(e,t){var n,i=[],r=function(e,t){var n=y(t)?t():t;i[i.length]=encodeURIComponent(e)+"="+encodeURIComponent(null==n?"":n)};if(null==e)return"";if(Array.isArray(e)||e.jquery&&!_.isPlainObject(e))_.each(e,function(){r(this.name,this.value)});else for(n in e)Lt(n,e[n],t,r);return i.join("&")},_.fn.extend({serialize:function(){return _.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=_.prop(this,"elements");return e?_.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!_(this).is(":disabled")&&Ot.test(this.nodeName)&&!Dt.test(e)&&(this.checked||!ve.test(e))}).map(function(e,t){var n=_(this).val();return null==n?null:Array.isArray(n)?_.map(n,function(e){return{name:t.name,value:e.replace(kt,"\r\n")}}):{name:t.name,value:n.replace(kt,"\r\n")}}).get()}});var Et=/%20/g,Wt=/#.*$/,Mt=/([?&])_=[^&]*/,Nt=/^(.*?):[ \t]*([^\r\n]*)$/gm,jt=/^(?:GET|HEAD)$/,Ft=/^\/\//,It={},Ht={},Rt="*/".concat("*"),Pt=s.createElement("a");function Bt(e){return function(t,n){"string"!=typeof t&&(n=t,t="*");var i,r=0,o=t.toLowerCase().match(F)||[];if(y(n))for(;i=o[r++];)"+"===i[0]?(i=i.slice(1)||"*",(e[i]=e[i]||[]).unshift(n)):(e[i]=e[i]||[]).push(n)}}function qt(e,t,n,i){var r={},o=e===Ht;function s(a){var l;return r[a]=!0,_.each(e[a]||[],function(e,a){var u=a(t,n,i);return"string"!=typeof u||o||r[u]?o?!(l=u):void 0:(t.dataTypes.unshift(u),s(u),!1)}),l}return s(t.dataTypes[0])||!r["*"]&&s("*")}function Vt(e,t){var n,i,r=_.ajaxSettings.flatOptions||{};for(n in t)void 0!==t[n]&&((r[n]?e:i||(i={}))[n]=t[n]);return i&&_.extend(!0,e,i),e}Pt.href=Ct.href,_.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:Ct.href,type:"GET",isLocal:/^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(Ct.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Rt,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":JSON.parse,"text xml":_.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?Vt(Vt(e,_.ajaxSettings),t):Vt(_.ajaxSettings,e)},ajaxPrefilter:Bt(It),ajaxTransport:Bt(Ht),ajax:function(e,t){"object"==typeof e&&(t=e,e=void 0),t=t||{};var i,r,o,a,l,u,c,d,f,h,p=_.ajaxSetup({},t),v=p.context||p,m=p.context&&(v.nodeType||v.jquery)?_(v):_.event,g=_.Deferred(),y=_.Callbacks("once memory"),w=p.statusCode||{},b={},x={},T="canceled",S={readyState:0,getResponseHeader:function(e){var t;if(c){if(!a)for(a={};t=Nt.exec(o);)a[t[1].toLowerCase()+" "]=(a[t[1].toLowerCase()+" "]||[]).concat(t[2]);t=a[e.toLowerCase()+" "]}return null==t?null:t.join(", ")},getAllResponseHeaders:function(){return c?o:null},setRequestHeader:function(e,t){return null==c&&(e=x[e.toLowerCase()]=x[e.toLowerCase()]||e,b[e]=t),this},overrideMimeType:function(e){return null==c&&(p.mimeType=e),this},statusCode:function(e){var t;if(e)if(c)S.always(e[S.status]);else for(t in e)w[t]=[w[t],e[t]];return this},abort:function(e){var t=e||T;return i&&i.abort(t),C(0,t),this}};if(g.promise(S),p.url=((e||p.url||Ct.href)+"").replace(Ft,Ct.protocol+"//"),p.type=t.method||t.type||p.method||p.type,p.dataTypes=(p.dataType||"*").toLowerCase().match(F)||[""],null==p.crossDomain){u=s.createElement("a");try{u.href=p.url,u.href=u.href,p.crossDomain=Pt.protocol+"//"+Pt.host!=u.protocol+"//"+u.host}catch(e){p.crossDomain=!0}}if(p.data&&p.processData&&"string"!=typeof p.data&&(p.data=_.param(p.data,p.traditional)),qt(It,p,t,S),c)return S;for(f in(d=_.event&&p.global)&&0==_.active++&&_.event.trigger("ajaxStart"),p.type=p.type.toUpperCase(),p.hasContent=!jt.test(p.type),r=p.url.replace(Wt,""),p.hasContent?p.data&&p.processData&&0===(p.contentType||"").indexOf("application/x-www-form-urlencoded")&&(p.data=p.data.replace(Et,"+")):(h=p.url.slice(r.length),p.data&&(p.processData||"string"==typeof p.data)&&(r+=($t.test(r)?"&":"?")+p.data,delete p.data),!1===p.cache&&(r=r.replace(Mt,"$1"),h=($t.test(r)?"&":"?")+"_="+zt+++h),p.url=r+h),p.ifModified&&(_.lastModified[r]&&S.setRequestHeader("If-Modified-Since",_.lastModified[r]),_.etag[r]&&S.setRequestHeader("If-None-Match",_.etag[r])),(p.data&&p.hasContent&&!1!==p.contentType||t.contentType)&&S.setRequestHeader("Content-Type",p.contentType),S.setRequestHeader("Accept",p.dataTypes[0]&&p.accepts[p.dataTypes[0]]?p.accepts[p.dataTypes[0]]+("*"!==p.dataTypes[0]?", "+Rt+"; q=0.01":""):p.accepts["*"]),p.headers)S.setRequestHeader(f,p.headers[f]);if(p.beforeSend&&(!1===p.beforeSend.call(v,S,p)||c))return S.abort();if(T="abort",y.add(p.complete),S.done(p.success),S.fail(p.error),i=qt(Ht,p,t,S)){if(S.readyState=1,d&&m.trigger("ajaxSend",[S,p]),c)return S;p.async&&p.timeout>0&&(l=n.setTimeout(function(){S.abort("timeout")},p.timeout));try{c=!1,i.send(b,C)}catch(e){if(c)throw e;C(-1,e)}}else C(-1,"No Transport");function C(e,t,s,a){var u,f,h,b,x,T=t;c||(c=!0,l&&n.clearTimeout(l),i=void 0,o=a||"",S.readyState=e>0?4:0,u=e>=200&&e<300||304===e,s&&(b=function(e,t,n){for(var i,r,o,s,a=e.contents,l=e.dataTypes;"*"===l[0];)l.shift(),void 0===i&&(i=e.mimeType||t.getResponseHeader("Content-Type"));if(i)for(r in a)if(a[r]&&a[r].test(i)){l.unshift(r);break}if(l[0]in n)o=l[0];else{for(r in n){if(!l[0]||e.converters[r+" "+l[0]]){o=r;break}s||(s=r)}o=o||s}if(o)return o!==l[0]&&l.unshift(o),n[o]}(p,S,s)),b=function(e,t,n,i){var r,o,s,a,l,u={},c=e.dataTypes.slice();if(c[1])for(s in e.converters)u[s.toLowerCase()]=e.converters[s];for(o=c.shift();o;)if(e.responseFields[o]&&(n[e.responseFields[o]]=t),!l&&i&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),l=o,o=c.shift())if("*"===o)o=l;else if("*"!==l&&l!==o){if(!(s=u[l+" "+o]||u["* "+o]))for(r in u)if((a=r.split(" "))[1]===o&&(s=u[l+" "+a[0]]||u["* "+a[0]])){!0===s?s=u[r]:!0!==u[r]&&(o=a[0],c.unshift(a[1]));break}if(!0!==s)if(s&&e.throws)t=s(t);else try{t=s(t)}catch(e){return{state:"parsererror",error:s?e:"No conversion from "+l+" to "+o}}}return{state:"success",data:t}}(p,b,S,u),u?(p.ifModified&&((x=S.getResponseHeader("Last-Modified"))&&(_.lastModified[r]=x),(x=S.getResponseHeader("etag"))&&(_.etag[r]=x)),204===e||"HEAD"===p.type?T="nocontent":304===e?T="notmodified":(T=b.state,f=b.data,u=!(h=b.error))):(h=T,!e&&T||(T="error",e<0&&(e=0))),S.status=e,S.statusText=(t||T)+"",u?g.resolveWith(v,[f,T,S]):g.rejectWith(v,[S,T,h]),S.statusCode(w),w=void 0,d&&m.trigger(u?"ajaxSuccess":"ajaxError",[S,p,u?f:h]),y.fireWith(v,[S,T]),d&&(m.trigger("ajaxComplete",[S,p]),--_.active||_.event.trigger("ajaxStop")))}return S},getJSON:function(e,t,n){return _.get(e,t,n,"json")},getScript:function(e,t){return _.get(e,void 0,t,"script")}}),_.each(["get","post"],function(e,t){_[t]=function(e,n,i,r){return y(n)&&(r=r||i,i=n,n=void 0),_.ajax(_.extend({url:e,type:t,dataType:r,data:n,success:i},_.isPlainObject(e)&&e))}}),_._evalUrl=function(e,t){return _.ajax({url:e,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,converters:{"text script":function(){}},dataFilter:function(e){_.globalEval(e,t)}})},_.fn.extend({wrapAll:function(e){var t;return this[0]&&(y(e)&&(e=e.call(this[0])),t=_(e,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){for(var e=this;e.firstElementChild;)e=e.firstElementChild;return e}).append(this)),this},wrapInner:function(e){return y(e)?this.each(function(t){_(this).wrapInner(e.call(this,t))}):this.each(function(){var t=_(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=y(e);return this.each(function(n){_(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(e){return this.parent(e).not("body").each(function(){_(this).replaceWith(this.childNodes)}),this}}),_.expr.pseudos.hidden=function(e){return!_.expr.pseudos.visible(e)},_.expr.pseudos.visible=function(e){return!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)},_.ajaxSettings.xhr=function(){try{return new n.XMLHttpRequest}catch(e){}};var Ut={0:200,1223:204},Yt=_.ajaxSettings.xhr();g.cors=!!Yt&&"withCredentials"in Yt,g.ajax=Yt=!!Yt,_.ajaxTransport(function(e){var t,i;if(g.cors||Yt&&!e.crossDomain)return{send:function(r,o){var s,a=e.xhr();if(a.open(e.type,e.url,e.async,e.username,e.password),e.xhrFields)for(s in e.xhrFields)a[s]=e.xhrFields[s];for(s in e.mimeType&&a.overrideMimeType&&a.overrideMimeType(e.mimeType),e.crossDomain||r["X-Requested-With"]||(r["X-Requested-With"]="XMLHttpRequest"),r)a.setRequestHeader(s,r[s]);t=function(e){return function(){t&&(t=i=a.onload=a.onerror=a.onabort=a.ontimeout=a.onreadystatechange=null,"abort"===e?a.abort():"error"===e?"number"!=typeof a.status?o(0,"error"):o(a.status,a.statusText):o(Ut[a.status]||a.status,a.statusText,"text"!==(a.responseType||"text")||"string"!=typeof a.responseText?{binary:a.response}:{text:a.responseText},a.getAllResponseHeaders()))}},a.onload=t(),i=a.onerror=a.ontimeout=t("error"),void 0!==a.onabort?a.onabort=i:a.onreadystatechange=function(){4===a.readyState&&n.setTimeout(function(){t&&i()})},t=t("abort");try{a.send(e.hasContent&&e.data||null)}catch(e){if(t)throw e}},abort:function(){t&&t()}}}),_.ajaxPrefilter(function(e){e.crossDomain&&(e.contents.script=!1)}),_.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(e){return _.globalEval(e),e}}}),_.ajaxPrefilter("script",function(e){void 0===e.cache&&(e.cache=!1),e.crossDomain&&(e.type="GET")}),_.ajaxTransport("script",function(e){var t,n;if(e.crossDomain||e.scriptAttrs)return{send:function(i,r){t=_(" @endpush \ No newline at end of file diff --git a/packages/Webkul/Shop/src/Resources/views/checkout/total/summary.blade.php b/packages/Webkul/Shop/src/Resources/views/checkout/total/summary.blade.php index 308a96884..976ddfbff 100755 --- a/packages/Webkul/Shop/src/Resources/views/checkout/total/summary.blade.php +++ b/packages/Webkul/Shop/src/Resources/views/checkout/total/summary.blade.php @@ -35,7 +35,7 @@ @if (! request()->is('checkout/cart')) @if (isset($rule['rule']) && ! $rule['rule']->end_other_rules) -
+
@@ -43,27 +43,25 @@ @{{ message }} - +
@endif @if($rule) -
+
- {{ $rule['rule']->name }} applied + {{ $rule['rule']->name }} {{ __('shop::app.checkout.onepage.applied') }}
- + + @if ($rule['impact']['amount_given']) + - - @if ($rule['amount_given']) - - - + @else - - + + @endif
@@ -72,7 +70,7 @@ @if (! $rule['rule']->end_other_rules)
- Coupon used + {{ __('shop::app.checkout.onepage.coupon-used') }}
@@ -80,10 +78,8 @@ - - - - + +
From fe347d345af465aa87abe01d0c8903311fae1b27 Mon Sep 17 00:00:00 2001 From: Prashant Singh Date: Fri, 31 May 2019 11:58:06 +0530 Subject: [PATCH 285/678] some bug fixes --- .../promotions/cart-rule/create.blade.php | 47 +++++--- .../views/promotions/cart-rule/edit.blade.php | 61 ++++++---- .../Webkul/Discount/src/Helpers/Discount.php | 15 ++- .../Http/Controllers/CartRuleController.php | 112 ++++++++---------- .../views/checkout/onepage.blade.php | 2 +- .../views/checkout/total/summary.blade.php | 49 +++++--- 6 files changed, 155 insertions(+), 131 deletions(-) diff --git a/packages/Webkul/Admin/src/Resources/views/promotions/cart-rule/create.blade.php b/packages/Webkul/Admin/src/Resources/views/promotions/cart-rule/create.blade.php index 92cb756b1..d7eb89af1 100644 --- a/packages/Webkul/Admin/src/Resources/views/promotions/cart-rule/create.blade.php +++ b/packages/Webkul/Admin/src/Resources/views/promotions/cart-rule/create.blade.php @@ -124,15 +124,15 @@ @{{ errors.first('use_coupon') }}
-
+ {{--
@{{ errors.first('auto_generation') }} -
+
--}} - + {{-- --}}
@@ -173,6 +173,8 @@
+ +
@@ -270,7 +272,7 @@
- + @{{ errors.first('disc_quantity') }}
@@ -299,14 +301,25 @@ @{{ errors.first('apply_to_shipping') }}
+ +
+ + + + + @{{ errors.first('end_other_rules') }} +
- +
-
+ {{--
@@ -322,9 +335,9 @@ @{{ errors.first('suffix') }}
-
+
--}} -
+
@@ -338,7 +351,6 @@
-
@@ -388,7 +400,7 @@ per_customer: 0, status: null, use_coupon: null, - auto_generation: null, + auto_generation: false, usage_limit: 0, is_guest: 0, @@ -397,7 +409,6 @@ apply_amt: false, apply_prct: false, apply_to_shipping: null, - buy_atleast: null, disc_amount: null, disc_threshold: null, disc_quantity: null, @@ -487,13 +498,13 @@ } }, - useCoupon() { - if (this.use_coupon == 0) { - this.auto_generation = null; - } else { - this.auto_generation = true; - } - }, + // useCoupon() { + // if (this.use_coupon == 0) { + // this.auto_generation = null; + // } else { + // this.auto_generation = true; + // } + // }, removeCartAttr(index) { this.conditions_list.splice(index, 1); diff --git a/packages/Webkul/Admin/src/Resources/views/promotions/cart-rule/edit.blade.php b/packages/Webkul/Admin/src/Resources/views/promotions/cart-rule/edit.blade.php index 3c26c66b6..961709f71 100644 --- a/packages/Webkul/Admin/src/Resources/views/promotions/cart-rule/edit.blade.php +++ b/packages/Webkul/Admin/src/Resources/views/promotions/cart-rule/edit.blade.php @@ -124,15 +124,15 @@ @{{ errors.first('use_coupon') }}
-
+ {{--
@{{ errors.first('auto_generation') }} -
+
--}} - + {{-- --}}
@@ -299,14 +299,24 @@ @{{ errors.first('apply_to_shipping') }}
+ +
+ + + + + @{{ errors.first('end_other_rules') }} +
- +
- -
+ {{--
@@ -322,17 +332,17 @@ @{{ errors.first('suffix') }}
+
--}} + + {{--
--}} +
+ + + + + @{{ errors.first('code') }}
- -
-
- - - - - @{{ errors.first('code') }} -
-
+ {{--
--}}
@@ -385,7 +395,7 @@ per_customer: 0, status: null, use_coupon: null, - auto_generation: 0, + // auto_generation: 0, usage_limit: 0, is_guest: 0, @@ -457,19 +467,19 @@ this.per_customer = data.per_customer; this.status = data.status; if (data.use_coupon == 0) { - this.auto_generation = null; + // this.auto_generation = null; this.use_coupon = 0; } else { this.use_coupon = 1; - this.auto_generation = data.auto_generation; + // this.auto_generation = data.auto_generation; this.code = data.coupons.code; - this.suffix = data.coupons.suffix; - this.prefix = data.coupons.prefix; + // this.suffix = data.coupons.suffix; + // this.prefix = data.coupons.prefix; - if (data.auto_generation == 0) - this.auto_generation = true; - else - this.auto_generation = false; + // if (data.auto_generation == 0) + // this.auto_generation = true; + // else + // this.auto_generation = false; } this.usage_limit = data.usage_limit; @@ -520,7 +530,6 @@ } if (this.condition_on == 'cart') { - console.log(this.conditions_list); this.conditions_list.push(this.cart_object); this.cart_object = { diff --git a/packages/Webkul/Discount/src/Helpers/Discount.php b/packages/Webkul/Discount/src/Helpers/Discount.php index cde226085..f57542acd 100644 --- a/packages/Webkul/Discount/src/Helpers/Discount.php +++ b/packages/Webkul/Discount/src/Helpers/Discount.php @@ -305,7 +305,6 @@ class Discount } } else { $rules = $rules['rule']; - $id = array(); foreach ($rules as $rule) { @@ -337,10 +336,10 @@ class Discount $result = $this->applyNonCouponAble(); $cart = \Cart::getCart(); $maxImpacts = array(); - + // dd($result); if (isset($result['id']) && count($result['id'])) { $rules = array(); - + // dd(2); if (count($result['id']) > 1) { $leastPriority = 999999999999; @@ -349,12 +348,14 @@ class Discount array_push($rules, $rule); } } + } else if (count($result['id'])) { + array_push($rules, $result['id'][0]); } foreach ($rules as $rule) { // All of conditions is/are true $result = 1; - if ($rule->conditions && $rule->conditions != "null") { + if ($rule->conditions && ($rule->conditions != "null" || $rule->conditions != "")) { if ($rule->starts_from != null && $rule->ends_till != null) { if (Carbon::parse($rule->starts_from) < now() && now() < Carbon::parse($rule->ends_till)) { $conditions = json_decode(json_decode($rule->conditions)); @@ -505,7 +506,7 @@ class Discount ]); } - return ['rule' => $maxImpacts[$leastId]['rule'], 'impact' => $maxImpacts[$leastId], 'endRuleActive' => $this->endRuleActive]; + return ['rule' => $maxImpacts[$leastId]['rule'], 'impact' => $maxImpacts[$leastId], 'endRuleActive' => $this->endRuleActive, 'success' => true]; } } @@ -514,6 +515,10 @@ class Discount $rules = $this->applyCouponAble(); $appliedRule = null; + if (! isset($rules['id'])) { + return response()->json(['message' => trans('admin::app.promotion.status.no-coupon')], 200); + } + foreach($rules['id'] as $rule) { if ($rule->auto_generation == 0) { if ($rule->coupons->code == $code) { diff --git a/packages/Webkul/Discount/src/Http/Controllers/CartRuleController.php b/packages/Webkul/Discount/src/Http/Controllers/CartRuleController.php index 022a9ea8e..fefc93d80 100644 --- a/packages/Webkul/Discount/src/Http/Controllers/CartRuleController.php +++ b/packages/Webkul/Discount/src/Http/Controllers/CartRuleController.php @@ -96,12 +96,9 @@ class CartRuleController extends Controller public function store() { - // dd(request()->all()); required_if:use_coupon,1 + // dd(request()->all()); // required_if:use_coupon,1 $types = config('price_rules.cart.validations'); $data = request()->all(); - if (isset($data['auto_generation'])) { - $data['auto_generation'] = (boolean) $data['auto_generation']; - } $validated = Validator::make($data, [ 'name' => 'required|string', @@ -110,7 +107,7 @@ class CartRuleController extends Controller 'channels' => 'required|array', 'status' => 'required|boolean', 'use_coupon' => 'boolean|required', - 'auto_generation' => 'boolean|sometimes', + // 'auto_generation' => 'boolean|sometimes', 'usage_limit' => 'numeric|min:0', 'per_customer' => 'numeric|min:0', 'action_type' => 'required|string', @@ -120,19 +117,17 @@ class CartRuleController extends Controller 'free_shipping' => 'required|boolean', 'apply_to_shipping' => 'required|boolean', 'code' => 'string|required_if:auto_generation,0', - 'all_conditions' => 'required', + 'all_conditions' => 'sometimes|nullable', 'label' => 'array|nullable' ]); if ($validated->fails()) { session()->flash('error', 'Validation failed'); - dd($validated); return redirect()->route('admin.cart-rule.create') ->withErrors($validated) ->withInput(); } - // dd($data); if ($data['starts_from'] == "" || $data['ends_till'] == "") { $data['starts_from'] = null; $data['ends_till'] = null; @@ -152,12 +147,7 @@ class CartRuleController extends Controller unset($data['cart_attributes']); unset($data['attributes']); - if (count(json_decode($data['all_conditions'])) == 0) { - $data['conditions'] = null; - } else { - $data['conditions'] = $data['all_conditions']; - } - unset($data['all_conditions']); + // unset($data['all_conditions']); if (isset($data['disc_amount']) && $data['action_type'] == config('pricerules.cart.validations.2')) { $data['actions'] = [ @@ -176,26 +166,32 @@ class CartRuleController extends Controller } $data['actions'] = json_encode($data['actions']); - $data['conditions'] = json_encode($data['conditions']); + + if (! isset($data['all_conditions'])) { + $data['conditions'] = null; + } else { + $data['conditions'] = json_encode($data['all_conditions']); + } if ($data['use_coupon']) { - if (isset($data['auto_generation']) && $data['auto_generation']) { - $data['auto_generation'] = 0; - $coupons['code'] = $data['code']; - unset($data['code']); - } else { - $data['auto_generation'] = 1; - } + // if (isset($data['auto_generation']) && $data['auto_generation']) { + $data['auto_generation'] = 0; - if (isset($data['prefix'])) { - $coupons['prefix'] = $data['prefix']; - unset($data['prefix']); - } + $coupons['code'] = $data['code']; + unset($data['code']); + // } else { + // $data['auto_generation'] = 1; + // } - if (isset($data['suffix'])) { - $coupons['suffix'] = $data['suffix']; - unset($data['suffix']); - } + // if (isset($data['prefix'])) { + // $coupons['prefix'] = $data['prefix']; + // unset($data['prefix']); + // } + + // if (isset($data['suffix'])) { + // $coupons['suffix'] = $data['suffix']; + // unset($data['suffix']); + // } } if(isset($data['limit'])) { @@ -263,7 +259,6 @@ class CartRuleController extends Controller 'channels' => 'required|array', 'status' => 'required|boolean', 'use_coupon' => 'boolean|required', - 'auto_generation' => 'sometimes', 'usage_limit' => 'numeric|min:0', 'per_customer' => 'numeric|min:0', 'action_type' => 'required|string', @@ -272,8 +267,8 @@ class CartRuleController extends Controller 'disc_threshold' => 'required|numeric', 'free_shipping' => 'required|boolean', 'apply_to_shipping' => 'required|boolean', - 'code' => 'string|required_if:auto_generation,0', - 'all_conditions' => 'required', + 'code' => 'string|required_if:user_coupon,1', + 'all_conditions' => 'present', 'label' => 'array|nullable' ]); @@ -308,13 +303,6 @@ class CartRuleController extends Controller unset($data['cart_attributes']); unset($data['attributes']); - if (count(json_decode($data['all_conditions'])) == 0) { - $data['conditions'] = null; - } else { - $data['conditions'] = $data['all_conditions']; - } - unset($data['all_conditions']); - if (isset($data['disc_amount']) && $data['action_type'] == config('pricerules.cart.validations.2')) { $data['actions'] = [ 'action_type' => $data['action_type'], @@ -332,33 +320,33 @@ class CartRuleController extends Controller } $data['actions'] = json_encode($data['actions']); - $data['conditions'] = json_encode($data['conditions']); + if (! isset($data['all_conditions'])) { + $data['conditions'] = null; + } else { + $data['conditions'] = json_encode($data['all_conditions']); + } + + unset($data['all_conditions']); if ($data['use_coupon']) { - if (isset($data['auto_generation'])) { - if ($data['auto_generation'] == "true") { - $data['auto_generation'] = 0; - } else { - $data['auto_generation'] = 1; - } + // if (isset($data['auto_generation']) && $data['auto_generation']) { + $data['auto_generation'] = 0; - if(! $data['auto_generation']) { - $coupons['code'] = $data['code']; - unset($data['code']); - } - } else { + $coupons['code'] = $data['code']; + unset($data['code']); + // } else { + // $data['auto_generation'] = 1; + // } - } + // if (isset($data['prefix'])) { + // $coupons['prefix'] = $data['prefix']; + // unset($data['prefix']); + // } - if (isset($data['prefix'])) { - $coupons['prefix'] = $data['prefix']; - unset($data['prefix']); - } - - if (isset($data['suffix'])) { - $coupons['suffix'] = $data['suffix']; - unset($data['suffix']); - } + // if (isset($data['suffix'])) { + // $coupons['suffix'] = $data['suffix']; + // unset($data['suffix']); + // } } if (isset($data['limit'])) { 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 f3c3f60be..707329e18 100755 --- a/packages/Webkul/Shop/src/Resources/views/checkout/onepage.blade.php +++ b/packages/Webkul/Shop/src/Resources/views/checkout/onepage.blade.php @@ -489,7 +489,7 @@ qtyRevealed: false, amount_given: null, amount: null, - discounted: false, + discounted: null, discount: { amount: null, action: null, diff --git a/packages/Webkul/Shop/src/Resources/views/checkout/total/summary.blade.php b/packages/Webkul/Shop/src/Resources/views/checkout/total/summary.blade.php index 976ddfbff..a4deed7e3 100755 --- a/packages/Webkul/Shop/src/Resources/views/checkout/total/summary.blade.php +++ b/packages/Webkul/Shop/src/Resources/views/checkout/total/summary.blade.php @@ -30,26 +30,26 @@
-
+
@inject('cart_rule', 'Webkul\Discount\Helpers\Discount') @if (! request()->is('checkout/cart')) - @if (isset($rule['rule']) && ! $rule['rule']->end_other_rules) -
-
- + +
+ + + @{{ errors.first('code') }} + + @{{ message }} - @{{ message }} + @{{ message }} - @{{ message }} + +
+ - -
- - @endif - - @if($rule) -
+ @if(isset($rule)) + {{--
{{ $rule['rule']->name }} {{ __('shop::app.checkout.onepage.applied') }}
@@ -64,11 +64,22 @@ @endif -
- @endif +
--}} + @else + {{-- {{dd('2')}} --}} + {{--
+
+ @{{ code }} {{ __('shop::app.checkout.onepage.applied') }} +
- @if (! $rule['rule']->end_other_rules) -
+ + + + + +
+ +
{{ __('shop::app.checkout.onepage.coupon-used') }}
@@ -82,7 +93,7 @@ -
+
--}} @endif @endif
From 68e945c04d660f8a95f826d8e97eab1ef820224f Mon Sep 17 00:00:00 2001 From: rahul shukla Date: Fri, 31 May 2019 12:36:09 +0530 Subject: [PATCH 286/678] readme updated --- README.md | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 5436abd62..9b145722f 100755 --- a/README.md +++ b/README.md @@ -12,10 +12,11 @@ # Topics 1. ### [Introduction](#1-introduction-) -2. ### [Requirements](#2-requirements-) -3. ### [Installation & Configuration](#3-installation--configuration-) -4. ### [License](#4-license-) -5. ### [Miscellaneous](#5-miscellaneous-) +2. ### [Documentation] (#2-documentation-) +3. ### [Requirements](#2-requirements-) +4. ### [Installation & Configuration](#3-installation--configuration-) +5. ### [License](#4-license-) +6. ### [Miscellaneous](#5-miscellaneous-) ### 1. Introduction : @@ -50,7 +51,11 @@ It packs in lots of demanding features that allows your business to scale in no Dev guys can take advantage of two of the hottest frameworks used in this project Laravel and Vue.js, both of these frameworks have been used in Bagisto. Bagisto is using power of both of these frameworks and making best out of it out of the box. -### 2. Requirements : +### 2. Documentation : + +# Visit our documentation(https://devdocs.bagisto.com) + +### 3. Requirements : * **OS**: Ubuntu 16.04 LTS or higher. * **SERVER**: Apache 2 or NGINX @@ -62,7 +67,7 @@ Bagisto is using power of both of these frameworks and making best out of it out * **Node**: 8.11.3 LTS or higher. * **Composer**: 1.6.5 or higher. -### 3. Installation & Configuration : +### 4. Installation & Configuration : **1. Try our new GUI installer to install Bagisto:** From 3f0fee01e5ff6ad5c9a54a327890eb4ada2e8a19 Mon Sep 17 00:00:00 2001 From: rahul shukla Date: Fri, 31 May 2019 12:39:33 +0530 Subject: [PATCH 287/678] readme updated --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 9b145722f..5c43613a4 100755 --- a/README.md +++ b/README.md @@ -51,9 +51,9 @@ It packs in lots of demanding features that allows your business to scale in no Dev guys can take advantage of two of the hottest frameworks used in this project Laravel and Vue.js, both of these frameworks have been used in Bagisto. Bagisto is using power of both of these frameworks and making best out of it out of the box. -### 2. Documentation : +### 2. Documentation : -# Visit our documentation(https://devdocs.bagisto.com) +# Visit our [Documentation](https://devdocs.bagisto.com) ### 3. Requirements : From ba076f15f54495f3070adab626f494750682c1b7 Mon Sep 17 00:00:00 2001 From: rahul shukla Date: Fri, 31 May 2019 12:41:26 +0530 Subject: [PATCH 288/678] readme updated --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 5c43613a4..f9ed9ea46 100755 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ # Topics 1. ### [Introduction](#1-introduction-) -2. ### [Documentation] (#2-documentation-) +2. ### [Documentation](#2-documentation-) 3. ### [Requirements](#2-requirements-) 4. ### [Installation & Configuration](#3-installation--configuration-) 5. ### [License](#4-license-) From 12e93b3f58530c2931c06b39f0656dab0e201fc9 Mon Sep 17 00:00:00 2001 From: rahul shukla Date: Fri, 31 May 2019 12:48:04 +0530 Subject: [PATCH 289/678] cart updated for convert price --- packages/Webkul/Checkout/src/Cart.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/Webkul/Checkout/src/Cart.php b/packages/Webkul/Checkout/src/Cart.php index 874d27e7d..f007cd844 100755 --- a/packages/Webkul/Checkout/src/Cart.php +++ b/packages/Webkul/Checkout/src/Cart.php @@ -346,7 +346,7 @@ class Cart { if ($childData != null) { $childData['parent_id'] = $item->id; - + $this->cartItem->create($childData); } @@ -869,7 +869,7 @@ class Cart { } $item->update([ - 'price' => $price, + 'price' => core()->convertPrice($price), 'base_price' => $price, 'total' => core()->convertPrice($price * ($item->quantity)), 'base_total' => $price * ($item->quantity), @@ -893,7 +893,7 @@ class Cart { } $item->update([ - 'price' => $price, + 'price' => core()->convertPrice($price), 'base_price' => $price, 'total' => core()->convertPrice($price * ($item->quantity)), 'base_total' => $price * ($item->quantity), From 8202f58284a08ed4d107033f0359c8279bc7add9 Mon Sep 17 00:00:00 2001 From: jitendra Date: Fri, 31 May 2019 17:52:52 +0530 Subject: [PATCH 290/678] Issue #932 fixed --- packages/Webkul/Product/src/Helpers/ConfigurableOption.php | 3 +++ .../views/products/view/configurable-options.blade.php | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/packages/Webkul/Product/src/Helpers/ConfigurableOption.php b/packages/Webkul/Product/src/Helpers/ConfigurableOption.php index f2f40310c..3ec316b67 100755 --- a/packages/Webkul/Product/src/Helpers/ConfigurableOption.php +++ b/packages/Webkul/Product/src/Helpers/ConfigurableOption.php @@ -135,6 +135,9 @@ class ConfigurableOption extends AbstractProduct $attributeValue = $product->{$productAttribute->code}; + if ($attributeValue == '' && $product instanceof \Webkul\Product\Models\ProductFlat) + $attributeValue = $product->product->{$productAttribute->code}; + $options[$productAttributeId][$attributeValue][] = $productId; $options['index'][$productId][$productAttributeId] = $attributeValue; 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 c237f7565..40bc27b8a 100755 --- 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 @@ -138,7 +138,7 @@ this.resetChildren(attribute.nextAttribute); } else { - this.selectedProductId = attribute.options[attribute.selectedIndex].allowedProducts[0]; + this.selectedProductId = this.simpleProduct; } //buy now anchor href changer with options @@ -219,7 +219,7 @@ if (prevOption) { for (j = 0; j < options[i].products.length; j++) { - if (prevOption.products && prevOption.products.indexOf(options[i].products[j]) > -1) { + if (prevOption.allowedProducts && prevOption.allowedProducts.indexOf(options[i].products[j]) > -1) { allowedProducts.push(options[i].products[j]); } } From 96e8556b5444c0032cb8f30e48902f9cb241fbaa Mon Sep 17 00:00:00 2001 From: jitendra Date: Fri, 31 May 2019 18:30:09 +0530 Subject: [PATCH 291/678] Fixed mini cart layout --- .../Shop/publishable/assets/css/shop.css | 2 +- .../Shop/publishable/assets/mix-manifest.json | 2 +- .../Shop/src/Resources/assets/sass/app.scss | 20 ++++++++++++------- .../views/checkout/cart/mini-cart.blade.php | 4 ++-- 4 files changed, 17 insertions(+), 11 deletions(-) diff --git a/packages/Webkul/Shop/publishable/assets/css/shop.css b/packages/Webkul/Shop/publishable/assets/css/shop.css index 1c2a4c299..a74033e95 100755 --- a/packages/Webkul/Shop/publishable/assets/css/shop.css +++ b/packages/Webkul/Shop/publishable/assets/css/shop.css @@ -1 +1 @@ -@import url(https://fonts.googleapis.com/css?family=Montserrat:400,500);.icon{display:inline-block;background-size:cover}.dropdown-right-icon{background-image:URL("../images/icon-dropdown-left.svg");width:8px;height:8px;margin-left:auto;margin-bottom:2px}.icon-menu-close{background-image:URL("../images/icon-menu-close.svg");width:24px;height:24px;margin-left:auto}.icon-menu-close-adj{background-image:URL("../images/cross-icon-adj.svg");margin-left:auto}.grid-view-icon{background-image:URL("../images/icon-grid-view.svg");width:24px;height:24px}.list-view-icon{background-image:URL("../images/icon-list-view.svg");width:24px;height:24px}.sort-icon{background-image:URL("../images/icon-sort.svg");width:32px;height:32px}.filter-icon{background-image:URL("../images/icon-filter.svg");width:32px;height:32px}.whishlist-icon{background-image:URL("../images/wishlist.svg");width:24px;height:24px}.share-icon{background-image:URL("../images/icon-share.svg");width:24px;height:24px}.icon-menu{background-image:URL("../images/icon-menu.svg");width:24px;height:24px}.icon-search{background-image:URL("../images/icon-search.svg");width:24px;height:24px}.icon-menu-back{background-image:URL("../images/icon-menu-back.svg");width:24px;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}.cart-icon{background-image:url("../images/icon-cart.svg");width:24px;height:24px}.wishlist-icon{background-image:url("../images/wishlist.svg");width:32px;height:32px}.icon-arrow-up{background-image:url("../images/arrow-up.svg");width:16px;height:16px}.icon-arrow-down{background-image:url("../images/arrow-down.svg");width:16px;height:16px}.expand-icon{background-image:url("../images/Expand-Light.svg");width:18px;height:18px}.expand-on-icon{background-image:url("../images/Expand-Light-On.svg");width:18px;height:18px}.icon-menu-close-adj{background-image:url("../images/cross-icon-adj.svg");width:32px;height:32px}.icon-facebook{background-image:url("../images/facebook.svg")}.icon-twitter{background-image:url("../images/twitter.svg")}.icon-google-plus{background-image:url("../images/google-plus.svg")}.icon-instagram{background-image:url("../images/instagram.svg")}.icon-linkedin{background-image:url("../images/linkedin.svg")}.icon-dropdown{background-image:url("../images/icon-dropdown.svg")}@-webkit-keyframes spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}@keyframes spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}body{margin:0;padding:0;font-weight:500;max-width:100%;width:auto;color:#242424;font-size:16px}*{font-family:Montserrat,sans-serif}::-webkit-input-placeholder{font-family:Montserrat,sans-serif}textarea{resize:none}input{font-family:Montserrat,sans-serif}.btn{border-radius:0!important}.mb-10{margin-bottom:10px}.mb-15{margin-bottom:15px}.mb-20{margin-bottom:20px}.mb-25{margin-bottom:25px}.mb-30{margin-bottom:30px}.mb-35{margin-bottom:35px}.mb-40{margin-bottom:40px}.mb-45{margin-bottom:45px}.mb-50{margin-bottom:50px}.mb-60{margin-bottom:60px}.mb-70{margin-bottom:70px}.mb-80{margin-bottom:80px}.mb-90{margin-bottom:90px}.mt-5{margin-top:5px}.mt-10{margin-top:10px}.mt-15{margin-top:15px}.mt-20{margin-top:20px}.mt-25{margin-top:25px}.mt-30{margin-top:30px}.mt-35{margin-top:35px}.mt-40{margin-top:40px}.mt-45{margin-top:45px}.mt-50{margin-top:50px}.mt-60{margin-top:60px}.mt-70{margin-top:70px}.mt-80{margin-top:80px}.mt-90{margin-top:90px}.pagination.shop{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-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.bold{font-weight:700;color:#3a3a3a}.radio-container{display:block;position:relative;padding-left:35px;margin-bottom:12px;cursor:pointer;font-size:16px;user-select:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none}.radio-container input{position:absolute;opacity:0;cursor:pointer;top:0;left:0}.radio-container .checkmark{position:absolute;top:0;left:0;height:16px;width:16px;background-color:#fff;border:2px solid #ff6472;border-radius:50%}.radio-container .checkmark:after{content:"";position:absolute;display:none;top:2px;left:2px;width:8px;height:8px;border-radius:50%;background:#ff6472}.radio-container input:checked~.checkmark:after{display:block}.radio-container input:disabled~.checkmark{display:block;border:2px solid rgba(255,100,113,.4)}.cp-spinner{width:48px;height:48px;display:inline-block;-webkit-box-sizing:border-box;box-sizing:border-box}.cp-round:before{border-radius:50%;border:6px solid #bababa}.cp-round:after,.cp-round:before{content:" ";width:48px;height:48px;display:inline-block;-webkit-box-sizing:border-box;box-sizing:border-box;position:absolute;top:0;left:0}.cp-round:after{border-radius:50%;border-top:6px solid #0031f0;border-right:6px solid transparent;border-bottom:6px solid transparent;border-left:6px solid transparent;-webkit-animation:spin 1s ease-in-out infinite;animation:spin 1s ease-in-out infinite}.pull-right{float:right}.add-to-wishlist .wishlist-icon:hover{background-image:url("../images/wishlist-added.svg")}.product-price{margin-bottom:14px;width:100%;font-weight:600}.product-price .price-label{font-size:14px;font-weight:400}.product-price .regular-price{color:#a5a5a5;text-decoration:line-through;margin-right:10px}.product-price .special-price{color:#ff6472}.horizontal-rule{display:block;width:100%;height:1px;background:#c7c7c7}.account-head .account-heading{font-size:28px;color:#242424;text-transform:capitalize;text-align:left}.account-head .account-action{font-size:17px;margin-top:1%;color:#0031f0;float:right}.account-head .horizontal-rule{margin-top:1.1%;width:100%;height:1px;vertical-align:middle;background:#c7c7c7}.account-item-card{-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;-webkit-box-align:center;-ms-flex-align:center;align-items:center;width:100%;height:125px}.account-item-card,.account-item-card .media-info{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row}.account-item-card .media-info .media{height:125px;width:110px}.account-item-card .media-info .info{margin-left:20px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-pack:space-evenly;-ms-flex-pack:space-evenly;justify-content:space-evenly}.account-item-card .media-info .info .stars .icon{height:16px;width:16px}.account-item-card .operations{height:120px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.account-item-card .operations a{width:100%}.account-item-card .operations a span{float:right}.account-items-list{display:block;width:100%}.account-items-list .grid-container{margin-top:40px}.search-result-status{width:100%;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.grid-container{margin-top:20px}.main-container-wrapper{max-width:1300px;width:auto;padding-left:15px;padding-right:15px;margin-left:auto;margin-right:auto}.main-container-wrapper .content-container{display:block;margin-bottom:40px}.main-container-wrapper .product-grid-4{display:grid;grid-template-columns:repeat(auto-fill,minmax(235px,1fr));grid-auto-rows:auto;grid-column-gap:30px;grid-row-gap:15px;justify-items:end}.main-container-wrapper .product-grid-3{display:grid;grid-template-columns:repeat(auto-fill,minmax(235px,1fr));grid-gap:27px;grid-auto-rows:auto;justify-items:center}.main-container-wrapper .product-card{position:relative;padding:15px}.main-container-wrapper .product-card .product-image{max-height:350px;max-width:280px;margin-bottom:10px;background:#f2f2f2}.main-container-wrapper .product-card .product-image img{display:block;width:100%}.main-container-wrapper .product-card .product-name{margin-bottom:14px;width:100%;color:#242424}.main-container-wrapper .product-card .product-name a{color:#242424}.main-container-wrapper .product-card .product-description{display:none}.main-container-wrapper .product-card .product-ratings{width:100%}.main-container-wrapper .product-card .product-ratings .icon{width:16px;height:16px}.main-container-wrapper .product-card .cart-wish-wrap{display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start;-webkit-box-align:center;-ms-flex-align:center;align-items:center;height:40px}.main-container-wrapper .product-card .cart-wish-wrap .addtocart{margin-right:10px;text-transform:uppercase;text-align:left;-webkit-box-shadow:1px 1px 0 #ccc;box-shadow:1px 1px 0 #ccc}.main-container-wrapper .product-card .cart-wish-wrap .add-to-wishlist{margin-top:5px;background:transparent;border:0;cursor:pointer;padding:0}.main-container-wrapper .product-card .sticker{border-radius:100px;position:absolute;top:20px;left:20px;text-transform:uppercase;padding:4px 13px;font-size:14px;color:#fff;-webkit-box-shadow:1px 1px 1px #ccc;box-shadow:1px 1px 1px #ccc}.main-container-wrapper .product-card .sticker.sale{background:#ff6472}.main-container-wrapper .product-card .sticker.new{background:#2ed04c}.main-container-wrapper .product-card:hover{outline:1px solid #eaeaec;box-shadow:0 1px 2px rgba(0,0,0,.05);-webkit-box-shadow:0 2px 16px 4px rgba(40,44,63,.07);box-shadow:0 2px 16px 4px rgba(40,44,63,.07)}@media only screen and (max-width:580px){.main-container-wrapper .main-container-wrapper{padding:0}}@media only screen and (max-width:551px){.main-container-wrapper .product-grid-3{grid-template-columns:48.5% 48.5%;grid-column-gap:20px}}@media only screen and (max-width:854px){.main-container-wrapper .product-grid-4{grid-template-columns:29.5% 29.5% 29.5%;grid-column-gap:35px}}@media only screen and (max-width:653px){.main-container-wrapper .product-grid-4{grid-template-columns:48.5% 48.5%;grid-column-gap:17px}}@media only screen and (max-width:425px){.main-container-wrapper .product-card{font-size:90%}.main-container-wrapper .product-card .btn.btn-md{padding:5px}.main-container-wrapper .product-grid-4{grid-template-columns:48.5% 48.5%;grid-column-gap:10px}}.main-container-wrapper .product-list{min-height:200px}.main-container-wrapper .product-list .product-card{width:100%;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-align:center;-ms-flex-align:center;align-items:center;margin-bottom:20px}.main-container-wrapper .product-list .product-card .product-image{float:left;width:30%;height:350px}.main-container-wrapper .product-list .product-card .product-image img{height:100%}.main-container-wrapper .product-list .product-card .product-information{float:right;width:70%;padding-left:30px}.main-container-wrapper .product-list .product-card:last-child{margin-bottom:0}.main-container-wrapper .product-list.empty h2{font-size:20px}.main-container-wrapper section.featured-products{display:block;margin-bottom:5%}.main-container-wrapper section.featured-products .featured-heading{width:100%;text-align:center;text-transform:uppercase;font-size:18px;margin-bottom:20px}.main-container-wrapper section.featured-products .featured-heading .featured-separator{color:#d3d3d3}.main-container-wrapper section.news-update{display:block;-webkit-box-sizing:border-box;box-sizing:border-box;width:100%;margin-bottom:5%}.main-container-wrapper section.news-update .news-update-grid{display:grid;grid-template-columns:58.5% 40%;grid-gap:20px}.main-container-wrapper section.news-update .news-update-grid .block1{display:block;-webkit-box-sizing:border-box;box-sizing:border-box}.main-container-wrapper section.news-update .news-update-grid .block1 img{display:-webkit-box;display:-ms-flexbox;display:flex;height:100%;width:100%}.main-container-wrapper section.news-update .news-update-grid .block2{display:block;-webkit-box-sizing:border-box;box-sizing:border-box;display:grid;grid-template-rows:repeat(2,minmax(50%,1fr));grid-row-gap:20px}.main-container-wrapper section.news-update .news-update-grid .block2 .sub-block1{display:block;-webkit-box-sizing:border-box;box-sizing:border-box}.main-container-wrapper section.news-update .news-update-grid .block2 .sub-block1 img{width:100%}.main-container-wrapper section.news-update .news-update-grid .block2 .sub-block2{display:block;-webkit-box-sizing:border-box;box-sizing:border-box}.main-container-wrapper section.news-update .news-update-grid .block2 .sub-block2 img{width:100%}section.slider-block{display:block;margin-left:auto;margin-right:auto;margin-bottom:5%}section.slider-block div.slider-content{position:relative;height:500px;margin-left:auto;margin-right:auto}section.slider-block div.slider-content ul.slider-images .show-content{display:none}section.slider-block div.slider-content ul.slider-images li{position:absolute;visibility:hidden}section.slider-block div.slider-content ul.slider-images li.show{display:block;position:relative;visibility:visible;width:100%;-webkit-animation-name:example;animation-name:example;-webkit-animation-duration:4s;animation-duration:4s}section.slider-block div.slider-content ul.slider-images li.show .show-content{display:-webkit-box;display:-ms-flexbox;display:flex;position:absolute;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;color:#242424;height:100%;width:100%;top:0}@-webkit-keyframes example{0%{opacity:.1}to{opacity:1}}@keyframes example{0%{opacity:.1}to{opacity:1}}section.slider-block div.slider-content ul.slider-images li img{height:500px;width:100%}section.slider-block div.slider-content div.slider-control{display:block;cursor:pointer;position:absolute;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;bottom:2%;right:2%}section.slider-block div.slider-content div.slider-control .dark-left-icon{background-color:#f2f2f2;height:48px;width:48px;max-height:100%;max-width:100%}section.slider-block div.slider-content div.slider-control .light-right-icon{background-color:#242424;height:48px;width:48px;max-height:100%;max-width:100%}@media only screen and (max-width:770px){section.slider-block div.slider-content div.slider-control{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;bottom:46%;right:0;width:100%}}.header{margin-top:16px;margin-bottom:21px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.header .header-top{margin-bottom:16px;max-width:100%;width:auto;margin-left:auto;margin-right:auto;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between}.header .header-top,.header .header-top div.left-content{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.header .header-top div.left-content{-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start}.header .header-top div.left-content ul.logo-container{margin-right:12px}.header .header-top div.left-content ul.logo-container li{display:-webkit-box;display:-ms-flexbox;display:flex}.header .header-top div.left-content ul.logo-container li img{max-width:120px;max-height:40px}.header .header-top div.left-content ul.search-container li.search-group{display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.header .header-top div.left-content ul.search-container li.search-group .search-field{height:38px;border:2px solid #c7c7c7;border-radius:3px;border-right:none;border-top-right-radius:0;border-bottom-right-radius:0;padding-left:12px;font-size:14px}.header .header-top div.left-content ul.search-container li.search-group .search-icon-wrapper{-webkit-box-sizing:border-box;box-sizing:border-box;height:38px;width:38px;border:2px solid #c7c7c7;border-top-right-radius:3px;border-bottom-right-radius:3px}.header .header-top div.left-content ul.search-container li.search-group .search-icon-wrapper button{background:#fff;border:0;padding:3px 5px}.header .header-top div.right-content .right-content-menu>li{display:inline-block;border-right:2px solid #c7c7c7;padding:0 15px;min-height:15px;padding-top:3px}.header .header-top div.right-content .right-content-menu>li:first-child{padding-left:0}.header .header-top div.right-content .right-content-menu>li:last-child{border-right:0;padding-right:0}.header .header-top div.right-content .right-content-menu>li .icon{vertical-align:middle}.header .header-top div.right-content .right-content-menu>li .icon:not(.arrow-down-icon){margin-right:5px}.header .header-top div.right-content .right-content-menu>li .arrow-down-icon{width:12px;height:6px}.header .header-top div.right-content .right-content-menu .cart-dropdown-container{border-right:0;padding-right:0}.header .header-top div.right-content .right-content-menu .cart-link{pointer-events:none}.header .header-top div.right-content .right-content-menu ul.dropdown-list{display:none;margin-top:14px}.header .header-top div.right-content .right-content-menu ul.dropdown-list li{border-right:none;padding:5px 10px;display:block}.header .header-top div.right-content .right-content-menu ul.dropdown-list li a{color:#333}.header .header-top div.right-content .right-content-menu .currency{position:absolute;right:0;width:100px}.header .header-top div.right-content .right-content-menu .account{position:absolute;right:0}.header .header-top div.right-content .right-content-menu .account li{padding:20px!important}.header .header-top div.right-content .right-content-menu .account li ul{margin-top:5px}.header .header-top div.right-content .right-content-menu .account li ul>li{padding:5px 10px 5px 0!important}.header .header-top div.right-content .right-content-menu .guest{width:300px}.header .header-top div.right-content .right-content-menu .guest .btn.btn-sm{padding:9px 25px}.header .header-top div.right-content .right-content-menu .cart-dropdown-container .dropdown-list{width:387px}.header .header-top div.right-content .right-content-menu .cart-dropdown-container .dropdown-list .dropdown-container{padding:10px 18px;max-height:410px;overflow-y:auto}.header .header-top div.right-content .right-content-menu .cart-dropdown-container .dropdown-list .dropdown-container .dropdown-cart{color:#242424}.header .header-top div.right-content .right-content-menu .cart-dropdown-container .dropdown-list .dropdown-container .dropdown-cart>.dropdown-header{width:100%}.header .header-top div.right-content .right-content-menu .cart-dropdown-container .dropdown-list .dropdown-container .dropdown-cart>.dropdown-header p{display:inline;line-height:25px}.header .header-top div.right-content .right-content-menu .cart-dropdown-container .dropdown-list .dropdown-container .dropdown-cart>.dropdown-header i{float:right;height:22px;width:22px}.header .header-top div.right-content .right-content-menu .cart-dropdown-container .dropdown-list .dropdown-container .dropdown-cart>.dropdown-header p.heading{font-weight:lighter}.header .header-top div.right-content .right-content-menu .cart-dropdown-container .dropdown-list .dropdown-container .dropdown-content{padding-top:8px;padding-bottom:10px;width:100%}.header .header-top div.right-content .right-content-menu .cart-dropdown-container .dropdown-list .dropdown-container .dropdown-content .item{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;border-bottom:1px solid #c7c7c7;padding-top:8px;padding-bottom:8px}.header .header-top div.right-content .right-content-menu .cart-dropdown-container .dropdown-list .dropdown-container .dropdown-content .item img{height:75px;width:75px;margin-right:8px}.header .header-top div.right-content .right-content-menu .cart-dropdown-container .dropdown-list .dropdown-container .dropdown-content .item-details{height:auto}.header .header-top div.right-content .right-content-menu .cart-dropdown-container .dropdown-list .dropdown-container .item-details .item-name{font-size:16px;font-weight:700;margin-bottom:8px}.header .header-top div.right-content .right-content-menu .cart-dropdown-container .dropdown-list .dropdown-container .item-details .item-options{font-size:16px;margin-bottom:8px}.header .header-top div.right-content .right-content-menu .cart-dropdown-container .dropdown-list .dropdown-container .item-details .item-price{margin-bottom:8px}.header .header-top div.right-content .right-content-menu .cart-dropdown-container .dropdown-list .dropdown-container .item-details .item-qty{font-weight:lighter;margin-bottom:8px}.header .header-top div.right-content .right-content-menu .cart-dropdown-container .dropdown-list .dropdown-container .dropdown-footer{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;-webkit-box-align:center;-ms-flex-align:center;align-items:center;margin-bottom:8px}.header .header-top div.right-content .right-content-menu .cart-dropdown-container .dropdown-list .dropdown-container .dropdown-footer .btn{margin:0;max-width:170px;text-align:center}.header .header-top div.right-content .menu-box,.header .header-top div.right-content .search-box{display:none}.header .header-bottom{height:47px;margin-left:auto;margin-right:auto;border-top:1px solid #c7c7c7;border-bottom:1px solid #c7c7c7;display:block}.header .header-bottom ul.nav{display:block;font-size:16px;max-width:100%;width:auto;margin-left:auto;margin-right:auto}.header .header-bottom .nav ul{margin:0;padding:0;-webkit-box-shadow:1px 1px 1px 0 rgba(0,0,0,.4);box-shadow:1px 1px 1px 0 rgba(0,0,0,.4)}.header .header-bottom .nav a{display:block;color:#242424;text-decoration:none;padding:.8em .3em .8em .5em;text-transform:capitalize;letter-spacing:-.38px;position:relative}.header .header-bottom .nav li>.icon{display:none}.header .header-bottom .nav{vertical-align:top;display:inline-block}.header .header-bottom .nav li{position:relative}.header .header-bottom .nav>li{float:left;margin-right:1px;height:45px}.header .header-bottom .nav>li>a{margin-bottom:1px}.header .header-bottom .nav>li>a .icon{display:none}.header .header-bottom .nav li li a{margin-top:1px;white-space:normal;word-break:break-word;width:200px}.header .header-bottom .nav li a:first-child:nth-last-child(2):before{content:"";position:absolute;height:0;width:0;border:5px solid transparent;top:50%;right:5px}.header .header-bottom .nav ul{position:absolute;white-space:nowrap;border:1px solid #c7c7c7;background-color:#fff;z-index:10000;left:-99999em}.header .header-bottom .nav>li:hover{background-color:#f2f2f2}.header .header-bottom .nav>li:hover>ul{left:auto;min-width:100%}.header .header-bottom .nav>li li:hover{background-color:#f2f2f2}.header .header-bottom .nav>li li:hover>ul{left:100%;margin-left:1px;top:-2px}.header .header-bottom .nav>li:hover>a:first-child:nth-last-child(2):before,.header .header-bottom .nav li li>a:first-child:nth-last-child(2):before{margin-top:-5px}.header .header-bottom .nav li li:hover>a:first-child:nth-last-child(2):before{right:10px}.header .search-responsive{display:none}.header .search-responsive .search-content{border-bottom:1px solid #c7c7c7;border-top:1px solid #c7c7c7;height:50px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between}.header .search-responsive .search-content .search{width:80%;border:none;font-size:16px}.header .search-responsive .search-content .right{float:right}@media (max-width:720px){.header .currency-switcher{display:none!important}.header .header-top div.right-content{display:inherit}.header .header-top div.right-content .menu-box{display:inline-block;margin-left:10px}.header .header-top div.right-content .search-box{display:inline-block;margin-right:10px}.header .header-top div.right-content .right-content-menu>li{border-right:none;padding:0 2px}.header .header-top div.right-content .right-content-menu>li .icon:not(.arrow-down-icon){margin-right:0}.header .header-top div.right-content .right-content-menu .cart-link{pointer-events:all}.header .header-top div.right-content .right-content-menu .arrow-down-icon,.header .header-top div.right-content .right-content-menu .cart-dropdown-container .dropdown-container,.header .header-top div.right-content .right-content-menu .name{display:none}.header .header-bottom{height:auto;display:none}.header .header-bottom .nav a{display:inline-block}.header .header-bottom .nav li,.header .header-bottom ul.nav{height:auto}.header .header-bottom .nav>li{float:none}.header .header-bottom .nav li>.icon{float:right;display:block}.header .header-bottom .icon.icon-arrow-down{margin-right:5px}.header .header-bottom .nav li .left{height:16px;width:16px}.header .header-bottom .nav li a>.icon{display:none}.header .header-bottom .nav ul{position:unset;border:none;-webkit-box-shadow:none;box-shadow:none}.header .header-bottom .nav>li li:hover>ul{margin-left:0;top:0}ul.account-dropdown-container,ul.cart-dropdown-container,ul.search-container{display:none!important}}@media (max-width:400px){.header .header-top div.right-content .right-content-menu .guest{width:240px}.header .header-top div.right-content .right-content-menu .guest .btn.btn-sm{padding:7px 14px}}.footer{background-color:#f2f2f2;padding-left:10%;padding-right:10%;width:100%;display:inline-block}.footer .footer-content .footer-list-container{display:grid;padding:40px 10px;grid-template-columns:repeat(auto-fit,minmax(250px,1fr));grid-auto-rows:auto;grid-row-gap:1vh}.footer .footer-content .footer-list-container .list-container .list-heading{text-transform:uppercase;color:#a5a5a5}.footer .footer-content .footer-list-container .list-container .list-group{padding-top:25px}.footer .footer-content .footer-list-container .list-container .list-group a{color:#242424}.footer .footer-content .footer-list-container .list-container .list-group li{margin-bottom:12px;list-style-type:none;text-transform:uppercase}.footer .footer-content .footer-list-container .list-container .list-group li span.icon{display:inline-block;vertical-align:middle;margin-right:5px;height:24px;width:24px}.footer .footer-content .footer-list-container .list-container .form-container{padding-top:5px}.footer .footer-content .footer-list-container .list-container .form-container .control-group .subscribe-field{width:100%}.footer .footer-content .footer-list-container .list-container .form-container .control-group .btn-primary{background-color:#242424;margin-top:8px;border-radius:0;text-align:center}.footer .footer-content .footer-list-container .list-container .form-container .control-group .locale-switcher{width:100%}.footer .footer-content .footer-list-container .list-container .currency{display:none}@media (max-width:720px){.footer{padding-left:15px}.footer .footer-list-container{padding-left:0!important}.footer .currency{display:block!important}}.footer-bottom{width:100%;height:70px;font-size:16px;color:#a5a5a5;letter-spacing:-.26px;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:center;-ms-flex-pack:center;justify-content:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.footer-bottom p{padding:0 15px}.main .category-container{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;width:100%}.main .category-container .layered-filter-wrapper,.main .category-container .responsive-layred-filter{width:25%;float:left;padding-right:20px;min-height:1px}.main .category-container .layered-filter-wrapper .filter-title,.main .category-container .responsive-layred-filter .filter-title{border-bottom:1px solid #c7c7c7;color:#242424;padding:10px 0}.main .category-container .layered-filter-wrapper .filter-attributes .filter-attributes-item,.main .category-container .responsive-layred-filter .filter-attributes .filter-attributes-item{border-bottom:1px solid #c7c7c7;padding-bottom:10px}.main .category-container .layered-filter-wrapper .filter-attributes .filter-attributes-item .filter-attributes-title,.main .category-container .responsive-layred-filter .filter-attributes .filter-attributes-item .filter-attributes-title{padding:10px 40px 0 10px;color:#5e5e5e;cursor:pointer;position:relative}.main .category-container .layered-filter-wrapper .filter-attributes .filter-attributes-item .filter-attributes-title .remove-filter-link,.main .category-container .responsive-layred-filter .filter-attributes .filter-attributes-item .filter-attributes-title .remove-filter-link{font-weight:400;color:#0031f0;margin-right:10px}.main .category-container .layered-filter-wrapper .filter-attributes .filter-attributes-item .filter-attributes-title .icon,.main .category-container .responsive-layred-filter .filter-attributes .filter-attributes-item .filter-attributes-title .icon{background-image:url("../images/icon-dropdown.svg")!important;width:10px;height:10px;position:absolute;right:15px;top:14px}.main .category-container .layered-filter-wrapper .filter-attributes .filter-attributes-item .filter-attributes-content,.main .category-container .responsive-layred-filter .filter-attributes .filter-attributes-item .filter-attributes-content{padding:10px;display:none}.main .category-container .layered-filter-wrapper .filter-attributes .filter-attributes-item .filter-attributes-content ol.items,.main .category-container .responsive-layred-filter .filter-attributes .filter-attributes-item .filter-attributes-content ol.items{padding:0;margin:0;list-style:none none}.main .category-container .layered-filter-wrapper .filter-attributes .filter-attributes-item .filter-attributes-content ol.items li.item,.main .category-container .responsive-layred-filter .filter-attributes .filter-attributes-item .filter-attributes-content ol.items li.item{padding:8px 0;color:#5e5e5e}.main .category-container .layered-filter-wrapper .filter-attributes .filter-attributes-item .filter-attributes-content ol.items li.item .checkbox,.main .category-container .responsive-layred-filter .filter-attributes .filter-attributes-item .filter-attributes-content ol.items li.item .checkbox{margin:0}.main .category-container .layered-filter-wrapper .filter-attributes .filter-attributes-item .filter-attributes-content ol.items li.item .checkbox .checkbox-view,.main .category-container .responsive-layred-filter .filter-attributes .filter-attributes-item .filter-attributes-content ol.items li.item .checkbox .checkbox-view{height:16px;width:16px;background-image:url("../images/checkbox.svg")}.main .category-container .layered-filter-wrapper .filter-attributes .filter-attributes-item .filter-attributes-content ol.items li.item .checkbox input:checked+.checkbox-view,.main .category-container .responsive-layred-filter .filter-attributes .filter-attributes-item .filter-attributes-content ol.items li.item .checkbox input:checked+.checkbox-view{background-image:url("../images/checkbox-checked.svg")}.main .category-container .layered-filter-wrapper .filter-attributes .filter-attributes-item .filter-attributes-content ol.items li.item .color-swatch,.main .category-container .responsive-layred-filter .filter-attributes .filter-attributes-item .filter-attributes-content ol.items li.item .color-swatch{display:inline-block;margin-right:5px;min-width:20px;height:20px;border:1px solid #c7c7c7;border-radius:3px;float:right}.main .category-container .layered-filter-wrapper .filter-attributes .filter-attributes-item .filter-attributes-content .price-range-wrapper,.main .category-container .responsive-layred-filter .filter-attributes .filter-attributes-item .filter-attributes-content .price-range-wrapper{margin-top:21px}.main .category-container .layered-filter-wrapper .filter-attributes .filter-attributes-item.active .filter-attributes-content,.main .category-container .responsive-layred-filter .filter-attributes .filter-attributes-item.active .filter-attributes-content{display:block}.main .category-container .layered-filter-wrapper .filter-attributes .filter-attributes-item.active .filter-attributes-title .icon,.main .category-container .responsive-layred-filter .filter-attributes .filter-attributes-item.active .filter-attributes-title .icon{background-image:url("../images//arrow-up.svg")!important}.main .category-container .responsive-layred-filter{display:none;width:100%;float:none;padding-right:0;margin-top:-25px!important}.main .category-container .category-block{width:80%;display:block}.main .category-container .category-block .hero-image{display:inline-block;visibility:visible;width:100%}.main .category-container .category-block .hero-image img{height:400px;width:100%}.main .top-toolbar{width:100%;display:inline-block}.main .top-toolbar .page-info{float:left;color:#242424;line-height:45px}.main .top-toolbar .page-info span{display:none}.main .top-toolbar .page-info span:first-child{display:inline}.main .top-toolbar .pager{float:right}.main .top-toolbar .pager label{margin-right:5px}.main .top-toolbar .pager select{background:#f2f2f2;border:1px solid #c7c7c7;border-radius:3px;color:#242424;padding:10px}.main .top-toolbar .pager .view-mode{display:inline-block;margin-right:20px}.main .top-toolbar .pager .view-mode a,.main .top-toolbar .pager .view-mode span{display:inline-block;vertical-align:middle}.main .top-toolbar .pager .view-mode a.grid-view,.main .top-toolbar .pager .view-mode span.grid-view{margin-right:10px}.main .top-toolbar .pager .view-mode .sort-filter{display:none}.main .top-toolbar .pager .sorter{display:inline-block;margin-right:10px}.main .top-toolbar .pager .limiter{display:inline-block}.main .bottom-toolbar{display:block;margin-top:40px;margin-bottom:40px;text-align:center}@media only screen and (max-width:840px){.main .category-container .responsive-layred-filter,.main .layered-filter-wrapper{display:none}.main .category-block{width:100%!important}.main .category-block .top-toolbar{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.main .category-block .top-toolbar .page-info{border-bottom:1px solid #c7c7c7;line-height:15px;margin-top:10px}.main .category-block .top-toolbar .page-info span{display:inline}.main .category-block .top-toolbar .page-info span:first-child{display:none}.main .category-block .top-toolbar .page-info .sort-filter{float:right;cursor:pointer}.main .category-block .top-toolbar .pager{margin-top:20px;display:none}.main .category-block .top-toolbar .pager .view-mode{display:none}.main .category-block .responsive-layred-filter{display:block}}section.product-detail{color:#242424}section.product-detail div.category-breadcrumbs{display:inline}section.product-detail div.layouter{display:block;margin-top:20px;margin-bottom:20px}section.product-detail div.layouter .form-container{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;width:100%}section.product-detail div.layouter .form-container div.product-image-group{margin-right:30px;width:604px;height:650px;max-width:604px;position:-webkit-sticky;position:sticky;top:10px}section.product-detail div.layouter .form-container div.product-image-group div{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;cursor:pointer}section.product-detail div.layouter .form-container div.product-image-group div .thumb-list{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;margin-right:4px;min-width:120px;overflow:hidden;position:relative;-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start;max-height:480px}section.product-detail div.layouter .form-container div.product-image-group div .thumb-list .thumb-frame{border:2px solid transparent;background:#f2f2f2;width:120px;max-height:120px}section.product-detail div.layouter .form-container div.product-image-group div .thumb-list .thumb-frame.active{border-color:#0031f0}section.product-detail div.layouter .form-container div.product-image-group div .thumb-list .thumb-frame img{height:100%;width:100%}section.product-detail div.layouter .form-container div.product-image-group div .thumb-list .gallery-control{width:100%;position:absolute;text-align:center;cursor:pointer;z-index:1}section.product-detail div.layouter .form-container div.product-image-group div .thumb-list .gallery-control .overlay{opacity:.3;background:#242424;width:100%;height:18px;position:absolute;left:0;z-index:-1}section.product-detail div.layouter .form-container div.product-image-group div .thumb-list .gallery-control .icon{z-index:2}section.product-detail div.layouter .form-container div.product-image-group div .thumb-list .gallery-control.top{top:0}section.product-detail div.layouter .form-container div.product-image-group div .thumb-list .gallery-control.bottom{bottom:0}section.product-detail div.layouter .form-container div.product-image-group div .product-hero-image{display:block;position:relative;background:#f2f2f2;width:100%;max-height:480px;height:100%}section.product-detail div.layouter .form-container div.product-image-group div .product-hero-image img{width:100%;height:auto;max-height:480px}section.product-detail div.layouter .form-container div.product-image-group div .product-hero-image .add-to-wishlist{background-image:url("../images/wishlist.svg");position:absolute;top:10px;right:12px;background-color:transparent;border:0;cursor:pointer;padding:0;width:32px;height:32px}section.product-detail div.layouter .form-container div.product-image-group div .product-hero-image .add-to-wishlist:hover{background-image:url("../images/wishlist-added.svg")}section.product-detail div.layouter .form-container div.product-image-group div .product-hero-image .share{position:absolute;top:10px;right:45px}section.product-detail div.layouter .form-container div.product-image-group .add-to-buttons{display:none;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;margin-top:10px;width:79.5%;float:right;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between}section.product-detail div.layouter .form-container div.product-image-group .add-to-buttons .addtocart{width:49%;background:#000;white-space:normal;text-transform:uppercase}section.product-detail div.layouter .form-container div.product-image-group .add-to-buttons .buynow{width:49%;white-space:nowrap;text-transform:uppercase}section.product-detail div.layouter .form-container .details{width:50%;overflow-wrap:break-word}section.product-detail div.layouter .form-container .details .product-price{margin-bottom:14px}section.product-detail div.layouter .form-container .details .product-price .sticker{display:none}section.product-detail div.layouter .form-container .details .product-ratings{margin-bottom:20px}section.product-detail div.layouter .form-container .details .product-ratings .icon{width:16px;height:16px}section.product-detail div.layouter .form-container .details .product-ratings .total-reviews{display:inline-block;margin-left:15px}section.product-detail div.layouter .form-container .details .product-heading{font-size:24px;color:#242424;margin-bottom:15px}section.product-detail div.layouter .form-container .details .product-price{margin-bottom:15px}section.product-detail div.layouter .form-container .details .product-price .special-price{font-size:24px}section.product-detail div.layouter .form-container .details .stock-status{margin-bottom:15px;font-weight:600;color:#fc6868}section.product-detail div.layouter .form-container .details .stock-status.active{color:#4caf50}section.product-detail div.layouter .form-container .details .description{margin-bottom:15px}section.product-detail div.layouter .form-container .details .description ul{padding-left:40px;list-style:disc}section.product-detail div.layouter .form-container .details .quantity{padding-top:15px;border-top:1px solid hsla(0,0%,64%,.2)}section.product-detail div.layouter .form-container .details .full-description *{max-width:100%}section.product-detail div.layouter .form-container .details .full-description ul{padding-left:40px;list-style:disc}section.product-detail div.layouter .form-container .details .full-specifications td{padding:10px 0;color:#5e5e5e}section.product-detail div.layouter .form-container .details .full-specifications td:first-child{padding-right:40px}section.product-detail div.layouter .form-container .details .accordian .accordian-header{padding-left:0;font-weight:600}section.product-detail div.layouter .form-container .details .accordian .accordian-content{padding:20px 0}section.product-detail div.layouter .form-container .details .attributes{display:block;width:100%;border-bottom:1px solid hsla(0,0%,64%,.2)}section.product-detail div.layouter .form-container .details .attributes .attribute.control-group{margin-bottom:20px}section.product-detail div.layouter .form-container .details .attributes .attribute.control-group .swatch-container{margin-top:10px;display:inline-block}section.product-detail div.layouter .form-container .details .attributes .attribute.control-group .swatch-container .swatch{display:inline-block;margin-right:5px;min-width:40px;height:40px}section.product-detail div.layouter .form-container .details .attributes .attribute.control-group .swatch-container .swatch span{min-width:38px;height:38px;float:left;border:1px solid #c7c7c7;border-radius:3px;line-height:36px;text-align:center;cursor:pointer;padding:0 10px}section.product-detail div.layouter .form-container .details .attributes .attribute.control-group .swatch-container .swatch img{width:38px;height:38px;border:1px solid #c7c7c7;border-radius:3px;cursor:pointer;background:#f2f2f2}section.product-detail div.layouter .form-container .details .attributes .attribute.control-group .swatch-container .swatch input:checked+img,section.product-detail div.layouter .form-container .details .attributes .attribute.control-group .swatch-container .swatch input:checked+span{border:1px solid #242424}section.product-detail div.layouter .form-container .details .attributes .attribute.control-group .swatch-container .swatch input{display:none}section.product-detail div.layouter .form-container .details .attributes .attribute.control-group .swatch-container .no-options{color:#ff6472}section.product-detail div.layouter .form-container .details .quantity-change{cursor:pointer;text-align:center}section.product-detail div.layouter .form-container .details .quantity-change:focus{border-color:#c7c7c7!important}@media only screen and (max-width:720px){section.product-detail div.layouter .form-container{-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}section.product-detail div.layouter .form-container div.product-image-group{margin-right:0;max-width:none;width:auto;min-height:400px;height:auto;position:unset}section.product-detail div.layouter .form-container div.product-image-group .loader{margin-left:47%}section.product-detail div.layouter .form-container div.product-image-group div{-webkit-box-orient:vertical;-webkit-box-direction:reverse;-ms-flex-direction:column-reverse;flex-direction:column-reverse}section.product-detail div.layouter .form-container div.product-image-group div .thumb-list{margin-top:5px;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;overflow-x:scroll;margin-right:0}section.product-detail div.layouter .form-container div.product-image-group div .thumb-list .thumb-frame img{height:100%;width:auto}section.product-detail div.layouter .form-container div.product-image-group div .thumb-list .gallery-control{display:none}section.product-detail div.layouter .form-container div.product-image-group div .product-hero-image{display:-webkit-box;display:-ms-flexbox;display:flex}section.product-detail div.layouter .form-container div.product-image-group div .product-hero-image img{margin-left:auto;margin-right:auto;width:480px}section.product-detail div.layouter .form-container div.product-image-group div .wrap{-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;width:100%!important}section.product-detail div.layouter .form-container div.product-image-group .add-to-buttons{width:100%}section.product-detail div.layouter .form-container .details{width:100%;margin-top:20px}}@media only screen and (max-width:510px){section.product-detail div.layouter .form-container div.product-image-group .product-hero-image img{width:100%!important}}.rating-reviews .rating-header{padding:20px 0}.rating-reviews .stars .icon{width:16px;height:16px}.rating-reviews .overall{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-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between}.rating-reviews .overall .review-info .number{font-size:34px}.rating-reviews .overall .review-info .total-reviews{margin-top:10px}.rating-reviews .reviews{margin-top:40px;margin-bottom:40px}.rating-reviews .reviews .review{margin-bottom:25px}.rating-reviews .reviews .review .title{margin-bottom:5px}.rating-reviews .reviews .review .stars{margin-bottom:15px;display:inline-block}.rating-reviews .reviews .review .message{margin-bottom:10px}.rating-reviews .reviews .review .reviewer-details{color:#5e5e5e}.rating-reviews .reviews .view-all{margin-top:15px;color:#0031f0;margin-bottom:15px}section.cart{width:100%;color:#242424;margin-bottom:80px;margin-top:20px}section.cart .title{font-size:24px}section.cart .cart-content{margin-top:20px;width:100%;display:inline-block}section.cart .cart-content .left-side{width:70%;float:left}section.cart .cart-content .left-side .misc-controls{width:100%;display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;margin-top:20px}section.cart .cart-content .left-side .misc-controls a.link,section.cart .cart-content .left-side .misc-controls div button{margin-right:15px}section.cart .cart-content .right-side{width:30%;display:inline-block;padding-left:40px}.cart-item-list .item{padding:10px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;border:1px solid #c7c7c7;border-radius:2px}.cart-item-list .item .item-image{margin-right:15px}.cart-item-list .item .item-image img{height:160px;width:160px}.cart-item-list .item .item-details{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start;width:100%}.cart-item-list .item .item-details .item-title{font-size:18px;margin-bottom:10px;font-weight:600}.cart-item-list .item .item-details .item-title a{color:#242424}.cart-item-list .item .item-details .price{margin-bottom:10px;font-size:18px;font-weight:600}.cart-item-list .item .item-details .summary{margin-bottom:17px}.cart-item-list .item .item-details .misc{display:-webkit-box;display:-ms-flexbox;display:flex;width:100%;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start;-webkit-box-align:start;-ms-flex-align:start;align-items:flex-start}.cart-item-list .item .item-details .misc .control-group{font-size:16px!important;width:220px;margin:0}.cart-item-list .item .item-details .misc .control-group .wrap{display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.cart-item-list .item .item-details .misc .control-group label{margin-right:15px}.cart-item-list .item .item-details .misc .control-group .control{height:38px;width:60px;border-radius:3px;text-align:center;line-height:38px}.cart-item-list .item .item-details .misc .remove,.cart-item-list .item .item-details .misc .towishlist{margin-top:18px;margin-right:15px}.cart-item-list .item .item-details .misc .quantity-change{cursor:pointer}.cart-item-list .item .item-details .misc .quantity-change:focus{border-color:#c7c7c7!important}.cart-item-list .item .error-message{color:#ff6472}.order-summary h3{font-size:16px;margin-top:0}.order-summary .item-detail{margin-top:12px}.order-summary .item-detail label.right{float:right}.order-summary .payble-amount{margin-top:17px;border-top:1px solid #c7c7c7;padding-top:12px}.order-summary .payble-amount label{font-weight:700}.order-summary .payble-amount label.right{float:right}@media only screen and (max-width:815px){section.cart .cart-content{display:block}section.cart .cart-content .left-side{width:100%;float:none}section.cart .cart-content .left-side .misc-controls{position:relative;top:180px;margin-top:0}section.cart .cart-content .right-side{width:100%;padding-left:0;position:relative;top:-20px}}@media only screen and (max-width:600px){section.cart .cart-content .left-side .cart-item-list .item{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}section.cart .cart-content .left-side .cart-item-list .item .item-details{margin-top:10px}section.cart .cart-content .left-side .cart-item-list .item .item-details .misc{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;line-height:40px}}@media only screen and (max-width:574px){section.cart .cart-content .left-side .misc-controls{display:block;top:160px}section.cart .cart-content .left-side .misc-controls div button{width:100%;margin-top:10px}section.cart .cart-content .left-side .misc-controls div a{margin-top:10px;width:100%;text-align:center}section.cart .cart-content .right-side{top:-100px}}.checkout-method-group .line-one{display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.checkout-method-group .line-one .radio-container{padding-left:28px}.checkout-method-group .line-one .method-label{margin-top:4px}.checkout-method-group .line-two{margin-left:30px}.checkout-process{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;width:100%;margin-top:20px;margin-bottom:20px;font-size:16px;color:#242424}.checkout-process .col-main{width:70%;margin-right:5%}.checkout-process .col-main ul.checkout-steps{display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;width:100%;padding-bottom:15px;border-bottom:1px solid #c7c7c7}.checkout-process .col-main ul.checkout-steps li{height:48px;display:-webkit-box;display:-ms-flexbox;display:flex}.checkout-process .col-main ul.checkout-steps li .decorator{height:48px;width:48px;border:1px solid #000;border-radius:50%;display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;border:1px solid #c7c7c7;background-repeat:no-repeat;background-position:50%}.checkout-process .col-main ul.checkout-steps li .decorator.address-info{background-image:url("../images/address.svg")}.checkout-process .col-main ul.checkout-steps li .decorator.shipping{background-image:url("../images/shipping.svg")}.checkout-process .col-main ul.checkout-steps li .decorator.payment{background-image:url("../images/payment.svg")}.checkout-process .col-main ul.checkout-steps li .decorator.review{background-image:url("../images/finish.svg")}.checkout-process .col-main ul.checkout-steps li.completed{cursor:pointer}.checkout-process .col-main ul.checkout-steps li.completed .decorator{background-image:url("../images/complete.svg")}.checkout-process .col-main ul.checkout-steps li span{margin-left:7px;margin-top:auto;margin-bottom:auto}.checkout-process .col-main ul.checkout-steps li.active{color:#2650ef}.checkout-process .col-main ul.checkout-steps li.active .decorator{border:1px solid #2650ef}.checkout-process .col-main .step-content{padding-top:20px}.checkout-process .col-main .step-content .form-header{display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;width:100%;height:30px}.checkout-process .col-main .step-content .form-header .checkout-step-heading{font-size:24px;font-weight:700;float:left}.checkout-process .col-main .step-content .form-header .btn{float:right;font-size:14px}.checkout-process .col-main .step-content .form-container{border-bottom:1px solid #c7c7c7;padding-top:20px;padding-bottom:20px}.checkout-process .col-main .step-content .shipping-methods{font-size:16px}.checkout-process .col-main .step-content .shipping-methods .ship-method-carrier{margin-bottom:15px;font-weight:700}.checkout-process .col-main .step-content .payment-methods .radio-container{padding-left:28px}.checkout-process .col-main .step-content .payment-methods .control-info{margin-left:28px}.checkout-process .col-main .step-content .address-summary{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:start;-ms-flex-pack:start;justify-content:flex-start;-webkit-box-align:center;-ms-flex-align:center;align-items:center;width:100%}.checkout-process .col-main .step-content .address-summary div.billing-address{margin-right:25%}.checkout-process .col-main .step-content .address-summary div.billing-address .horizontal-rule,.checkout-process .col-main .step-content .address-summary div.shipping-address .horizontal-rule{width:40px;background:#242424}.checkout-process .col-main .step-content .address-summary .label{width:10%}.checkout-process .col-main .step-content .address-summary .address-card-list{width:85%}.checkout-process .col-main .step-content .cart-item-list .item .row .title{width:100px;display:inline-block;color:#a5a5a5;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:25%;padding-left:40px}@media only screen and (max-width:770px){.checkout-process .col-main{width:100%;padding-right:0}.checkout-process .col-main ul.checkout-steps{border-bottom:none;padding-bottom:0}.checkout-process .col-main ul.checkout-steps span{display:none}.checkout-process .col-main ul.checkout-steps .line{-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;border-bottom:1px solid #c7c7c7;margin-left:5px;margin-right:5px}.checkout-process .step-content{padding-top:0}.checkout-process .step-content .control-group .control{width:100%}.checkout-process .col-right{display:none}}@media only screen and (max-width:480px){.checkout-process .col-main .step-content .address,.checkout-process .col-main .step-content .order-description{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.checkout-process .col-main .step-content .address .billing-address,.checkout-process .col-main .step-content .address .pull-left,.checkout-process .col-main .step-content .order-description .billing-address,.checkout-process .col-main .step-content .order-description .pull-left{width:100%!important}.checkout-process .col-main .step-content .address .pull-right,.checkout-process .col-main .step-content .address .shipping-address,.checkout-process .col-main .step-content .order-description .pull-right,.checkout-process .col-main .step-content .order-description .shipping-address{width:100%!important;margin-top:20px}}.attached-products-wrapper{margin-bottom:80px}.attached-products-wrapper .title{margin-bottom:40px;font-size:18px;color:#242424;text-align:center;position:relative}.attached-products-wrapper .title .border-bottom{border-bottom:1px solid hsla(0,0%,64%,.2);display:inline-block;width:100px;position:absolute;top:40px;left:50%;margin-left:-50px}.attached-products-wrapper .horizontal-rule{height:1px;background:#c7c7c7;width:148px;margin-bottom:24px;margin-left:auto;margin-right:auto}section.review .category-breadcrumbs{display:inline}section.review .review-layouter{display:-webkit-box;display:-ms-flexbox;display:flex}section.review .review-layouter .product-info{font-size:24px;max-width:25%}section.review .review-layouter .product-info .product-image img{height:280px;width:280px}section.review .review-layouter .product-info .product-name a{color:#242424}section.review .review-layouter .product-info .product-price .pro-price{color:#ff6472}section.review .review-layouter .product-info .product-price .pro-price-not{margin-left:10px;font-size:16px;color:#a5a5a5}section.review .review-layouter .product-info .product-price .offer{margin-left:10px;font-size:16px}section.review .review-layouter .review-form{margin-left:20px;width:55%}section.review .review-layouter .review-form .heading{color:#242424;font-weight:600}section.review .review-layouter .review-form .heading .right{float:right;margin-top:-10px}section.review .review-layouter .review-form .star{font-size:23px;color:#d4d4d4;-webkit-transition:all .2s;transition:all .2s}section.review .review-layouter .review-form .star:before{content:"\2605"}section.review .review-layouter .review-form .control-group .control{width:100%}section.review .review-layouter .review-form .review-detail{height:150px;border:1px solid #b22222;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}section.review .review-layouter .review-form .review-detail .rating-review{margin-top:40px;margin-left:20px;width:48%}section.review .review-layouter .review-form .review-detail .rating-review .avg-rating-count span{font-size:34px;text-align:center}section.review .review-layouter .review-form .review-detail .rating-calculate .progress-only{width:20px;border:1px solid blue}section.review .review-layouter .ratings-reviews{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between}section.review .review-layouter .ratings-reviews .left-side{padding:40px 20px;width:50%}section.review .review-layouter .ratings-reviews .left-side .rate{font-size:34px}section.review .review-layouter .ratings-reviews .left-side .stars .icon{height:16px;width:16px}section.review .review-layouter .ratings-reviews .right-side{width:50%}section.review .review-layouter .ratings-reviews .right-side .rater{display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;padding-top:5px;width:100%}section.review .review-layouter .ratings-reviews .right-side .rater .star-name{margin-right:5px;width:35px}section.review .review-layouter .ratings-reviews .right-side .rater .rate-number{width:15px}section.review .review-layouter .ratings-reviews .right-side .rater .percentage{width:50px;margin-right:10px}section.review .review-layouter .ratings-reviews .right-side .rater .percentage span{float:right;white-space:nowrap}section.review .review-layouter .ratings-reviews .right-side .rater .line-bar{height:4px;width:calc(100% - 100px);margin-right:5px;margin-left:5px;background:#d8d8d8}section.review .review-layouter .ratings-reviews .right-side .rater .line-bar .line-value{background-color:#0031f0}@media only screen and (max-width:770px){section.review .category-breadcrumbs{display:none}section.review .review-layouter{-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}section.review .review-layouter .product-info{max-width:100%}section.review .review-layouter .product-info .product-image,section.review .review-layouter .product-info .product-name,section.review .review-layouter .product-info .product-price{max-width:280px;margin-left:auto;margin-right:auto}section.review .review-layouter .review-form{width:100%;margin-left:0}section.review .review-layouter .review-form .heading .right{margin-top:50px}section.review .review-layouter .review-form .ratings-reviews{-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;width:100%}section.review .review-layouter .review-form .ratings-reviews .left-side{width:100%;padding:0 0 40px;margin-top:-30px}section.review .review-layouter .review-form .ratings-reviews .right-side{width:100%}section.review .review-layouter .review-form .ratings-reviews .right-side .rater .percentage{margin-right:0}}.auth-content{padding-top:5%;padding-bottom:5%}.auth-content .sign-up-text{margin-bottom:2%;margin-left:auto;margin-right:auto;font-size:18px;color:#a5a5a5;text-align:center}.auth-content .login-form{margin-left:auto;margin-right:auto;display:-webkit-box;display:-ms-flexbox;display:flex;border:1px solid #c7c7c7;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;max-width:500px;min-width:320px;padding:25px}.auth-content .login-form .login-text{font-size:24px;font-weight:600;margin-bottom:30px}.auth-content .login-form .control-group{margin-bottom:15px!important}.auth-content .login-form .control-group .control{width:100%!important}.auth-content .login-form .forgot-password-link{font-size:17px;color:#0031f0;margin-bottom:5%}.auth-content .login-form .signup-confirm{margin-bottom:5%}.auth-content .login-form .btn-primary{width:100%;text-transform:uppercase}.account-content{width:100%;-webkit-box-orient:horizontal;-ms-flex-direction:row;flex-direction:row;margin-top:5.5%;margin-bottom:5.5%}.account-content,.account-content .sidebar{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-direction:normal}.account-content .sidebar{-webkit-box-orient:vertical;-ms-flex-direction:column;flex-direction:column;-ms-flex-line-pack:center;align-content:center;-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start;width:20%;height:100%}.account-content .menu-block{margin-bottom:30px}.account-content .menu-block:last-child{margin-bottom:0}.account-content .menu-block .menu-block-title{padding-bottom:10px;font-size:18px}.account-content .menu-block .menu-block-title .right{display:none}.account-content .menu-block .menubar{border:1px solid #c7c7c7;color:#a5a5a5;position:relative}.account-content .menu-block .menubar li{width:95%;height:50px;margin-left:5%;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:start;-ms-flex-pack:start;justify-content:flex-start;-webkit-box-align:center;-ms-flex-align:center;align-items:center;border-bottom:1px solid #c7c7c7;text-align:center}.account-content .menu-block .menubar li a{color:#5e5e5e;width:100%;text-align:left}.account-content .menu-block .menubar li .icon{display:none;position:absolute;right:12px}.account-content .menu-block .menubar li:first-child{border-top:none}.account-content .menu-block .menubar li:last-child{border-bottom:none}.account-content .menu-block .menubar li.active a{color:#0031f0}.account-content .menu-block .menubar li.active .icon{display:inline-block}.account-content .account-layout{margin-left:40px;width:80%}.account-content .account-layout .account-head .back-icon,.account-content .account-layout .responsive-empty{display:none}.account-table-content{color:#242424;margin-top:1.4%}.account-table-content table{width:100%}.account-table-content table tbody tr{height:45px}.account-table-content table tbody tr td{width:250px}.address-holder{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:start;-ms-flex-pack:start;justify-content:flex-start;-webkit-box-align:start;-ms-flex-align:start;align-items:flex-start;-ms-flex-wrap:wrap;flex-wrap:wrap;width:100%}.address-card{width:260px;border:1px solid #c7c7c7;padding:15px;margin-right:15px;margin-bottom:15px}.address-card .control-group{width:15px;height:15px;margin-top:10px}.address-card .details{font-weight:lighter}.address-card .details span{display:block}.address-card .details .control-links{width:90%;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;-ms-flex-wrap:wrap;flex-wrap:wrap;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.address-card .details .control-links .btn{height:30px}.edit-form{display:-webkit-box;display:-ms-flexbox;display:flex;border:1px solid #c7c7c7;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;min-height:345px;padding:25px}@media only screen and (max-width:770px){.account-content{-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.account-content .sidebar{width:100%}.account-content .sidebar .menu-block .menu-block-title{height:50px;padding-top:13px;border-bottom:1px solid #c7c7c7;border-top:1px solid #c7c7c7}.account-content .sidebar .menu-block .menu-block-title .right{display:block;float:right;-ms-flex-item-align:center;align-self:center}.account-content .sidebar .menu-block .menubar{border:0;display:none}.account-content .sidebar .menu-block .menubar>li{margin-left:0;width:100%}.account-content .sidebar .menu-block .menubar>li .icon{right:0}.account-content .sidebar .menu-block .menubar>li:last-child{border-bottom:1px solid #c7c7c7}.account-content .account-layout{margin-left:0;margin-top:20px;width:100%}.account-content .account-layout .account-head{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;border-bottom:1px solid #c7c7c7;border-top:1px solid #c7c7c7;height:50px;margin-top:10px}.account-content .account-layout .account-head .account-action{margin-top:12px;margin-left:15px}.account-content .account-layout .account-head .back-icon{display:block}.account-content .account-layout .account-head span{margin-top:13px;font-size:18px}.account-content .account-layout .account-head .horizontal-rule{display:none}.account-content .account-layout .account-table-content{margin-top:2%}.account-content .account-layout .account-table-content table tbody tr{height:70px}.account-content .account-layout .account-table-content table tbody tr td{display:block}.account-content .account-layout .account-table-content .address-holder{-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.account-content .account-items-list,.account-content .edit-form{margin-top:20px}.account-content .account-items-list .responsive-empty,.account-content .edit-form .responsive-empty{display:block}.account-content .control-group .control{width:100%}}.sale-container{color:#5e5e5e}.sale-container .sale-section .secton-title{font-size:18px;color:#8e8e8e;padding:15px 0;border-bottom:1px solid #c7c7c7}.sale-container .sale-section .section-content{display:block;padding:20px 0;border-bottom:1px solid #e8e8e8}.sale-container .sale-section .section-content .row{display:block;padding:7px 0}.sale-container .sale-section .section-content .row .title{width:200px;letter-spacing:-.26px;display:inline-block}.sale-container .sale-section .section-content .row .value{letter-spacing:-.26px;display:inline-block}.sale-container .sale-section .section-content .order-box-container{display:inline-block;width:100%}.sale-container .sale-section .section-content .order-box-container .box{float:left;width:25%}.sale-container .sale-section .section-content .order-box-container .box .box-title{padding:10px 0;font-size:18px;color:#8e8e8e}.sale-container .sale-section .section-content .order-box-container .box .box-content{color:#3a3a3a;padding-right:10px}.sale-container .sale-section .section-content .qty-row{display:block}.sale-container .totals{padding-top:20px;display:inline-block;width:100%;border-top:1px solid #e8e8e8}.sale-container .totals .sale-summary{height:130px;float:right;border-collapse:collapse}.sale-container .totals .sale-summary tr td{padding:5px 8px;width:auto;color:#3a3a3a}.sale-container .totals .sale-summary tr.bold{font-weight:600;font-size:15px}.sale-container .totals .sale-summary tr.border td{border-bottom:1px solid #c7c7c7}@media only screen and (max-width:770px){.sale-container .sale-section .section-content{border-bottom:none;padding:10px 0}.sale-container .sale-section .section-content .row{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.sale-container .sale-section .section-content .row .title{line-height:20px}.sale-container .sale-section .section-content .totals{border-top:none}.sale-container .sale-section .section-content .totals .sale-summary{width:100%}.sale-container .sale-section .section-content .totals .sale-summary tr td:nth-child(2){display:none}.sale-container .sale-section .section-content .order-box-container{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.sale-container .sale-section .section-content .order-box-container .box{width:100%;margin:10px auto}.sale-container .sale-section .section-content .qty-row{display:inline}}.verify-account{text-align:center;background:#204d74;width:200px;margin-right:auto;margin-left:auto;border-radius:4px}.verify-account a{color:#fff!important}.cp-spinner{position:absolute;left:calc(50% - 24px);margin-top:calc(40% - 24px)}@media only screen and (max-width:720px){.cp-spinner{left:50%;margin-left:-24px;top:50%;margin-top:-24px}}@media only screen and (max-width:720px){.error-container .wrapper{-webkit-box-orient:vertical!important;-webkit-box-direction:reverse!important;-ms-flex-direction:column-reverse!important;flex-direction:column-reverse!important;margin:10px 0 20px!important;-webkit-box-align:start!important;-ms-flex-align:start!important;align-items:start!important;height:100%!important}}@media only screen and (max-width:770px){.table table{width:100%}.table table thead{display:none}.table table tbody tr td:before{content:attr(data-value);font-size:15px;font-weight:600;display:inline-block;width:120px}.table table tbody td{border-bottom:none!important;display:block;width:100%!important}.table table tbody td div{position:relative;left:100px;top:-20px}.table table tbody tr{border:1px solid #c7c7c7}}.show-wishlist{z-index:-1!important}.filter-row-one .dropdown-filters{position:relative!important;right:1px!important}@media only screen and (max-width:770px){.table .grid-container{margin-top:10px}.table .grid-container .filter-row-one{display:block}.table .grid-container .filter-row-one .dropdown-filters{margin-top:10px}}.rtl{direction:rtl}.rtl .header .header-top div.left-content ul.logo-container{margin-right:0;margin-left:12px}.rtl .header .header-top div.left-content ul.search-container li.search-group .search-field{border:2px solid #c7c7c7;padding-right:12px;padding-left:0;border-radius:2px;border-top-left-radius:0;border-bottom-left-radius:0}.rtl .header .header-top div.left-content ul.search-container li.search-group .search-icon-wrapper{border:2px solid #c7c7c7;border-right:none;border-radius:2px;border-top-right-radius:0;border-bottom-right-radius:0}.rtl .header .header-top div.right-content .right-content-menu>li{border-right:2px solid #c7c7c7;padding:0 15px}.rtl .header .header-top div.right-content .right-content-menu>li:last-child{padding-left:0}.rtl .header .header-top div.right-content .right-content-menu>li:first-child{border-right:0;padding-right:0}.rtl .header .header-top div.right-content .right-content-menu .cart-dropdown-container .dropdown-list{left:0;right:unset!important}.rtl .header .header-top div.right-content .right-content-menu .cart-dropdown-container .count{display:inline-block}.rtl .header .header-top div.right-content .right-content-menu .account,.rtl .header .header-top div.right-content .right-content-menu .currency{right:unset;left:0}.rtl .header .header-top div.right-content .right-content-menu .guest div{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between}.rtl .header .header-bottom .nav>li{float:right;margin-right:0;margin-left:1px}.rtl .header .header-bottom .nav a{padding:.8em .5em .8em .3em!important}.rtl .header .header-bottom .nav li a>.icon{-webkit-transform:rotate(180deg);transform:rotate(180deg)}.rtl .header .header-bottom .nav>li li:hover>ul{left:unset!important;right:100%!important}.rtl .header .header-bottom .nav ul{left:99999em}.rtl .header .search-responsive .search-content .right{float:left}.rtl .dropdown-list{text-align:right}.rtl .dropdown-list.bottom-right{left:0;right:auto}@media only screen and (max-width:720px){.rtl .header .header-top div.right-content .menu-box{margin-left:0;margin-right:5px}.rtl .header .header-top div.right-content .right-content-menu .account{position:absolute;left:0;right:auto}.rtl .header .header-top div.right-content .right-content-menu>li{padding:0;border:0}.rtl .header .header-top div.right-content .search-box{margin-left:5px}.rtl .header .header-bottom .nav>li{float:none}.rtl .header .header-bottom .nav li>.icon{float:left;-webkit-transform:rotate(180deg);transform:rotate(180deg)}.rtl .header .header-bottom .icon.icon-arrow-down{margin-left:5px}}.rtl section.slider-block div.slider-content div.slider-control{left:2%;right:auto}@media only screen and (max-width:720px){.rtl section.slider-block div.slider-content div.slider-control{left:0}}.rtl .main-container-wrapper .product-card .sticker{left:auto;right:20px}.rtl .main-container-wrapper .product-card .cart-wish-wrap .addtocart{margin-right:0;margin-left:10px}.rtl section.product-detail div.layouter .form-container div.product-image-group{margin-right:0;margin-left:30px}.rtl section.product-detail div.layouter .form-container div.product-image-group .add-to-buttons{float:left!important}.rtl section.product-detail div.layouter .form-container div .thumb-list{margin-left:4px;margin-right:0}.rtl section.product-detail div.layouter .form-container .details .accordian .accordian-header{padding:20px 0 20px 15px}.rtl section.product-detail div.layouter .form-container .details .accordian .accordian-header .icon{float:left}.rtl section.product-detail div.layouter .form-container .details .accordian .accordian-header .expand-icon{margin-left:10px}.rtl section.product-detail div.layouter .form-container .details .full-specifications td:first-child{padding-right:0;padding-left:40px}.rtl section.product-detail div.layouter .form-container .details .product-ratings .total-reviews{margin-left:0;margin-right:15px}@media only screen and (max-width:720px){.rtl section.product-detail div.layouter .form-container div.product-image-group{margin-right:0;margin-left:0}}.rtl .main .category-container .layered-filter-wrapper,.rtl .main .category-container .responsive-layred-filter{padding-right:0;padding-left:20px}.rtl .main .top-toolbar .pager{float:left}.rtl .main .top-toolbar .pager .view-mode{margin-right:0;margin-left:20px}.rtl .main .top-toolbar .pager .sorter{margin-right:0;margin-left:10px}.rtl .main .top-toolbar .pager label{margin-right:0;margin-left:5px}.rtl .main .top-toolbar .page-info{float:right}.rtl section.review .review-layouter .review-form{margin-left:0;margin-right:20px}.rtl section.review .review-layouter .review-form .heading .right{float:left}.rtl section.review .review-layouter .review-form .ratings-reviews .right-side .rater .star-name{margin-right:0;margin-left:5px}@media only screen and (max-width:770px){.rtl section.review .review-layouter .review-form{margin-right:0}}.rtl section.cart .cart-content .left-side{width:70%;float:right}.rtl section.cart .cart-content .left-side .misc-controls a.link{margin-left:15px;margin-right:0}.rtl section.cart .cart-content .right-side{width:30%;padding-right:40px;padding-left:0}.rtl .order-summary .item-detail label.right,.rtl .payble-amount label.right{float:left}.rtl .item div{margin-left:15px;margin-right:0!important}.rtl .cart-item-list .item .item-details .misc div.qty-text{margin-right:0;margin-left:10px}.rtl .cart-item-list .item .item-details .misc .remove,.rtl .cart-item-list .item .item-details .misc input.box{margin-right:0;margin-left:30px}.rtl .cart-item-list .item .item-details .misc .control-group label{margin-left:15px;margin-right:0}@media only screen and (max-width:770px){.rtl section.cart .cart-content .left-side{width:100%;float:none}.rtl section.cart .cart-content .left-side .misc-controls div button{margin-right:0}.rtl section.cart .cart-content .right-side{width:100%;padding-right:0}}.rtl .checkout-process .col-right{padding-left:0;padding-right:40px}.rtl .checkout-process .col-main{padding-left:40px;padding-right:0}.rtl .checkout-process .col-main ul.checkout-steps li span{margin-right:7px;margin-left:0}.rtl .checkout-process .col-main .step-content .form-header h1{float:right}.rtl .checkout-process .col-main .step-content .form-header .btn{float:left}.rtl .checkout-process .col-main .step-content .payment-methods .control-info{margin-right:28px;margin-left:0}.rtl .checkout-process .col-main .step-content .address .billing-address,.rtl .checkout-process .col-main .step-content .address .pull-left,.rtl .checkout-process .col-main .step-content .order-description .billing-address,.rtl .checkout-process .col-main .step-content .order-description .pull-left{float:right!important}.rtl .checkout-process .col-main .step-content .address .pull-right,.rtl .checkout-process .col-main .step-content .address .shipping-address,.rtl .checkout-process .col-main .step-content .order-description .pull-right,.rtl .checkout-process .col-main .step-content .order-description .shipping-address{float:left!important}.rtl .checkbox,.rtl .radio{margin:10px 0 5px 5px}.rtl .radio .radio-view{margin-left:5px;margin-right:0}.rtl .radio input{right:0;left:auto}@media only screen and (max-width:770px){.rtl .checkout-process .col-main{padding-left:0}}.rtl .account-content .account-layout{margin-left:0;margin-right:40px}.rtl .account-content .menu-block .menubar li{margin-left:0;margin-right:5%}.rtl .account-content .menu-block .menubar li a{text-align:right}.rtl .account-content .menu-block .menubar li .icon{right:unset;left:12px;-webkit-transform:rotate(180deg);transform:rotate(180deg)}.rtl .account-head .account-action{float:left}.rtl .account-item-card .media-info .info{margin-right:20px;margin-left:0}.rtl .account-item-card .operations a span{float:left}.rtl .table table{text-align:right}.rtl .sale-container .totals .sale-summary{float:left}.rtl .sale-container .sale-section .section-content .order-box-container{display:-webkit-box;display:-ms-flexbox;display:flex}@media (max-width:770px){.rtl .account-content .account-layout{margin-right:0}.rtl .account-content .account-layout .account-head .account-action{margin-left:0}.rtl .account-content .sidebar .menu-block .menu-block-title .right{float:left}.rtl .account-content .sidebar .menu-block .menubar>li{margin-right:0}}.rtl .footer .footer-content .footer-list-container .list-container .list-group li span.icon{margin-left:5px;margin-right:0}@media (max-width:720px){.rtl .footer{padding-right:15px;padding-left:10%}.rtl .footer .footer-list-container{padding-right:0!important}}.rtl .cp-spinner{position:absolute;right:calc(50% - 24px);margin-top:calc(40% - 24px)}@media only screen and (max-width:720px){.rtl .cp-spinner{right:50%;margin-right:-24px;left:auto}}.rtl .product-list .product-card .product-information{padding-left:0;padding-right:30px;float:left}.rtl .zoom-image-direction{left:0;right:476px!important}.banner-container{width:100%;float:left;padding:0 18px;margin-bottom:40px}.banner-container .left-banner{padding-right:20px;width:60%;float:left}.banner-container .left-banner img{width:100%}.banner-container .right-banner{padding-left:20px;width:40%;float:left}.banner-container .right-banner img{width:100%}.banner-container .right-banner img:first-child{padding-bottom:20px;height:50%;display:block}.banner-container .right-banner img:last-child{padding-top:20px;height:50%;display:block}@media (max-width:720px){.banner-container .left-banner{padding-right:0;width:100%}.banner-container .right-banner{padding-left:0;width:100%}.banner-container .right-banner img:first-child{padding-bottom:0;padding-top:25px}.banner-container .right-banner img:last-child{padding-top:25px}} \ No newline at end of file +@import url(https://fonts.googleapis.com/css?family=Montserrat:400,500);.icon{display:inline-block;background-size:cover}.dropdown-right-icon{background-image:URL("../images/icon-dropdown-left.svg");width:8px;height:8px;margin-left:auto;margin-bottom:2px}.icon-menu-close{background-image:URL("../images/icon-menu-close.svg");width:24px;height:24px;margin-left:auto}.icon-menu-close-adj{background-image:URL("../images/cross-icon-adj.svg");margin-left:auto}.grid-view-icon{background-image:URL("../images/icon-grid-view.svg");width:24px;height:24px}.list-view-icon{background-image:URL("../images/icon-list-view.svg");width:24px;height:24px}.sort-icon{background-image:URL("../images/icon-sort.svg");width:32px;height:32px}.filter-icon{background-image:URL("../images/icon-filter.svg");width:32px;height:32px}.whishlist-icon{background-image:URL("../images/wishlist.svg");width:24px;height:24px}.share-icon{background-image:URL("../images/icon-share.svg");width:24px;height:24px}.icon-menu{background-image:URL("../images/icon-menu.svg");width:24px;height:24px}.icon-search{background-image:URL("../images/icon-search.svg");width:24px;height:24px}.icon-menu-back{background-image:URL("../images/icon-menu-back.svg");width:24px;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}.cart-icon{background-image:url("../images/icon-cart.svg");width:24px;height:24px}.wishlist-icon{background-image:url("../images/wishlist.svg");width:32px;height:32px}.icon-arrow-up{background-image:url("../images/arrow-up.svg");width:16px;height:16px}.icon-arrow-down{background-image:url("../images/arrow-down.svg");width:16px;height:16px}.expand-icon{background-image:url("../images/Expand-Light.svg");width:18px;height:18px}.expand-on-icon{background-image:url("../images/Expand-Light-On.svg");width:18px;height:18px}.icon-menu-close-adj{background-image:url("../images/cross-icon-adj.svg");width:32px;height:32px}.icon-facebook{background-image:url("../images/facebook.svg")}.icon-twitter{background-image:url("../images/twitter.svg")}.icon-google-plus{background-image:url("../images/google-plus.svg")}.icon-instagram{background-image:url("../images/instagram.svg")}.icon-linkedin{background-image:url("../images/linkedin.svg")}.icon-dropdown{background-image:url("../images/icon-dropdown.svg")}@-webkit-keyframes spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}@keyframes spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}body{margin:0;padding:0;font-weight:500;max-width:100%;width:auto;color:#242424;font-size:16px}*{font-family:Montserrat,sans-serif}::-webkit-input-placeholder{font-family:Montserrat,sans-serif}textarea{resize:none}input{font-family:Montserrat,sans-serif}.btn{border-radius:0!important}.mb-10{margin-bottom:10px}.mb-15{margin-bottom:15px}.mb-20{margin-bottom:20px}.mb-25{margin-bottom:25px}.mb-30{margin-bottom:30px}.mb-35{margin-bottom:35px}.mb-40{margin-bottom:40px}.mb-45{margin-bottom:45px}.mb-50{margin-bottom:50px}.mb-60{margin-bottom:60px}.mb-70{margin-bottom:70px}.mb-80{margin-bottom:80px}.mb-90{margin-bottom:90px}.mt-5{margin-top:5px}.mt-10{margin-top:10px}.mt-15{margin-top:15px}.mt-20{margin-top:20px}.mt-25{margin-top:25px}.mt-30{margin-top:30px}.mt-35{margin-top:35px}.mt-40{margin-top:40px}.mt-45{margin-top:45px}.mt-50{margin-top:50px}.mt-60{margin-top:60px}.mt-70{margin-top:70px}.mt-80{margin-top:80px}.mt-90{margin-top:90px}.pagination.shop{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-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.bold{font-weight:700;color:#3a3a3a}.radio-container{display:block;position:relative;padding-left:35px;margin-bottom:12px;cursor:pointer;font-size:16px;user-select:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none}.radio-container input{position:absolute;opacity:0;cursor:pointer;top:0;left:0}.radio-container .checkmark{position:absolute;top:0;left:0;height:16px;width:16px;background-color:#fff;border:2px solid #ff6472;border-radius:50%}.radio-container .checkmark:after{content:"";position:absolute;display:none;top:2px;left:2px;width:8px;height:8px;border-radius:50%;background:#ff6472}.radio-container input:checked~.checkmark:after{display:block}.radio-container input:disabled~.checkmark{display:block;border:2px solid rgba(255,100,113,.4)}.cp-spinner{width:48px;height:48px;display:inline-block;-webkit-box-sizing:border-box;box-sizing:border-box}.cp-round:before{border-radius:50%;border:6px solid #bababa}.cp-round:after,.cp-round:before{content:" ";width:48px;height:48px;display:inline-block;-webkit-box-sizing:border-box;box-sizing:border-box;position:absolute;top:0;left:0}.cp-round:after{border-radius:50%;border-top:6px solid #0031f0;border-right:6px solid transparent;border-bottom:6px solid transparent;border-left:6px solid transparent;-webkit-animation:spin 1s ease-in-out infinite;animation:spin 1s ease-in-out infinite}.pull-right{float:right}.add-to-wishlist .wishlist-icon:hover{background-image:url("../images/wishlist-added.svg")}.product-price{margin-bottom:14px;width:100%;font-weight:600}.product-price .price-label{font-size:14px;font-weight:400}.product-price .regular-price{color:#a5a5a5;text-decoration:line-through;margin-right:10px}.product-price .special-price{color:#ff6472}.horizontal-rule{display:block;width:100%;height:1px;background:#c7c7c7}.account-head .account-heading{font-size:28px;color:#242424;text-transform:capitalize;text-align:left}.account-head .account-action{font-size:17px;margin-top:1%;color:#0031f0;float:right}.account-head .horizontal-rule{margin-top:1.1%;width:100%;height:1px;vertical-align:middle;background:#c7c7c7}.account-item-card{-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;-webkit-box-align:center;-ms-flex-align:center;align-items:center;width:100%;height:125px}.account-item-card,.account-item-card .media-info{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row}.account-item-card .media-info .media{height:125px;width:110px}.account-item-card .media-info .info{margin-left:20px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-pack:space-evenly;-ms-flex-pack:space-evenly;justify-content:space-evenly}.account-item-card .media-info .info .stars .icon{height:16px;width:16px}.account-item-card .operations{height:120px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.account-item-card .operations a{width:100%}.account-item-card .operations a span{float:right}.account-items-list{display:block;width:100%}.account-items-list .grid-container{margin-top:40px}.search-result-status{width:100%;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.grid-container{margin-top:20px}.main-container-wrapper{max-width:1300px;width:auto;padding-left:15px;padding-right:15px;margin-left:auto;margin-right:auto}.main-container-wrapper .content-container{display:block;margin-bottom:40px}.main-container-wrapper .product-grid-4{display:grid;grid-template-columns:repeat(auto-fill,minmax(235px,1fr));grid-auto-rows:auto;grid-column-gap:30px;grid-row-gap:15px;justify-items:end}.main-container-wrapper .product-grid-3{display:grid;grid-template-columns:repeat(auto-fill,minmax(235px,1fr));grid-gap:27px;grid-auto-rows:auto;justify-items:center}.main-container-wrapper .product-card{position:relative;padding:15px}.main-container-wrapper .product-card .product-image{max-height:350px;max-width:280px;margin-bottom:10px;background:#f2f2f2}.main-container-wrapper .product-card .product-image img{display:block;width:100%}.main-container-wrapper .product-card .product-name{margin-bottom:14px;width:100%;color:#242424}.main-container-wrapper .product-card .product-name a{color:#242424}.main-container-wrapper .product-card .product-description{display:none}.main-container-wrapper .product-card .product-ratings{width:100%}.main-container-wrapper .product-card .product-ratings .icon{width:16px;height:16px}.main-container-wrapper .product-card .cart-wish-wrap{display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start;-webkit-box-align:center;-ms-flex-align:center;align-items:center;height:40px}.main-container-wrapper .product-card .cart-wish-wrap .addtocart{margin-right:10px;text-transform:uppercase;text-align:left;-webkit-box-shadow:1px 1px 0 #ccc;box-shadow:1px 1px 0 #ccc}.main-container-wrapper .product-card .cart-wish-wrap .add-to-wishlist{margin-top:5px;background:transparent;border:0;cursor:pointer;padding:0}.main-container-wrapper .product-card .sticker{border-radius:100px;position:absolute;top:20px;left:20px;text-transform:uppercase;padding:4px 13px;font-size:14px;color:#fff;-webkit-box-shadow:1px 1px 1px #ccc;box-shadow:1px 1px 1px #ccc}.main-container-wrapper .product-card .sticker.sale{background:#ff6472}.main-container-wrapper .product-card .sticker.new{background:#2ed04c}.main-container-wrapper .product-card:hover{outline:1px solid #eaeaec;box-shadow:0 1px 2px rgba(0,0,0,.05);-webkit-box-shadow:0 2px 16px 4px rgba(40,44,63,.07);box-shadow:0 2px 16px 4px rgba(40,44,63,.07)}@media only screen and (max-width:580px){.main-container-wrapper .main-container-wrapper{padding:0}}@media only screen and (max-width:551px){.main-container-wrapper .product-grid-3{grid-template-columns:48.5% 48.5%;grid-column-gap:20px}}@media only screen and (max-width:854px){.main-container-wrapper .product-grid-4{grid-template-columns:29.5% 29.5% 29.5%;grid-column-gap:35px}}@media only screen and (max-width:653px){.main-container-wrapper .product-grid-4{grid-template-columns:48.5% 48.5%;grid-column-gap:17px}}@media only screen and (max-width:425px){.main-container-wrapper .product-card{font-size:90%}.main-container-wrapper .product-card .btn.btn-md{padding:5px}.main-container-wrapper .product-grid-4{grid-template-columns:48.5% 48.5%;grid-column-gap:10px}}.main-container-wrapper .product-list{min-height:200px}.main-container-wrapper .product-list .product-card{width:100%;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-align:center;-ms-flex-align:center;align-items:center;margin-bottom:20px}.main-container-wrapper .product-list .product-card .product-image{float:left;width:30%;height:350px}.main-container-wrapper .product-list .product-card .product-image img{height:100%}.main-container-wrapper .product-list .product-card .product-information{float:right;width:70%;padding-left:30px}.main-container-wrapper .product-list .product-card:last-child{margin-bottom:0}.main-container-wrapper .product-list.empty h2{font-size:20px}.main-container-wrapper section.featured-products{display:block;margin-bottom:5%}.main-container-wrapper section.featured-products .featured-heading{width:100%;text-align:center;text-transform:uppercase;font-size:18px;margin-bottom:20px}.main-container-wrapper section.featured-products .featured-heading .featured-separator{color:#d3d3d3}.main-container-wrapper section.news-update{display:block;-webkit-box-sizing:border-box;box-sizing:border-box;width:100%;margin-bottom:5%}.main-container-wrapper section.news-update .news-update-grid{display:grid;grid-template-columns:58.5% 40%;grid-gap:20px}.main-container-wrapper section.news-update .news-update-grid .block1{display:block;-webkit-box-sizing:border-box;box-sizing:border-box}.main-container-wrapper section.news-update .news-update-grid .block1 img{display:-webkit-box;display:-ms-flexbox;display:flex;height:100%;width:100%}.main-container-wrapper section.news-update .news-update-grid .block2{display:block;-webkit-box-sizing:border-box;box-sizing:border-box;display:grid;grid-template-rows:repeat(2,minmax(50%,1fr));grid-row-gap:20px}.main-container-wrapper section.news-update .news-update-grid .block2 .sub-block1{display:block;-webkit-box-sizing:border-box;box-sizing:border-box}.main-container-wrapper section.news-update .news-update-grid .block2 .sub-block1 img{width:100%}.main-container-wrapper section.news-update .news-update-grid .block2 .sub-block2{display:block;-webkit-box-sizing:border-box;box-sizing:border-box}.main-container-wrapper section.news-update .news-update-grid .block2 .sub-block2 img{width:100%}section.slider-block{display:block;margin-left:auto;margin-right:auto;margin-bottom:5%}section.slider-block div.slider-content{position:relative;height:500px;margin-left:auto;margin-right:auto}section.slider-block div.slider-content ul.slider-images .show-content{display:none}section.slider-block div.slider-content ul.slider-images li{position:absolute;visibility:hidden}section.slider-block div.slider-content ul.slider-images li.show{display:block;position:relative;visibility:visible;width:100%;-webkit-animation-name:example;animation-name:example;-webkit-animation-duration:4s;animation-duration:4s}section.slider-block div.slider-content ul.slider-images li.show .show-content{display:-webkit-box;display:-ms-flexbox;display:flex;position:absolute;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;color:#242424;height:100%;width:100%;top:0}@-webkit-keyframes example{0%{opacity:.1}to{opacity:1}}@keyframes example{0%{opacity:.1}to{opacity:1}}section.slider-block div.slider-content ul.slider-images li img{height:500px;width:100%}section.slider-block div.slider-content div.slider-control{display:block;cursor:pointer;position:absolute;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;bottom:2%;right:2%}section.slider-block div.slider-content div.slider-control .dark-left-icon{background-color:#f2f2f2;height:48px;width:48px;max-height:100%;max-width:100%}section.slider-block div.slider-content div.slider-control .light-right-icon{background-color:#242424;height:48px;width:48px;max-height:100%;max-width:100%}@media only screen and (max-width:770px){section.slider-block div.slider-content div.slider-control{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;bottom:46%;right:0;width:100%}}.header{margin-top:16px;margin-bottom:21px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.header .header-top{margin-bottom:16px;max-width:100%;width:auto;margin-left:auto;margin-right:auto;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between}.header .header-top,.header .header-top div.left-content{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.header .header-top div.left-content{-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start}.header .header-top div.left-content ul.logo-container{margin-right:12px}.header .header-top div.left-content ul.logo-container li{display:-webkit-box;display:-ms-flexbox;display:flex}.header .header-top div.left-content ul.logo-container li img{max-width:120px;max-height:40px}.header .header-top div.left-content ul.search-container li.search-group{display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.header .header-top div.left-content ul.search-container li.search-group .search-field{height:38px;border:2px solid #c7c7c7;border-radius:3px;border-right:none;border-top-right-radius:0;border-bottom-right-radius:0;padding-left:12px;font-size:14px}.header .header-top div.left-content ul.search-container li.search-group .search-icon-wrapper{-webkit-box-sizing:border-box;box-sizing:border-box;height:38px;width:38px;border:2px solid #c7c7c7;border-top-right-radius:3px;border-bottom-right-radius:3px}.header .header-top div.left-content ul.search-container li.search-group .search-icon-wrapper button{background:#fff;border:0;padding:3px 5px}.header .header-top div.right-content .right-content-menu>li{display:inline-block;border-right:2px solid #c7c7c7;padding:0 15px;min-height:15px;padding-top:3px}.header .header-top div.right-content .right-content-menu>li:first-child{padding-left:0}.header .header-top div.right-content .right-content-menu>li:last-child{border-right:0;padding-right:0}.header .header-top div.right-content .right-content-menu>li .icon{vertical-align:middle}.header .header-top div.right-content .right-content-menu>li .icon:not(.arrow-down-icon){margin-right:5px}.header .header-top div.right-content .right-content-menu>li .arrow-down-icon{width:12px;height:6px}.header .header-top div.right-content .right-content-menu .cart-dropdown-container{border-right:0;padding-right:0}.header .header-top div.right-content .right-content-menu .cart-link{pointer-events:none}.header .header-top div.right-content .right-content-menu ul.dropdown-list{display:none;margin-top:14px}.header .header-top div.right-content .right-content-menu ul.dropdown-list li{border-right:none;padding:5px 10px;display:block}.header .header-top div.right-content .right-content-menu ul.dropdown-list li a{color:#333}.header .header-top div.right-content .right-content-menu .currency{position:absolute;right:0;width:100px}.header .header-top div.right-content .right-content-menu .account{position:absolute;right:0}.header .header-top div.right-content .right-content-menu .account li{padding:20px!important}.header .header-top div.right-content .right-content-menu .account li ul{margin-top:5px}.header .header-top div.right-content .right-content-menu .account li ul>li{padding:5px 10px 5px 0!important}.header .header-top div.right-content .right-content-menu .guest{width:300px}.header .header-top div.right-content .right-content-menu .guest .btn.btn-sm{padding:9px 25px}.header .header-top div.right-content .right-content-menu .cart-dropdown-container .dropdown-list{width:387px}.header .header-top div.right-content .right-content-menu .cart-dropdown-container .dropdown-list .dropdown-container{padding:0}.header .header-top div.right-content .right-content-menu .cart-dropdown-container .dropdown-list .dropdown-container .dropdown-cart{color:#242424}.header .header-top div.right-content .right-content-menu .cart-dropdown-container .dropdown-list .dropdown-container .dropdown-cart>.dropdown-header{width:100%;padding:8px 16px;border-bottom:1px solid #c7c7c7}.header .header-top div.right-content .right-content-menu .cart-dropdown-container .dropdown-list .dropdown-container .dropdown-cart>.dropdown-header p{display:inline;line-height:25px}.header .header-top div.right-content .right-content-menu .cart-dropdown-container .dropdown-list .dropdown-container .dropdown-cart>.dropdown-header i{float:right;height:22px;width:22px}.header .header-top div.right-content .right-content-menu .cart-dropdown-container .dropdown-list .dropdown-container .dropdown-cart>.dropdown-header p.heading{font-weight:lighter}.header .header-top div.right-content .right-content-menu .cart-dropdown-container .dropdown-list .dropdown-container .dropdown-content{padding-top:8px;margin-bottom:55px;width:100%;max-height:329px;overflow-y:auto}.header .header-top div.right-content .right-content-menu .cart-dropdown-container .dropdown-list .dropdown-container .dropdown-content .item{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;border-bottom:1px solid #c7c7c7;padding:8px 16px}.header .header-top div.right-content .right-content-menu .cart-dropdown-container .dropdown-list .dropdown-container .dropdown-content .item img{height:75px;width:75px;margin-right:8px}.header .header-top div.right-content .right-content-menu .cart-dropdown-container .dropdown-list .dropdown-container .dropdown-content .item-details{height:auto}.header .header-top div.right-content .right-content-menu .cart-dropdown-container .dropdown-list .dropdown-container .item-details .item-name{font-size:16px;font-weight:700;margin-bottom:8px}.header .header-top div.right-content .right-content-menu .cart-dropdown-container .dropdown-list .dropdown-container .item-details .item-options{font-size:16px;margin-bottom:8px}.header .header-top div.right-content .right-content-menu .cart-dropdown-container .dropdown-list .dropdown-container .item-details .item-price{margin-bottom:8px}.header .header-top div.right-content .right-content-menu .cart-dropdown-container .dropdown-list .dropdown-container .item-details .item-qty{font-weight:lighter;margin-bottom:8px}.header .header-top div.right-content .right-content-menu .cart-dropdown-container .dropdown-list .dropdown-container .dropdown-footer{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;-webkit-box-align:center;-ms-flex-align:center;align-items:center;padding:8px 16px;position:absolute;bottom:0;width:100%;background:#fff;border-top:1px solid #c7c7c7}.header .header-top div.right-content .right-content-menu .cart-dropdown-container .dropdown-list .dropdown-container .dropdown-footer .btn{margin:0;max-width:170px;text-align:center}.header .header-top div.right-content .menu-box,.header .header-top div.right-content .search-box{display:none}.header .header-bottom{height:47px;margin-left:auto;margin-right:auto;border-top:1px solid #c7c7c7;border-bottom:1px solid #c7c7c7;display:block}.header .header-bottom ul.nav{display:block;font-size:16px;max-width:100%;width:auto;margin-left:auto;margin-right:auto}.header .header-bottom .nav ul{margin:0;padding:0;-webkit-box-shadow:1px 1px 1px 0 rgba(0,0,0,.4);box-shadow:1px 1px 1px 0 rgba(0,0,0,.4)}.header .header-bottom .nav a{display:block;color:#242424;text-decoration:none;padding:.8em .3em .8em .5em;text-transform:capitalize;letter-spacing:-.38px;position:relative}.header .header-bottom .nav li>.icon{display:none}.header .header-bottom .nav{vertical-align:top;display:inline-block}.header .header-bottom .nav li{position:relative}.header .header-bottom .nav>li{float:left;margin-right:1px;height:45px}.header .header-bottom .nav>li>a{margin-bottom:1px}.header .header-bottom .nav>li>a .icon{display:none}.header .header-bottom .nav li li a{margin-top:1px;white-space:normal;word-break:break-word;width:200px}.header .header-bottom .nav li a:first-child:nth-last-child(2):before{content:"";position:absolute;height:0;width:0;border:5px solid transparent;top:50%;right:5px}.header .header-bottom .nav ul{position:absolute;white-space:nowrap;border:1px solid #c7c7c7;background-color:#fff;z-index:10000;left:-99999em}.header .header-bottom .nav>li:hover{background-color:#f2f2f2}.header .header-bottom .nav>li:hover>ul{left:auto;min-width:100%}.header .header-bottom .nav>li li:hover{background-color:#f2f2f2}.header .header-bottom .nav>li li:hover>ul{left:100%;margin-left:1px;top:-2px}.header .header-bottom .nav>li:hover>a:first-child:nth-last-child(2):before,.header .header-bottom .nav li li>a:first-child:nth-last-child(2):before{margin-top:-5px}.header .header-bottom .nav li li:hover>a:first-child:nth-last-child(2):before{right:10px}.header .search-responsive{display:none}.header .search-responsive .search-content{border-bottom:1px solid #c7c7c7;border-top:1px solid #c7c7c7;height:50px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between}.header .search-responsive .search-content .search{width:80%;border:none;font-size:16px}.header .search-responsive .search-content .right{float:right}@media (max-width:720px){.header .currency-switcher{display:none!important}.header .header-top div.right-content{display:inherit}.header .header-top div.right-content .menu-box{display:inline-block;margin-left:10px}.header .header-top div.right-content .search-box{display:inline-block;margin-right:10px}.header .header-top div.right-content .right-content-menu>li{border-right:none;padding:0 2px}.header .header-top div.right-content .right-content-menu>li .icon:not(.arrow-down-icon){margin-right:0}.header .header-top div.right-content .right-content-menu .cart-link{pointer-events:all}.header .header-top div.right-content .right-content-menu .arrow-down-icon,.header .header-top div.right-content .right-content-menu .cart-dropdown-container .dropdown-container,.header .header-top div.right-content .right-content-menu .name{display:none}.header .header-bottom{height:auto;display:none}.header .header-bottom .nav a{display:inline-block}.header .header-bottom .nav li,.header .header-bottom ul.nav{height:auto}.header .header-bottom .nav>li{float:none}.header .header-bottom .nav li>.icon{float:right;display:block}.header .header-bottom .icon.icon-arrow-down{margin-right:5px}.header .header-bottom .nav li .left{height:16px;width:16px}.header .header-bottom .nav li a>.icon{display:none}.header .header-bottom .nav ul{position:unset;border:none;-webkit-box-shadow:none;box-shadow:none}.header .header-bottom .nav>li li:hover>ul{margin-left:0;top:0}ul.account-dropdown-container,ul.cart-dropdown-container,ul.search-container{display:none!important}}@media (max-width:400px){.header .header-top div.right-content .right-content-menu .guest{width:240px}.header .header-top div.right-content .right-content-menu .guest .btn.btn-sm{padding:7px 14px}}.footer{background-color:#f2f2f2;padding-left:10%;padding-right:10%;width:100%;display:inline-block}.footer .footer-content .footer-list-container{display:grid;padding:40px 10px;grid-template-columns:repeat(auto-fit,minmax(250px,1fr));grid-auto-rows:auto;grid-row-gap:1vh}.footer .footer-content .footer-list-container .list-container .list-heading{text-transform:uppercase;color:#a5a5a5}.footer .footer-content .footer-list-container .list-container .list-group{padding-top:25px}.footer .footer-content .footer-list-container .list-container .list-group a{color:#242424}.footer .footer-content .footer-list-container .list-container .list-group li{margin-bottom:12px;list-style-type:none;text-transform:uppercase}.footer .footer-content .footer-list-container .list-container .list-group li span.icon{display:inline-block;vertical-align:middle;margin-right:5px;height:24px;width:24px}.footer .footer-content .footer-list-container .list-container .form-container{padding-top:5px}.footer .footer-content .footer-list-container .list-container .form-container .control-group .subscribe-field{width:100%}.footer .footer-content .footer-list-container .list-container .form-container .control-group .btn-primary{background-color:#242424;margin-top:8px;border-radius:0;text-align:center}.footer .footer-content .footer-list-container .list-container .form-container .control-group .locale-switcher{width:100%}.footer .footer-content .footer-list-container .list-container .currency{display:none}@media (max-width:720px){.footer{padding-left:15px}.footer .footer-list-container{padding-left:0!important}.footer .currency{display:block!important}}.footer-bottom{width:100%;height:70px;font-size:16px;color:#a5a5a5;letter-spacing:-.26px;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:center;-ms-flex-pack:center;justify-content:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.footer-bottom p{padding:0 15px}.main .category-container{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;width:100%}.main .category-container .layered-filter-wrapper,.main .category-container .responsive-layred-filter{width:25%;float:left;padding-right:20px;min-height:1px}.main .category-container .layered-filter-wrapper .filter-title,.main .category-container .responsive-layred-filter .filter-title{border-bottom:1px solid #c7c7c7;color:#242424;padding:10px 0}.main .category-container .layered-filter-wrapper .filter-attributes .filter-attributes-item,.main .category-container .responsive-layred-filter .filter-attributes .filter-attributes-item{border-bottom:1px solid #c7c7c7;padding-bottom:10px}.main .category-container .layered-filter-wrapper .filter-attributes .filter-attributes-item .filter-attributes-title,.main .category-container .responsive-layred-filter .filter-attributes .filter-attributes-item .filter-attributes-title{padding:10px 40px 0 10px;color:#5e5e5e;cursor:pointer;position:relative}.main .category-container .layered-filter-wrapper .filter-attributes .filter-attributes-item .filter-attributes-title .remove-filter-link,.main .category-container .responsive-layred-filter .filter-attributes .filter-attributes-item .filter-attributes-title .remove-filter-link{font-weight:400;color:#0031f0;margin-right:10px}.main .category-container .layered-filter-wrapper .filter-attributes .filter-attributes-item .filter-attributes-title .icon,.main .category-container .responsive-layred-filter .filter-attributes .filter-attributes-item .filter-attributes-title .icon{background-image:url("../images/icon-dropdown.svg")!important;width:10px;height:10px;position:absolute;right:15px;top:14px}.main .category-container .layered-filter-wrapper .filter-attributes .filter-attributes-item .filter-attributes-content,.main .category-container .responsive-layred-filter .filter-attributes .filter-attributes-item .filter-attributes-content{padding:10px;display:none}.main .category-container .layered-filter-wrapper .filter-attributes .filter-attributes-item .filter-attributes-content ol.items,.main .category-container .responsive-layred-filter .filter-attributes .filter-attributes-item .filter-attributes-content ol.items{padding:0;margin:0;list-style:none none}.main .category-container .layered-filter-wrapper .filter-attributes .filter-attributes-item .filter-attributes-content ol.items li.item,.main .category-container .responsive-layred-filter .filter-attributes .filter-attributes-item .filter-attributes-content ol.items li.item{padding:8px 0;color:#5e5e5e}.main .category-container .layered-filter-wrapper .filter-attributes .filter-attributes-item .filter-attributes-content ol.items li.item .checkbox,.main .category-container .responsive-layred-filter .filter-attributes .filter-attributes-item .filter-attributes-content ol.items li.item .checkbox{margin:0}.main .category-container .layered-filter-wrapper .filter-attributes .filter-attributes-item .filter-attributes-content ol.items li.item .checkbox .checkbox-view,.main .category-container .responsive-layred-filter .filter-attributes .filter-attributes-item .filter-attributes-content ol.items li.item .checkbox .checkbox-view{height:16px;width:16px;background-image:url("../images/checkbox.svg")}.main .category-container .layered-filter-wrapper .filter-attributes .filter-attributes-item .filter-attributes-content ol.items li.item .checkbox input:checked+.checkbox-view,.main .category-container .responsive-layred-filter .filter-attributes .filter-attributes-item .filter-attributes-content ol.items li.item .checkbox input:checked+.checkbox-view{background-image:url("../images/checkbox-checked.svg")}.main .category-container .layered-filter-wrapper .filter-attributes .filter-attributes-item .filter-attributes-content ol.items li.item .color-swatch,.main .category-container .responsive-layred-filter .filter-attributes .filter-attributes-item .filter-attributes-content ol.items li.item .color-swatch{display:inline-block;margin-right:5px;min-width:20px;height:20px;border:1px solid #c7c7c7;border-radius:3px;float:right}.main .category-container .layered-filter-wrapper .filter-attributes .filter-attributes-item .filter-attributes-content .price-range-wrapper,.main .category-container .responsive-layred-filter .filter-attributes .filter-attributes-item .filter-attributes-content .price-range-wrapper{margin-top:21px}.main .category-container .layered-filter-wrapper .filter-attributes .filter-attributes-item.active .filter-attributes-content,.main .category-container .responsive-layred-filter .filter-attributes .filter-attributes-item.active .filter-attributes-content{display:block}.main .category-container .layered-filter-wrapper .filter-attributes .filter-attributes-item.active .filter-attributes-title .icon,.main .category-container .responsive-layred-filter .filter-attributes .filter-attributes-item.active .filter-attributes-title .icon{background-image:url("../images//arrow-up.svg")!important}.main .category-container .responsive-layred-filter{display:none;width:100%;float:none;padding-right:0;margin-top:-25px!important}.main .category-container .category-block{width:80%;display:block}.main .category-container .category-block .hero-image{display:inline-block;visibility:visible;width:100%}.main .category-container .category-block .hero-image img{height:400px;width:100%}.main .top-toolbar{width:100%;display:inline-block}.main .top-toolbar .page-info{float:left;color:#242424;line-height:45px}.main .top-toolbar .page-info span{display:none}.main .top-toolbar .page-info span:first-child{display:inline}.main .top-toolbar .pager{float:right}.main .top-toolbar .pager label{margin-right:5px}.main .top-toolbar .pager select{background:#f2f2f2;border:1px solid #c7c7c7;border-radius:3px;color:#242424;padding:10px}.main .top-toolbar .pager .view-mode{display:inline-block;margin-right:20px}.main .top-toolbar .pager .view-mode a,.main .top-toolbar .pager .view-mode span{display:inline-block;vertical-align:middle}.main .top-toolbar .pager .view-mode a.grid-view,.main .top-toolbar .pager .view-mode span.grid-view{margin-right:10px}.main .top-toolbar .pager .view-mode .sort-filter{display:none}.main .top-toolbar .pager .sorter{display:inline-block;margin-right:10px}.main .top-toolbar .pager .limiter{display:inline-block}.main .bottom-toolbar{display:block;margin-top:40px;margin-bottom:40px;text-align:center}@media only screen and (max-width:840px){.main .category-container .responsive-layred-filter,.main .layered-filter-wrapper{display:none}.main .category-block{width:100%!important}.main .category-block .top-toolbar{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.main .category-block .top-toolbar .page-info{border-bottom:1px solid #c7c7c7;line-height:15px;margin-top:10px}.main .category-block .top-toolbar .page-info span{display:inline}.main .category-block .top-toolbar .page-info span:first-child{display:none}.main .category-block .top-toolbar .page-info .sort-filter{float:right;cursor:pointer}.main .category-block .top-toolbar .pager{margin-top:20px;display:none}.main .category-block .top-toolbar .pager .view-mode{display:none}.main .category-block .responsive-layred-filter{display:block}}section.product-detail{color:#242424}section.product-detail div.category-breadcrumbs{display:inline}section.product-detail div.layouter{display:block;margin-top:20px;margin-bottom:20px}section.product-detail div.layouter .form-container{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;width:100%}section.product-detail div.layouter .form-container div.product-image-group{margin-right:30px;width:604px;height:650px;max-width:604px;position:-webkit-sticky;position:sticky;top:10px}section.product-detail div.layouter .form-container div.product-image-group div{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;cursor:pointer}section.product-detail div.layouter .form-container div.product-image-group div .thumb-list{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;margin-right:4px;min-width:120px;overflow:hidden;position:relative;-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start;max-height:480px}section.product-detail div.layouter .form-container div.product-image-group div .thumb-list .thumb-frame{border:2px solid transparent;background:#f2f2f2;width:120px;max-height:120px}section.product-detail div.layouter .form-container div.product-image-group div .thumb-list .thumb-frame.active{border-color:#0031f0}section.product-detail div.layouter .form-container div.product-image-group div .thumb-list .thumb-frame img{height:100%;width:100%}section.product-detail div.layouter .form-container div.product-image-group div .thumb-list .gallery-control{width:100%;position:absolute;text-align:center;cursor:pointer;z-index:1}section.product-detail div.layouter .form-container div.product-image-group div .thumb-list .gallery-control .overlay{opacity:.3;background:#242424;width:100%;height:18px;position:absolute;left:0;z-index:-1}section.product-detail div.layouter .form-container div.product-image-group div .thumb-list .gallery-control .icon{z-index:2}section.product-detail div.layouter .form-container div.product-image-group div .thumb-list .gallery-control.top{top:0}section.product-detail div.layouter .form-container div.product-image-group div .thumb-list .gallery-control.bottom{bottom:0}section.product-detail div.layouter .form-container div.product-image-group div .product-hero-image{display:block;position:relative;background:#f2f2f2;width:100%;max-height:480px;height:100%}section.product-detail div.layouter .form-container div.product-image-group div .product-hero-image img{width:100%;height:auto;max-height:480px}section.product-detail div.layouter .form-container div.product-image-group div .product-hero-image .add-to-wishlist{background-image:url("../images/wishlist.svg");position:absolute;top:10px;right:12px;background-color:transparent;border:0;cursor:pointer;padding:0;width:32px;height:32px}section.product-detail div.layouter .form-container div.product-image-group div .product-hero-image .add-to-wishlist:hover{background-image:url("../images/wishlist-added.svg")}section.product-detail div.layouter .form-container div.product-image-group div .product-hero-image .share{position:absolute;top:10px;right:45px}section.product-detail div.layouter .form-container div.product-image-group .add-to-buttons{display:none;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;margin-top:10px;width:79.5%;float:right;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between}section.product-detail div.layouter .form-container div.product-image-group .add-to-buttons .addtocart{width:49%;background:#000;white-space:normal;text-transform:uppercase}section.product-detail div.layouter .form-container div.product-image-group .add-to-buttons .buynow{width:49%;white-space:nowrap;text-transform:uppercase}section.product-detail div.layouter .form-container .details{width:50%;overflow-wrap:break-word}section.product-detail div.layouter .form-container .details .product-price{margin-bottom:14px}section.product-detail div.layouter .form-container .details .product-price .sticker{display:none}section.product-detail div.layouter .form-container .details .product-ratings{margin-bottom:20px}section.product-detail div.layouter .form-container .details .product-ratings .icon{width:16px;height:16px}section.product-detail div.layouter .form-container .details .product-ratings .total-reviews{display:inline-block;margin-left:15px}section.product-detail div.layouter .form-container .details .product-heading{font-size:24px;color:#242424;margin-bottom:15px}section.product-detail div.layouter .form-container .details .product-price{margin-bottom:15px}section.product-detail div.layouter .form-container .details .product-price .special-price{font-size:24px}section.product-detail div.layouter .form-container .details .stock-status{margin-bottom:15px;font-weight:600;color:#fc6868}section.product-detail div.layouter .form-container .details .stock-status.active{color:#4caf50}section.product-detail div.layouter .form-container .details .description{margin-bottom:15px}section.product-detail div.layouter .form-container .details .description ul{padding-left:40px;list-style:disc}section.product-detail div.layouter .form-container .details .quantity{padding-top:15px;border-top:1px solid hsla(0,0%,64%,.2)}section.product-detail div.layouter .form-container .details .full-description *{max-width:100%}section.product-detail div.layouter .form-container .details .full-description ul{padding-left:40px;list-style:disc}section.product-detail div.layouter .form-container .details .full-specifications td{padding:10px 0;color:#5e5e5e}section.product-detail div.layouter .form-container .details .full-specifications td:first-child{padding-right:40px}section.product-detail div.layouter .form-container .details .accordian .accordian-header{padding-left:0;font-weight:600}section.product-detail div.layouter .form-container .details .accordian .accordian-content{padding:20px 0}section.product-detail div.layouter .form-container .details .attributes{display:block;width:100%;border-bottom:1px solid hsla(0,0%,64%,.2)}section.product-detail div.layouter .form-container .details .attributes .attribute.control-group{margin-bottom:20px}section.product-detail div.layouter .form-container .details .attributes .attribute.control-group .swatch-container{margin-top:10px;display:inline-block}section.product-detail div.layouter .form-container .details .attributes .attribute.control-group .swatch-container .swatch{display:inline-block;margin-right:5px;min-width:40px;height:40px}section.product-detail div.layouter .form-container .details .attributes .attribute.control-group .swatch-container .swatch span{min-width:38px;height:38px;float:left;border:1px solid #c7c7c7;border-radius:3px;line-height:36px;text-align:center;cursor:pointer;padding:0 10px}section.product-detail div.layouter .form-container .details .attributes .attribute.control-group .swatch-container .swatch img{width:38px;height:38px;border:1px solid #c7c7c7;border-radius:3px;cursor:pointer;background:#f2f2f2}section.product-detail div.layouter .form-container .details .attributes .attribute.control-group .swatch-container .swatch input:checked+img,section.product-detail div.layouter .form-container .details .attributes .attribute.control-group .swatch-container .swatch input:checked+span{border:1px solid #242424}section.product-detail div.layouter .form-container .details .attributes .attribute.control-group .swatch-container .swatch input{display:none}section.product-detail div.layouter .form-container .details .attributes .attribute.control-group .swatch-container .no-options{color:#ff6472}section.product-detail div.layouter .form-container .details .quantity-change{cursor:pointer;text-align:center}section.product-detail div.layouter .form-container .details .quantity-change:focus{border-color:#c7c7c7!important}@media only screen and (max-width:720px){section.product-detail div.layouter .form-container{-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}section.product-detail div.layouter .form-container div.product-image-group{margin-right:0;max-width:none;width:auto;min-height:400px;height:auto;position:unset}section.product-detail div.layouter .form-container div.product-image-group .loader{margin-left:47%}section.product-detail div.layouter .form-container div.product-image-group div{-webkit-box-orient:vertical;-webkit-box-direction:reverse;-ms-flex-direction:column-reverse;flex-direction:column-reverse}section.product-detail div.layouter .form-container div.product-image-group div .thumb-list{margin-top:5px;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;overflow-x:scroll;margin-right:0}section.product-detail div.layouter .form-container div.product-image-group div .thumb-list .thumb-frame img{height:100%;width:auto}section.product-detail div.layouter .form-container div.product-image-group div .thumb-list .gallery-control{display:none}section.product-detail div.layouter .form-container div.product-image-group div .product-hero-image{display:-webkit-box;display:-ms-flexbox;display:flex}section.product-detail div.layouter .form-container div.product-image-group div .product-hero-image img{margin-left:auto;margin-right:auto;width:480px}section.product-detail div.layouter .form-container div.product-image-group div .wrap{-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;width:100%!important}section.product-detail div.layouter .form-container div.product-image-group .add-to-buttons{width:100%}section.product-detail div.layouter .form-container .details{width:100%;margin-top:20px}}@media only screen and (max-width:510px){section.product-detail div.layouter .form-container div.product-image-group .product-hero-image img{width:100%!important}}.rating-reviews .rating-header{padding:20px 0}.rating-reviews .stars .icon{width:16px;height:16px}.rating-reviews .overall{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-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between}.rating-reviews .overall .review-info .number{font-size:34px}.rating-reviews .overall .review-info .total-reviews{margin-top:10px}.rating-reviews .reviews{margin-top:40px;margin-bottom:40px}.rating-reviews .reviews .review{margin-bottom:25px}.rating-reviews .reviews .review .title{margin-bottom:5px}.rating-reviews .reviews .review .stars{margin-bottom:15px;display:inline-block}.rating-reviews .reviews .review .message{margin-bottom:10px}.rating-reviews .reviews .review .reviewer-details{color:#5e5e5e}.rating-reviews .reviews .view-all{margin-top:15px;color:#0031f0;margin-bottom:15px}section.cart{width:100%;color:#242424;margin-bottom:80px;margin-top:20px}section.cart .title{font-size:24px}section.cart .cart-content{margin-top:20px;width:100%;display:inline-block}section.cart .cart-content .left-side{width:70%;float:left}section.cart .cart-content .left-side .misc-controls{width:100%;display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;margin-top:20px}section.cart .cart-content .left-side .misc-controls a.link,section.cart .cart-content .left-side .misc-controls div button{margin-right:15px}section.cart .cart-content .right-side{width:30%;display:inline-block;padding-left:40px}.cart-item-list .item{padding:10px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;border:1px solid #c7c7c7;border-radius:2px}.cart-item-list .item .item-image{margin-right:15px}.cart-item-list .item .item-image img{height:160px;width:160px}.cart-item-list .item .item-details{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start;width:100%}.cart-item-list .item .item-details .item-title{font-size:18px;margin-bottom:10px;font-weight:600}.cart-item-list .item .item-details .item-title a{color:#242424}.cart-item-list .item .item-details .price{margin-bottom:10px;font-size:18px;font-weight:600}.cart-item-list .item .item-details .summary{margin-bottom:17px}.cart-item-list .item .item-details .misc{display:-webkit-box;display:-ms-flexbox;display:flex;width:100%;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start;-webkit-box-align:start;-ms-flex-align:start;align-items:flex-start}.cart-item-list .item .item-details .misc .control-group{font-size:16px!important;width:220px;margin:0}.cart-item-list .item .item-details .misc .control-group .wrap{display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.cart-item-list .item .item-details .misc .control-group label{margin-right:15px}.cart-item-list .item .item-details .misc .control-group .control{height:38px;width:60px;border-radius:3px;text-align:center;line-height:38px}.cart-item-list .item .item-details .misc .remove,.cart-item-list .item .item-details .misc .towishlist{margin-top:18px;margin-right:15px}.cart-item-list .item .item-details .misc .quantity-change{cursor:pointer}.cart-item-list .item .item-details .misc .quantity-change:focus{border-color:#c7c7c7!important}.cart-item-list .item .error-message{color:#ff6472}.order-summary h3{font-size:16px;margin-top:0}.order-summary .item-detail{margin-top:12px}.order-summary .item-detail label.right{float:right}.order-summary .payble-amount{margin-top:17px;border-top:1px solid #c7c7c7;padding-top:12px}.order-summary .payble-amount label{font-weight:700}.order-summary .payble-amount label.right{float:right}@media only screen and (max-width:815px){section.cart .cart-content{display:block}section.cart .cart-content .left-side{width:100%;float:none}section.cart .cart-content .left-side .misc-controls{position:relative;top:180px;margin-top:0}section.cart .cart-content .right-side{width:100%;padding-left:0;position:relative;top:-20px}}@media only screen and (max-width:600px){section.cart .cart-content .left-side .cart-item-list .item{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}section.cart .cart-content .left-side .cart-item-list .item .item-details{margin-top:10px}section.cart .cart-content .left-side .cart-item-list .item .item-details .misc{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;line-height:40px}}@media only screen and (max-width:574px){section.cart .cart-content .left-side .misc-controls{display:block;top:160px}section.cart .cart-content .left-side .misc-controls div button{width:100%;margin-top:10px}section.cart .cart-content .left-side .misc-controls div a{margin-top:10px;width:100%;text-align:center}section.cart .cart-content .right-side{top:-100px}}.checkout-method-group .line-one{display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.checkout-method-group .line-one .radio-container{padding-left:28px}.checkout-method-group .line-one .method-label{margin-top:4px}.checkout-method-group .line-two{margin-left:30px}.checkout-process{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;width:100%;margin-top:20px;margin-bottom:20px;font-size:16px;color:#242424}.checkout-process .col-main{width:70%;margin-right:5%}.checkout-process .col-main ul.checkout-steps{display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;width:100%;padding-bottom:15px;border-bottom:1px solid #c7c7c7}.checkout-process .col-main ul.checkout-steps li{height:48px;display:-webkit-box;display:-ms-flexbox;display:flex}.checkout-process .col-main ul.checkout-steps li .decorator{height:48px;width:48px;border:1px solid #000;border-radius:50%;display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;border:1px solid #c7c7c7;background-repeat:no-repeat;background-position:50%}.checkout-process .col-main ul.checkout-steps li .decorator.address-info{background-image:url("../images/address.svg")}.checkout-process .col-main ul.checkout-steps li .decorator.shipping{background-image:url("../images/shipping.svg")}.checkout-process .col-main ul.checkout-steps li .decorator.payment{background-image:url("../images/payment.svg")}.checkout-process .col-main ul.checkout-steps li .decorator.review{background-image:url("../images/finish.svg")}.checkout-process .col-main ul.checkout-steps li.completed{cursor:pointer}.checkout-process .col-main ul.checkout-steps li.completed .decorator{background-image:url("../images/complete.svg")}.checkout-process .col-main ul.checkout-steps li span{margin-left:7px;margin-top:auto;margin-bottom:auto}.checkout-process .col-main ul.checkout-steps li.active{color:#2650ef}.checkout-process .col-main ul.checkout-steps li.active .decorator{border:1px solid #2650ef}.checkout-process .col-main .step-content{padding-top:20px}.checkout-process .col-main .step-content .form-header{display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;width:100%;height:30px}.checkout-process .col-main .step-content .form-header .checkout-step-heading{font-size:24px;font-weight:700;float:left}.checkout-process .col-main .step-content .form-header .btn{float:right;font-size:14px}.checkout-process .col-main .step-content .form-container{border-bottom:1px solid #c7c7c7;padding-top:20px;padding-bottom:20px}.checkout-process .col-main .step-content .shipping-methods{font-size:16px}.checkout-process .col-main .step-content .shipping-methods .ship-method-carrier{margin-bottom:15px;font-weight:700}.checkout-process .col-main .step-content .payment-methods .radio-container{padding-left:28px}.checkout-process .col-main .step-content .payment-methods .control-info{margin-left:28px}.checkout-process .col-main .step-content .address-summary{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:start;-ms-flex-pack:start;justify-content:flex-start;-webkit-box-align:center;-ms-flex-align:center;align-items:center;width:100%}.checkout-process .col-main .step-content .address-summary div.billing-address{margin-right:25%}.checkout-process .col-main .step-content .address-summary div.billing-address .horizontal-rule,.checkout-process .col-main .step-content .address-summary div.shipping-address .horizontal-rule{width:40px;background:#242424}.checkout-process .col-main .step-content .address-summary .label{width:10%}.checkout-process .col-main .step-content .address-summary .address-card-list{width:85%}.checkout-process .col-main .step-content .cart-item-list .item .row .title{width:100px;display:inline-block;color:#a5a5a5;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:25%;padding-left:40px}@media only screen and (max-width:770px){.checkout-process .col-main{width:100%;padding-right:0}.checkout-process .col-main ul.checkout-steps{border-bottom:none;padding-bottom:0}.checkout-process .col-main ul.checkout-steps span{display:none}.checkout-process .col-main ul.checkout-steps .line{-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;border-bottom:1px solid #c7c7c7;margin-left:5px;margin-right:5px}.checkout-process .step-content{padding-top:0}.checkout-process .step-content .control-group .control{width:100%}.checkout-process .col-right{display:none}}@media only screen and (max-width:480px){.checkout-process .col-main .step-content .address,.checkout-process .col-main .step-content .order-description{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.checkout-process .col-main .step-content .address .billing-address,.checkout-process .col-main .step-content .address .pull-left,.checkout-process .col-main .step-content .order-description .billing-address,.checkout-process .col-main .step-content .order-description .pull-left{width:100%!important}.checkout-process .col-main .step-content .address .pull-right,.checkout-process .col-main .step-content .address .shipping-address,.checkout-process .col-main .step-content .order-description .pull-right,.checkout-process .col-main .step-content .order-description .shipping-address{width:100%!important;margin-top:20px}}.attached-products-wrapper{margin-bottom:80px}.attached-products-wrapper .title{margin-bottom:40px;font-size:18px;color:#242424;text-align:center;position:relative}.attached-products-wrapper .title .border-bottom{border-bottom:1px solid hsla(0,0%,64%,.2);display:inline-block;width:100px;position:absolute;top:40px;left:50%;margin-left:-50px}.attached-products-wrapper .horizontal-rule{height:1px;background:#c7c7c7;width:148px;margin-bottom:24px;margin-left:auto;margin-right:auto}section.review .category-breadcrumbs{display:inline}section.review .review-layouter{display:-webkit-box;display:-ms-flexbox;display:flex}section.review .review-layouter .product-info{font-size:24px;max-width:25%}section.review .review-layouter .product-info .product-image img{height:280px;width:280px}section.review .review-layouter .product-info .product-name a{color:#242424}section.review .review-layouter .product-info .product-price .pro-price{color:#ff6472}section.review .review-layouter .product-info .product-price .pro-price-not{margin-left:10px;font-size:16px;color:#a5a5a5}section.review .review-layouter .product-info .product-price .offer{margin-left:10px;font-size:16px}section.review .review-layouter .review-form{margin-left:20px;width:55%}section.review .review-layouter .review-form .heading{color:#242424;font-weight:600}section.review .review-layouter .review-form .heading .right{float:right;margin-top:-10px}section.review .review-layouter .review-form .star{font-size:23px;color:#d4d4d4;-webkit-transition:all .2s;transition:all .2s}section.review .review-layouter .review-form .star:before{content:"\2605"}section.review .review-layouter .review-form .control-group .control{width:100%}section.review .review-layouter .review-form .review-detail{height:150px;border:1px solid #b22222;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}section.review .review-layouter .review-form .review-detail .rating-review{margin-top:40px;margin-left:20px;width:48%}section.review .review-layouter .review-form .review-detail .rating-review .avg-rating-count span{font-size:34px;text-align:center}section.review .review-layouter .review-form .review-detail .rating-calculate .progress-only{width:20px;border:1px solid blue}section.review .review-layouter .ratings-reviews{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between}section.review .review-layouter .ratings-reviews .left-side{padding:40px 20px;width:50%}section.review .review-layouter .ratings-reviews .left-side .rate{font-size:34px}section.review .review-layouter .ratings-reviews .left-side .stars .icon{height:16px;width:16px}section.review .review-layouter .ratings-reviews .right-side{width:50%}section.review .review-layouter .ratings-reviews .right-side .rater{display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;padding-top:5px;width:100%}section.review .review-layouter .ratings-reviews .right-side .rater .star-name{margin-right:5px;width:35px}section.review .review-layouter .ratings-reviews .right-side .rater .rate-number{width:15px}section.review .review-layouter .ratings-reviews .right-side .rater .percentage{width:50px;margin-right:10px}section.review .review-layouter .ratings-reviews .right-side .rater .percentage span{float:right;white-space:nowrap}section.review .review-layouter .ratings-reviews .right-side .rater .line-bar{height:4px;width:calc(100% - 100px);margin-right:5px;margin-left:5px;background:#d8d8d8}section.review .review-layouter .ratings-reviews .right-side .rater .line-bar .line-value{background-color:#0031f0}@media only screen and (max-width:770px){section.review .category-breadcrumbs{display:none}section.review .review-layouter{-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}section.review .review-layouter .product-info{max-width:100%}section.review .review-layouter .product-info .product-image,section.review .review-layouter .product-info .product-name,section.review .review-layouter .product-info .product-price{max-width:280px;margin-left:auto;margin-right:auto}section.review .review-layouter .review-form{width:100%;margin-left:0}section.review .review-layouter .review-form .heading .right{margin-top:50px}section.review .review-layouter .review-form .ratings-reviews{-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;width:100%}section.review .review-layouter .review-form .ratings-reviews .left-side{width:100%;padding:0 0 40px;margin-top:-30px}section.review .review-layouter .review-form .ratings-reviews .right-side{width:100%}section.review .review-layouter .review-form .ratings-reviews .right-side .rater .percentage{margin-right:0}}.auth-content{padding-top:5%;padding-bottom:5%}.auth-content .sign-up-text{margin-bottom:2%;margin-left:auto;margin-right:auto;font-size:18px;color:#a5a5a5;text-align:center}.auth-content .login-form{margin-left:auto;margin-right:auto;display:-webkit-box;display:-ms-flexbox;display:flex;border:1px solid #c7c7c7;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;max-width:500px;min-width:320px;padding:25px}.auth-content .login-form .login-text{font-size:24px;font-weight:600;margin-bottom:30px}.auth-content .login-form .control-group{margin-bottom:15px!important}.auth-content .login-form .control-group .control{width:100%!important}.auth-content .login-form .forgot-password-link{font-size:17px;color:#0031f0;margin-bottom:5%}.auth-content .login-form .signup-confirm{margin-bottom:5%}.auth-content .login-form .btn-primary{width:100%;text-transform:uppercase}.account-content{width:100%;-webkit-box-orient:horizontal;-ms-flex-direction:row;flex-direction:row;margin-top:5.5%;margin-bottom:5.5%}.account-content,.account-content .sidebar{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-direction:normal}.account-content .sidebar{-webkit-box-orient:vertical;-ms-flex-direction:column;flex-direction:column;-ms-flex-line-pack:center;align-content:center;-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start;width:20%;height:100%}.account-content .menu-block{margin-bottom:30px}.account-content .menu-block:last-child{margin-bottom:0}.account-content .menu-block .menu-block-title{padding-bottom:10px;font-size:18px}.account-content .menu-block .menu-block-title .right{display:none}.account-content .menu-block .menubar{border:1px solid #c7c7c7;color:#a5a5a5;position:relative}.account-content .menu-block .menubar li{width:95%;height:50px;margin-left:5%;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:start;-ms-flex-pack:start;justify-content:flex-start;-webkit-box-align:center;-ms-flex-align:center;align-items:center;border-bottom:1px solid #c7c7c7;text-align:center}.account-content .menu-block .menubar li a{color:#5e5e5e;width:100%;text-align:left}.account-content .menu-block .menubar li .icon{display:none;position:absolute;right:12px}.account-content .menu-block .menubar li:first-child{border-top:none}.account-content .menu-block .menubar li:last-child{border-bottom:none}.account-content .menu-block .menubar li.active a{color:#0031f0}.account-content .menu-block .menubar li.active .icon{display:inline-block}.account-content .account-layout{margin-left:40px;width:80%}.account-content .account-layout .account-head .back-icon,.account-content .account-layout .responsive-empty{display:none}.account-table-content{color:#242424;margin-top:1.4%}.account-table-content table{width:100%}.account-table-content table tbody tr{height:45px}.account-table-content table tbody tr td{width:250px}.address-holder{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:start;-ms-flex-pack:start;justify-content:flex-start;-webkit-box-align:start;-ms-flex-align:start;align-items:flex-start;-ms-flex-wrap:wrap;flex-wrap:wrap;width:100%}.address-card{width:260px;border:1px solid #c7c7c7;padding:15px;margin-right:15px;margin-bottom:15px}.address-card .control-group{width:15px;height:15px;margin-top:10px}.address-card .details{font-weight:lighter}.address-card .details span{display:block}.address-card .details .control-links{width:90%;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;-ms-flex-wrap:wrap;flex-wrap:wrap;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.address-card .details .control-links .btn{height:30px}.edit-form{display:-webkit-box;display:-ms-flexbox;display:flex;border:1px solid #c7c7c7;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;min-height:345px;padding:25px}@media only screen and (max-width:770px){.account-content{-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.account-content .sidebar{width:100%}.account-content .sidebar .menu-block .menu-block-title{height:50px;padding-top:13px;border-bottom:1px solid #c7c7c7;border-top:1px solid #c7c7c7}.account-content .sidebar .menu-block .menu-block-title .right{display:block;float:right;-ms-flex-item-align:center;align-self:center}.account-content .sidebar .menu-block .menubar{border:0;display:none}.account-content .sidebar .menu-block .menubar>li{margin-left:0;width:100%}.account-content .sidebar .menu-block .menubar>li .icon{right:0}.account-content .sidebar .menu-block .menubar>li:last-child{border-bottom:1px solid #c7c7c7}.account-content .account-layout{margin-left:0;margin-top:20px;width:100%}.account-content .account-layout .account-head{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;border-bottom:1px solid #c7c7c7;border-top:1px solid #c7c7c7;height:50px;margin-top:10px}.account-content .account-layout .account-head .account-action{margin-top:12px;margin-left:15px}.account-content .account-layout .account-head .back-icon{display:block}.account-content .account-layout .account-head span{margin-top:13px;font-size:18px}.account-content .account-layout .account-head .horizontal-rule{display:none}.account-content .account-layout .account-table-content{margin-top:2%}.account-content .account-layout .account-table-content table tbody tr{height:70px}.account-content .account-layout .account-table-content table tbody tr td{display:block}.account-content .account-layout .account-table-content .address-holder{-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.account-content .account-items-list,.account-content .edit-form{margin-top:20px}.account-content .account-items-list .responsive-empty,.account-content .edit-form .responsive-empty{display:block}.account-content .control-group .control{width:100%}}.sale-container{color:#5e5e5e}.sale-container .sale-section .secton-title{font-size:18px;color:#8e8e8e;padding:15px 0;border-bottom:1px solid #c7c7c7}.sale-container .sale-section .section-content{display:block;padding:20px 0;border-bottom:1px solid #e8e8e8}.sale-container .sale-section .section-content .row{display:block;padding:7px 0}.sale-container .sale-section .section-content .row .title{width:200px;letter-spacing:-.26px;display:inline-block}.sale-container .sale-section .section-content .row .value{letter-spacing:-.26px;display:inline-block}.sale-container .sale-section .section-content .order-box-container{display:inline-block;width:100%}.sale-container .sale-section .section-content .order-box-container .box{float:left;width:25%}.sale-container .sale-section .section-content .order-box-container .box .box-title{padding:10px 0;font-size:18px;color:#8e8e8e}.sale-container .sale-section .section-content .order-box-container .box .box-content{color:#3a3a3a;padding-right:10px}.sale-container .sale-section .section-content .qty-row{display:block}.sale-container .totals{padding-top:20px;display:inline-block;width:100%;border-top:1px solid #e8e8e8}.sale-container .totals .sale-summary{height:130px;float:right;border-collapse:collapse}.sale-container .totals .sale-summary tr td{padding:5px 8px;width:auto;color:#3a3a3a}.sale-container .totals .sale-summary tr.bold{font-weight:600;font-size:15px}.sale-container .totals .sale-summary tr.border td{border-bottom:1px solid #c7c7c7}@media only screen and (max-width:770px){.sale-container .sale-section .section-content{border-bottom:none;padding:10px 0}.sale-container .sale-section .section-content .row{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.sale-container .sale-section .section-content .row .title{line-height:20px}.sale-container .sale-section .section-content .totals{border-top:none}.sale-container .sale-section .section-content .totals .sale-summary{width:100%}.sale-container .sale-section .section-content .totals .sale-summary tr td:nth-child(2){display:none}.sale-container .sale-section .section-content .order-box-container{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.sale-container .sale-section .section-content .order-box-container .box{width:100%;margin:10px auto}.sale-container .sale-section .section-content .qty-row{display:inline}}.verify-account{text-align:center;background:#204d74;width:200px;margin-right:auto;margin-left:auto;border-radius:4px}.verify-account a{color:#fff!important}.cp-spinner{position:absolute;left:calc(50% - 24px);margin-top:calc(40% - 24px)}@media only screen and (max-width:720px){.cp-spinner{left:50%;margin-left:-24px;top:50%;margin-top:-24px}}@media only screen and (max-width:720px){.error-container .wrapper{-webkit-box-orient:vertical!important;-webkit-box-direction:reverse!important;-ms-flex-direction:column-reverse!important;flex-direction:column-reverse!important;margin:10px 0 20px!important;-webkit-box-align:start!important;-ms-flex-align:start!important;align-items:start!important;height:100%!important}}@media only screen and (max-width:770px){.table table{width:100%}.table table thead{display:none}.table table tbody tr td:before{content:attr(data-value);font-size:15px;font-weight:600;display:inline-block;width:120px}.table table tbody td{border-bottom:none!important;display:block;width:100%!important}.table table tbody td div{position:relative;left:100px;top:-20px}.table table tbody tr{border:1px solid #c7c7c7}}.show-wishlist{z-index:-1!important}.filter-row-one .dropdown-filters{position:relative!important;right:1px!important}@media only screen and (max-width:770px){.table .grid-container{margin-top:10px}.table .grid-container .filter-row-one{display:block}.table .grid-container .filter-row-one .dropdown-filters{margin-top:10px}}.rtl{direction:rtl}.rtl .header .header-top div.left-content ul.logo-container{margin-right:0;margin-left:12px}.rtl .header .header-top div.left-content ul.search-container li.search-group .search-field{border:2px solid #c7c7c7;padding-right:12px;padding-left:0;border-radius:2px;border-top-left-radius:0;border-bottom-left-radius:0}.rtl .header .header-top div.left-content ul.search-container li.search-group .search-icon-wrapper{border:2px solid #c7c7c7;border-right:none;border-radius:2px;border-top-right-radius:0;border-bottom-right-radius:0}.rtl .header .header-top div.right-content .right-content-menu>li{border-right:2px solid #c7c7c7;padding:0 15px}.rtl .header .header-top div.right-content .right-content-menu>li:last-child{padding-left:0}.rtl .header .header-top div.right-content .right-content-menu>li:first-child{border-right:0;padding-right:0}.rtl .header .header-top div.right-content .right-content-menu .cart-dropdown-container .dropdown-list{left:0;right:unset!important}.rtl .header .header-top div.right-content .right-content-menu .cart-dropdown-container .count{display:inline-block}.rtl .header .header-top div.right-content .right-content-menu .account,.rtl .header .header-top div.right-content .right-content-menu .currency{right:unset;left:0}.rtl .header .header-top div.right-content .right-content-menu .guest div{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between}.rtl .header .header-bottom .nav>li{float:right;margin-right:0;margin-left:1px}.rtl .header .header-bottom .nav a{padding:.8em .5em .8em .3em!important}.rtl .header .header-bottom .nav li a>.icon{-webkit-transform:rotate(180deg);transform:rotate(180deg)}.rtl .header .header-bottom .nav>li li:hover>ul{left:unset!important;right:100%!important}.rtl .header .header-bottom .nav ul{left:99999em}.rtl .header .search-responsive .search-content .right{float:left}.rtl .dropdown-list{text-align:right}.rtl .dropdown-list.bottom-right{left:0;right:auto}@media only screen and (max-width:720px){.rtl .header .header-top div.right-content .menu-box{margin-left:0;margin-right:5px}.rtl .header .header-top div.right-content .right-content-menu .account{position:absolute;left:0;right:auto}.rtl .header .header-top div.right-content .right-content-menu>li{padding:0;border:0}.rtl .header .header-top div.right-content .search-box{margin-left:5px}.rtl .header .header-bottom .nav>li{float:none}.rtl .header .header-bottom .nav li>.icon{float:left;-webkit-transform:rotate(180deg);transform:rotate(180deg)}.rtl .header .header-bottom .icon.icon-arrow-down{margin-left:5px}}.rtl section.slider-block div.slider-content div.slider-control{left:2%;right:auto}@media only screen and (max-width:720px){.rtl section.slider-block div.slider-content div.slider-control{left:0}}.rtl .main-container-wrapper .product-card .sticker{left:auto;right:20px}.rtl .main-container-wrapper .product-card .cart-wish-wrap .addtocart{margin-right:0;margin-left:10px}.rtl section.product-detail div.layouter .form-container div.product-image-group{margin-right:0;margin-left:30px}.rtl section.product-detail div.layouter .form-container div.product-image-group .add-to-buttons{float:left!important}.rtl section.product-detail div.layouter .form-container div .thumb-list{margin-left:4px;margin-right:0}.rtl section.product-detail div.layouter .form-container .details .accordian .accordian-header{padding:20px 0 20px 15px}.rtl section.product-detail div.layouter .form-container .details .accordian .accordian-header .icon{float:left}.rtl section.product-detail div.layouter .form-container .details .accordian .accordian-header .expand-icon{margin-left:10px}.rtl section.product-detail div.layouter .form-container .details .full-specifications td:first-child{padding-right:0;padding-left:40px}.rtl section.product-detail div.layouter .form-container .details .product-ratings .total-reviews{margin-left:0;margin-right:15px}@media only screen and (max-width:720px){.rtl section.product-detail div.layouter .form-container div.product-image-group{margin-right:0;margin-left:0}}.rtl .main .category-container .layered-filter-wrapper,.rtl .main .category-container .responsive-layred-filter{padding-right:0;padding-left:20px}.rtl .main .top-toolbar .pager{float:left}.rtl .main .top-toolbar .pager .view-mode{margin-right:0;margin-left:20px}.rtl .main .top-toolbar .pager .sorter{margin-right:0;margin-left:10px}.rtl .main .top-toolbar .pager label{margin-right:0;margin-left:5px}.rtl .main .top-toolbar .page-info{float:right}.rtl section.review .review-layouter .review-form{margin-left:0;margin-right:20px}.rtl section.review .review-layouter .review-form .heading .right{float:left}.rtl section.review .review-layouter .review-form .ratings-reviews .right-side .rater .star-name{margin-right:0;margin-left:5px}@media only screen and (max-width:770px){.rtl section.review .review-layouter .review-form{margin-right:0}}.rtl section.cart .cart-content .left-side{width:70%;float:right}.rtl section.cart .cart-content .left-side .misc-controls a.link{margin-left:15px;margin-right:0}.rtl section.cart .cart-content .right-side{width:30%;padding-right:40px;padding-left:0}.rtl .order-summary .item-detail label.right,.rtl .payble-amount label.right{float:left}.rtl .item div{margin-left:15px;margin-right:0!important}.rtl .cart-item-list .item .item-details .misc div.qty-text{margin-right:0;margin-left:10px}.rtl .cart-item-list .item .item-details .misc .remove,.rtl .cart-item-list .item .item-details .misc input.box{margin-right:0;margin-left:30px}.rtl .cart-item-list .item .item-details .misc .control-group label{margin-left:15px;margin-right:0}@media only screen and (max-width:770px){.rtl section.cart .cart-content .left-side{width:100%;float:none}.rtl section.cart .cart-content .left-side .misc-controls div button{margin-right:0}.rtl section.cart .cart-content .right-side{width:100%;padding-right:0}}.rtl .checkout-process .col-right{padding-left:0;padding-right:40px}.rtl .checkout-process .col-main{padding-left:40px;padding-right:0}.rtl .checkout-process .col-main ul.checkout-steps li span{margin-right:7px;margin-left:0}.rtl .checkout-process .col-main .step-content .form-header h1{float:right}.rtl .checkout-process .col-main .step-content .form-header .btn{float:left}.rtl .checkout-process .col-main .step-content .payment-methods .control-info{margin-right:28px;margin-left:0}.rtl .checkout-process .col-main .step-content .address .billing-address,.rtl .checkout-process .col-main .step-content .address .pull-left,.rtl .checkout-process .col-main .step-content .order-description .billing-address,.rtl .checkout-process .col-main .step-content .order-description .pull-left{float:right!important}.rtl .checkout-process .col-main .step-content .address .pull-right,.rtl .checkout-process .col-main .step-content .address .shipping-address,.rtl .checkout-process .col-main .step-content .order-description .pull-right,.rtl .checkout-process .col-main .step-content .order-description .shipping-address{float:left!important}.rtl .checkbox,.rtl .radio{margin:10px 0 5px 5px}.rtl .radio .radio-view{margin-left:5px;margin-right:0}.rtl .radio input{right:0;left:auto}@media only screen and (max-width:770px){.rtl .checkout-process .col-main{padding-left:0}}.rtl .account-content .account-layout{margin-left:0;margin-right:40px}.rtl .account-content .menu-block .menubar li{margin-left:0;margin-right:5%}.rtl .account-content .menu-block .menubar li a{text-align:right}.rtl .account-content .menu-block .menubar li .icon{right:unset;left:12px;-webkit-transform:rotate(180deg);transform:rotate(180deg)}.rtl .account-head .account-action{float:left}.rtl .account-item-card .media-info .info{margin-right:20px;margin-left:0}.rtl .account-item-card .operations a span{float:left}.rtl .table table{text-align:right}.rtl .sale-container .totals .sale-summary{float:left}.rtl .sale-container .sale-section .section-content .order-box-container{display:-webkit-box;display:-ms-flexbox;display:flex}@media (max-width:770px){.rtl .account-content .account-layout{margin-right:0}.rtl .account-content .account-layout .account-head .account-action{margin-left:0}.rtl .account-content .sidebar .menu-block .menu-block-title .right{float:left}.rtl .account-content .sidebar .menu-block .menubar>li{margin-right:0}}.rtl .footer .footer-content .footer-list-container .list-container .list-group li span.icon{margin-left:5px;margin-right:0}@media (max-width:720px){.rtl .footer{padding-right:15px;padding-left:10%}.rtl .footer .footer-list-container{padding-right:0!important}}.rtl .cp-spinner{position:absolute;right:calc(50% - 24px);margin-top:calc(40% - 24px)}@media only screen and (max-width:720px){.rtl .cp-spinner{right:50%;margin-right:-24px;left:auto}}.rtl .product-list .product-card .product-information{padding-left:0;padding-right:30px;float:left}.rtl .zoom-image-direction{left:0;right:476px!important}.banner-container{width:100%;float:left;padding:0 18px;margin-bottom:40px}.banner-container .left-banner{padding-right:20px;width:60%;float:left}.banner-container .left-banner img{width:100%}.banner-container .right-banner{padding-left:20px;width:40%;float:left}.banner-container .right-banner img{width:100%}.banner-container .right-banner img:first-child{padding-bottom:20px;height:50%;display:block}.banner-container .right-banner img:last-child{padding-top:20px;height:50%;display:block}@media (max-width:720px){.banner-container .left-banner{padding-right:0;width:100%}.banner-container .right-banner{padding-left:0;width:100%}.banner-container .right-banner img:first-child{padding-bottom:0;padding-top:25px}.banner-container .right-banner img:last-child{padding-top:25px}} \ No newline at end of file diff --git a/packages/Webkul/Shop/publishable/assets/mix-manifest.json b/packages/Webkul/Shop/publishable/assets/mix-manifest.json index 848891aeb..43504b45b 100755 --- a/packages/Webkul/Shop/publishable/assets/mix-manifest.json +++ b/packages/Webkul/Shop/publishable/assets/mix-manifest.json @@ -1,4 +1,4 @@ { "/js/shop.js": "/js/shop.js?id=9a7027b387c171cd0fd3", - "/css/shop.css": "/css/shop.css?id=77d013de702af8275b0c" + "/css/shop.css": "/css/shop.css?id=5d0ffa213eda626b89f6" } \ 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 11f842701..db79dd970 100755 --- a/packages/Webkul/Shop/src/Resources/assets/sass/app.scss +++ b/packages/Webkul/Shop/src/Resources/assets/sass/app.scss @@ -939,9 +939,7 @@ section.slider-block { } .dropdown-list .dropdown-container { - padding: 10px 18px 10px 18px; - max-height: 410px; - overflow-y: auto; + padding: 0; .dropdown-cart { color: $font-color; @@ -949,6 +947,8 @@ section.slider-block { .dropdown-cart > .dropdown-header { width: 100%; + padding: 8px 16px; + border-bottom: 1px solid $border-color; } .dropdown-cart > .dropdown-header p { @@ -968,16 +968,17 @@ section.slider-block { .dropdown-content { padding-top: 8px; - padding-bottom: 10px; + margin-bottom: 55px; width: 100%; + max-height: 329px; + overflow-y: auto; } .dropdown-content .item { display: flex; flex-direction: row; border-bottom: 1px solid $border-color; - padding-top: 8px; - padding-bottom: 8px; + padding: 8px 16px; } .dropdown-content .item img { @@ -1015,7 +1016,12 @@ section.slider-block { flex-direction: row; justify-content: space-between; align-items: center; - margin-bottom: 8px; + padding: 8px 16px; + position: absolute; + bottom: 0; + width: 100%; + background: #fff; + border-top: 1px solid $border-color; .btn { margin: 0; diff --git a/packages/Webkul/Shop/src/Resources/views/checkout/cart/mini-cart.blade.php b/packages/Webkul/Shop/src/Resources/views/checkout/cart/mini-cart.blade.php index b913fc364..4bae33edc 100755 --- a/packages/Webkul/Shop/src/Resources/views/checkout/cart/mini-cart.blade.php +++ b/packages/Webkul/Shop/src/Resources/views/checkout/cart/mini-cart.blade.php @@ -22,10 +22,10 @@
- @@ -421,11 +406,10 @@ global_label: null, label: { - global: null, @foreach(core()->getAllChannels() as $channel) @foreach($channel->locales as $locale) - '{{ trim($channel->code) }}' : { - '{{ trim($locale->code) }}': null + {{ trim($channel->code) }} : { + {{ trim($locale->code) }}: '' }, @endforeach @endforeach @@ -504,18 +488,6 @@ this.conditions_list = JSON.parse(JSON.parse(data.conditions)); } - this.dedicated_label = false; - global_label = null; - - this.label = { - @foreach($cart_rule[3]->labels as $label) - '{{ $label->channel->code }}': { - '{{ $label->locale->code }}': - '{{ $label->label }}' - }, - @endforeach - } - criteria = null; }, diff --git a/packages/Webkul/Discount/src/Http/Controllers/CartRuleController.php b/packages/Webkul/Discount/src/Http/Controllers/CartRuleController.php index 2e3d653bf..5fc1c3a79 100644 --- a/packages/Webkul/Discount/src/Http/Controllers/CartRuleController.php +++ b/packages/Webkul/Discount/src/Http/Controllers/CartRuleController.php @@ -209,12 +209,14 @@ class CartRuleController extends Controller foreach($channel->locales as $locale) { $label1['locale_id'] = $locale->id; $label1['label'] = $labels['global']; + $label1['cart_rule_id'] = $ruleCreated->id; $ruleLabelCreated = $this->cartRuleLabel->create($label1); } } } else { $label2['label'] = $labels['global']; + $label2['cart_rule_id'] = $ruleCreated->id; $ruleLabelCreated = $this->cartRuleLabel->create($label2); } @@ -280,6 +282,8 @@ class CartRuleController extends Controller $data = request()->all(); + dd($data); + if ($data['starts_from'] == "" || $data['ends_till'] == "") { $data['starts_from'] = null; $data['ends_till'] = null; From e0dd74c06c0a0c57d213bf42dea394bd1a1fcd55 Mon Sep 17 00:00:00 2001 From: imanghafoori Date: Tue, 4 Jun 2019 00:52:37 +0430 Subject: [PATCH 299/678] clean up --- .../Http/Controllers/DashboardController.php | 70 +++++++++---------- 1 file changed, 33 insertions(+), 37 deletions(-) diff --git a/packages/Webkul/Admin/src/Http/Controllers/DashboardController.php b/packages/Webkul/Admin/src/Http/Controllers/DashboardController.php index 37848b391..3be5ad0c8 100755 --- a/packages/Webkul/Admin/src/Http/Controllers/DashboardController.php +++ b/packages/Webkul/Admin/src/Http/Controllers/DashboardController.php @@ -131,47 +131,23 @@ class DashboardController extends Controller $statistics = [ 'total_customers' => [ - 'previous' => $previous = $this->customer->scopeQuery(function($query) { - return $query->where('customers.created_at', '>=', $this->lastStartDate) - ->where('customers.created_at', '<=', $this->lastEndDate); - })->count(), - 'current' => $current = $this->customer->scopeQuery(function($query) { - return $query->where('customers.created_at', '>=', $this->startDate) - ->where('customers.created_at', '<=', $this->endDate); - })->count(), + 'previous' => $previous = $this->getCustomersBetweenDates($this->lastStartDate, $this->lastEndDate)->count(), + 'current' => $current = $this->getCustomersBetweenDates($this->startDate, $this->endDate)->count(), 'progress' => $this->getPercentageChange($previous, $current) ], 'total_orders' => [ - 'previous' => $previous = $this->order->scopeQuery(function($query) { - return $query->where('orders.created_at', '>=', $this->lastStartDate) - ->where('orders.created_at', '<=', $this->lastEndDate); - })->count(), - 'current' => $current = $this->order->scopeQuery(function($query) { - return $query->where('orders.created_at', '>=', $this->startDate) - ->where('orders.created_at', '<=', $this->endDate); - })->count(), + 'previous' => $previous = $this->previousOrders()->count(), + 'current' => $current = $this->currentOrders()->count(), 'progress' => $this->getPercentageChange($previous, $current) ], 'total_sales' => [ - 'previous' => $previous = $this->order->scopeQuery(function($query) { - return $query->where('orders.created_at', '>=', $this->lastStartDate) - ->where('orders.created_at', '<=', $this->lastEndDate); - })->sum('base_grand_total'), - 'current' => $current = $this->order->scopeQuery(function($query) { - return $query->where('orders.created_at', '>=', $this->startDate) - ->where('orders.created_at', '<=', $this->endDate); - })->sum('base_grand_total'), + 'previous' => $previous = $this->previousOrders()->sum('base_grand_total'), + 'current' => $current = $this->currentOrders()->sum('base_grand_total'), 'progress' => $this->getPercentageChange($previous, $current) ], 'avg_sales' => [ - 'previous' => $previous = $this->order->scopeQuery(function($query) { - return $query->where('orders.created_at', '>=', $this->lastStartDate) - ->where('orders.created_at', '<=', $this->lastEndDate); - })->avg('base_grand_total'), - 'current' => $current = $this->order->scopeQuery(function($query) { - return $query->where('orders.created_at', '>=', $this->startDate) - ->where('orders.created_at', '<=', $this->endDate); - })->avg('base_grand_total'), + 'previous' => $previous = $this->previousOrders()->avg('base_grand_total'), + 'current' => $current = $this->currentOrders()->avg('base_grand_total'), 'progress' => $this->getPercentageChange($previous, $current) ], 'top_selling_categories' => $this->getTopSellingCategories(), @@ -180,14 +156,10 @@ class DashboardController extends Controller 'stock_threshold' => $this->getStockThreshold(), ]; - foreach (core()->getTimeInterval($this->startDate, $this->endDate) as $interval) { $statistics['sale_graph']['label'][] = $interval['start']->format('d M'); - $total = $this->order->scopeQuery(function($query) use($interval) { - return $query->where('orders.created_at', '>=', $interval['start']) - ->where('orders.created_at', '<=', $interval['end']); - })->sum('base_grand_total'); + $total = $this->getOrdersBetweenDate($interval['start'], $interval['end'])->sum('base_grand_total'); $statistics['sale_graph']['total'][] = $total; $statistics['sale_graph']['formated_total'][] = core()->formatBasePrice($total); @@ -300,4 +272,28 @@ class DashboardController extends Controller $this->lastStartDate->subDays($this->startDate->diffInDays($this->endDate)); // $this->lastEndDate->subDays($this->lastStartDate->diffInDays($this->lastEndDate)); } + + private function previousOrders() + { + return $this->getOrdersBetweenDate($this->lastStartDate, $this->lastEndDate); + } + + private function currentOrders() + { + return $this->getOrdersBetweenDate($this->startDate, $this->endDate); + } + + private function getOrdersBetweenDate($start, $end) + { + return $this->order->scopeQuery(function ($query) use ($start, $end) { + return $query->where('orders.created_at', '>=', $start)->where('orders.created_at', '<=', $end); + }); + } + + private function getCustomersBetweenDates($start, $end) + { + return $this->customer->scopeQuery(function ($query) use ($start, $end) { + return $query->where('customers.created_at', '>=', $start)->where('customers.created_at', '<=', $end); + }); + } } \ No newline at end of file From 40e8c85813a9206ba303bc2aaab2ff6e1b3ed89a Mon Sep 17 00:00:00 2001 From: rahul shukla Date: Tue, 4 Jun 2019 10:17:00 +0530 Subject: [PATCH 300/678] issue #945 product image of variant --- packages/Webkul/Product/src/Helpers/ProductImage.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/Webkul/Product/src/Helpers/ProductImage.php b/packages/Webkul/Product/src/Helpers/ProductImage.php index 16c906027..cc62c1a9d 100755 --- a/packages/Webkul/Product/src/Helpers/ProductImage.php +++ b/packages/Webkul/Product/src/Helpers/ProductImage.php @@ -15,7 +15,7 @@ class ProductImage extends AbstractProduct */ public function getGalleryImages($product) { - if (! $product) + if (! $product) return []; $images = []; @@ -32,7 +32,7 @@ class ProductImage extends AbstractProduct ]; } - if (! $product->parent_id && ! count($images)) { + if (! count($images)) { $images[] = [ 'small_image_url' => asset('vendor/webkul/ui/assets/images/product/small-product-placeholder.png'), 'medium_image_url' => asset('vendor/webkul/ui/assets/images/product/meduim-product-placeholder.png'), From d232722b5de882124242ecf1d0c3ee3a1593f741 Mon Sep 17 00:00:00 2001 From: rahul shukla Date: Tue, 4 Jun 2019 12:49:10 +0530 Subject: [PATCH 301/678] issue #916 --- .../views/customers/create.blade.php | 4 +-- .../Resources/views/customers/edit.blade.php | 6 ++-- ...09_add_phone_column_in_customers_table.php | 32 +++++++++++++++++++ .../Webkul/Customer/src/Models/Customer.php | 7 ++-- 4 files changed, 41 insertions(+), 8 deletions(-) create mode 100644 packages/Webkul/Customer/src/Database/migrations/2019_06_04_114009_add_phone_column_in_customers_table.php diff --git a/packages/Webkul/Admin/src/Resources/views/customers/create.blade.php b/packages/Webkul/Admin/src/Resources/views/customers/create.blade.php index be22c1382..4a797e1b9 100755 --- a/packages/Webkul/Admin/src/Resources/views/customers/create.blade.php +++ b/packages/Webkul/Admin/src/Resources/views/customers/create.blade.php @@ -64,11 +64,11 @@ @{{ errors.first('date_of_birth') }}
- {{--
+
@{{ errors.first('phone') }} -
--}} +
diff --git a/packages/Webkul/Admin/src/Resources/views/customers/edit.blade.php b/packages/Webkul/Admin/src/Resources/views/customers/edit.blade.php index 385a4b964..a14dd01e0 100755 --- a/packages/Webkul/Admin/src/Resources/views/customers/edit.blade.php +++ b/packages/Webkul/Admin/src/Resources/views/customers/edit.blade.php @@ -55,7 +55,7 @@
- @@ -68,11 +68,11 @@ @{{ errors.first('date_of_birth') }}
- {{--
+
@{{ errors.first('phone') }} -
--}} +
diff --git a/packages/Webkul/Customer/src/Database/migrations/2019_06_04_114009_add_phone_column_in_customers_table.php b/packages/Webkul/Customer/src/Database/migrations/2019_06_04_114009_add_phone_column_in_customers_table.php new file mode 100644 index 000000000..9cdeb24ca --- /dev/null +++ b/packages/Webkul/Customer/src/Database/migrations/2019_06_04_114009_add_phone_column_in_customers_table.php @@ -0,0 +1,32 @@ +string('phone')->unique()->nullable(); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::table('customers', function (Blueprint $table) { + // + }); + } +} diff --git a/packages/Webkul/Customer/src/Models/Customer.php b/packages/Webkul/Customer/src/Models/Customer.php index b49329a39..8b43a0445 100755 --- a/packages/Webkul/Customer/src/Models/Customer.php +++ b/packages/Webkul/Customer/src/Models/Customer.php @@ -17,7 +17,8 @@ class Customer extends Authenticatable implements CustomerContract, JWTSubject protected $table = 'customers'; - protected $fillable = ['first_name', 'channel_id', 'last_name', 'gender', 'date_of_birth', 'email', 'password', 'customer_group_id', 'subscribed_to_news_letter', 'is_verified', 'token']; + protected $fillable = ['first_name', 'channel_id', 'last_name', 'gender', 'date_of_birth', 'email', + 'phone', 'password', 'customer_group_id', 'subscribed_to_news_letter', 'is_verified', 'token']; protected $hidden = ['password', 'remember_token']; @@ -104,7 +105,7 @@ class Customer extends Authenticatable implements CustomerContract, JWTSubject public function all_orders() { return $this->hasMany(OrderProxy::modelClass(), 'customer_id'); } - + /** * Get the identifier that will be stored in the subject claim of the JWT. * @@ -114,7 +115,7 @@ class Customer extends Authenticatable implements CustomerContract, JWTSubject { return $this->getKey(); } - + /** * Return a key value array, containing any custom claims to be added to the JWT. * From 3c95e11df7f2d78984bbc12fb7e156cfd049d805 Mon Sep 17 00:00:00 2001 From: Prashant Singh Date: Tue, 4 Jun 2019 14:54:42 +0530 Subject: [PATCH 302/678] Cart rule labels bug fixed --- .../promotions/cart-rule/create.blade.php | 4 +- .../views/promotions/cart-rule/edit.blade.php | 29 +++++++------ .../Http/Controllers/CartRuleController.php | 18 +------- .../src/Repositories/CartRuleRepository.php | 42 +++++++++++++++++-- 4 files changed, 59 insertions(+), 34 deletions(-) diff --git a/packages/Webkul/Admin/src/Resources/views/promotions/cart-rule/create.blade.php b/packages/Webkul/Admin/src/Resources/views/promotions/cart-rule/create.blade.php index dc2f58fa7..421db019d 100644 --- a/packages/Webkul/Admin/src/Resources/views/promotions/cart-rule/create.blade.php +++ b/packages/Webkul/Admin/src/Resources/views/promotions/cart-rule/create.blade.php @@ -316,7 +316,7 @@
- +
{{--
@@ -366,7 +366,7 @@
- + @{{ errors.first('label') }}
diff --git a/packages/Webkul/Admin/src/Resources/views/promotions/cart-rule/edit.blade.php b/packages/Webkul/Admin/src/Resources/views/promotions/cart-rule/edit.blade.php index c26ece9a1..051a47cdc 100644 --- a/packages/Webkul/Admin/src/Resources/views/promotions/cart-rule/edit.blade.php +++ b/packages/Webkul/Admin/src/Resources/views/promotions/cart-rule/edit.blade.php @@ -38,6 +38,8 @@
+ +
@@ -232,9 +234,6 @@
- - -
@@ -352,7 +351,14 @@
@foreach($cart_rule[3]->labels as $label) + [{{ $label->channel->code }}] +
+ + + + @{{ errors.first('label') }} +
@endforeach
@@ -405,15 +411,14 @@ dedicated_label: true, global_label: null, - label: { - @foreach(core()->getAllChannels() as $channel) - @foreach($channel->locales as $locale) - {{ trim($channel->code) }} : { - {{ trim($locale->code) }}: '' - }, - @endforeach - @endforeach - }, + labels: [], + // label: { + // @foreach(core()->getAllChannels() as $channel) + // @foreach($channel->locales as $locale) + // {{ trim($channel->code) }} : null, + // @endforeach + // @endforeach + // }, criteria: null, conditions: @json($cart_rule[0]).conditions, diff --git a/packages/Webkul/Discount/src/Http/Controllers/CartRuleController.php b/packages/Webkul/Discount/src/Http/Controllers/CartRuleController.php index 5fc1c3a79..aca8d490e 100644 --- a/packages/Webkul/Discount/src/Http/Controllers/CartRuleController.php +++ b/packages/Webkul/Discount/src/Http/Controllers/CartRuleController.php @@ -105,7 +105,6 @@ class CartRuleController extends Controller 'channels' => 'required|array', 'status' => 'required|boolean', 'use_coupon' => 'boolean|required', - // 'auto_generation' => 'boolean|sometimes', 'usage_limit' => 'numeric|min:0', 'per_customer' => 'numeric|min:0', 'action_type' => 'required|string', @@ -282,8 +281,6 @@ class CartRuleController extends Controller $data = request()->all(); - dd($data); - if ($data['starts_from'] == "" || $data['ends_till'] == "") { $data['starts_from'] = null; $data['ends_till'] = null; @@ -362,20 +359,7 @@ class CartRuleController extends Controller $ruleGroupUpdated = $this->cartRule->CustomerGroupSync($customer_groups, $ruleUpdated); $ruleChannelUpdated = $this->cartRule->ChannelSync($channels, $ruleUpdated); - // if (isset($labels['global'])) { - // foreach (core()->getAllChannels() as $channel) { - // $label1['channel_id'] = $channel->id; - // foreach ($channel->locales as $locale) { - // $label1['locale_id'] = $locale->id; - // $label1['label'] = $labels['global']; - - // $ruleLabelUpdated = $this->cartRuleLabel->create($label1); - // } - // } - // } else { - // $label2['label'] = $labels['global']; - // $ruleLabelUpdated = $this->cartRuleLabel->create($label2); - // } + $labelsUpdated = $this->cartRule->LabelSync($labels, $ruleUpdated); if (isset($coupons)) { $coupons['cart_rule_id'] = $ruleUpdated->id; diff --git a/packages/Webkul/Discount/src/Repositories/CartRuleRepository.php b/packages/Webkul/Discount/src/Repositories/CartRuleRepository.php index 79fdb6450..3eebebc06 100644 --- a/packages/Webkul/Discount/src/Repositories/CartRuleRepository.php +++ b/packages/Webkul/Discount/src/Repositories/CartRuleRepository.php @@ -33,7 +33,7 @@ class CartRuleRepository extends Repository $this->cartRuleChannels = $cartRuleChannels; $this->cartRuleCustomerGroups = $cartRuleCustomerGroups; $this->cartRuleCoupons = $cartRuleCoupons; - $this->cartRuleLabels = $cartRuleLabels; + $this->cartRuleLabel = $cartRuleLabels; parent::__construct($app); } @@ -146,15 +146,51 @@ class CartRuleRepository extends Repository /** * To sync the labels associated with the cart rule */ - public function LabelsSync($labels, $cartRule) + public function LabelSync($labels, $cartRule) { + foreach ($labels as $channelCode => $value) { + $localeCode = array_keys($value)[0]; + $localeValue = array_values($value)[0]; + $updated = 0; + foreach ($cartRule->labels as $label) { + if ($label->channel->code == $channelCode && $label->locale->code == $localeCode) { + $label->update([ + 'label' => $localeValue + ]); + + $updated = 1; + } + } + + if ($updated == 0) { + foreach (core()->getAllChannels() as $channel) { + if ($channel->code == $channelCode) { + $newLabel['channel_id'] = $channel->id; + } + + foreach($channel->locales as $locale) { + if ($localeCode == $locale->code) { + $newLabel['locale_id'] = $locale->id; + $newLabel['label'] = $localeValue; + $newLabel['cart_rule_id'] = $cartRule->id; + + $ruleLabelCreated = $this->CartRuleLabels->create($newLabel); + } + } + } + } + + $updated = 0; + } + + return true; } /** * To sync the coupons associated with the cart rule */ - public function CouponsSync($coupon, $cartRule) + public function CouponSync($coupon, $cartRule) { } From 9f039cb9a5389e61393c1be901a56bfb2d542e1e Mon Sep 17 00:00:00 2001 From: imanghafoori Date: Tue, 4 Jun 2019 14:45:16 +0430 Subject: [PATCH 303/678] clean up - optimized imports - remove unused variable - extract a method - flatten code --- .../Controllers/ConfigurationController.php | 41 ++++++++----------- 1 file changed, 18 insertions(+), 23 deletions(-) diff --git a/packages/Webkul/Admin/src/Http/Controllers/ConfigurationController.php b/packages/Webkul/Admin/src/Http/Controllers/ConfigurationController.php index 9e1ec21b8..f24446b7c 100755 --- a/packages/Webkul/Admin/src/Http/Controllers/ConfigurationController.php +++ b/packages/Webkul/Admin/src/Http/Controllers/ConfigurationController.php @@ -2,13 +2,10 @@ namespace Webkul\Admin\Http\Controllers; -use Illuminate\Http\Request; -use Illuminate\Http\Response; use Illuminate\Support\Facades\Event; use Webkul\Admin\Facades\Configuration; use Webkul\Core\Repositories\CoreConfigRepository as CoreConfig; use Webkul\Core\Tree; -use Webkul\Admin\Http\Requests\ConfigurationForm; use Illuminate\Support\Facades\Storage; /** @@ -98,32 +95,18 @@ class ConfigurationController extends Controller */ public function getDefaultConfigSlugs() { - $slugs = []; - if (! request()->route('slug')) { $firstItem = current($this->configTree->items); $secondItem = current($firstItem['children']); - $temp = explode('.', $secondItem['key']); - - $slugs = [ - 'slug' => current($temp), - 'slug2' => end($temp) - ]; - } else { - if (! request()->route('slug2')) { - $secondItem = current($this->configTree->items[request()->route('slug')]['children']); - - $temp = explode('.', $secondItem['key']); - - $slugs = [ - 'slug' => current($temp), - 'slug2' => end($temp) - ]; - } + return $this->getSlugs($secondItem); } - return $slugs; + if (! request()->route('slug2')) { + $secondItem = current($this->configTree->items[request()->route('slug')]['children']); + + return $this->getSlugs($secondItem); + } } /** @@ -160,4 +143,16 @@ class ConfigurationController extends Controller return Storage::download($config['value']); } + + /** + * @param $secondItem + * + * @return array + */ + private function getSlugs($secondItem): array + { + $temp = explode('.', $secondItem['key']); + + return ['slug' => current($temp), 'slug2' => end($temp)]; + } } \ No newline at end of file From 255664c4c09a97fc9eb3dbc87601fe090ca0ebd1 Mon Sep 17 00:00:00 2001 From: rahul shukla Date: Tue, 4 Jun 2019 16:36:42 +0530 Subject: [PATCH 304/678] back button implemented on checkout page --- packages/Webkul/Shop/src/Resources/lang/en/app.php | 3 ++- .../src/Resources/views/checkout/onepage.blade.php | 10 +++++++++- .../views/checkout/onepage/customer-info.blade.php | 12 ++++++++++++ 3 files changed, 23 insertions(+), 2 deletions(-) diff --git a/packages/Webkul/Shop/src/Resources/lang/en/app.php b/packages/Webkul/Shop/src/Resources/lang/en/app.php index 285f00df0..9365c1adf 100755 --- a/packages/Webkul/Shop/src/Resources/lang/en/app.php +++ b/packages/Webkul/Shop/src/Resources/lang/en/app.php @@ -433,7 +433,8 @@ return [ 'contact' => 'Contact', 'place-order' => 'Place Order', 'new-address' => 'Add New Address', - 'save_as_address' => 'Save as Address' + 'save_as_address' => 'Save as Address', + 'back' => 'Back' ], '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 aae5a6b97..59d2c7f65 100755 --- a/packages/Webkul/Shop/src/Resources/views/checkout/onepage.blade.php +++ b/packages/Webkul/Shop/src/Resources/views/checkout/onepage.blade.php @@ -364,7 +364,15 @@ newShippingAddress: function() { this.new_shipping_address = true; - } + }, + + backToSavedBillingAddress: function() { + this.new_billing_address = false; + }, + + backToSavedShippingAddress: function() { + this.new_shipping_address = false; + }, } }) diff --git a/packages/Webkul/Shop/src/Resources/views/checkout/onepage/customer-info.blade.php b/packages/Webkul/Shop/src/Resources/views/checkout/onepage/customer-info.blade.php index d11d32682..87041cc53 100755 --- a/packages/Webkul/Shop/src/Resources/views/checkout/onepage/customer-info.blade.php +++ b/packages/Webkul/Shop/src/Resources/views/checkout/onepage/customer-info.blade.php @@ -69,6 +69,12 @@ {{ __('shop::app.checkout.onepage.sign-in') }} @endguest + + @auth('customer') + + {{ __('shop::app.checkout.onepage.back') }} + + @endauth
@@ -285,6 +291,12 @@

{{ __('shop::app.checkout.onepage.shipping-address') }}

+ + @auth('customer') + + {{ __('shop::app.checkout.onepage.back') }} + + @endauth
From b7b42ffc159bb7d6c4204b31fbf4fa14e0fb8528 Mon Sep 17 00:00:00 2001 From: rahul shukla Date: Tue, 4 Jun 2019 18:25:54 +0530 Subject: [PATCH 305/678] translation updated --- .../Admin/src/Resources/lang/en/app.php | 30 +++++++++++++++---- .../Http/Controllers/ChannelController.php | 8 ++--- .../Http/Controllers/CurrencyController.php | 8 ++--- .../Controllers/ExchangeRateController.php | 10 +++---- .../src/Http/Controllers/LocaleController.php | 10 +++---- .../Controllers/InventorySourceController.php | 10 +++---- 6 files changed, 48 insertions(+), 28 deletions(-) diff --git a/packages/Webkul/Admin/src/Resources/lang/en/app.php b/packages/Webkul/Admin/src/Resources/lang/en/app.php index c597229a5..c5c9a4dc8 100755 --- a/packages/Webkul/Admin/src/Resources/lang/en/app.php +++ b/packages/Webkul/Admin/src/Resources/lang/en/app.php @@ -551,7 +551,11 @@ return [ 'save-btn-title' => 'Save Locale', 'general' => 'General', 'code' => 'Code', - 'name' => 'Name' + 'name' => 'Name', + 'create-success' => 'Locale created successfully.', + 'update-success' => 'Locale updated successfully.', + 'delete-success' => 'Locale deleted successfully.', + 'last-delete-error' => 'At least one Locale is required.', ], 'countries' => [ 'title' => 'Countries', @@ -569,7 +573,11 @@ return [ 'general' => 'General', 'code' => 'Code', 'name' => 'Name', - 'symbol' => 'Symbol' + 'symbol' => 'Symbol', + 'create-success' => 'Currency created successfully.', + 'update-success' => 'Currency updated successfully.', + 'delete-success' => 'Currency deleted successfully.', + 'last-delete-error' => 'At least one Currency is required.', ], 'exchange_rates' => [ 'title' => 'Exchange Rates', @@ -579,7 +587,11 @@ return [ 'general' => 'General', 'source_currency' => 'Source Currency', 'target_currency' => 'Target Currency', - 'rate' => 'Rate' + 'rate' => 'Rate', + 'create-success' => 'Exchange Rate created successfully.', + 'update-success' => 'Exchange Rate updated successfully.', + 'delete-success' => 'Exchange Rate deleted successfully.', + 'last-delete-error' => 'At least one Exchange Rate is required.', ], 'inventory_sources' => [ 'title' => 'Inventory Sources', @@ -605,7 +617,11 @@ return [ 'priority' => 'Priority', 'latitude' => 'Latitude', 'longitude' => 'Longitude', - 'status' => 'Status' + 'status' => 'Status', + 'create-success' => 'Inventory source created successfully.', + 'update-success' => 'Inventory source updated successfully.', + 'delete-success' => 'Inventory source deleted successfully.', + 'last-delete-error' => 'At least one Inventory source is required.', ], 'channels' => [ 'title' => 'Channels', @@ -629,7 +645,11 @@ return [ 'home_page_content' => 'Home Page Content', 'footer_content' => 'Footer Content', 'logo' => 'Logo', - 'favicon' => 'Favicon' + 'favicon' => 'Favicon', + 'create-success' => 'Channel created successfully.', + 'update-success' => 'Channel updated successfully.', + 'delete-success' => 'Channel deleted successfully.', + 'last-delete-error' => 'At least one Channel is required.', ], 'sliders' => [ diff --git a/packages/Webkul/Core/src/Http/Controllers/ChannelController.php b/packages/Webkul/Core/src/Http/Controllers/ChannelController.php index a49ff7c06..62fe2c6e0 100755 --- a/packages/Webkul/Core/src/Http/Controllers/ChannelController.php +++ b/packages/Webkul/Core/src/Http/Controllers/ChannelController.php @@ -87,7 +87,7 @@ class ChannelController extends Controller Event::fire('core.channel.create.after', $channel); - session()->flash('success', trans('admin::app.response.create-success', ['name' => 'Channel'])); + session()->flash('success', trans('admin::app.settings.channels.create-success')); return redirect()->route($this->_config['redirect']); } @@ -133,7 +133,7 @@ class ChannelController extends Controller Event::fire('core.channel.update.after', $channel); - session()->flash('success', trans('admin::app.response.update-success', ['name' => 'Channel'])); + session()->flash('success', trans('admin::app.settings.channels.update-success')); return redirect()->route($this->_config['redirect']); } @@ -149,7 +149,7 @@ class ChannelController extends Controller $channel = $this->channel->findOrFail($id); if ($channel->code == config('app.channel')) { - session()->flash('error', trans('admin::app.response.cannot-delete-default', ['name' => 'Channel'])); + session()->flash('error', trans('admin::app.settings.channels.last-delete-error')); } else { try { Event::fire('core.channel.delete.before', $id); @@ -158,7 +158,7 @@ class ChannelController extends Controller Event::fire('core.channel.delete.after', $id); - session()->flash('success', trans('admin::app.response.delete-success', ['name' => 'Channel'])); + session()->flash('success', trans('admin::app.settings.channels.delete-success')); return response()->json(['message' => true], 200); } catch(\Exception $e) { diff --git a/packages/Webkul/Core/src/Http/Controllers/CurrencyController.php b/packages/Webkul/Core/src/Http/Controllers/CurrencyController.php index 497da79ee..c0346a6bf 100755 --- a/packages/Webkul/Core/src/Http/Controllers/CurrencyController.php +++ b/packages/Webkul/Core/src/Http/Controllers/CurrencyController.php @@ -81,7 +81,7 @@ class CurrencyController extends Controller Event::fire('core.currency.create.after', $currency); - session()->flash('success', trans('admin::app.response.create-success', ['name' => 'Currency'])); + session()->flash('success', trans('admin::app.settings.currencies.create-success')); return redirect()->route($this->_config['redirect']); } @@ -119,7 +119,7 @@ class CurrencyController extends Controller Event::fire('core.currency.update.after', $currency); - session()->flash('success', trans('admin::app.response.update-success', ['name' => 'Currency'])); + session()->flash('success', trans('admin::app.settings.currencies.update-success')); return redirect()->route($this->_config['redirect']); } @@ -135,7 +135,7 @@ class CurrencyController extends Controller $currency = $this->currency->findOrFail($id); if ($this->currency->count() == 1) { - sesssion()->flash('warning', trans( 'admin::app.response.last-delete-error', ['name' => 'Currency'])); + session()->flash('warning', trans('admin::app.settings.currencies.last-delete-error')); } else { try { Event::fire('core.currency.delete.before', $id); @@ -144,7 +144,7 @@ class CurrencyController extends Controller Event::fire('core.currency.delete.after', $id); - session()->flash('success', trans('admin::app.response.delete-success', ['name' => 'Currency'])); + session()->flash('success', trans('admin::app.settings.currencies.delete-success')); return response()->json(['message' => true], 200); } catch (\Exception $e) { diff --git a/packages/Webkul/Core/src/Http/Controllers/ExchangeRateController.php b/packages/Webkul/Core/src/Http/Controllers/ExchangeRateController.php index fe4bb1dbf..b10b1c315 100755 --- a/packages/Webkul/Core/src/Http/Controllers/ExchangeRateController.php +++ b/packages/Webkul/Core/src/Http/Controllers/ExchangeRateController.php @@ -94,7 +94,7 @@ class ExchangeRateController extends Controller Event::fire('core.exchange_rate.create.after', $exchangeRate); - session()->flash('success', trans('admin::app.response.create-success', ['name' => 'Exchange rate'])); + session()->flash('success', trans('admin::app.settings.exchange_rates.create-success')); return redirect()->route($this->_config['redirect']); } @@ -134,7 +134,7 @@ class ExchangeRateController extends Controller Event::fire('core.exchange_rate.update.after', $exchangeRate); - session()->flash('success', trans('admin::app.response.update-success', ['name' => 'Exchange rate'])); + session()->flash('success', trans('admin::app.settings.exchange_rates.update-success')); return redirect()->route($this->_config['redirect']); } @@ -149,15 +149,15 @@ class ExchangeRateController extends Controller { $exchangeRate = $this->exchangeRate->findOrFail($id); - if($this->exchangeRate->count() == 1) { - session()->flash('error', trans('admin::app.response.last-delete-error', ['name' => 'Exchange rate'])); + if ($this->exchangeRate->count() == 1) { + session()->flash('error', trans('admin::app.settings.exchange_rates.last-delete-error')); } else { try { Event::fire('core.exchange_rate.delete.before', $id); $this->exchangeRate->delete($id); - session()->flash('success', trans('admin::app.response.delete-success', ['name' => 'Exchange rate'])); + session()->flash('success', trans('admin::app.settings.exchange_rates.delete-success')); Event::fire('core.exchange_rate.delete.after', $id); diff --git a/packages/Webkul/Core/src/Http/Controllers/LocaleController.php b/packages/Webkul/Core/src/Http/Controllers/LocaleController.php index 65bdadfb0..ff8f5f058 100755 --- a/packages/Webkul/Core/src/Http/Controllers/LocaleController.php +++ b/packages/Webkul/Core/src/Http/Controllers/LocaleController.php @@ -81,7 +81,7 @@ class LocaleController extends Controller Event::fire('core.locale.create.after', $locale); - session()->flash('success', trans('admin::app.response.create-success', ['name' => 'Locale'])); + session()->flash('success', trans('admin::app.settings.locales.create-success')); return redirect()->route($this->_config['redirect']); } @@ -119,7 +119,7 @@ class LocaleController extends Controller Event::fire('core.locale.update.after', $locale); - session()->flash('success', trans('admin::app.response.update-success', ['name' => 'Locale'])); + session()->flash('success', trans('admin::app.settings.locales.update-success')); return redirect()->route($this->_config['redirect']); } @@ -134,8 +134,8 @@ class LocaleController extends Controller { $locale = $this->locale->findOrFail($id); - if($this->locale->count() == 1) { - session()->flash('error', trans('admin::app.response.last-delete-error', ['name' => 'Locale'])); + if ($this->locale->count() == 1) { + session()->flash('error', trans('admin::app.settings.locales.last-delete-error')); } else { try { Event::fire('core.locale.delete.before', $id); @@ -144,7 +144,7 @@ class LocaleController extends Controller Event::fire('core.locale.delete.after', $id); - session()->flash('success', trans('admin::app.response.delete-success', ['name' => 'Locale'])); + session()->flash('success', trans('admin::app.settings.locales.delete-success')); return response()->json(['message' => true], 200); } catch(\Exception $e) { diff --git a/packages/Webkul/Inventory/src/Http/Controllers/InventorySourceController.php b/packages/Webkul/Inventory/src/Http/Controllers/InventorySourceController.php index 59c2c00a2..23480e11a 100755 --- a/packages/Webkul/Inventory/src/Http/Controllers/InventorySourceController.php +++ b/packages/Webkul/Inventory/src/Http/Controllers/InventorySourceController.php @@ -92,7 +92,7 @@ class InventorySourceController extends Controller Event::fire('inventory.inventory_source.create.after', $inventorySource); - session()->flash('success', trans('admin::app.response.create-success', ['name' => 'Inventory source'])); + session()->flash('success', trans('admin::app.settings.inventory_sources.create-success')); return redirect()->route($this->_config['redirect']); } @@ -142,7 +142,7 @@ class InventorySourceController extends Controller Event::fire('inventory.inventory_source.update.after', $inventorySource); - session()->flash('success', trans('admin::app.response.update-success', ['name' => 'Inventory source'])); + session()->flash('success', trans('admin::app.settings.inventory_sources.update-success')); return redirect()->route($this->_config['redirect']); } @@ -157,8 +157,8 @@ class InventorySourceController extends Controller { $inventorySource = $this->inventorySource->findOrFail($id); - if($this->inventorySource->count() == 1) { - session()->flash('error', trans('admin::app.response.last-delete-error', ['name' => 'Inventory source'])); + if ($this->inventorySource->count() == 1) { + session()->flash('error', trans('admin::app.settings.inventory_sources.last-delete-error')); } else { try { Event::fire('inventory.inventory_source.delete.before', $id); @@ -167,7 +167,7 @@ class InventorySourceController extends Controller Event::fire('inventory.inventory_source.delete.after', $id); - session()->flash('success', trans('admin::app.response.delete-success', ['name' => 'Inventory source'])); + session()->flash('success', trans('admin::app.settings.inventory_sources.delete-success')); return response()->json(['message' => true], 200); } catch (\Exception $e) { From a78cc0b3b76cfbe54fc2f064e3f29a6231783038 Mon Sep 17 00:00:00 2001 From: Prashant Singh Date: Thu, 6 Jun 2019 11:14:54 +0530 Subject: [PATCH 306/678] removed margin classes from shop to UI --- .../Http/Controllers/CartRuleController.php | 2 - .../Shop/src/Resources/assets/sass/app.scss | 110 ------------------ .../Ui/src/Resources/assets/sass/app.scss | 4 - 3 files changed, 116 deletions(-) diff --git a/packages/Webkul/Discount/src/Http/Controllers/CartRuleController.php b/packages/Webkul/Discount/src/Http/Controllers/CartRuleController.php index aca8d490e..e6427031b 100644 --- a/packages/Webkul/Discount/src/Http/Controllers/CartRuleController.php +++ b/packages/Webkul/Discount/src/Http/Controllers/CartRuleController.php @@ -144,8 +144,6 @@ class CartRuleController extends Controller unset($data['cart_attributes']); unset($data['attributes']); - // unset($data['all_conditions']); - if (isset($data['disc_amount']) && $data['action_type'] == config('pricerules.cart.validations.2')) { $data['actions'] = [ 'action_type' => $data['action_type'], diff --git a/packages/Webkul/Shop/src/Resources/assets/sass/app.scss b/packages/Webkul/Shop/src/Resources/assets/sass/app.scss index db79dd970..f6e235150 100755 --- a/packages/Webkul/Shop/src/Resources/assets/sass/app.scss +++ b/packages/Webkul/Shop/src/Resources/assets/sass/app.scss @@ -38,116 +38,6 @@ input { border-radius: 0px !important; } -//margin bottom classes -.mb-10 { - margin-bottom: 10px; -} - -.mb-15 { - margin-bottom: 15px; -} - -.mb-20 { - margin-bottom: 20px; -} - -.mb-25 { - margin-bottom: 25px; -} - -.mb-30 { - margin-bottom: 30px; -} - -.mb-35 { - margin-bottom: 35px; -} - -.mb-40 { - margin-bottom: 40px; -} - -.mb-45 { - margin-bottom: 45px; -} - -.mb-50 { - margin-bottom: 50px; -} - -.mb-60 { - margin-bottom: 60px; -} - -.mb-70 { - margin-bottom: 70px; -} - -.mb-80 { - margin-bottom: 80px; -} - -.mb-90 { - margin-bottom: 90px; -} - -//margin-top -.mt-5 { - margin-top: 5px; -} - -.mt-10 { - margin-top: 10px; -} - -.mt-15 { - margin-top: 15px; -} - -.mt-20 { - margin-top: 20px; -} - -.mt-25 { - margin-top: 25px; -} - -.mt-30 { - margin-top: 30px; -} - -.mt-35 { - margin-top: 35px; -} - -.mt-40 { - margin-top: 40px; -} - -.mt-45 { - margin-top: 45px; -} - -.mt-50 { - margin-top: 50px; -} - -.mt-60 { - margin-top: 60px; -} - -.mt-70 { - margin-top: 70px; -} - -.mt-80 { - margin-top: 80px; -} - -.mt-90 { - margin-top: 90px; -} - //pagination .pagination.shop{ display: flex; diff --git a/packages/Webkul/Ui/src/Resources/assets/sass/app.scss b/packages/Webkul/Ui/src/Resources/assets/sass/app.scss index 8c83a391c..d4413f8bf 100755 --- a/packages/Webkul/Ui/src/Resources/assets/sass/app.scss +++ b/packages/Webkul/Ui/src/Resources/assets/sass/app.scss @@ -16,10 +16,6 @@ } //margin bottom classes -.mb-5 { - margin-bottom: 5px; -} - .mb-10 { margin-bottom: 10px; } From af67516c3677c6c92bc47ab125e2a5fb35e2de81 Mon Sep 17 00:00:00 2001 From: rahul shukla Date: Thu, 6 Jun 2019 15:16:16 +0530 Subject: [PATCH 307/678] object added with event --- .../Webkul/Shop/src/Resources/views/products/index.blade.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/Webkul/Shop/src/Resources/views/products/index.blade.php b/packages/Webkul/Shop/src/Resources/views/products/index.blade.php index 95a1b6cc0..347e23722 100755 --- a/packages/Webkul/Shop/src/Resources/views/products/index.blade.php +++ b/packages/Webkul/Shop/src/Resources/views/products/index.blade.php @@ -63,13 +63,13 @@
@endif - {!! view_render_event('bagisto.shop.products.index.pagination.before') !!} + {!! view_render_event('bagisto.shop.products.index.pagination.before', ['category' => $category]) !!}
{{ $products->appends(request()->input())->links() }}
- {!! view_render_event('bagisto.shop.products.index.pagination.after') !!} + {!! view_render_event('bagisto.shop.products.index.pagination.after', ['category' => $category]) !!} @else From 2d00679901fd7d206a720b2e904e129889cd22c5 Mon Sep 17 00:00:00 2001 From: jitendra Date: Thu, 6 Jun 2019 16:43:36 +0530 Subject: [PATCH 308/678] totalQuantity function added to product and product flat model --- packages/Webkul/Product/src/Models/Product.php | 18 +++++++++++++----- .../Webkul/Product/src/Models/ProductFlat.php | 8 ++++++++ 2 files changed, 21 insertions(+), 5 deletions(-) diff --git a/packages/Webkul/Product/src/Models/Product.php b/packages/Webkul/Product/src/Models/Product.php index 4205d25ff..8a5577e23 100755 --- a/packages/Webkul/Product/src/Models/Product.php +++ b/packages/Webkul/Product/src/Models/Product.php @@ -168,11 +168,9 @@ class Product extends Model implements ProductContract } /** - * @param integer $qty - * - * @return bool + * @return integer */ - public function haveSufficientQuantity($qty) + public function totalQuantity() { $total = 0; @@ -195,7 +193,17 @@ class Product extends Model implements ProductContract $total -= $orderedInventory->qty; } - return $qty <= $total ? true : (core()->getConfigData('catalog.inventory.stock_options.backorders') ? true : false); + return $total; + } + + /** + * @param integer $qty + * + * @return bool + */ + public function haveSufficientQuantity($qty) + { + return $qty <= $this->totalQuantity() ? true : (core()->getConfigData('catalog.inventory.stock_options.backorders') ? true : false); } /** diff --git a/packages/Webkul/Product/src/Models/ProductFlat.php b/packages/Webkul/Product/src/Models/ProductFlat.php index 26bdb5e6b..c23ecbefa 100644 --- a/packages/Webkul/Product/src/Models/ProductFlat.php +++ b/packages/Webkul/Product/src/Models/ProductFlat.php @@ -53,6 +53,14 @@ class ProductFlat extends Model implements ProductFlatContract return false; } + /** + * @return integer + */ + public function totalQuantity() + { + return $this->product->totalQuantity(); + } + /** * @param integer $qty * From 99ccac943dd4aa2cf919946fa89a1135686eb086 Mon Sep 17 00:00:00 2001 From: imanghafoori Date: Thu, 6 Jun 2019 16:25:06 +0430 Subject: [PATCH 309/678] fix bug --- .../Admin/src/Http/Controllers/ConfigurationController.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/Webkul/Admin/src/Http/Controllers/ConfigurationController.php b/packages/Webkul/Admin/src/Http/Controllers/ConfigurationController.php index f24446b7c..eefc14ad0 100755 --- a/packages/Webkul/Admin/src/Http/Controllers/ConfigurationController.php +++ b/packages/Webkul/Admin/src/Http/Controllers/ConfigurationController.php @@ -107,6 +107,8 @@ class ConfigurationController extends Controller return $this->getSlugs($secondItem); } + + return []; } /** From b6d64b251b6594beed5b3984dd67fc8926ac5320 Mon Sep 17 00:00:00 2001 From: Prashant Singh Date: Thu, 6 Jun 2019 19:33:52 +0530 Subject: [PATCH 310/678] Refactoring cart rule on front end --- .../Admin/src/DataGrids/CartRuleDataGrid.php | 44 ++++--- .../Admin/src/Resources/lang/en/app.php | 3 +- .../Discount/src/Config/rule-conditions.php | 3 +- .../Webkul/Discount/src/Helpers/Discount.php | 118 +++++------------- .../Http/Controllers/CartRuleController.php | 6 +- .../Shop/publishable/assets/css/shop.css | 2 +- .../src/Http/Controllers/CartController.php | 2 +- .../Shop/src/Resources/assets/sass/app.scss | 4 +- .../views/checkout/onepage.blade.php | 97 +++++++------- .../views/checkout/total/summary.blade.php | 68 +--------- 10 files changed, 119 insertions(+), 228 deletions(-) diff --git a/packages/Webkul/Admin/src/DataGrids/CartRuleDataGrid.php b/packages/Webkul/Admin/src/DataGrids/CartRuleDataGrid.php index 24c94b830..ef51932bf 100644 --- a/packages/Webkul/Admin/src/DataGrids/CartRuleDataGrid.php +++ b/packages/Webkul/Admin/src/DataGrids/CartRuleDataGrid.php @@ -21,7 +21,7 @@ class CartRuleDataGrid extends DataGrid { $queryBuilder = DB::table('cart_rules') ->select('id') - ->addSelect('id', 'name', 'starts_from', 'ends_till', 'usage_limit', 'per_customer', 'status', 'end_other_rules', 'action_type'); + ->addSelect('id', 'name', 'starts_from', 'ends_till', 'priority', 'usage_limit', 'per_customer', 'status', 'end_other_rules', 'is_guest', 'action_type'); $this->setQueryBuilder($queryBuilder); } @@ -47,21 +47,12 @@ class CartRuleDataGrid extends DataGrid ]); $this->addColumn([ - 'index' => 'per_customer', - 'label' => trans('admin::app.datagrid.per-cust'), - 'type' => 'string', + 'index' => 'priority', + 'label' => trans('admin::app.datagrid.priority'), + 'type' => 'number', 'searchable' => false, 'sortable' => true, - 'filterable' => true - ]); - - $this->addColumn([ - 'index' => 'usage_limit', - 'label' => trans('admin::app.datagrid.usage-throttle'), - 'type' => 'string', - 'searchable' => false, - 'sortable' => true, - 'filterable' => true + 'filterable' => true, ]); $this->addColumn([ @@ -72,10 +63,25 @@ class CartRuleDataGrid extends DataGrid 'sortable' => true, 'filterable' => true, 'wrapper' => function($value) { - if ($value->end_other_rules == 1) - return 'true'; + if ($value->status == 1) + return 'True'; else - return 'false'; + return 'False'; + } + ]); + + $this->addColumn([ + 'index' => 'is_guest', + 'label' => trans('admin::app.datagrid.for-guest'), + 'type' => 'boolean', + 'searchable' => false, + 'sortable' => true, + 'filterable' => true, + 'wrapper' => function($value) { + if ($value->is_guest == 1) + return 'True'; + else + return 'False'; } ]); @@ -88,9 +94,9 @@ class CartRuleDataGrid extends DataGrid 'filterable' => true, 'wrapper' => function($value) { if ($value->end_other_rules == 1) - return 'true'; + return 'True'; else - return 'false'; + return 'False'; } ]); diff --git a/packages/Webkul/Admin/src/Resources/lang/en/app.php b/packages/Webkul/Admin/src/Resources/lang/en/app.php index 29fa8ef01..64f8dbb6f 100755 --- a/packages/Webkul/Admin/src/Resources/lang/en/app.php +++ b/packages/Webkul/Admin/src/Resources/lang/en/app.php @@ -157,7 +157,8 @@ return [ 'starts-from' => 'Starts From', 'ends-till' => 'Ends Till', 'per-cust' => 'Per Customer', - 'usage-throttle' => 'Usage Times' + 'usage-throttle' => 'Usage Times', + 'for-guest' => 'For Guest' ], 'account' => [ diff --git a/packages/Webkul/Discount/src/Config/rule-conditions.php b/packages/Webkul/Discount/src/Config/rule-conditions.php index 443699c5f..90ea67d0c 100644 --- a/packages/Webkul/Discount/src/Config/rule-conditions.php +++ b/packages/Webkul/Discount/src/Config/rule-conditions.php @@ -67,8 +67,7 @@ return [ 'actions' => [ 'percent_of_product' => 'Percentage of product', 'fixed_amount' => 'Apply as fixed amount', - 'buy_a_get_b' => 'Get B units free', - 'fixed_amount_cart' => 'Fixed amount for whole cart' + 'buy_a_get_b' => 'Get B amount back', ], 'validation' => [ diff --git a/packages/Webkul/Discount/src/Helpers/Discount.php b/packages/Webkul/Discount/src/Helpers/Discount.php index 2c12c8cd5..7e31cc6f0 100644 --- a/packages/Webkul/Discount/src/Helpers/Discount.php +++ b/packages/Webkul/Discount/src/Helpers/Discount.php @@ -516,7 +516,7 @@ class Discount $appliedRule = null; if (! isset($rules['id'])) { - return response()->json(['message' => trans('admin::app.promotion.status.no-coupon')], 200); + return ['message' => trans('admin::app.promotion.status.no-coupon'), 'success' => false]; } foreach($rules['id'] as $rule) { @@ -532,13 +532,13 @@ class Discount } if (! isset($appliedRule)) { - return response()->json(['message' => trans('admin::app.promotion.status.no-coupon')], 200); + return ['message' => trans('admin::app.promotion.status.no-coupon'), 'success' => false]; } $race = $this->endRace($appliedRule); if (! $race) { - return response()->json(['message' => trans('admin::app.promotion.status.no-coupon')], 200); + return ['message' => trans('admin::app.promotion.status.no-coupon'), 'success' => false]; } $cart = \Cart::getCart(); @@ -578,6 +578,7 @@ class Discount } else { if ($appliedRule->starts_from != null && $appliedRule->ends_till != null) { if (Carbon::parse($appliedRule->starts_from) < now() && now() < Carbon::parse($appliedRule->ends_till)) { + $result = 1; } else { $result = 0; } @@ -595,13 +596,14 @@ class Discount $newQuantity = 0; if ($cart->items_qty >= $disc_threshold && $disc_quantity > 0) { - if ($disc_quantity > 1) { - $disc_amount = $disc_amount * $disc_quantity; - } // add the time conditions if rule is expired and active then make it in active $leastWorthItem = \Cart::leastWorthItem(); $realQty = $leastWorthItem['quantity']; + if ($disc_quantity > 1) { + $disc_amount = $disc_amount * $disc_quantity; + } + if ($action_type == config('pricerules.cart.validation.0')) { if ($realQty <= $disc_quantity) { $amountDiscounted = (($leastWorthItem['total'] / $realQty) * ($disc_amount / 100)) * $disc_quantity; @@ -624,92 +626,36 @@ class Discount } } else if ($action_type == config('pricerules.cart.validation.2')) { if ($realQty <= $disc_quantity) { - $newQuantity = $this->cartItem->find($leastWorthItem['id'])->quantity + $disc_amount; + $amountDiscounted = $this->cartItem->find($leastWorthItem['id'])->quantity + $disc_amount; } else { - $newQuantity = $this->cartItem->find($leastWorthItem['id'])->quantity + $disc_quantity; + $amountDiscounted = $this->cartItem->find($leastWorthItem['id'])->quantity + $disc_quantity; } - } else if ($action_type == config('pricerules.cart.validation.3')) { - $amountDiscounted = $disc_amount; - } - - if ($action_type == config('pricerules.cart.validation.2')) { - $cartRuleCart = $this->cartRuleCart->findWhere([ - 'cart_id' => $cart->id, - ]); - - if (count($cartRuleCart)) { - $this->cartRuleCart->update([ - 'cart_id' => $cart->id, - 'cart_rule_id' => $appliedRule->id - ], $cartRuleCart->first()->id); - } else { - $this->cartRuleCart->create([ - 'cart_id' => $cart->id, - 'cart_rule_id' => $appliedRule->id - ]); - } - - return response()->json([ - 'message' => trans('admin::app.promotion.status.coupon-applied'), - 'action' => $action_type, - 'amount_given' => false, - 'amount_payable' => $newQuantity, - 'amount' => null, - 'success' => true - ]); } else { - $cartRuleCart = $this->cartRuleCart->findWhere([ + $amountDiscounted = 0; + } + + $cartRuleCart = $this->cartRuleCart->findWhere([ + 'cart_id' => $cart->id, + ]); + + if (count($cartRuleCart)) { + $this->cartRuleCart->update([ 'cart_id' => $cart->id, - ]); - - if (count($cartRuleCart)) { - $this->cartRuleCart->update([ - 'cart_id' => $cart->id, - 'cart_rule_id' => $appliedRule->id - ], $cartRuleCart->first()->id); - } else { - $this->cartRuleCart->create([ - 'cart_id' => $cart->id, - 'cart_rule_id' => $appliedRule->id - ]); - } - - return response()->json([ - 'id' => $appliedRule->id, - 'rule' => $appliedRule, - 'item_id' => $leastWorthItem['id'], - 'message' => trans('admin::app.promotion.status.coupon-applied'), - 'amount_given' => true, - 'amount' => core()->currency($amountDiscounted + $cart->tax_total), - 'action_type' => $action_type, - 'success' => true + 'cart_rule_id' => $appliedRule->id + ], $cartRuleCart->first()->id); + } else { + $this->cartRuleCart->create([ + 'cart_id' => $cart->id, + 'cart_rule_id' => $appliedRule->id ]); } + dd($amountDiscounted); + return ['message' => trans('admin::app.promotion.status.coupon-applied'), 'success' => true, 'amount' => $amountDiscounted]; } else { - return response()->json([ - 'id' => null, - 'rule' => null, - 'item_id' => null, - 'message' => trans('admin::app.promotion.status.coupon-failed'), - 'action' => $action_type, - 'amount_given' => null, - 'amount' => null, - 'least_value_item' => null, - 'success' => false - ]); + return ['message' => trans('admin::app.promotion.status.coupon-failed'), 'success' => false, 'amount' => $amountDiscounted]; } } else { - return response()->json([ - 'id' => null, - 'rule' => null, - 'item_id' => null, - 'message' => trans('admin::app.promotion.status.coupon-failed'), - 'action' => null, - 'amount_given' => null, - 'amount' => null, - 'least_value_item' => null, - 'success' => false - ]); + return ['message' => trans('admin::app.promotion.status.coupon-failed'), 'success' => false, 'amount' => $amountDiscounted]; } } @@ -769,6 +715,11 @@ class Discount } } + /** + * Used when race condition occurs between + * any two rules possibly a discounted and + * a non discounted rule + */ public function analyzeImpact($rule) { $cart = \Cart::getCart(); @@ -947,7 +898,6 @@ class Discount protected function testAllConditionAreFalse($conditions, $cart) { $shipping_address = $cart->getShippingAddressAttribute(); - $shipping_method = $cart->shipping_method; $shipping_country = $shipping_address->country; $shipping_state = $shipping_address->state; diff --git a/packages/Webkul/Discount/src/Http/Controllers/CartRuleController.php b/packages/Webkul/Discount/src/Http/Controllers/CartRuleController.php index e6427031b..e577304e5 100644 --- a/packages/Webkul/Discount/src/Http/Controllers/CartRuleController.php +++ b/packages/Webkul/Discount/src/Http/Controllers/CartRuleController.php @@ -162,12 +162,12 @@ class CartRuleController extends Controller $data['actions'] = json_encode($data['actions']); - if (! isset($data['all_conditions'])) { + if (! isset($data['all_conditions']) || $data['all_conditions'] == "[]") { $data['conditions'] = null; } else { $data['conditions'] = json_encode($data['all_conditions']); - unset($data['all_conditions']); } + unset($data['all_conditions']); if ($data['use_coupon']) { // if (isset($data['auto_generation']) && $data['auto_generation']) { @@ -318,7 +318,7 @@ class CartRuleController extends Controller } $data['actions'] = json_encode($data['actions']); - if (! isset($data['all_conditions'])) { + if (! isset($data['all_conditions']) || $data['all_conditions'] == "[]") { $data['conditions'] = null; } else { $data['conditions'] = json_encode($data['all_conditions']); diff --git a/packages/Webkul/Shop/publishable/assets/css/shop.css b/packages/Webkul/Shop/publishable/assets/css/shop.css index a74033e95..4f71e11da 100755 --- a/packages/Webkul/Shop/publishable/assets/css/shop.css +++ b/packages/Webkul/Shop/publishable/assets/css/shop.css @@ -1 +1 @@ -@import url(https://fonts.googleapis.com/css?family=Montserrat:400,500);.icon{display:inline-block;background-size:cover}.dropdown-right-icon{background-image:URL("../images/icon-dropdown-left.svg");width:8px;height:8px;margin-left:auto;margin-bottom:2px}.icon-menu-close{background-image:URL("../images/icon-menu-close.svg");width:24px;height:24px;margin-left:auto}.icon-menu-close-adj{background-image:URL("../images/cross-icon-adj.svg");margin-left:auto}.grid-view-icon{background-image:URL("../images/icon-grid-view.svg");width:24px;height:24px}.list-view-icon{background-image:URL("../images/icon-list-view.svg");width:24px;height:24px}.sort-icon{background-image:URL("../images/icon-sort.svg");width:32px;height:32px}.filter-icon{background-image:URL("../images/icon-filter.svg");width:32px;height:32px}.whishlist-icon{background-image:URL("../images/wishlist.svg");width:24px;height:24px}.share-icon{background-image:URL("../images/icon-share.svg");width:24px;height:24px}.icon-menu{background-image:URL("../images/icon-menu.svg");width:24px;height:24px}.icon-search{background-image:URL("../images/icon-search.svg");width:24px;height:24px}.icon-menu-back{background-image:URL("../images/icon-menu-back.svg");width:24px;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}.cart-icon{background-image:url("../images/icon-cart.svg");width:24px;height:24px}.wishlist-icon{background-image:url("../images/wishlist.svg");width:32px;height:32px}.icon-arrow-up{background-image:url("../images/arrow-up.svg");width:16px;height:16px}.icon-arrow-down{background-image:url("../images/arrow-down.svg");width:16px;height:16px}.expand-icon{background-image:url("../images/Expand-Light.svg");width:18px;height:18px}.expand-on-icon{background-image:url("../images/Expand-Light-On.svg");width:18px;height:18px}.icon-menu-close-adj{background-image:url("../images/cross-icon-adj.svg");width:32px;height:32px}.icon-facebook{background-image:url("../images/facebook.svg")}.icon-twitter{background-image:url("../images/twitter.svg")}.icon-google-plus{background-image:url("../images/google-plus.svg")}.icon-instagram{background-image:url("../images/instagram.svg")}.icon-linkedin{background-image:url("../images/linkedin.svg")}.icon-dropdown{background-image:url("../images/icon-dropdown.svg")}@-webkit-keyframes spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}@keyframes spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}body{margin:0;padding:0;font-weight:500;max-width:100%;width:auto;color:#242424;font-size:16px}*{font-family:Montserrat,sans-serif}::-webkit-input-placeholder{font-family:Montserrat,sans-serif}textarea{resize:none}input{font-family:Montserrat,sans-serif}.btn{border-radius:0!important}.mb-10{margin-bottom:10px}.mb-15{margin-bottom:15px}.mb-20{margin-bottom:20px}.mb-25{margin-bottom:25px}.mb-30{margin-bottom:30px}.mb-35{margin-bottom:35px}.mb-40{margin-bottom:40px}.mb-45{margin-bottom:45px}.mb-50{margin-bottom:50px}.mb-60{margin-bottom:60px}.mb-70{margin-bottom:70px}.mb-80{margin-bottom:80px}.mb-90{margin-bottom:90px}.mt-5{margin-top:5px}.mt-10{margin-top:10px}.mt-15{margin-top:15px}.mt-20{margin-top:20px}.mt-25{margin-top:25px}.mt-30{margin-top:30px}.mt-35{margin-top:35px}.mt-40{margin-top:40px}.mt-45{margin-top:45px}.mt-50{margin-top:50px}.mt-60{margin-top:60px}.mt-70{margin-top:70px}.mt-80{margin-top:80px}.mt-90{margin-top:90px}.pagination.shop{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-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.bold{font-weight:700;color:#3a3a3a}.radio-container{display:block;position:relative;padding-left:35px;margin-bottom:12px;cursor:pointer;font-size:16px;user-select:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none}.radio-container input{position:absolute;opacity:0;cursor:pointer;top:0;left:0}.radio-container .checkmark{position:absolute;top:0;left:0;height:16px;width:16px;background-color:#fff;border:2px solid #ff6472;border-radius:50%}.radio-container .checkmark:after{content:"";position:absolute;display:none;top:2px;left:2px;width:8px;height:8px;border-radius:50%;background:#ff6472}.radio-container input:checked~.checkmark:after{display:block}.radio-container input:disabled~.checkmark{display:block;border:2px solid rgba(255,100,113,.4)}.cp-spinner{width:48px;height:48px;display:inline-block;-webkit-box-sizing:border-box;box-sizing:border-box}.cp-round:before{border-radius:50%;border:6px solid #bababa}.cp-round:after,.cp-round:before{content:" ";width:48px;height:48px;display:inline-block;-webkit-box-sizing:border-box;box-sizing:border-box;position:absolute;top:0;left:0}.cp-round:after{border-radius:50%;border-top:6px solid #0031f0;border-right:6px solid transparent;border-bottom:6px solid transparent;border-left:6px solid transparent;-webkit-animation:spin 1s ease-in-out infinite;animation:spin 1s ease-in-out infinite}.pull-right{float:right}.add-to-wishlist .wishlist-icon:hover{background-image:url("../images/wishlist-added.svg")}.product-price{margin-bottom:14px;width:100%;font-weight:600}.product-price .price-label{font-size:14px;font-weight:400}.product-price .regular-price{color:#a5a5a5;text-decoration:line-through;margin-right:10px}.product-price .special-price{color:#ff6472}.horizontal-rule{display:block;width:100%;height:1px;background:#c7c7c7}.account-head .account-heading{font-size:28px;color:#242424;text-transform:capitalize;text-align:left}.account-head .account-action{font-size:17px;margin-top:1%;color:#0031f0;float:right}.account-head .horizontal-rule{margin-top:1.1%;width:100%;height:1px;vertical-align:middle;background:#c7c7c7}.account-item-card{-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;-webkit-box-align:center;-ms-flex-align:center;align-items:center;width:100%;height:125px}.account-item-card,.account-item-card .media-info{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row}.account-item-card .media-info .media{height:125px;width:110px}.account-item-card .media-info .info{margin-left:20px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-pack:space-evenly;-ms-flex-pack:space-evenly;justify-content:space-evenly}.account-item-card .media-info .info .stars .icon{height:16px;width:16px}.account-item-card .operations{height:120px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.account-item-card .operations a{width:100%}.account-item-card .operations a span{float:right}.account-items-list{display:block;width:100%}.account-items-list .grid-container{margin-top:40px}.search-result-status{width:100%;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.grid-container{margin-top:20px}.main-container-wrapper{max-width:1300px;width:auto;padding-left:15px;padding-right:15px;margin-left:auto;margin-right:auto}.main-container-wrapper .content-container{display:block;margin-bottom:40px}.main-container-wrapper .product-grid-4{display:grid;grid-template-columns:repeat(auto-fill,minmax(235px,1fr));grid-auto-rows:auto;grid-column-gap:30px;grid-row-gap:15px;justify-items:end}.main-container-wrapper .product-grid-3{display:grid;grid-template-columns:repeat(auto-fill,minmax(235px,1fr));grid-gap:27px;grid-auto-rows:auto;justify-items:center}.main-container-wrapper .product-card{position:relative;padding:15px}.main-container-wrapper .product-card .product-image{max-height:350px;max-width:280px;margin-bottom:10px;background:#f2f2f2}.main-container-wrapper .product-card .product-image img{display:block;width:100%}.main-container-wrapper .product-card .product-name{margin-bottom:14px;width:100%;color:#242424}.main-container-wrapper .product-card .product-name a{color:#242424}.main-container-wrapper .product-card .product-description{display:none}.main-container-wrapper .product-card .product-ratings{width:100%}.main-container-wrapper .product-card .product-ratings .icon{width:16px;height:16px}.main-container-wrapper .product-card .cart-wish-wrap{display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start;-webkit-box-align:center;-ms-flex-align:center;align-items:center;height:40px}.main-container-wrapper .product-card .cart-wish-wrap .addtocart{margin-right:10px;text-transform:uppercase;text-align:left;-webkit-box-shadow:1px 1px 0 #ccc;box-shadow:1px 1px 0 #ccc}.main-container-wrapper .product-card .cart-wish-wrap .add-to-wishlist{margin-top:5px;background:transparent;border:0;cursor:pointer;padding:0}.main-container-wrapper .product-card .sticker{border-radius:100px;position:absolute;top:20px;left:20px;text-transform:uppercase;padding:4px 13px;font-size:14px;color:#fff;-webkit-box-shadow:1px 1px 1px #ccc;box-shadow:1px 1px 1px #ccc}.main-container-wrapper .product-card .sticker.sale{background:#ff6472}.main-container-wrapper .product-card .sticker.new{background:#2ed04c}.main-container-wrapper .product-card:hover{outline:1px solid #eaeaec;box-shadow:0 1px 2px rgba(0,0,0,.05);-webkit-box-shadow:0 2px 16px 4px rgba(40,44,63,.07);box-shadow:0 2px 16px 4px rgba(40,44,63,.07)}@media only screen and (max-width:580px){.main-container-wrapper .main-container-wrapper{padding:0}}@media only screen and (max-width:551px){.main-container-wrapper .product-grid-3{grid-template-columns:48.5% 48.5%;grid-column-gap:20px}}@media only screen and (max-width:854px){.main-container-wrapper .product-grid-4{grid-template-columns:29.5% 29.5% 29.5%;grid-column-gap:35px}}@media only screen and (max-width:653px){.main-container-wrapper .product-grid-4{grid-template-columns:48.5% 48.5%;grid-column-gap:17px}}@media only screen and (max-width:425px){.main-container-wrapper .product-card{font-size:90%}.main-container-wrapper .product-card .btn.btn-md{padding:5px}.main-container-wrapper .product-grid-4{grid-template-columns:48.5% 48.5%;grid-column-gap:10px}}.main-container-wrapper .product-list{min-height:200px}.main-container-wrapper .product-list .product-card{width:100%;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-align:center;-ms-flex-align:center;align-items:center;margin-bottom:20px}.main-container-wrapper .product-list .product-card .product-image{float:left;width:30%;height:350px}.main-container-wrapper .product-list .product-card .product-image img{height:100%}.main-container-wrapper .product-list .product-card .product-information{float:right;width:70%;padding-left:30px}.main-container-wrapper .product-list .product-card:last-child{margin-bottom:0}.main-container-wrapper .product-list.empty h2{font-size:20px}.main-container-wrapper section.featured-products{display:block;margin-bottom:5%}.main-container-wrapper section.featured-products .featured-heading{width:100%;text-align:center;text-transform:uppercase;font-size:18px;margin-bottom:20px}.main-container-wrapper section.featured-products .featured-heading .featured-separator{color:#d3d3d3}.main-container-wrapper section.news-update{display:block;-webkit-box-sizing:border-box;box-sizing:border-box;width:100%;margin-bottom:5%}.main-container-wrapper section.news-update .news-update-grid{display:grid;grid-template-columns:58.5% 40%;grid-gap:20px}.main-container-wrapper section.news-update .news-update-grid .block1{display:block;-webkit-box-sizing:border-box;box-sizing:border-box}.main-container-wrapper section.news-update .news-update-grid .block1 img{display:-webkit-box;display:-ms-flexbox;display:flex;height:100%;width:100%}.main-container-wrapper section.news-update .news-update-grid .block2{display:block;-webkit-box-sizing:border-box;box-sizing:border-box;display:grid;grid-template-rows:repeat(2,minmax(50%,1fr));grid-row-gap:20px}.main-container-wrapper section.news-update .news-update-grid .block2 .sub-block1{display:block;-webkit-box-sizing:border-box;box-sizing:border-box}.main-container-wrapper section.news-update .news-update-grid .block2 .sub-block1 img{width:100%}.main-container-wrapper section.news-update .news-update-grid .block2 .sub-block2{display:block;-webkit-box-sizing:border-box;box-sizing:border-box}.main-container-wrapper section.news-update .news-update-grid .block2 .sub-block2 img{width:100%}section.slider-block{display:block;margin-left:auto;margin-right:auto;margin-bottom:5%}section.slider-block div.slider-content{position:relative;height:500px;margin-left:auto;margin-right:auto}section.slider-block div.slider-content ul.slider-images .show-content{display:none}section.slider-block div.slider-content ul.slider-images li{position:absolute;visibility:hidden}section.slider-block div.slider-content ul.slider-images li.show{display:block;position:relative;visibility:visible;width:100%;-webkit-animation-name:example;animation-name:example;-webkit-animation-duration:4s;animation-duration:4s}section.slider-block div.slider-content ul.slider-images li.show .show-content{display:-webkit-box;display:-ms-flexbox;display:flex;position:absolute;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;color:#242424;height:100%;width:100%;top:0}@-webkit-keyframes example{0%{opacity:.1}to{opacity:1}}@keyframes example{0%{opacity:.1}to{opacity:1}}section.slider-block div.slider-content ul.slider-images li img{height:500px;width:100%}section.slider-block div.slider-content div.slider-control{display:block;cursor:pointer;position:absolute;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;bottom:2%;right:2%}section.slider-block div.slider-content div.slider-control .dark-left-icon{background-color:#f2f2f2;height:48px;width:48px;max-height:100%;max-width:100%}section.slider-block div.slider-content div.slider-control .light-right-icon{background-color:#242424;height:48px;width:48px;max-height:100%;max-width:100%}@media only screen and (max-width:770px){section.slider-block div.slider-content div.slider-control{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;bottom:46%;right:0;width:100%}}.header{margin-top:16px;margin-bottom:21px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.header .header-top{margin-bottom:16px;max-width:100%;width:auto;margin-left:auto;margin-right:auto;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between}.header .header-top,.header .header-top div.left-content{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.header .header-top div.left-content{-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start}.header .header-top div.left-content ul.logo-container{margin-right:12px}.header .header-top div.left-content ul.logo-container li{display:-webkit-box;display:-ms-flexbox;display:flex}.header .header-top div.left-content ul.logo-container li img{max-width:120px;max-height:40px}.header .header-top div.left-content ul.search-container li.search-group{display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.header .header-top div.left-content ul.search-container li.search-group .search-field{height:38px;border:2px solid #c7c7c7;border-radius:3px;border-right:none;border-top-right-radius:0;border-bottom-right-radius:0;padding-left:12px;font-size:14px}.header .header-top div.left-content ul.search-container li.search-group .search-icon-wrapper{-webkit-box-sizing:border-box;box-sizing:border-box;height:38px;width:38px;border:2px solid #c7c7c7;border-top-right-radius:3px;border-bottom-right-radius:3px}.header .header-top div.left-content ul.search-container li.search-group .search-icon-wrapper button{background:#fff;border:0;padding:3px 5px}.header .header-top div.right-content .right-content-menu>li{display:inline-block;border-right:2px solid #c7c7c7;padding:0 15px;min-height:15px;padding-top:3px}.header .header-top div.right-content .right-content-menu>li:first-child{padding-left:0}.header .header-top div.right-content .right-content-menu>li:last-child{border-right:0;padding-right:0}.header .header-top div.right-content .right-content-menu>li .icon{vertical-align:middle}.header .header-top div.right-content .right-content-menu>li .icon:not(.arrow-down-icon){margin-right:5px}.header .header-top div.right-content .right-content-menu>li .arrow-down-icon{width:12px;height:6px}.header .header-top div.right-content .right-content-menu .cart-dropdown-container{border-right:0;padding-right:0}.header .header-top div.right-content .right-content-menu .cart-link{pointer-events:none}.header .header-top div.right-content .right-content-menu ul.dropdown-list{display:none;margin-top:14px}.header .header-top div.right-content .right-content-menu ul.dropdown-list li{border-right:none;padding:5px 10px;display:block}.header .header-top div.right-content .right-content-menu ul.dropdown-list li a{color:#333}.header .header-top div.right-content .right-content-menu .currency{position:absolute;right:0;width:100px}.header .header-top div.right-content .right-content-menu .account{position:absolute;right:0}.header .header-top div.right-content .right-content-menu .account li{padding:20px!important}.header .header-top div.right-content .right-content-menu .account li ul{margin-top:5px}.header .header-top div.right-content .right-content-menu .account li ul>li{padding:5px 10px 5px 0!important}.header .header-top div.right-content .right-content-menu .guest{width:300px}.header .header-top div.right-content .right-content-menu .guest .btn.btn-sm{padding:9px 25px}.header .header-top div.right-content .right-content-menu .cart-dropdown-container .dropdown-list{width:387px}.header .header-top div.right-content .right-content-menu .cart-dropdown-container .dropdown-list .dropdown-container{padding:0}.header .header-top div.right-content .right-content-menu .cart-dropdown-container .dropdown-list .dropdown-container .dropdown-cart{color:#242424}.header .header-top div.right-content .right-content-menu .cart-dropdown-container .dropdown-list .dropdown-container .dropdown-cart>.dropdown-header{width:100%;padding:8px 16px;border-bottom:1px solid #c7c7c7}.header .header-top div.right-content .right-content-menu .cart-dropdown-container .dropdown-list .dropdown-container .dropdown-cart>.dropdown-header p{display:inline;line-height:25px}.header .header-top div.right-content .right-content-menu .cart-dropdown-container .dropdown-list .dropdown-container .dropdown-cart>.dropdown-header i{float:right;height:22px;width:22px}.header .header-top div.right-content .right-content-menu .cart-dropdown-container .dropdown-list .dropdown-container .dropdown-cart>.dropdown-header p.heading{font-weight:lighter}.header .header-top div.right-content .right-content-menu .cart-dropdown-container .dropdown-list .dropdown-container .dropdown-content{padding-top:8px;margin-bottom:55px;width:100%;max-height:329px;overflow-y:auto}.header .header-top div.right-content .right-content-menu .cart-dropdown-container .dropdown-list .dropdown-container .dropdown-content .item{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;border-bottom:1px solid #c7c7c7;padding:8px 16px}.header .header-top div.right-content .right-content-menu .cart-dropdown-container .dropdown-list .dropdown-container .dropdown-content .item img{height:75px;width:75px;margin-right:8px}.header .header-top div.right-content .right-content-menu .cart-dropdown-container .dropdown-list .dropdown-container .dropdown-content .item-details{height:auto}.header .header-top div.right-content .right-content-menu .cart-dropdown-container .dropdown-list .dropdown-container .item-details .item-name{font-size:16px;font-weight:700;margin-bottom:8px}.header .header-top div.right-content .right-content-menu .cart-dropdown-container .dropdown-list .dropdown-container .item-details .item-options{font-size:16px;margin-bottom:8px}.header .header-top div.right-content .right-content-menu .cart-dropdown-container .dropdown-list .dropdown-container .item-details .item-price{margin-bottom:8px}.header .header-top div.right-content .right-content-menu .cart-dropdown-container .dropdown-list .dropdown-container .item-details .item-qty{font-weight:lighter;margin-bottom:8px}.header .header-top div.right-content .right-content-menu .cart-dropdown-container .dropdown-list .dropdown-container .dropdown-footer{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;-webkit-box-align:center;-ms-flex-align:center;align-items:center;padding:8px 16px;position:absolute;bottom:0;width:100%;background:#fff;border-top:1px solid #c7c7c7}.header .header-top div.right-content .right-content-menu .cart-dropdown-container .dropdown-list .dropdown-container .dropdown-footer .btn{margin:0;max-width:170px;text-align:center}.header .header-top div.right-content .menu-box,.header .header-top div.right-content .search-box{display:none}.header .header-bottom{height:47px;margin-left:auto;margin-right:auto;border-top:1px solid #c7c7c7;border-bottom:1px solid #c7c7c7;display:block}.header .header-bottom ul.nav{display:block;font-size:16px;max-width:100%;width:auto;margin-left:auto;margin-right:auto}.header .header-bottom .nav ul{margin:0;padding:0;-webkit-box-shadow:1px 1px 1px 0 rgba(0,0,0,.4);box-shadow:1px 1px 1px 0 rgba(0,0,0,.4)}.header .header-bottom .nav a{display:block;color:#242424;text-decoration:none;padding:.8em .3em .8em .5em;text-transform:capitalize;letter-spacing:-.38px;position:relative}.header .header-bottom .nav li>.icon{display:none}.header .header-bottom .nav{vertical-align:top;display:inline-block}.header .header-bottom .nav li{position:relative}.header .header-bottom .nav>li{float:left;margin-right:1px;height:45px}.header .header-bottom .nav>li>a{margin-bottom:1px}.header .header-bottom .nav>li>a .icon{display:none}.header .header-bottom .nav li li a{margin-top:1px;white-space:normal;word-break:break-word;width:200px}.header .header-bottom .nav li a:first-child:nth-last-child(2):before{content:"";position:absolute;height:0;width:0;border:5px solid transparent;top:50%;right:5px}.header .header-bottom .nav ul{position:absolute;white-space:nowrap;border:1px solid #c7c7c7;background-color:#fff;z-index:10000;left:-99999em}.header .header-bottom .nav>li:hover{background-color:#f2f2f2}.header .header-bottom .nav>li:hover>ul{left:auto;min-width:100%}.header .header-bottom .nav>li li:hover{background-color:#f2f2f2}.header .header-bottom .nav>li li:hover>ul{left:100%;margin-left:1px;top:-2px}.header .header-bottom .nav>li:hover>a:first-child:nth-last-child(2):before,.header .header-bottom .nav li li>a:first-child:nth-last-child(2):before{margin-top:-5px}.header .header-bottom .nav li li:hover>a:first-child:nth-last-child(2):before{right:10px}.header .search-responsive{display:none}.header .search-responsive .search-content{border-bottom:1px solid #c7c7c7;border-top:1px solid #c7c7c7;height:50px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between}.header .search-responsive .search-content .search{width:80%;border:none;font-size:16px}.header .search-responsive .search-content .right{float:right}@media (max-width:720px){.header .currency-switcher{display:none!important}.header .header-top div.right-content{display:inherit}.header .header-top div.right-content .menu-box{display:inline-block;margin-left:10px}.header .header-top div.right-content .search-box{display:inline-block;margin-right:10px}.header .header-top div.right-content .right-content-menu>li{border-right:none;padding:0 2px}.header .header-top div.right-content .right-content-menu>li .icon:not(.arrow-down-icon){margin-right:0}.header .header-top div.right-content .right-content-menu .cart-link{pointer-events:all}.header .header-top div.right-content .right-content-menu .arrow-down-icon,.header .header-top div.right-content .right-content-menu .cart-dropdown-container .dropdown-container,.header .header-top div.right-content .right-content-menu .name{display:none}.header .header-bottom{height:auto;display:none}.header .header-bottom .nav a{display:inline-block}.header .header-bottom .nav li,.header .header-bottom ul.nav{height:auto}.header .header-bottom .nav>li{float:none}.header .header-bottom .nav li>.icon{float:right;display:block}.header .header-bottom .icon.icon-arrow-down{margin-right:5px}.header .header-bottom .nav li .left{height:16px;width:16px}.header .header-bottom .nav li a>.icon{display:none}.header .header-bottom .nav ul{position:unset;border:none;-webkit-box-shadow:none;box-shadow:none}.header .header-bottom .nav>li li:hover>ul{margin-left:0;top:0}ul.account-dropdown-container,ul.cart-dropdown-container,ul.search-container{display:none!important}}@media (max-width:400px){.header .header-top div.right-content .right-content-menu .guest{width:240px}.header .header-top div.right-content .right-content-menu .guest .btn.btn-sm{padding:7px 14px}}.footer{background-color:#f2f2f2;padding-left:10%;padding-right:10%;width:100%;display:inline-block}.footer .footer-content .footer-list-container{display:grid;padding:40px 10px;grid-template-columns:repeat(auto-fit,minmax(250px,1fr));grid-auto-rows:auto;grid-row-gap:1vh}.footer .footer-content .footer-list-container .list-container .list-heading{text-transform:uppercase;color:#a5a5a5}.footer .footer-content .footer-list-container .list-container .list-group{padding-top:25px}.footer .footer-content .footer-list-container .list-container .list-group a{color:#242424}.footer .footer-content .footer-list-container .list-container .list-group li{margin-bottom:12px;list-style-type:none;text-transform:uppercase}.footer .footer-content .footer-list-container .list-container .list-group li span.icon{display:inline-block;vertical-align:middle;margin-right:5px;height:24px;width:24px}.footer .footer-content .footer-list-container .list-container .form-container{padding-top:5px}.footer .footer-content .footer-list-container .list-container .form-container .control-group .subscribe-field{width:100%}.footer .footer-content .footer-list-container .list-container .form-container .control-group .btn-primary{background-color:#242424;margin-top:8px;border-radius:0;text-align:center}.footer .footer-content .footer-list-container .list-container .form-container .control-group .locale-switcher{width:100%}.footer .footer-content .footer-list-container .list-container .currency{display:none}@media (max-width:720px){.footer{padding-left:15px}.footer .footer-list-container{padding-left:0!important}.footer .currency{display:block!important}}.footer-bottom{width:100%;height:70px;font-size:16px;color:#a5a5a5;letter-spacing:-.26px;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:center;-ms-flex-pack:center;justify-content:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.footer-bottom p{padding:0 15px}.main .category-container{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;width:100%}.main .category-container .layered-filter-wrapper,.main .category-container .responsive-layred-filter{width:25%;float:left;padding-right:20px;min-height:1px}.main .category-container .layered-filter-wrapper .filter-title,.main .category-container .responsive-layred-filter .filter-title{border-bottom:1px solid #c7c7c7;color:#242424;padding:10px 0}.main .category-container .layered-filter-wrapper .filter-attributes .filter-attributes-item,.main .category-container .responsive-layred-filter .filter-attributes .filter-attributes-item{border-bottom:1px solid #c7c7c7;padding-bottom:10px}.main .category-container .layered-filter-wrapper .filter-attributes .filter-attributes-item .filter-attributes-title,.main .category-container .responsive-layred-filter .filter-attributes .filter-attributes-item .filter-attributes-title{padding:10px 40px 0 10px;color:#5e5e5e;cursor:pointer;position:relative}.main .category-container .layered-filter-wrapper .filter-attributes .filter-attributes-item .filter-attributes-title .remove-filter-link,.main .category-container .responsive-layred-filter .filter-attributes .filter-attributes-item .filter-attributes-title .remove-filter-link{font-weight:400;color:#0031f0;margin-right:10px}.main .category-container .layered-filter-wrapper .filter-attributes .filter-attributes-item .filter-attributes-title .icon,.main .category-container .responsive-layred-filter .filter-attributes .filter-attributes-item .filter-attributes-title .icon{background-image:url("../images/icon-dropdown.svg")!important;width:10px;height:10px;position:absolute;right:15px;top:14px}.main .category-container .layered-filter-wrapper .filter-attributes .filter-attributes-item .filter-attributes-content,.main .category-container .responsive-layred-filter .filter-attributes .filter-attributes-item .filter-attributes-content{padding:10px;display:none}.main .category-container .layered-filter-wrapper .filter-attributes .filter-attributes-item .filter-attributes-content ol.items,.main .category-container .responsive-layred-filter .filter-attributes .filter-attributes-item .filter-attributes-content ol.items{padding:0;margin:0;list-style:none none}.main .category-container .layered-filter-wrapper .filter-attributes .filter-attributes-item .filter-attributes-content ol.items li.item,.main .category-container .responsive-layred-filter .filter-attributes .filter-attributes-item .filter-attributes-content ol.items li.item{padding:8px 0;color:#5e5e5e}.main .category-container .layered-filter-wrapper .filter-attributes .filter-attributes-item .filter-attributes-content ol.items li.item .checkbox,.main .category-container .responsive-layred-filter .filter-attributes .filter-attributes-item .filter-attributes-content ol.items li.item .checkbox{margin:0}.main .category-container .layered-filter-wrapper .filter-attributes .filter-attributes-item .filter-attributes-content ol.items li.item .checkbox .checkbox-view,.main .category-container .responsive-layred-filter .filter-attributes .filter-attributes-item .filter-attributes-content ol.items li.item .checkbox .checkbox-view{height:16px;width:16px;background-image:url("../images/checkbox.svg")}.main .category-container .layered-filter-wrapper .filter-attributes .filter-attributes-item .filter-attributes-content ol.items li.item .checkbox input:checked+.checkbox-view,.main .category-container .responsive-layred-filter .filter-attributes .filter-attributes-item .filter-attributes-content ol.items li.item .checkbox input:checked+.checkbox-view{background-image:url("../images/checkbox-checked.svg")}.main .category-container .layered-filter-wrapper .filter-attributes .filter-attributes-item .filter-attributes-content ol.items li.item .color-swatch,.main .category-container .responsive-layred-filter .filter-attributes .filter-attributes-item .filter-attributes-content ol.items li.item .color-swatch{display:inline-block;margin-right:5px;min-width:20px;height:20px;border:1px solid #c7c7c7;border-radius:3px;float:right}.main .category-container .layered-filter-wrapper .filter-attributes .filter-attributes-item .filter-attributes-content .price-range-wrapper,.main .category-container .responsive-layred-filter .filter-attributes .filter-attributes-item .filter-attributes-content .price-range-wrapper{margin-top:21px}.main .category-container .layered-filter-wrapper .filter-attributes .filter-attributes-item.active .filter-attributes-content,.main .category-container .responsive-layred-filter .filter-attributes .filter-attributes-item.active .filter-attributes-content{display:block}.main .category-container .layered-filter-wrapper .filter-attributes .filter-attributes-item.active .filter-attributes-title .icon,.main .category-container .responsive-layred-filter .filter-attributes .filter-attributes-item.active .filter-attributes-title .icon{background-image:url("../images//arrow-up.svg")!important}.main .category-container .responsive-layred-filter{display:none;width:100%;float:none;padding-right:0;margin-top:-25px!important}.main .category-container .category-block{width:80%;display:block}.main .category-container .category-block .hero-image{display:inline-block;visibility:visible;width:100%}.main .category-container .category-block .hero-image img{height:400px;width:100%}.main .top-toolbar{width:100%;display:inline-block}.main .top-toolbar .page-info{float:left;color:#242424;line-height:45px}.main .top-toolbar .page-info span{display:none}.main .top-toolbar .page-info span:first-child{display:inline}.main .top-toolbar .pager{float:right}.main .top-toolbar .pager label{margin-right:5px}.main .top-toolbar .pager select{background:#f2f2f2;border:1px solid #c7c7c7;border-radius:3px;color:#242424;padding:10px}.main .top-toolbar .pager .view-mode{display:inline-block;margin-right:20px}.main .top-toolbar .pager .view-mode a,.main .top-toolbar .pager .view-mode span{display:inline-block;vertical-align:middle}.main .top-toolbar .pager .view-mode a.grid-view,.main .top-toolbar .pager .view-mode span.grid-view{margin-right:10px}.main .top-toolbar .pager .view-mode .sort-filter{display:none}.main .top-toolbar .pager .sorter{display:inline-block;margin-right:10px}.main .top-toolbar .pager .limiter{display:inline-block}.main .bottom-toolbar{display:block;margin-top:40px;margin-bottom:40px;text-align:center}@media only screen and (max-width:840px){.main .category-container .responsive-layred-filter,.main .layered-filter-wrapper{display:none}.main .category-block{width:100%!important}.main .category-block .top-toolbar{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.main .category-block .top-toolbar .page-info{border-bottom:1px solid #c7c7c7;line-height:15px;margin-top:10px}.main .category-block .top-toolbar .page-info span{display:inline}.main .category-block .top-toolbar .page-info span:first-child{display:none}.main .category-block .top-toolbar .page-info .sort-filter{float:right;cursor:pointer}.main .category-block .top-toolbar .pager{margin-top:20px;display:none}.main .category-block .top-toolbar .pager .view-mode{display:none}.main .category-block .responsive-layred-filter{display:block}}section.product-detail{color:#242424}section.product-detail div.category-breadcrumbs{display:inline}section.product-detail div.layouter{display:block;margin-top:20px;margin-bottom:20px}section.product-detail div.layouter .form-container{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;width:100%}section.product-detail div.layouter .form-container div.product-image-group{margin-right:30px;width:604px;height:650px;max-width:604px;position:-webkit-sticky;position:sticky;top:10px}section.product-detail div.layouter .form-container div.product-image-group div{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;cursor:pointer}section.product-detail div.layouter .form-container div.product-image-group div .thumb-list{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;margin-right:4px;min-width:120px;overflow:hidden;position:relative;-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start;max-height:480px}section.product-detail div.layouter .form-container div.product-image-group div .thumb-list .thumb-frame{border:2px solid transparent;background:#f2f2f2;width:120px;max-height:120px}section.product-detail div.layouter .form-container div.product-image-group div .thumb-list .thumb-frame.active{border-color:#0031f0}section.product-detail div.layouter .form-container div.product-image-group div .thumb-list .thumb-frame img{height:100%;width:100%}section.product-detail div.layouter .form-container div.product-image-group div .thumb-list .gallery-control{width:100%;position:absolute;text-align:center;cursor:pointer;z-index:1}section.product-detail div.layouter .form-container div.product-image-group div .thumb-list .gallery-control .overlay{opacity:.3;background:#242424;width:100%;height:18px;position:absolute;left:0;z-index:-1}section.product-detail div.layouter .form-container div.product-image-group div .thumb-list .gallery-control .icon{z-index:2}section.product-detail div.layouter .form-container div.product-image-group div .thumb-list .gallery-control.top{top:0}section.product-detail div.layouter .form-container div.product-image-group div .thumb-list .gallery-control.bottom{bottom:0}section.product-detail div.layouter .form-container div.product-image-group div .product-hero-image{display:block;position:relative;background:#f2f2f2;width:100%;max-height:480px;height:100%}section.product-detail div.layouter .form-container div.product-image-group div .product-hero-image img{width:100%;height:auto;max-height:480px}section.product-detail div.layouter .form-container div.product-image-group div .product-hero-image .add-to-wishlist{background-image:url("../images/wishlist.svg");position:absolute;top:10px;right:12px;background-color:transparent;border:0;cursor:pointer;padding:0;width:32px;height:32px}section.product-detail div.layouter .form-container div.product-image-group div .product-hero-image .add-to-wishlist:hover{background-image:url("../images/wishlist-added.svg")}section.product-detail div.layouter .form-container div.product-image-group div .product-hero-image .share{position:absolute;top:10px;right:45px}section.product-detail div.layouter .form-container div.product-image-group .add-to-buttons{display:none;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;margin-top:10px;width:79.5%;float:right;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between}section.product-detail div.layouter .form-container div.product-image-group .add-to-buttons .addtocart{width:49%;background:#000;white-space:normal;text-transform:uppercase}section.product-detail div.layouter .form-container div.product-image-group .add-to-buttons .buynow{width:49%;white-space:nowrap;text-transform:uppercase}section.product-detail div.layouter .form-container .details{width:50%;overflow-wrap:break-word}section.product-detail div.layouter .form-container .details .product-price{margin-bottom:14px}section.product-detail div.layouter .form-container .details .product-price .sticker{display:none}section.product-detail div.layouter .form-container .details .product-ratings{margin-bottom:20px}section.product-detail div.layouter .form-container .details .product-ratings .icon{width:16px;height:16px}section.product-detail div.layouter .form-container .details .product-ratings .total-reviews{display:inline-block;margin-left:15px}section.product-detail div.layouter .form-container .details .product-heading{font-size:24px;color:#242424;margin-bottom:15px}section.product-detail div.layouter .form-container .details .product-price{margin-bottom:15px}section.product-detail div.layouter .form-container .details .product-price .special-price{font-size:24px}section.product-detail div.layouter .form-container .details .stock-status{margin-bottom:15px;font-weight:600;color:#fc6868}section.product-detail div.layouter .form-container .details .stock-status.active{color:#4caf50}section.product-detail div.layouter .form-container .details .description{margin-bottom:15px}section.product-detail div.layouter .form-container .details .description ul{padding-left:40px;list-style:disc}section.product-detail div.layouter .form-container .details .quantity{padding-top:15px;border-top:1px solid hsla(0,0%,64%,.2)}section.product-detail div.layouter .form-container .details .full-description *{max-width:100%}section.product-detail div.layouter .form-container .details .full-description ul{padding-left:40px;list-style:disc}section.product-detail div.layouter .form-container .details .full-specifications td{padding:10px 0;color:#5e5e5e}section.product-detail div.layouter .form-container .details .full-specifications td:first-child{padding-right:40px}section.product-detail div.layouter .form-container .details .accordian .accordian-header{padding-left:0;font-weight:600}section.product-detail div.layouter .form-container .details .accordian .accordian-content{padding:20px 0}section.product-detail div.layouter .form-container .details .attributes{display:block;width:100%;border-bottom:1px solid hsla(0,0%,64%,.2)}section.product-detail div.layouter .form-container .details .attributes .attribute.control-group{margin-bottom:20px}section.product-detail div.layouter .form-container .details .attributes .attribute.control-group .swatch-container{margin-top:10px;display:inline-block}section.product-detail div.layouter .form-container .details .attributes .attribute.control-group .swatch-container .swatch{display:inline-block;margin-right:5px;min-width:40px;height:40px}section.product-detail div.layouter .form-container .details .attributes .attribute.control-group .swatch-container .swatch span{min-width:38px;height:38px;float:left;border:1px solid #c7c7c7;border-radius:3px;line-height:36px;text-align:center;cursor:pointer;padding:0 10px}section.product-detail div.layouter .form-container .details .attributes .attribute.control-group .swatch-container .swatch img{width:38px;height:38px;border:1px solid #c7c7c7;border-radius:3px;cursor:pointer;background:#f2f2f2}section.product-detail div.layouter .form-container .details .attributes .attribute.control-group .swatch-container .swatch input:checked+img,section.product-detail div.layouter .form-container .details .attributes .attribute.control-group .swatch-container .swatch input:checked+span{border:1px solid #242424}section.product-detail div.layouter .form-container .details .attributes .attribute.control-group .swatch-container .swatch input{display:none}section.product-detail div.layouter .form-container .details .attributes .attribute.control-group .swatch-container .no-options{color:#ff6472}section.product-detail div.layouter .form-container .details .quantity-change{cursor:pointer;text-align:center}section.product-detail div.layouter .form-container .details .quantity-change:focus{border-color:#c7c7c7!important}@media only screen and (max-width:720px){section.product-detail div.layouter .form-container{-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}section.product-detail div.layouter .form-container div.product-image-group{margin-right:0;max-width:none;width:auto;min-height:400px;height:auto;position:unset}section.product-detail div.layouter .form-container div.product-image-group .loader{margin-left:47%}section.product-detail div.layouter .form-container div.product-image-group div{-webkit-box-orient:vertical;-webkit-box-direction:reverse;-ms-flex-direction:column-reverse;flex-direction:column-reverse}section.product-detail div.layouter .form-container div.product-image-group div .thumb-list{margin-top:5px;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;overflow-x:scroll;margin-right:0}section.product-detail div.layouter .form-container div.product-image-group div .thumb-list .thumb-frame img{height:100%;width:auto}section.product-detail div.layouter .form-container div.product-image-group div .thumb-list .gallery-control{display:none}section.product-detail div.layouter .form-container div.product-image-group div .product-hero-image{display:-webkit-box;display:-ms-flexbox;display:flex}section.product-detail div.layouter .form-container div.product-image-group div .product-hero-image img{margin-left:auto;margin-right:auto;width:480px}section.product-detail div.layouter .form-container div.product-image-group div .wrap{-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;width:100%!important}section.product-detail div.layouter .form-container div.product-image-group .add-to-buttons{width:100%}section.product-detail div.layouter .form-container .details{width:100%;margin-top:20px}}@media only screen and (max-width:510px){section.product-detail div.layouter .form-container div.product-image-group .product-hero-image img{width:100%!important}}.rating-reviews .rating-header{padding:20px 0}.rating-reviews .stars .icon{width:16px;height:16px}.rating-reviews .overall{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-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between}.rating-reviews .overall .review-info .number{font-size:34px}.rating-reviews .overall .review-info .total-reviews{margin-top:10px}.rating-reviews .reviews{margin-top:40px;margin-bottom:40px}.rating-reviews .reviews .review{margin-bottom:25px}.rating-reviews .reviews .review .title{margin-bottom:5px}.rating-reviews .reviews .review .stars{margin-bottom:15px;display:inline-block}.rating-reviews .reviews .review .message{margin-bottom:10px}.rating-reviews .reviews .review .reviewer-details{color:#5e5e5e}.rating-reviews .reviews .view-all{margin-top:15px;color:#0031f0;margin-bottom:15px}section.cart{width:100%;color:#242424;margin-bottom:80px;margin-top:20px}section.cart .title{font-size:24px}section.cart .cart-content{margin-top:20px;width:100%;display:inline-block}section.cart .cart-content .left-side{width:70%;float:left}section.cart .cart-content .left-side .misc-controls{width:100%;display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;margin-top:20px}section.cart .cart-content .left-side .misc-controls a.link,section.cart .cart-content .left-side .misc-controls div button{margin-right:15px}section.cart .cart-content .right-side{width:30%;display:inline-block;padding-left:40px}.cart-item-list .item{padding:10px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;border:1px solid #c7c7c7;border-radius:2px}.cart-item-list .item .item-image{margin-right:15px}.cart-item-list .item .item-image img{height:160px;width:160px}.cart-item-list .item .item-details{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start;width:100%}.cart-item-list .item .item-details .item-title{font-size:18px;margin-bottom:10px;font-weight:600}.cart-item-list .item .item-details .item-title a{color:#242424}.cart-item-list .item .item-details .price{margin-bottom:10px;font-size:18px;font-weight:600}.cart-item-list .item .item-details .summary{margin-bottom:17px}.cart-item-list .item .item-details .misc{display:-webkit-box;display:-ms-flexbox;display:flex;width:100%;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start;-webkit-box-align:start;-ms-flex-align:start;align-items:flex-start}.cart-item-list .item .item-details .misc .control-group{font-size:16px!important;width:220px;margin:0}.cart-item-list .item .item-details .misc .control-group .wrap{display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.cart-item-list .item .item-details .misc .control-group label{margin-right:15px}.cart-item-list .item .item-details .misc .control-group .control{height:38px;width:60px;border-radius:3px;text-align:center;line-height:38px}.cart-item-list .item .item-details .misc .remove,.cart-item-list .item .item-details .misc .towishlist{margin-top:18px;margin-right:15px}.cart-item-list .item .item-details .misc .quantity-change{cursor:pointer}.cart-item-list .item .item-details .misc .quantity-change:focus{border-color:#c7c7c7!important}.cart-item-list .item .error-message{color:#ff6472}.order-summary h3{font-size:16px;margin-top:0}.order-summary .item-detail{margin-top:12px}.order-summary .item-detail label.right{float:right}.order-summary .payble-amount{margin-top:17px;border-top:1px solid #c7c7c7;padding-top:12px}.order-summary .payble-amount label{font-weight:700}.order-summary .payble-amount label.right{float:right}@media only screen and (max-width:815px){section.cart .cart-content{display:block}section.cart .cart-content .left-side{width:100%;float:none}section.cart .cart-content .left-side .misc-controls{position:relative;top:180px;margin-top:0}section.cart .cart-content .right-side{width:100%;padding-left:0;position:relative;top:-20px}}@media only screen and (max-width:600px){section.cart .cart-content .left-side .cart-item-list .item{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}section.cart .cart-content .left-side .cart-item-list .item .item-details{margin-top:10px}section.cart .cart-content .left-side .cart-item-list .item .item-details .misc{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;line-height:40px}}@media only screen and (max-width:574px){section.cart .cart-content .left-side .misc-controls{display:block;top:160px}section.cart .cart-content .left-side .misc-controls div button{width:100%;margin-top:10px}section.cart .cart-content .left-side .misc-controls div a{margin-top:10px;width:100%;text-align:center}section.cart .cart-content .right-side{top:-100px}}.checkout-method-group .line-one{display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.checkout-method-group .line-one .radio-container{padding-left:28px}.checkout-method-group .line-one .method-label{margin-top:4px}.checkout-method-group .line-two{margin-left:30px}.checkout-process{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;width:100%;margin-top:20px;margin-bottom:20px;font-size:16px;color:#242424}.checkout-process .col-main{width:70%;margin-right:5%}.checkout-process .col-main ul.checkout-steps{display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;width:100%;padding-bottom:15px;border-bottom:1px solid #c7c7c7}.checkout-process .col-main ul.checkout-steps li{height:48px;display:-webkit-box;display:-ms-flexbox;display:flex}.checkout-process .col-main ul.checkout-steps li .decorator{height:48px;width:48px;border:1px solid #000;border-radius:50%;display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;border:1px solid #c7c7c7;background-repeat:no-repeat;background-position:50%}.checkout-process .col-main ul.checkout-steps li .decorator.address-info{background-image:url("../images/address.svg")}.checkout-process .col-main ul.checkout-steps li .decorator.shipping{background-image:url("../images/shipping.svg")}.checkout-process .col-main ul.checkout-steps li .decorator.payment{background-image:url("../images/payment.svg")}.checkout-process .col-main ul.checkout-steps li .decorator.review{background-image:url("../images/finish.svg")}.checkout-process .col-main ul.checkout-steps li.completed{cursor:pointer}.checkout-process .col-main ul.checkout-steps li.completed .decorator{background-image:url("../images/complete.svg")}.checkout-process .col-main ul.checkout-steps li span{margin-left:7px;margin-top:auto;margin-bottom:auto}.checkout-process .col-main ul.checkout-steps li.active{color:#2650ef}.checkout-process .col-main ul.checkout-steps li.active .decorator{border:1px solid #2650ef}.checkout-process .col-main .step-content{padding-top:20px}.checkout-process .col-main .step-content .form-header{display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;width:100%;height:30px}.checkout-process .col-main .step-content .form-header .checkout-step-heading{font-size:24px;font-weight:700;float:left}.checkout-process .col-main .step-content .form-header .btn{float:right;font-size:14px}.checkout-process .col-main .step-content .form-container{border-bottom:1px solid #c7c7c7;padding-top:20px;padding-bottom:20px}.checkout-process .col-main .step-content .shipping-methods{font-size:16px}.checkout-process .col-main .step-content .shipping-methods .ship-method-carrier{margin-bottom:15px;font-weight:700}.checkout-process .col-main .step-content .payment-methods .radio-container{padding-left:28px}.checkout-process .col-main .step-content .payment-methods .control-info{margin-left:28px}.checkout-process .col-main .step-content .address-summary{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:start;-ms-flex-pack:start;justify-content:flex-start;-webkit-box-align:center;-ms-flex-align:center;align-items:center;width:100%}.checkout-process .col-main .step-content .address-summary div.billing-address{margin-right:25%}.checkout-process .col-main .step-content .address-summary div.billing-address .horizontal-rule,.checkout-process .col-main .step-content .address-summary div.shipping-address .horizontal-rule{width:40px;background:#242424}.checkout-process .col-main .step-content .address-summary .label{width:10%}.checkout-process .col-main .step-content .address-summary .address-card-list{width:85%}.checkout-process .col-main .step-content .cart-item-list .item .row .title{width:100px;display:inline-block;color:#a5a5a5;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:25%;padding-left:40px}@media only screen and (max-width:770px){.checkout-process .col-main{width:100%;padding-right:0}.checkout-process .col-main ul.checkout-steps{border-bottom:none;padding-bottom:0}.checkout-process .col-main ul.checkout-steps span{display:none}.checkout-process .col-main ul.checkout-steps .line{-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;border-bottom:1px solid #c7c7c7;margin-left:5px;margin-right:5px}.checkout-process .step-content{padding-top:0}.checkout-process .step-content .control-group .control{width:100%}.checkout-process .col-right{display:none}}@media only screen and (max-width:480px){.checkout-process .col-main .step-content .address,.checkout-process .col-main .step-content .order-description{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.checkout-process .col-main .step-content .address .billing-address,.checkout-process .col-main .step-content .address .pull-left,.checkout-process .col-main .step-content .order-description .billing-address,.checkout-process .col-main .step-content .order-description .pull-left{width:100%!important}.checkout-process .col-main .step-content .address .pull-right,.checkout-process .col-main .step-content .address .shipping-address,.checkout-process .col-main .step-content .order-description .pull-right,.checkout-process .col-main .step-content .order-description .shipping-address{width:100%!important;margin-top:20px}}.attached-products-wrapper{margin-bottom:80px}.attached-products-wrapper .title{margin-bottom:40px;font-size:18px;color:#242424;text-align:center;position:relative}.attached-products-wrapper .title .border-bottom{border-bottom:1px solid hsla(0,0%,64%,.2);display:inline-block;width:100px;position:absolute;top:40px;left:50%;margin-left:-50px}.attached-products-wrapper .horizontal-rule{height:1px;background:#c7c7c7;width:148px;margin-bottom:24px;margin-left:auto;margin-right:auto}section.review .category-breadcrumbs{display:inline}section.review .review-layouter{display:-webkit-box;display:-ms-flexbox;display:flex}section.review .review-layouter .product-info{font-size:24px;max-width:25%}section.review .review-layouter .product-info .product-image img{height:280px;width:280px}section.review .review-layouter .product-info .product-name a{color:#242424}section.review .review-layouter .product-info .product-price .pro-price{color:#ff6472}section.review .review-layouter .product-info .product-price .pro-price-not{margin-left:10px;font-size:16px;color:#a5a5a5}section.review .review-layouter .product-info .product-price .offer{margin-left:10px;font-size:16px}section.review .review-layouter .review-form{margin-left:20px;width:55%}section.review .review-layouter .review-form .heading{color:#242424;font-weight:600}section.review .review-layouter .review-form .heading .right{float:right;margin-top:-10px}section.review .review-layouter .review-form .star{font-size:23px;color:#d4d4d4;-webkit-transition:all .2s;transition:all .2s}section.review .review-layouter .review-form .star:before{content:"\2605"}section.review .review-layouter .review-form .control-group .control{width:100%}section.review .review-layouter .review-form .review-detail{height:150px;border:1px solid #b22222;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}section.review .review-layouter .review-form .review-detail .rating-review{margin-top:40px;margin-left:20px;width:48%}section.review .review-layouter .review-form .review-detail .rating-review .avg-rating-count span{font-size:34px;text-align:center}section.review .review-layouter .review-form .review-detail .rating-calculate .progress-only{width:20px;border:1px solid blue}section.review .review-layouter .ratings-reviews{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between}section.review .review-layouter .ratings-reviews .left-side{padding:40px 20px;width:50%}section.review .review-layouter .ratings-reviews .left-side .rate{font-size:34px}section.review .review-layouter .ratings-reviews .left-side .stars .icon{height:16px;width:16px}section.review .review-layouter .ratings-reviews .right-side{width:50%}section.review .review-layouter .ratings-reviews .right-side .rater{display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;padding-top:5px;width:100%}section.review .review-layouter .ratings-reviews .right-side .rater .star-name{margin-right:5px;width:35px}section.review .review-layouter .ratings-reviews .right-side .rater .rate-number{width:15px}section.review .review-layouter .ratings-reviews .right-side .rater .percentage{width:50px;margin-right:10px}section.review .review-layouter .ratings-reviews .right-side .rater .percentage span{float:right;white-space:nowrap}section.review .review-layouter .ratings-reviews .right-side .rater .line-bar{height:4px;width:calc(100% - 100px);margin-right:5px;margin-left:5px;background:#d8d8d8}section.review .review-layouter .ratings-reviews .right-side .rater .line-bar .line-value{background-color:#0031f0}@media only screen and (max-width:770px){section.review .category-breadcrumbs{display:none}section.review .review-layouter{-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}section.review .review-layouter .product-info{max-width:100%}section.review .review-layouter .product-info .product-image,section.review .review-layouter .product-info .product-name,section.review .review-layouter .product-info .product-price{max-width:280px;margin-left:auto;margin-right:auto}section.review .review-layouter .review-form{width:100%;margin-left:0}section.review .review-layouter .review-form .heading .right{margin-top:50px}section.review .review-layouter .review-form .ratings-reviews{-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;width:100%}section.review .review-layouter .review-form .ratings-reviews .left-side{width:100%;padding:0 0 40px;margin-top:-30px}section.review .review-layouter .review-form .ratings-reviews .right-side{width:100%}section.review .review-layouter .review-form .ratings-reviews .right-side .rater .percentage{margin-right:0}}.auth-content{padding-top:5%;padding-bottom:5%}.auth-content .sign-up-text{margin-bottom:2%;margin-left:auto;margin-right:auto;font-size:18px;color:#a5a5a5;text-align:center}.auth-content .login-form{margin-left:auto;margin-right:auto;display:-webkit-box;display:-ms-flexbox;display:flex;border:1px solid #c7c7c7;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;max-width:500px;min-width:320px;padding:25px}.auth-content .login-form .login-text{font-size:24px;font-weight:600;margin-bottom:30px}.auth-content .login-form .control-group{margin-bottom:15px!important}.auth-content .login-form .control-group .control{width:100%!important}.auth-content .login-form .forgot-password-link{font-size:17px;color:#0031f0;margin-bottom:5%}.auth-content .login-form .signup-confirm{margin-bottom:5%}.auth-content .login-form .btn-primary{width:100%;text-transform:uppercase}.account-content{width:100%;-webkit-box-orient:horizontal;-ms-flex-direction:row;flex-direction:row;margin-top:5.5%;margin-bottom:5.5%}.account-content,.account-content .sidebar{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-direction:normal}.account-content .sidebar{-webkit-box-orient:vertical;-ms-flex-direction:column;flex-direction:column;-ms-flex-line-pack:center;align-content:center;-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start;width:20%;height:100%}.account-content .menu-block{margin-bottom:30px}.account-content .menu-block:last-child{margin-bottom:0}.account-content .menu-block .menu-block-title{padding-bottom:10px;font-size:18px}.account-content .menu-block .menu-block-title .right{display:none}.account-content .menu-block .menubar{border:1px solid #c7c7c7;color:#a5a5a5;position:relative}.account-content .menu-block .menubar li{width:95%;height:50px;margin-left:5%;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:start;-ms-flex-pack:start;justify-content:flex-start;-webkit-box-align:center;-ms-flex-align:center;align-items:center;border-bottom:1px solid #c7c7c7;text-align:center}.account-content .menu-block .menubar li a{color:#5e5e5e;width:100%;text-align:left}.account-content .menu-block .menubar li .icon{display:none;position:absolute;right:12px}.account-content .menu-block .menubar li:first-child{border-top:none}.account-content .menu-block .menubar li:last-child{border-bottom:none}.account-content .menu-block .menubar li.active a{color:#0031f0}.account-content .menu-block .menubar li.active .icon{display:inline-block}.account-content .account-layout{margin-left:40px;width:80%}.account-content .account-layout .account-head .back-icon,.account-content .account-layout .responsive-empty{display:none}.account-table-content{color:#242424;margin-top:1.4%}.account-table-content table{width:100%}.account-table-content table tbody tr{height:45px}.account-table-content table tbody tr td{width:250px}.address-holder{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:start;-ms-flex-pack:start;justify-content:flex-start;-webkit-box-align:start;-ms-flex-align:start;align-items:flex-start;-ms-flex-wrap:wrap;flex-wrap:wrap;width:100%}.address-card{width:260px;border:1px solid #c7c7c7;padding:15px;margin-right:15px;margin-bottom:15px}.address-card .control-group{width:15px;height:15px;margin-top:10px}.address-card .details{font-weight:lighter}.address-card .details span{display:block}.address-card .details .control-links{width:90%;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;-ms-flex-wrap:wrap;flex-wrap:wrap;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.address-card .details .control-links .btn{height:30px}.edit-form{display:-webkit-box;display:-ms-flexbox;display:flex;border:1px solid #c7c7c7;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;min-height:345px;padding:25px}@media only screen and (max-width:770px){.account-content{-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.account-content .sidebar{width:100%}.account-content .sidebar .menu-block .menu-block-title{height:50px;padding-top:13px;border-bottom:1px solid #c7c7c7;border-top:1px solid #c7c7c7}.account-content .sidebar .menu-block .menu-block-title .right{display:block;float:right;-ms-flex-item-align:center;align-self:center}.account-content .sidebar .menu-block .menubar{border:0;display:none}.account-content .sidebar .menu-block .menubar>li{margin-left:0;width:100%}.account-content .sidebar .menu-block .menubar>li .icon{right:0}.account-content .sidebar .menu-block .menubar>li:last-child{border-bottom:1px solid #c7c7c7}.account-content .account-layout{margin-left:0;margin-top:20px;width:100%}.account-content .account-layout .account-head{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;border-bottom:1px solid #c7c7c7;border-top:1px solid #c7c7c7;height:50px;margin-top:10px}.account-content .account-layout .account-head .account-action{margin-top:12px;margin-left:15px}.account-content .account-layout .account-head .back-icon{display:block}.account-content .account-layout .account-head span{margin-top:13px;font-size:18px}.account-content .account-layout .account-head .horizontal-rule{display:none}.account-content .account-layout .account-table-content{margin-top:2%}.account-content .account-layout .account-table-content table tbody tr{height:70px}.account-content .account-layout .account-table-content table tbody tr td{display:block}.account-content .account-layout .account-table-content .address-holder{-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.account-content .account-items-list,.account-content .edit-form{margin-top:20px}.account-content .account-items-list .responsive-empty,.account-content .edit-form .responsive-empty{display:block}.account-content .control-group .control{width:100%}}.sale-container{color:#5e5e5e}.sale-container .sale-section .secton-title{font-size:18px;color:#8e8e8e;padding:15px 0;border-bottom:1px solid #c7c7c7}.sale-container .sale-section .section-content{display:block;padding:20px 0;border-bottom:1px solid #e8e8e8}.sale-container .sale-section .section-content .row{display:block;padding:7px 0}.sale-container .sale-section .section-content .row .title{width:200px;letter-spacing:-.26px;display:inline-block}.sale-container .sale-section .section-content .row .value{letter-spacing:-.26px;display:inline-block}.sale-container .sale-section .section-content .order-box-container{display:inline-block;width:100%}.sale-container .sale-section .section-content .order-box-container .box{float:left;width:25%}.sale-container .sale-section .section-content .order-box-container .box .box-title{padding:10px 0;font-size:18px;color:#8e8e8e}.sale-container .sale-section .section-content .order-box-container .box .box-content{color:#3a3a3a;padding-right:10px}.sale-container .sale-section .section-content .qty-row{display:block}.sale-container .totals{padding-top:20px;display:inline-block;width:100%;border-top:1px solid #e8e8e8}.sale-container .totals .sale-summary{height:130px;float:right;border-collapse:collapse}.sale-container .totals .sale-summary tr td{padding:5px 8px;width:auto;color:#3a3a3a}.sale-container .totals .sale-summary tr.bold{font-weight:600;font-size:15px}.sale-container .totals .sale-summary tr.border td{border-bottom:1px solid #c7c7c7}@media only screen and (max-width:770px){.sale-container .sale-section .section-content{border-bottom:none;padding:10px 0}.sale-container .sale-section .section-content .row{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.sale-container .sale-section .section-content .row .title{line-height:20px}.sale-container .sale-section .section-content .totals{border-top:none}.sale-container .sale-section .section-content .totals .sale-summary{width:100%}.sale-container .sale-section .section-content .totals .sale-summary tr td:nth-child(2){display:none}.sale-container .sale-section .section-content .order-box-container{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.sale-container .sale-section .section-content .order-box-container .box{width:100%;margin:10px auto}.sale-container .sale-section .section-content .qty-row{display:inline}}.verify-account{text-align:center;background:#204d74;width:200px;margin-right:auto;margin-left:auto;border-radius:4px}.verify-account a{color:#fff!important}.cp-spinner{position:absolute;left:calc(50% - 24px);margin-top:calc(40% - 24px)}@media only screen and (max-width:720px){.cp-spinner{left:50%;margin-left:-24px;top:50%;margin-top:-24px}}@media only screen and (max-width:720px){.error-container .wrapper{-webkit-box-orient:vertical!important;-webkit-box-direction:reverse!important;-ms-flex-direction:column-reverse!important;flex-direction:column-reverse!important;margin:10px 0 20px!important;-webkit-box-align:start!important;-ms-flex-align:start!important;align-items:start!important;height:100%!important}}@media only screen and (max-width:770px){.table table{width:100%}.table table thead{display:none}.table table tbody tr td:before{content:attr(data-value);font-size:15px;font-weight:600;display:inline-block;width:120px}.table table tbody td{border-bottom:none!important;display:block;width:100%!important}.table table tbody td div{position:relative;left:100px;top:-20px}.table table tbody tr{border:1px solid #c7c7c7}}.show-wishlist{z-index:-1!important}.filter-row-one .dropdown-filters{position:relative!important;right:1px!important}@media only screen and (max-width:770px){.table .grid-container{margin-top:10px}.table .grid-container .filter-row-one{display:block}.table .grid-container .filter-row-one .dropdown-filters{margin-top:10px}}.rtl{direction:rtl}.rtl .header .header-top div.left-content ul.logo-container{margin-right:0;margin-left:12px}.rtl .header .header-top div.left-content ul.search-container li.search-group .search-field{border:2px solid #c7c7c7;padding-right:12px;padding-left:0;border-radius:2px;border-top-left-radius:0;border-bottom-left-radius:0}.rtl .header .header-top div.left-content ul.search-container li.search-group .search-icon-wrapper{border:2px solid #c7c7c7;border-right:none;border-radius:2px;border-top-right-radius:0;border-bottom-right-radius:0}.rtl .header .header-top div.right-content .right-content-menu>li{border-right:2px solid #c7c7c7;padding:0 15px}.rtl .header .header-top div.right-content .right-content-menu>li:last-child{padding-left:0}.rtl .header .header-top div.right-content .right-content-menu>li:first-child{border-right:0;padding-right:0}.rtl .header .header-top div.right-content .right-content-menu .cart-dropdown-container .dropdown-list{left:0;right:unset!important}.rtl .header .header-top div.right-content .right-content-menu .cart-dropdown-container .count{display:inline-block}.rtl .header .header-top div.right-content .right-content-menu .account,.rtl .header .header-top div.right-content .right-content-menu .currency{right:unset;left:0}.rtl .header .header-top div.right-content .right-content-menu .guest div{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between}.rtl .header .header-bottom .nav>li{float:right;margin-right:0;margin-left:1px}.rtl .header .header-bottom .nav a{padding:.8em .5em .8em .3em!important}.rtl .header .header-bottom .nav li a>.icon{-webkit-transform:rotate(180deg);transform:rotate(180deg)}.rtl .header .header-bottom .nav>li li:hover>ul{left:unset!important;right:100%!important}.rtl .header .header-bottom .nav ul{left:99999em}.rtl .header .search-responsive .search-content .right{float:left}.rtl .dropdown-list{text-align:right}.rtl .dropdown-list.bottom-right{left:0;right:auto}@media only screen and (max-width:720px){.rtl .header .header-top div.right-content .menu-box{margin-left:0;margin-right:5px}.rtl .header .header-top div.right-content .right-content-menu .account{position:absolute;left:0;right:auto}.rtl .header .header-top div.right-content .right-content-menu>li{padding:0;border:0}.rtl .header .header-top div.right-content .search-box{margin-left:5px}.rtl .header .header-bottom .nav>li{float:none}.rtl .header .header-bottom .nav li>.icon{float:left;-webkit-transform:rotate(180deg);transform:rotate(180deg)}.rtl .header .header-bottom .icon.icon-arrow-down{margin-left:5px}}.rtl section.slider-block div.slider-content div.slider-control{left:2%;right:auto}@media only screen and (max-width:720px){.rtl section.slider-block div.slider-content div.slider-control{left:0}}.rtl .main-container-wrapper .product-card .sticker{left:auto;right:20px}.rtl .main-container-wrapper .product-card .cart-wish-wrap .addtocart{margin-right:0;margin-left:10px}.rtl section.product-detail div.layouter .form-container div.product-image-group{margin-right:0;margin-left:30px}.rtl section.product-detail div.layouter .form-container div.product-image-group .add-to-buttons{float:left!important}.rtl section.product-detail div.layouter .form-container div .thumb-list{margin-left:4px;margin-right:0}.rtl section.product-detail div.layouter .form-container .details .accordian .accordian-header{padding:20px 0 20px 15px}.rtl section.product-detail div.layouter .form-container .details .accordian .accordian-header .icon{float:left}.rtl section.product-detail div.layouter .form-container .details .accordian .accordian-header .expand-icon{margin-left:10px}.rtl section.product-detail div.layouter .form-container .details .full-specifications td:first-child{padding-right:0;padding-left:40px}.rtl section.product-detail div.layouter .form-container .details .product-ratings .total-reviews{margin-left:0;margin-right:15px}@media only screen and (max-width:720px){.rtl section.product-detail div.layouter .form-container div.product-image-group{margin-right:0;margin-left:0}}.rtl .main .category-container .layered-filter-wrapper,.rtl .main .category-container .responsive-layred-filter{padding-right:0;padding-left:20px}.rtl .main .top-toolbar .pager{float:left}.rtl .main .top-toolbar .pager .view-mode{margin-right:0;margin-left:20px}.rtl .main .top-toolbar .pager .sorter{margin-right:0;margin-left:10px}.rtl .main .top-toolbar .pager label{margin-right:0;margin-left:5px}.rtl .main .top-toolbar .page-info{float:right}.rtl section.review .review-layouter .review-form{margin-left:0;margin-right:20px}.rtl section.review .review-layouter .review-form .heading .right{float:left}.rtl section.review .review-layouter .review-form .ratings-reviews .right-side .rater .star-name{margin-right:0;margin-left:5px}@media only screen and (max-width:770px){.rtl section.review .review-layouter .review-form{margin-right:0}}.rtl section.cart .cart-content .left-side{width:70%;float:right}.rtl section.cart .cart-content .left-side .misc-controls a.link{margin-left:15px;margin-right:0}.rtl section.cart .cart-content .right-side{width:30%;padding-right:40px;padding-left:0}.rtl .order-summary .item-detail label.right,.rtl .payble-amount label.right{float:left}.rtl .item div{margin-left:15px;margin-right:0!important}.rtl .cart-item-list .item .item-details .misc div.qty-text{margin-right:0;margin-left:10px}.rtl .cart-item-list .item .item-details .misc .remove,.rtl .cart-item-list .item .item-details .misc input.box{margin-right:0;margin-left:30px}.rtl .cart-item-list .item .item-details .misc .control-group label{margin-left:15px;margin-right:0}@media only screen and (max-width:770px){.rtl section.cart .cart-content .left-side{width:100%;float:none}.rtl section.cart .cart-content .left-side .misc-controls div button{margin-right:0}.rtl section.cart .cart-content .right-side{width:100%;padding-right:0}}.rtl .checkout-process .col-right{padding-left:0;padding-right:40px}.rtl .checkout-process .col-main{padding-left:40px;padding-right:0}.rtl .checkout-process .col-main ul.checkout-steps li span{margin-right:7px;margin-left:0}.rtl .checkout-process .col-main .step-content .form-header h1{float:right}.rtl .checkout-process .col-main .step-content .form-header .btn{float:left}.rtl .checkout-process .col-main .step-content .payment-methods .control-info{margin-right:28px;margin-left:0}.rtl .checkout-process .col-main .step-content .address .billing-address,.rtl .checkout-process .col-main .step-content .address .pull-left,.rtl .checkout-process .col-main .step-content .order-description .billing-address,.rtl .checkout-process .col-main .step-content .order-description .pull-left{float:right!important}.rtl .checkout-process .col-main .step-content .address .pull-right,.rtl .checkout-process .col-main .step-content .address .shipping-address,.rtl .checkout-process .col-main .step-content .order-description .pull-right,.rtl .checkout-process .col-main .step-content .order-description .shipping-address{float:left!important}.rtl .checkbox,.rtl .radio{margin:10px 0 5px 5px}.rtl .radio .radio-view{margin-left:5px;margin-right:0}.rtl .radio input{right:0;left:auto}@media only screen and (max-width:770px){.rtl .checkout-process .col-main{padding-left:0}}.rtl .account-content .account-layout{margin-left:0;margin-right:40px}.rtl .account-content .menu-block .menubar li{margin-left:0;margin-right:5%}.rtl .account-content .menu-block .menubar li a{text-align:right}.rtl .account-content .menu-block .menubar li .icon{right:unset;left:12px;-webkit-transform:rotate(180deg);transform:rotate(180deg)}.rtl .account-head .account-action{float:left}.rtl .account-item-card .media-info .info{margin-right:20px;margin-left:0}.rtl .account-item-card .operations a span{float:left}.rtl .table table{text-align:right}.rtl .sale-container .totals .sale-summary{float:left}.rtl .sale-container .sale-section .section-content .order-box-container{display:-webkit-box;display:-ms-flexbox;display:flex}@media (max-width:770px){.rtl .account-content .account-layout{margin-right:0}.rtl .account-content .account-layout .account-head .account-action{margin-left:0}.rtl .account-content .sidebar .menu-block .menu-block-title .right{float:left}.rtl .account-content .sidebar .menu-block .menubar>li{margin-right:0}}.rtl .footer .footer-content .footer-list-container .list-container .list-group li span.icon{margin-left:5px;margin-right:0}@media (max-width:720px){.rtl .footer{padding-right:15px;padding-left:10%}.rtl .footer .footer-list-container{padding-right:0!important}}.rtl .cp-spinner{position:absolute;right:calc(50% - 24px);margin-top:calc(40% - 24px)}@media only screen and (max-width:720px){.rtl .cp-spinner{right:50%;margin-right:-24px;left:auto}}.rtl .product-list .product-card .product-information{padding-left:0;padding-right:30px;float:left}.rtl .zoom-image-direction{left:0;right:476px!important}.banner-container{width:100%;float:left;padding:0 18px;margin-bottom:40px}.banner-container .left-banner{padding-right:20px;width:60%;float:left}.banner-container .left-banner img{width:100%}.banner-container .right-banner{padding-left:20px;width:40%;float:left}.banner-container .right-banner img{width:100%}.banner-container .right-banner img:first-child{padding-bottom:20px;height:50%;display:block}.banner-container .right-banner img:last-child{padding-top:20px;height:50%;display:block}@media (max-width:720px){.banner-container .left-banner{padding-right:0;width:100%}.banner-container .right-banner{padding-left:0;width:100%}.banner-container .right-banner img:first-child{padding-bottom:0;padding-top:25px}.banner-container .right-banner img:last-child{padding-top:25px}} \ No newline at end of file +@import url(https://fonts.googleapis.com/css?family=Montserrat:400,500);.icon{display:inline-block;background-size:cover}.dropdown-right-icon{background-image:URL("../images/icon-dropdown-left.svg");width:8px;height:8px;margin-left:auto;margin-bottom:2px}.icon-menu-close{background-image:URL("../images/icon-menu-close.svg");width:24px;height:24px;margin-left:auto}.icon-menu-close-adj{background-image:URL("../images/cross-icon-adj.svg");margin-left:auto}.grid-view-icon{background-image:URL("../images/icon-grid-view.svg");width:24px;height:24px}.list-view-icon{background-image:URL("../images/icon-list-view.svg");width:24px;height:24px}.sort-icon{background-image:URL("../images/icon-sort.svg");width:32px;height:32px}.filter-icon{background-image:URL("../images/icon-filter.svg");width:32px;height:32px}.whishlist-icon{background-image:URL("../images/wishlist.svg");width:24px;height:24px}.share-icon{background-image:URL("../images/icon-share.svg");width:24px;height:24px}.icon-menu{background-image:URL("../images/icon-menu.svg");width:24px;height:24px}.icon-search{background-image:URL("../images/icon-search.svg");width:24px;height:24px}.icon-menu-back{background-image:URL("../images/icon-menu-back.svg");width:24px;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}.cart-icon{background-image:url("../images/icon-cart.svg");width:24px;height:24px}.wishlist-icon{background-image:url("../images/wishlist.svg");width:32px;height:32px}.icon-arrow-up{background-image:url("../images/arrow-up.svg");width:16px;height:16px}.icon-arrow-down{background-image:url("../images/arrow-down.svg");width:16px;height:16px}.expand-icon{background-image:url("../images/Expand-Light.svg");width:18px;height:18px}.expand-on-icon{background-image:url("../images/Expand-Light-On.svg");width:18px;height:18px}.icon-menu-close-adj{background-image:url("../images/cross-icon-adj.svg");width:32px;height:32px}.icon-facebook{background-image:url("../images/facebook.svg")}.icon-twitter{background-image:url("../images/twitter.svg")}.icon-google-plus{background-image:url("../images/google-plus.svg")}.icon-instagram{background-image:url("../images/instagram.svg")}.icon-linkedin{background-image:url("../images/linkedin.svg")}.icon-dropdown{background-image:url("../images/icon-dropdown.svg")}@-webkit-keyframes spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}@keyframes spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}body{margin:0;padding:0;font-weight:500;max-width:100%;width:auto;color:#242424;font-size:16px}*{font-family:Montserrat,sans-serif}::-webkit-input-placeholder{font-family:Montserrat,sans-serif}textarea{resize:none}input{font-family:Montserrat,sans-serif}.btn{border-radius:0!important}.mb-10{margin-bottom:10px}.mb-15{margin-bottom:15px}.mb-20{margin-bottom:20px}.mb-25{margin-bottom:25px}.mb-30{margin-bottom:30px}.mb-35{margin-bottom:35px}.mb-40{margin-bottom:40px}.mb-45{margin-bottom:45px}.mb-50{margin-bottom:50px}.mb-60{margin-bottom:60px}.mb-70{margin-bottom:70px}.mb-80{margin-bottom:80px}.mb-90{margin-bottom:90px}.mt-5{margin-top:5px}.mt-10{margin-top:10px}.mt-15{margin-top:15px}.mt-20{margin-top:20px}.mt-25{margin-top:25px}.mt-30{margin-top:30px}.mt-35{margin-top:35px}.mt-40{margin-top:40px}.mt-45{margin-top:45px}.mt-50{margin-top:50px}.mt-60{margin-top:60px}.mt-70{margin-top:70px}.mt-80{margin-top:80px}.mt-90{margin-top:90px}.pagination.shop{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-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.bold{font-weight:700;color:#3a3a3a}.radio-container{display:block;position:relative;padding-left:35px;margin-bottom:12px;cursor:pointer;font-size:16px;user-select:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none}.radio-container input{position:absolute;opacity:0;cursor:pointer;top:0;left:0}.radio-container .checkmark{position:absolute;top:0;left:0;height:16px;width:16px;background-color:#fff;border:2px solid #ff6472;border-radius:50%}.radio-container .checkmark:after{content:"";position:absolute;display:none;top:2px;left:2px;width:8px;height:8px;border-radius:50%;background:#ff6472}.radio-container input:checked~.checkmark:after{display:block}.radio-container input:disabled~.checkmark{display:block;border:2px solid rgba(255,100,113,.4)}.cp-spinner{width:48px;height:48px;display:inline-block;-webkit-box-sizing:border-box;box-sizing:border-box}.cp-round:before{border-radius:50%;border:6px solid #bababa}.cp-round:after,.cp-round:before{content:" ";width:48px;height:48px;display:inline-block;-webkit-box-sizing:border-box;box-sizing:border-box;position:absolute;top:0;left:0}.cp-round:after{border-radius:50%;border-top:6px solid #0031f0;border-right:6px solid transparent;border-bottom:6px solid transparent;border-left:6px solid transparent;-webkit-animation:spin 1s ease-in-out infinite;animation:spin 1s ease-in-out infinite}.pull-right{float:right}.add-to-wishlist .wishlist-icon:hover{background-image:url("../images/wishlist-added.svg")}.product-price{margin-bottom:14px;width:100%;font-weight:600}.product-price .price-label{font-size:14px;font-weight:400}.product-price .regular-price{color:#a5a5a5;text-decoration:line-through;margin-right:10px}.product-price .special-price{color:#ff6472}.horizontal-rule{display:block;width:100%;height:1px;background:#c7c7c7}.account-head .account-heading{font-size:28px;color:#242424;text-transform:capitalize;text-align:left}.account-head .account-action{font-size:17px;margin-top:1%;color:#0031f0;float:right}.account-head .horizontal-rule{margin-top:1.1%;width:100%;height:1px;vertical-align:middle;background:#c7c7c7}.account-item-card{-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;-webkit-box-align:center;-ms-flex-align:center;align-items:center;width:100%;height:125px}.account-item-card,.account-item-card .media-info{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row}.account-item-card .media-info .media{height:125px;width:110px}.account-item-card .media-info .info{margin-left:20px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-pack:space-evenly;-ms-flex-pack:space-evenly;justify-content:space-evenly}.account-item-card .media-info .info .stars .icon{height:16px;width:16px}.account-item-card .operations{height:120px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.account-item-card .operations a{width:100%}.account-item-card .operations a span{float:right}.account-items-list{display:block;width:100%}.account-items-list .grid-container{margin-top:40px}.search-result-status{width:100%;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.grid-container{margin-top:20px}.main-container-wrapper{max-width:1300px;width:auto;padding-left:15px;padding-right:15px;margin-left:auto;margin-right:auto}.main-container-wrapper .content-container{display:block;margin-bottom:40px}.main-container-wrapper .product-grid-4{display:grid;grid-template-columns:repeat(auto-fill,minmax(235px,1fr));grid-auto-rows:auto;grid-column-gap:30px;grid-row-gap:15px;justify-items:end}.main-container-wrapper .product-grid-3{display:grid;grid-template-columns:repeat(auto-fill,minmax(235px,1fr));grid-gap:27px;grid-auto-rows:auto;justify-items:center}.main-container-wrapper .product-card{position:relative;padding:15px}.main-container-wrapper .product-card .product-image{max-height:350px;max-width:280px;margin-bottom:10px;background:#f2f2f2}.main-container-wrapper .product-card .product-image img{display:block;width:100%}.main-container-wrapper .product-card .product-name{margin-bottom:14px;width:100%;color:#242424}.main-container-wrapper .product-card .product-name a{color:#242424}.main-container-wrapper .product-card .product-description{display:none}.main-container-wrapper .product-card .product-ratings{width:100%}.main-container-wrapper .product-card .product-ratings .icon{width:16px;height:16px}.main-container-wrapper .product-card .cart-wish-wrap{display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start;-webkit-box-align:center;-ms-flex-align:center;align-items:center;height:40px}.main-container-wrapper .product-card .cart-wish-wrap .addtocart{margin-right:10px;text-transform:uppercase;text-align:left;-webkit-box-shadow:1px 1px 0 #ccc;box-shadow:1px 1px 0 #ccc}.main-container-wrapper .product-card .cart-wish-wrap .add-to-wishlist{margin-top:5px;background:transparent;border:0;cursor:pointer;padding:0}.main-container-wrapper .product-card .sticker{border-radius:100px;position:absolute;top:20px;left:20px;text-transform:uppercase;padding:4px 13px;font-size:14px;color:#fff;-webkit-box-shadow:1px 1px 1px #ccc;box-shadow:1px 1px 1px #ccc}.main-container-wrapper .product-card .sticker.sale{background:#ff6472}.main-container-wrapper .product-card .sticker.new{background:#2ed04c}.main-container-wrapper .product-card:hover{outline:1px solid #eaeaec;box-shadow:0 1px 2px rgba(0,0,0,.05);-webkit-box-shadow:0 2px 16px 4px rgba(40,44,63,.07);box-shadow:0 2px 16px 4px rgba(40,44,63,.07)}@media only screen and (max-width:580px){.main-container-wrapper .main-container-wrapper{padding:0}}@media only screen and (max-width:551px){.main-container-wrapper .product-grid-3{grid-template-columns:48.5% 48.5%;grid-column-gap:20px}}@media only screen and (max-width:854px){.main-container-wrapper .product-grid-4{grid-template-columns:29.5% 29.5% 29.5%;grid-column-gap:35px}}@media only screen and (max-width:653px){.main-container-wrapper .product-grid-4{grid-template-columns:48.5% 48.5%;grid-column-gap:17px}}@media only screen and (max-width:425px){.main-container-wrapper .product-card{font-size:90%}.main-container-wrapper .product-card .btn.btn-md{padding:5px}.main-container-wrapper .product-grid-4{grid-template-columns:48.5% 48.5%;grid-column-gap:10px}}.main-container-wrapper .product-list{min-height:200px}.main-container-wrapper .product-list .product-card{width:100%;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-align:center;-ms-flex-align:center;align-items:center;margin-bottom:20px}.main-container-wrapper .product-list .product-card .product-image{float:left;width:30%;height:350px}.main-container-wrapper .product-list .product-card .product-image img{height:100%}.main-container-wrapper .product-list .product-card .product-information{float:right;width:70%;padding-left:30px}.main-container-wrapper .product-list .product-card:last-child{margin-bottom:0}.main-container-wrapper .product-list.empty h2{font-size:20px}.main-container-wrapper section.featured-products{display:block;margin-bottom:5%}.main-container-wrapper section.featured-products .featured-heading{width:100%;text-align:center;text-transform:uppercase;font-size:18px;margin-bottom:20px}.main-container-wrapper section.featured-products .featured-heading .featured-separator{color:#d3d3d3}.main-container-wrapper section.news-update{display:block;-webkit-box-sizing:border-box;box-sizing:border-box;width:100%;margin-bottom:5%}.main-container-wrapper section.news-update .news-update-grid{display:grid;grid-template-columns:58.5% 40%;grid-gap:20px}.main-container-wrapper section.news-update .news-update-grid .block1{display:block;-webkit-box-sizing:border-box;box-sizing:border-box}.main-container-wrapper section.news-update .news-update-grid .block1 img{display:-webkit-box;display:-ms-flexbox;display:flex;height:100%;width:100%}.main-container-wrapper section.news-update .news-update-grid .block2{display:block;-webkit-box-sizing:border-box;box-sizing:border-box;display:grid;grid-template-rows:repeat(2,minmax(50%,1fr));grid-row-gap:20px}.main-container-wrapper section.news-update .news-update-grid .block2 .sub-block1{display:block;-webkit-box-sizing:border-box;box-sizing:border-box}.main-container-wrapper section.news-update .news-update-grid .block2 .sub-block1 img{width:100%}.main-container-wrapper section.news-update .news-update-grid .block2 .sub-block2{display:block;-webkit-box-sizing:border-box;box-sizing:border-box}.main-container-wrapper section.news-update .news-update-grid .block2 .sub-block2 img{width:100%}section.slider-block{display:block;margin-left:auto;margin-right:auto;margin-bottom:5%}section.slider-block div.slider-content{position:relative;height:500px;margin-left:auto;margin-right:auto}section.slider-block div.slider-content ul.slider-images .show-content{display:none}section.slider-block div.slider-content ul.slider-images li{position:absolute;visibility:hidden}section.slider-block div.slider-content ul.slider-images li.show{display:block;position:relative;visibility:visible;width:100%;-webkit-animation-name:example;animation-name:example;-webkit-animation-duration:4s;animation-duration:4s}section.slider-block div.slider-content ul.slider-images li.show .show-content{display:-webkit-box;display:-ms-flexbox;display:flex;position:absolute;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;color:#242424;height:100%;width:100%;top:0}@-webkit-keyframes example{0%{opacity:.1}to{opacity:1}}@keyframes example{0%{opacity:.1}to{opacity:1}}section.slider-block div.slider-content ul.slider-images li img{height:500px;width:100%}section.slider-block div.slider-content div.slider-control{display:block;cursor:pointer;position:absolute;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;bottom:2%;right:2%}section.slider-block div.slider-content div.slider-control .dark-left-icon{background-color:#f2f2f2;height:48px;width:48px;max-height:100%;max-width:100%}section.slider-block div.slider-content div.slider-control .light-right-icon{background-color:#242424;height:48px;width:48px;max-height:100%;max-width:100%}@media only screen and (max-width:770px){section.slider-block div.slider-content div.slider-control{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;bottom:46%;right:0;width:100%}}.header{margin-top:16px;margin-bottom:21px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.header .header-top{margin-bottom:16px;max-width:100%;width:auto;margin-left:auto;margin-right:auto;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between}.header .header-top,.header .header-top div.left-content{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.header .header-top div.left-content{-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start}.header .header-top div.left-content ul.logo-container{margin-right:12px}.header .header-top div.left-content ul.logo-container li{display:-webkit-box;display:-ms-flexbox;display:flex}.header .header-top div.left-content ul.logo-container li img{max-width:120px;max-height:40px}.header .header-top div.left-content ul.search-container li.search-group{display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.header .header-top div.left-content ul.search-container li.search-group .search-field{height:38px;border:2px solid #c7c7c7;border-radius:3px;border-right:none;border-top-right-radius:0;border-bottom-right-radius:0;padding-left:12px;font-size:14px}.header .header-top div.left-content ul.search-container li.search-group .search-icon-wrapper{-webkit-box-sizing:border-box;box-sizing:border-box;height:38px;width:38px;border:2px solid #c7c7c7;border-top-right-radius:3px;border-bottom-right-radius:3px}.header .header-top div.left-content ul.search-container li.search-group .search-icon-wrapper button{background:#fff;border:0;padding:3px 5px}.header .header-top div.right-content .right-content-menu>li{display:inline-block;border-right:2px solid #c7c7c7;padding:0 15px;min-height:15px;padding-top:3px}.header .header-top div.right-content .right-content-menu>li:first-child{padding-left:0}.header .header-top div.right-content .right-content-menu>li:last-child{border-right:0;padding-right:0}.header .header-top div.right-content .right-content-menu>li .icon{vertical-align:middle}.header .header-top div.right-content .right-content-menu>li .icon:not(.arrow-down-icon){margin-right:5px}.header .header-top div.right-content .right-content-menu>li .arrow-down-icon{width:12px;height:6px}.header .header-top div.right-content .right-content-menu .cart-dropdown-container{border-right:0;padding-right:0}.header .header-top div.right-content .right-content-menu .cart-link{pointer-events:none}.header .header-top div.right-content .right-content-menu ul.dropdown-list{display:none;margin-top:14px}.header .header-top div.right-content .right-content-menu ul.dropdown-list li{border-right:none;padding:5px 10px;display:block}.header .header-top div.right-content .right-content-menu ul.dropdown-list li a{color:#333}.header .header-top div.right-content .right-content-menu .currency{position:absolute;right:0;width:100px}.header .header-top div.right-content .right-content-menu .account{position:absolute;right:0}.header .header-top div.right-content .right-content-menu .account li{padding:20px!important}.header .header-top div.right-content .right-content-menu .account li ul{margin-top:5px}.header .header-top div.right-content .right-content-menu .account li ul>li{padding:5px 10px 5px 0!important}.header .header-top div.right-content .right-content-menu .guest{width:300px}.header .header-top div.right-content .right-content-menu .guest .btn.btn-sm{padding:9px 25px}.header .header-top div.right-content .right-content-menu .cart-dropdown-container .dropdown-list{width:387px}.header .header-top div.right-content .right-content-menu .cart-dropdown-container .dropdown-list .dropdown-container{padding:0}.header .header-top div.right-content .right-content-menu .cart-dropdown-container .dropdown-list .dropdown-container .dropdown-cart{color:#242424}.header .header-top div.right-content .right-content-menu .cart-dropdown-container .dropdown-list .dropdown-container .dropdown-cart>.dropdown-header{width:100%;padding:8px 16px;border-bottom:1px solid #c7c7c7}.header .header-top div.right-content .right-content-menu .cart-dropdown-container .dropdown-list .dropdown-container .dropdown-cart>.dropdown-header p{display:inline;line-height:25px}.header .header-top div.right-content .right-content-menu .cart-dropdown-container .dropdown-list .dropdown-container .dropdown-cart>.dropdown-header i{float:right;height:22px;width:22px}.header .header-top div.right-content .right-content-menu .cart-dropdown-container .dropdown-list .dropdown-container .dropdown-cart>.dropdown-header p.heading{font-weight:lighter}.header .header-top div.right-content .right-content-menu .cart-dropdown-container .dropdown-list .dropdown-container .dropdown-content{padding-top:8px;margin-bottom:55px;width:100%;max-height:329px;overflow-y:auto}.header .header-top div.right-content .right-content-menu .cart-dropdown-container .dropdown-list .dropdown-container .dropdown-content .item{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;border-bottom:1px solid #c7c7c7;padding:8px 16px}.header .header-top div.right-content .right-content-menu .cart-dropdown-container .dropdown-list .dropdown-container .dropdown-content .item img{height:75px;width:75px;margin-right:8px}.header .header-top div.right-content .right-content-menu .cart-dropdown-container .dropdown-list .dropdown-container .dropdown-content .item-details{height:auto}.header .header-top div.right-content .right-content-menu .cart-dropdown-container .dropdown-list .dropdown-container .item-details .item-name{font-size:16px;font-weight:700;margin-bottom:8px}.header .header-top div.right-content .right-content-menu .cart-dropdown-container .dropdown-list .dropdown-container .item-details .item-options{font-size:16px;margin-bottom:8px}.header .header-top div.right-content .right-content-menu .cart-dropdown-container .dropdown-list .dropdown-container .item-details .item-price{margin-bottom:8px}.header .header-top div.right-content .right-content-menu .cart-dropdown-container .dropdown-list .dropdown-container .item-details .item-qty{font-weight:lighter;margin-bottom:8px}.header .header-top div.right-content .right-content-menu .cart-dropdown-container .dropdown-list .dropdown-container .dropdown-footer{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;-webkit-box-align:center;-ms-flex-align:center;align-items:center;padding:8px 16px;position:absolute;bottom:0;width:100%;background:#fff;border-top:1px solid #c7c7c7}.header .header-top div.right-content .right-content-menu .cart-dropdown-container .dropdown-list .dropdown-container .dropdown-footer .btn{margin:0;max-width:170px;text-align:center}.header .header-top div.right-content .menu-box,.header .header-top div.right-content .search-box{display:none}.header .header-bottom{height:47px;margin-left:auto;margin-right:auto;border-top:1px solid #c7c7c7;border-bottom:1px solid #c7c7c7;display:block}.header .header-bottom ul.nav{display:block;font-size:16px;max-width:100%;width:auto;margin-left:auto;margin-right:auto}.header .header-bottom .nav ul{margin:0;padding:0;-webkit-box-shadow:1px 1px 1px 0 rgba(0,0,0,.4);box-shadow:1px 1px 1px 0 rgba(0,0,0,.4)}.header .header-bottom .nav a{display:block;color:#242424;text-decoration:none;padding:.8em .3em .8em .5em;text-transform:capitalize;letter-spacing:-.38px;position:relative}.header .header-bottom .nav li>.icon{display:none}.header .header-bottom .nav{vertical-align:top;display:inline-block}.header .header-bottom .nav li{position:relative}.header .header-bottom .nav>li{float:left;margin-right:1px;height:45px}.header .header-bottom .nav>li>a{margin-bottom:1px}.header .header-bottom .nav>li>a .icon{display:none}.header .header-bottom .nav li li a{margin-top:1px;white-space:normal;word-break:break-word;width:200px}.header .header-bottom .nav li a:first-child:nth-last-child(2):before{content:"";position:absolute;height:0;width:0;border:5px solid transparent;top:50%;right:5px}.header .header-bottom .nav ul{position:absolute;white-space:nowrap;border:1px solid #c7c7c7;background-color:#fff;z-index:10000;left:-99999em}.header .header-bottom .nav>li:hover{background-color:#f2f2f2}.header .header-bottom .nav>li:hover>ul{left:auto;min-width:100%}.header .header-bottom .nav>li li:hover{background-color:#f2f2f2}.header .header-bottom .nav>li li:hover>ul{left:100%;margin-left:1px;top:-2px}.header .header-bottom .nav>li:hover>a:first-child:nth-last-child(2):before,.header .header-bottom .nav li li>a:first-child:nth-last-child(2):before{margin-top:-5px}.header .header-bottom .nav li li:hover>a:first-child:nth-last-child(2):before{right:10px}.header .search-responsive{display:none}.header .search-responsive .search-content{border-bottom:1px solid #c7c7c7;border-top:1px solid #c7c7c7;height:50px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between}.header .search-responsive .search-content .search{width:80%;border:none;font-size:16px}.header .search-responsive .search-content .right{float:right}@media (max-width:720px){.header .currency-switcher{display:none!important}.header .header-top div.right-content{display:inherit}.header .header-top div.right-content .menu-box{display:inline-block;margin-left:10px}.header .header-top div.right-content .search-box{display:inline-block;margin-right:10px}.header .header-top div.right-content .right-content-menu>li{border-right:none;padding:0 2px}.header .header-top div.right-content .right-content-menu>li .icon:not(.arrow-down-icon){margin-right:0}.header .header-top div.right-content .right-content-menu .cart-link{pointer-events:all}.header .header-top div.right-content .right-content-menu .arrow-down-icon,.header .header-top div.right-content .right-content-menu .cart-dropdown-container .dropdown-container,.header .header-top div.right-content .right-content-menu .name{display:none}.header .header-bottom{height:auto;display:none}.header .header-bottom .nav a{display:inline-block}.header .header-bottom .nav li,.header .header-bottom ul.nav{height:auto}.header .header-bottom .nav>li{float:none}.header .header-bottom .nav li>.icon{float:right;display:block}.header .header-bottom .icon.icon-arrow-down{margin-right:5px}.header .header-bottom .nav li .left{height:16px;width:16px}.header .header-bottom .nav li a>.icon{display:none}.header .header-bottom .nav ul{position:unset;border:none;-webkit-box-shadow:none;box-shadow:none}.header .header-bottom .nav>li li:hover>ul{margin-left:0;top:0}ul.account-dropdown-container,ul.cart-dropdown-container,ul.search-container{display:none!important}}@media (max-width:400px){.header .header-top div.right-content .right-content-menu .guest{width:240px}.header .header-top div.right-content .right-content-menu .guest .btn.btn-sm{padding:7px 14px}}.footer{background-color:#f2f2f2;padding-left:10%;padding-right:10%;width:100%;display:inline-block}.footer .footer-content .footer-list-container{display:grid;padding:40px 10px;grid-template-columns:repeat(auto-fit,minmax(250px,1fr));grid-auto-rows:auto;grid-row-gap:1vh}.footer .footer-content .footer-list-container .list-container .list-heading{text-transform:uppercase;color:#a5a5a5}.footer .footer-content .footer-list-container .list-container .list-group{padding-top:25px}.footer .footer-content .footer-list-container .list-container .list-group a{color:#242424}.footer .footer-content .footer-list-container .list-container .list-group li{margin-bottom:12px;list-style-type:none;text-transform:uppercase}.footer .footer-content .footer-list-container .list-container .list-group li span.icon{display:inline-block;vertical-align:middle;margin-right:5px;height:24px;width:24px}.footer .footer-content .footer-list-container .list-container .form-container{padding-top:5px}.footer .footer-content .footer-list-container .list-container .form-container .control-group .subscribe-field{width:100%}.footer .footer-content .footer-list-container .list-container .form-container .control-group .btn-primary{background-color:#242424;margin-top:8px;border-radius:0;text-align:center}.footer .footer-content .footer-list-container .list-container .form-container .control-group .locale-switcher{width:100%}.footer .footer-content .footer-list-container .list-container .currency{display:none}@media (max-width:720px){.footer{padding-left:15px}.footer .footer-list-container{padding-left:0!important}.footer .currency{display:block!important}}.footer-bottom{width:100%;height:70px;font-size:16px;color:#a5a5a5;letter-spacing:-.26px;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:center;-ms-flex-pack:center;justify-content:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.footer-bottom p{padding:0 15px}.main .category-container{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;width:100%}.main .category-container .layered-filter-wrapper,.main .category-container .responsive-layred-filter{width:25%;float:left;padding-right:20px;min-height:1px}.main .category-container .layered-filter-wrapper .filter-title,.main .category-container .responsive-layred-filter .filter-title{border-bottom:1px solid #c7c7c7;color:#242424;padding:10px 0}.main .category-container .layered-filter-wrapper .filter-attributes .filter-attributes-item,.main .category-container .responsive-layred-filter .filter-attributes .filter-attributes-item{border-bottom:1px solid #c7c7c7;padding-bottom:10px}.main .category-container .layered-filter-wrapper .filter-attributes .filter-attributes-item .filter-attributes-title,.main .category-container .responsive-layred-filter .filter-attributes .filter-attributes-item .filter-attributes-title{padding:10px 40px 0 10px;color:#5e5e5e;cursor:pointer;position:relative}.main .category-container .layered-filter-wrapper .filter-attributes .filter-attributes-item .filter-attributes-title .remove-filter-link,.main .category-container .responsive-layred-filter .filter-attributes .filter-attributes-item .filter-attributes-title .remove-filter-link{font-weight:400;color:#0031f0;margin-right:10px}.main .category-container .layered-filter-wrapper .filter-attributes .filter-attributes-item .filter-attributes-title .icon,.main .category-container .responsive-layred-filter .filter-attributes .filter-attributes-item .filter-attributes-title .icon{background-image:url("../images/icon-dropdown.svg")!important;width:10px;height:10px;position:absolute;right:15px;top:14px}.main .category-container .layered-filter-wrapper .filter-attributes .filter-attributes-item .filter-attributes-content,.main .category-container .responsive-layred-filter .filter-attributes .filter-attributes-item .filter-attributes-content{padding:10px;display:none}.main .category-container .layered-filter-wrapper .filter-attributes .filter-attributes-item .filter-attributes-content ol.items,.main .category-container .responsive-layred-filter .filter-attributes .filter-attributes-item .filter-attributes-content ol.items{padding:0;margin:0;list-style:none none}.main .category-container .layered-filter-wrapper .filter-attributes .filter-attributes-item .filter-attributes-content ol.items li.item,.main .category-container .responsive-layred-filter .filter-attributes .filter-attributes-item .filter-attributes-content ol.items li.item{padding:8px 0;color:#5e5e5e}.main .category-container .layered-filter-wrapper .filter-attributes .filter-attributes-item .filter-attributes-content ol.items li.item .checkbox,.main .category-container .responsive-layred-filter .filter-attributes .filter-attributes-item .filter-attributes-content ol.items li.item .checkbox{margin:0}.main .category-container .layered-filter-wrapper .filter-attributes .filter-attributes-item .filter-attributes-content ol.items li.item .checkbox .checkbox-view,.main .category-container .responsive-layred-filter .filter-attributes .filter-attributes-item .filter-attributes-content ol.items li.item .checkbox .checkbox-view{height:16px;width:16px;background-image:url("../images/checkbox.svg")}.main .category-container .layered-filter-wrapper .filter-attributes .filter-attributes-item .filter-attributes-content ol.items li.item .checkbox input:checked+.checkbox-view,.main .category-container .responsive-layred-filter .filter-attributes .filter-attributes-item .filter-attributes-content ol.items li.item .checkbox input:checked+.checkbox-view{background-image:url("../images/checkbox-checked.svg")}.main .category-container .layered-filter-wrapper .filter-attributes .filter-attributes-item .filter-attributes-content ol.items li.item .color-swatch,.main .category-container .responsive-layred-filter .filter-attributes .filter-attributes-item .filter-attributes-content ol.items li.item .color-swatch{display:inline-block;margin-right:5px;min-width:20px;height:20px;border:1px solid #c7c7c7;border-radius:3px;float:right}.main .category-container .layered-filter-wrapper .filter-attributes .filter-attributes-item .filter-attributes-content .price-range-wrapper,.main .category-container .responsive-layred-filter .filter-attributes .filter-attributes-item .filter-attributes-content .price-range-wrapper{margin-top:21px}.main .category-container .layered-filter-wrapper .filter-attributes .filter-attributes-item.active .filter-attributes-content,.main .category-container .responsive-layred-filter .filter-attributes .filter-attributes-item.active .filter-attributes-content{display:block}.main .category-container .layered-filter-wrapper .filter-attributes .filter-attributes-item.active .filter-attributes-title .icon,.main .category-container .responsive-layred-filter .filter-attributes .filter-attributes-item.active .filter-attributes-title .icon{background-image:url("../images//arrow-up.svg")!important}.main .category-container .responsive-layred-filter{display:none;width:100%;float:none;padding-right:0;margin-top:-25px!important}.main .category-container .category-block{width:80%;display:block}.main .category-container .category-block .hero-image{display:inline-block;visibility:visible;width:100%}.main .category-container .category-block .hero-image img{height:400px;width:100%}.main .top-toolbar{width:100%;display:inline-block}.main .top-toolbar .page-info{float:left;color:#242424;line-height:45px}.main .top-toolbar .page-info span{display:none}.main .top-toolbar .page-info span:first-child{display:inline}.main .top-toolbar .pager{float:right}.main .top-toolbar .pager label{margin-right:5px}.main .top-toolbar .pager select{background:#f2f2f2;border:1px solid #c7c7c7;border-radius:3px;color:#242424;padding:10px}.main .top-toolbar .pager .view-mode{display:inline-block;margin-right:20px}.main .top-toolbar .pager .view-mode a,.main .top-toolbar .pager .view-mode span{display:inline-block;vertical-align:middle}.main .top-toolbar .pager .view-mode a.grid-view,.main .top-toolbar .pager .view-mode span.grid-view{margin-right:10px}.main .top-toolbar .pager .view-mode .sort-filter{display:none}.main .top-toolbar .pager .sorter{display:inline-block;margin-right:10px}.main .top-toolbar .pager .limiter{display:inline-block}.main .bottom-toolbar{display:block;margin-top:40px;margin-bottom:40px;text-align:center}@media only screen and (max-width:840px){.main .category-container .responsive-layred-filter,.main .layered-filter-wrapper{display:none}.main .category-block{width:100%!important}.main .category-block .top-toolbar{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.main .category-block .top-toolbar .page-info{border-bottom:1px solid #c7c7c7;line-height:15px;margin-top:10px}.main .category-block .top-toolbar .page-info span{display:inline}.main .category-block .top-toolbar .page-info span:first-child{display:none}.main .category-block .top-toolbar .page-info .sort-filter{float:right;cursor:pointer}.main .category-block .top-toolbar .pager{margin-top:20px;display:none}.main .category-block .top-toolbar .pager .view-mode{display:none}.main .category-block .responsive-layred-filter{display:block}}section.product-detail{color:#242424}section.product-detail div.category-breadcrumbs{display:inline}section.product-detail div.layouter{display:block;margin-top:20px;margin-bottom:20px}section.product-detail div.layouter .form-container{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;width:100%}section.product-detail div.layouter .form-container div.product-image-group{margin-right:30px;width:604px;height:650px;max-width:604px;position:-webkit-sticky;position:sticky;top:10px}section.product-detail div.layouter .form-container div.product-image-group div{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;cursor:pointer}section.product-detail div.layouter .form-container div.product-image-group div .thumb-list{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;margin-right:4px;min-width:120px;overflow:hidden;position:relative;-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start;max-height:480px}section.product-detail div.layouter .form-container div.product-image-group div .thumb-list .thumb-frame{border:2px solid transparent;background:#f2f2f2;width:120px;max-height:120px}section.product-detail div.layouter .form-container div.product-image-group div .thumb-list .thumb-frame.active{border-color:#0031f0}section.product-detail div.layouter .form-container div.product-image-group div .thumb-list .thumb-frame img{height:100%;width:100%}section.product-detail div.layouter .form-container div.product-image-group div .thumb-list .gallery-control{width:100%;position:absolute;text-align:center;cursor:pointer;z-index:1}section.product-detail div.layouter .form-container div.product-image-group div .thumb-list .gallery-control .overlay{opacity:.3;background:#242424;width:100%;height:18px;position:absolute;left:0;z-index:-1}section.product-detail div.layouter .form-container div.product-image-group div .thumb-list .gallery-control .icon{z-index:2}section.product-detail div.layouter .form-container div.product-image-group div .thumb-list .gallery-control.top{top:0}section.product-detail div.layouter .form-container div.product-image-group div .thumb-list .gallery-control.bottom{bottom:0}section.product-detail div.layouter .form-container div.product-image-group div .product-hero-image{display:block;position:relative;background:#f2f2f2;width:100%;max-height:480px;height:100%}section.product-detail div.layouter .form-container div.product-image-group div .product-hero-image img{width:100%;height:auto;max-height:480px}section.product-detail div.layouter .form-container div.product-image-group div .product-hero-image .add-to-wishlist{background-image:url("../images/wishlist.svg");position:absolute;top:10px;right:12px;background-color:transparent;border:0;cursor:pointer;padding:0;width:32px;height:32px}section.product-detail div.layouter .form-container div.product-image-group div .product-hero-image .add-to-wishlist:hover{background-image:url("../images/wishlist-added.svg")}section.product-detail div.layouter .form-container div.product-image-group div .product-hero-image .share{position:absolute;top:10px;right:45px}section.product-detail div.layouter .form-container div.product-image-group .add-to-buttons{display:none;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;margin-top:10px;width:79.5%;float:right;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between}section.product-detail div.layouter .form-container div.product-image-group .add-to-buttons .addtocart{width:49%;background:#000;white-space:normal;text-transform:uppercase}section.product-detail div.layouter .form-container div.product-image-group .add-to-buttons .buynow{width:49%;white-space:nowrap;text-transform:uppercase}section.product-detail div.layouter .form-container .details{width:50%;overflow-wrap:break-word}section.product-detail div.layouter .form-container .details .product-price{margin-bottom:14px}section.product-detail div.layouter .form-container .details .product-price .sticker{display:none}section.product-detail div.layouter .form-container .details .product-ratings{margin-bottom:20px}section.product-detail div.layouter .form-container .details .product-ratings .icon{width:16px;height:16px}section.product-detail div.layouter .form-container .details .product-ratings .total-reviews{display:inline-block;margin-left:15px}section.product-detail div.layouter .form-container .details .product-heading{font-size:24px;color:#242424;margin-bottom:15px}section.product-detail div.layouter .form-container .details .product-price{margin-bottom:15px}section.product-detail div.layouter .form-container .details .product-price .special-price{font-size:24px}section.product-detail div.layouter .form-container .details .stock-status{margin-bottom:15px;font-weight:600;color:#fc6868}section.product-detail div.layouter .form-container .details .stock-status.active{color:#4caf50}section.product-detail div.layouter .form-container .details .description{margin-bottom:15px}section.product-detail div.layouter .form-container .details .description ul{padding-left:40px;list-style:disc}section.product-detail div.layouter .form-container .details .quantity{padding-top:15px;border-top:1px solid hsla(0,0%,64%,.2)}section.product-detail div.layouter .form-container .details .full-description *{max-width:100%}section.product-detail div.layouter .form-container .details .full-description ul{padding-left:40px;list-style:disc}section.product-detail div.layouter .form-container .details .full-specifications td{padding:10px 0;color:#5e5e5e}section.product-detail div.layouter .form-container .details .full-specifications td:first-child{padding-right:40px}section.product-detail div.layouter .form-container .details .accordian .accordian-header{padding-left:0;font-weight:600}section.product-detail div.layouter .form-container .details .accordian .accordian-content{padding:20px 0}section.product-detail div.layouter .form-container .details .attributes{display:block;width:100%;border-bottom:1px solid hsla(0,0%,64%,.2)}section.product-detail div.layouter .form-container .details .attributes .attribute.control-group{margin-bottom:20px}section.product-detail div.layouter .form-container .details .attributes .attribute.control-group .swatch-container{margin-top:10px;display:inline-block}section.product-detail div.layouter .form-container .details .attributes .attribute.control-group .swatch-container .swatch{display:inline-block;margin-right:5px;min-width:40px;height:40px}section.product-detail div.layouter .form-container .details .attributes .attribute.control-group .swatch-container .swatch span{min-width:38px;height:38px;float:left;border:1px solid #c7c7c7;border-radius:3px;line-height:36px;text-align:center;cursor:pointer;padding:0 10px}section.product-detail div.layouter .form-container .details .attributes .attribute.control-group .swatch-container .swatch img{width:38px;height:38px;border:1px solid #c7c7c7;border-radius:3px;cursor:pointer;background:#f2f2f2}section.product-detail div.layouter .form-container .details .attributes .attribute.control-group .swatch-container .swatch input:checked+img,section.product-detail div.layouter .form-container .details .attributes .attribute.control-group .swatch-container .swatch input:checked+span{border:1px solid #242424}section.product-detail div.layouter .form-container .details .attributes .attribute.control-group .swatch-container .swatch input{display:none}section.product-detail div.layouter .form-container .details .attributes .attribute.control-group .swatch-container .no-options{color:#ff6472}section.product-detail div.layouter .form-container .details .quantity-change{cursor:pointer;text-align:center}section.product-detail div.layouter .form-container .details .quantity-change:focus{border-color:#c7c7c7!important}@media only screen and (max-width:720px){section.product-detail div.layouter .form-container{-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}section.product-detail div.layouter .form-container div.product-image-group{margin-right:0;max-width:none;width:auto;min-height:400px;height:auto;position:unset}section.product-detail div.layouter .form-container div.product-image-group .loader{margin-left:47%}section.product-detail div.layouter .form-container div.product-image-group div{-webkit-box-orient:vertical;-webkit-box-direction:reverse;-ms-flex-direction:column-reverse;flex-direction:column-reverse}section.product-detail div.layouter .form-container div.product-image-group div .thumb-list{margin-top:5px;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;overflow-x:scroll;margin-right:0}section.product-detail div.layouter .form-container div.product-image-group div .thumb-list .thumb-frame img{height:100%;width:auto}section.product-detail div.layouter .form-container div.product-image-group div .thumb-list .gallery-control{display:none}section.product-detail div.layouter .form-container div.product-image-group div .product-hero-image{display:-webkit-box;display:-ms-flexbox;display:flex}section.product-detail div.layouter .form-container div.product-image-group div .product-hero-image img{margin-left:auto;margin-right:auto;width:480px}section.product-detail div.layouter .form-container div.product-image-group div .wrap{-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;width:100%!important}section.product-detail div.layouter .form-container div.product-image-group .add-to-buttons{width:100%}section.product-detail div.layouter .form-container .details{width:100%;margin-top:20px}}@media only screen and (max-width:510px){section.product-detail div.layouter .form-container div.product-image-group .product-hero-image img{width:100%!important}}.rating-reviews .rating-header{padding:20px 0}.rating-reviews .stars .icon{width:16px;height:16px}.rating-reviews .overall{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-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between}.rating-reviews .overall .review-info .number{font-size:34px}.rating-reviews .overall .review-info .total-reviews{margin-top:10px}.rating-reviews .reviews{margin-top:40px;margin-bottom:40px}.rating-reviews .reviews .review{margin-bottom:25px}.rating-reviews .reviews .review .title{margin-bottom:5px}.rating-reviews .reviews .review .stars{margin-bottom:15px;display:inline-block}.rating-reviews .reviews .review .message{margin-bottom:10px}.rating-reviews .reviews .review .reviewer-details{color:#5e5e5e}.rating-reviews .reviews .view-all{margin-top:15px;color:#0031f0;margin-bottom:15px}section.cart{width:100%;color:#242424;margin-bottom:80px;margin-top:20px}section.cart .title{font-size:24px}section.cart .cart-content{margin-top:20px;width:100%;display:inline-block}section.cart .cart-content .left-side{width:70%;float:left}section.cart .cart-content .left-side .misc-controls{width:100%;display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;margin-top:20px}section.cart .cart-content .left-side .misc-controls a.link,section.cart .cart-content .left-side .misc-controls div button{margin-right:15px}section.cart .cart-content .right-side{width:30%;display:inline-block;padding-left:40px}.cart-item-list .item{padding:10px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;border:1px solid #c7c7c7;border-radius:2px}.cart-item-list .item .item-image{margin-right:15px}.cart-item-list .item .item-image img{height:160px;width:160px}.cart-item-list .item .item-details{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start;width:100%}.cart-item-list .item .item-details .item-title{font-size:18px;margin-bottom:10px;font-weight:600}.cart-item-list .item .item-details .item-title a{color:#242424}.cart-item-list .item .item-details .price{margin-bottom:10px;font-size:18px;font-weight:600}.cart-item-list .item .item-details .summary{margin-bottom:17px}.cart-item-list .item .item-details .misc{display:-webkit-box;display:-ms-flexbox;display:flex;width:100%;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start;-webkit-box-align:start;-ms-flex-align:start;align-items:flex-start}.cart-item-list .item .item-details .misc .control-group{font-size:16px!important;width:220px;margin:0}.cart-item-list .item .item-details .misc .control-group .wrap{display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.cart-item-list .item .item-details .misc .control-group label{margin-right:15px}.cart-item-list .item .item-details .misc .control-group .control{height:38px;width:60px;border-radius:3px;text-align:center;line-height:38px}.cart-item-list .item .item-details .misc .remove,.cart-item-list .item .item-details .misc .towishlist{margin-top:18px;margin-right:15px}.cart-item-list .item .item-details .misc .quantity-change{cursor:pointer}.cart-item-list .item .item-details .misc .quantity-change:focus{border-color:#c7c7c7!important}.cart-item-list .item .error-message{color:#ff6472}.order-summary h3{font-size:16px;margin-top:0}.order-summary .item-detail{margin-top:12px}.order-summary .item-detail label.right{float:right}.order-summary .payable-amount{margin-top:17px;border-top:1px solid #c7c7c7;padding-top:12px}.order-summary .payable-amount label{font-weight:700}.order-summary .payable-amount label.right{float:right}@media only screen and (max-width:815px){section.cart .cart-content{display:block}section.cart .cart-content .left-side{width:100%;float:none}section.cart .cart-content .left-side .misc-controls{position:relative;top:180px;margin-top:0}section.cart .cart-content .right-side{width:100%;padding-left:0;position:relative;top:-20px}}@media only screen and (max-width:600px){section.cart .cart-content .left-side .cart-item-list .item{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}section.cart .cart-content .left-side .cart-item-list .item .item-details{margin-top:10px}section.cart .cart-content .left-side .cart-item-list .item .item-details .misc{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;line-height:40px}}@media only screen and (max-width:574px){section.cart .cart-content .left-side .misc-controls{display:block;top:160px}section.cart .cart-content .left-side .misc-controls div button{width:100%;margin-top:10px}section.cart .cart-content .left-side .misc-controls div a{margin-top:10px;width:100%;text-align:center}section.cart .cart-content .right-side{top:-100px}}.checkout-method-group .line-one{display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.checkout-method-group .line-one .radio-container{padding-left:28px}.checkout-method-group .line-one .method-label{margin-top:4px}.checkout-method-group .line-two{margin-left:30px}.checkout-process{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;width:100%;margin-top:20px;margin-bottom:20px;font-size:16px;color:#242424}.checkout-process .col-main{width:70%;margin-right:5%}.checkout-process .col-main ul.checkout-steps{display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;width:100%;padding-bottom:15px;border-bottom:1px solid #c7c7c7}.checkout-process .col-main ul.checkout-steps li{height:48px;display:-webkit-box;display:-ms-flexbox;display:flex}.checkout-process .col-main ul.checkout-steps li .decorator{height:48px;width:48px;border:1px solid #000;border-radius:50%;display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;border:1px solid #c7c7c7;background-repeat:no-repeat;background-position:50%}.checkout-process .col-main ul.checkout-steps li .decorator.address-info{background-image:url("../images/address.svg")}.checkout-process .col-main ul.checkout-steps li .decorator.shipping{background-image:url("../images/shipping.svg")}.checkout-process .col-main ul.checkout-steps li .decorator.payment{background-image:url("../images/payment.svg")}.checkout-process .col-main ul.checkout-steps li .decorator.review{background-image:url("../images/finish.svg")}.checkout-process .col-main ul.checkout-steps li.completed{cursor:pointer}.checkout-process .col-main ul.checkout-steps li.completed .decorator{background-image:url("../images/complete.svg")}.checkout-process .col-main ul.checkout-steps li span{margin-left:7px;margin-top:auto;margin-bottom:auto}.checkout-process .col-main ul.checkout-steps li.active{color:#2650ef}.checkout-process .col-main ul.checkout-steps li.active .decorator{border:1px solid #2650ef}.checkout-process .col-main .step-content{padding-top:20px}.checkout-process .col-main .step-content .form-header{display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;width:100%;height:30px}.checkout-process .col-main .step-content .form-header .checkout-step-heading{font-size:24px;font-weight:700;float:left}.checkout-process .col-main .step-content .form-header .btn{float:right;font-size:14px}.checkout-process .col-main .step-content .form-container{border-bottom:1px solid #c7c7c7;padding-top:20px;padding-bottom:20px}.checkout-process .col-main .step-content .shipping-methods{font-size:16px}.checkout-process .col-main .step-content .shipping-methods .ship-method-carrier{margin-bottom:15px;font-weight:700}.checkout-process .col-main .step-content .payment-methods .radio-container{padding-left:28px}.checkout-process .col-main .step-content .payment-methods .control-info{margin-left:28px}.checkout-process .col-main .step-content .address-summary{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:start;-ms-flex-pack:start;justify-content:flex-start;-webkit-box-align:center;-ms-flex-align:center;align-items:center;width:100%}.checkout-process .col-main .step-content .address-summary div.billing-address{margin-right:25%}.checkout-process .col-main .step-content .address-summary div.billing-address .horizontal-rule,.checkout-process .col-main .step-content .address-summary div.shipping-address .horizontal-rule{width:40px;background:#242424}.checkout-process .col-main .step-content .address-summary .label{width:10%}.checkout-process .col-main .step-content .address-summary .address-card-list{width:85%}.checkout-process .col-main .step-content .cart-item-list .item .row .title{width:100px;display:inline-block;color:#a5a5a5;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:25%;padding-left:40px}@media only screen and (max-width:770px){.checkout-process .col-main{width:100%;padding-right:0}.checkout-process .col-main ul.checkout-steps{border-bottom:none;padding-bottom:0}.checkout-process .col-main ul.checkout-steps span{display:none}.checkout-process .col-main ul.checkout-steps .line{-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;border-bottom:1px solid #c7c7c7;margin-left:5px;margin-right:5px}.checkout-process .step-content{padding-top:0}.checkout-process .step-content .control-group .control{width:100%}.checkout-process .col-right{display:none}}@media only screen and (max-width:480px){.checkout-process .col-main .step-content .address,.checkout-process .col-main .step-content .order-description{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.checkout-process .col-main .step-content .address .billing-address,.checkout-process .col-main .step-content .address .pull-left,.checkout-process .col-main .step-content .order-description .billing-address,.checkout-process .col-main .step-content .order-description .pull-left{width:100%!important}.checkout-process .col-main .step-content .address .pull-right,.checkout-process .col-main .step-content .address .shipping-address,.checkout-process .col-main .step-content .order-description .pull-right,.checkout-process .col-main .step-content .order-description .shipping-address{width:100%!important;margin-top:20px}}.attached-products-wrapper{margin-bottom:80px}.attached-products-wrapper .title{margin-bottom:40px;font-size:18px;color:#242424;text-align:center;position:relative}.attached-products-wrapper .title .border-bottom{border-bottom:1px solid hsla(0,0%,64%,.2);display:inline-block;width:100px;position:absolute;top:40px;left:50%;margin-left:-50px}.attached-products-wrapper .horizontal-rule{height:1px;background:#c7c7c7;width:148px;margin-bottom:24px;margin-left:auto;margin-right:auto}section.review .category-breadcrumbs{display:inline}section.review .review-layouter{display:-webkit-box;display:-ms-flexbox;display:flex}section.review .review-layouter .product-info{font-size:24px;max-width:25%}section.review .review-layouter .product-info .product-image img{height:280px;width:280px}section.review .review-layouter .product-info .product-name a{color:#242424}section.review .review-layouter .product-info .product-price .pro-price{color:#ff6472}section.review .review-layouter .product-info .product-price .pro-price-not{margin-left:10px;font-size:16px;color:#a5a5a5}section.review .review-layouter .product-info .product-price .offer{margin-left:10px;font-size:16px}section.review .review-layouter .review-form{margin-left:20px;width:55%}section.review .review-layouter .review-form .heading{color:#242424;font-weight:600}section.review .review-layouter .review-form .heading .right{float:right;margin-top:-10px}section.review .review-layouter .review-form .star{font-size:23px;color:#d4d4d4;-webkit-transition:all .2s;transition:all .2s}section.review .review-layouter .review-form .star:before{content:"\2605"}section.review .review-layouter .review-form .control-group .control{width:100%}section.review .review-layouter .review-form .review-detail{height:150px;border:1px solid #b22222;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}section.review .review-layouter .review-form .review-detail .rating-review{margin-top:40px;margin-left:20px;width:48%}section.review .review-layouter .review-form .review-detail .rating-review .avg-rating-count span{font-size:34px;text-align:center}section.review .review-layouter .review-form .review-detail .rating-calculate .progress-only{width:20px;border:1px solid blue}section.review .review-layouter .ratings-reviews{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between}section.review .review-layouter .ratings-reviews .left-side{padding:40px 20px;width:50%}section.review .review-layouter .ratings-reviews .left-side .rate{font-size:34px}section.review .review-layouter .ratings-reviews .left-side .stars .icon{height:16px;width:16px}section.review .review-layouter .ratings-reviews .right-side{width:50%}section.review .review-layouter .ratings-reviews .right-side .rater{display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;padding-top:5px;width:100%}section.review .review-layouter .ratings-reviews .right-side .rater .star-name{margin-right:5px;width:35px}section.review .review-layouter .ratings-reviews .right-side .rater .rate-number{width:15px}section.review .review-layouter .ratings-reviews .right-side .rater .percentage{width:50px;margin-right:10px}section.review .review-layouter .ratings-reviews .right-side .rater .percentage span{float:right;white-space:nowrap}section.review .review-layouter .ratings-reviews .right-side .rater .line-bar{height:4px;width:calc(100% - 100px);margin-right:5px;margin-left:5px;background:#d8d8d8}section.review .review-layouter .ratings-reviews .right-side .rater .line-bar .line-value{background-color:#0031f0}@media only screen and (max-width:770px){section.review .category-breadcrumbs{display:none}section.review .review-layouter{-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}section.review .review-layouter .product-info{max-width:100%}section.review .review-layouter .product-info .product-image,section.review .review-layouter .product-info .product-name,section.review .review-layouter .product-info .product-price{max-width:280px;margin-left:auto;margin-right:auto}section.review .review-layouter .review-form{width:100%;margin-left:0}section.review .review-layouter .review-form .heading .right{margin-top:50px}section.review .review-layouter .review-form .ratings-reviews{-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;width:100%}section.review .review-layouter .review-form .ratings-reviews .left-side{width:100%;padding:0 0 40px;margin-top:-30px}section.review .review-layouter .review-form .ratings-reviews .right-side{width:100%}section.review .review-layouter .review-form .ratings-reviews .right-side .rater .percentage{margin-right:0}}.auth-content{padding-top:5%;padding-bottom:5%}.auth-content .sign-up-text{margin-bottom:2%;margin-left:auto;margin-right:auto;font-size:18px;color:#a5a5a5;text-align:center}.auth-content .login-form{margin-left:auto;margin-right:auto;display:-webkit-box;display:-ms-flexbox;display:flex;border:1px solid #c7c7c7;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;max-width:500px;min-width:320px;padding:25px}.auth-content .login-form .login-text{font-size:24px;font-weight:600;margin-bottom:30px}.auth-content .login-form .control-group{margin-bottom:15px!important}.auth-content .login-form .control-group .control{width:100%!important}.auth-content .login-form .forgot-password-link{font-size:17px;color:#0031f0;margin-bottom:5%}.auth-content .login-form .signup-confirm{margin-bottom:5%}.auth-content .login-form .btn-primary{width:100%;text-transform:uppercase}.account-content{width:100%;-webkit-box-orient:horizontal;-ms-flex-direction:row;flex-direction:row;margin-top:5.5%;margin-bottom:5.5%}.account-content,.account-content .sidebar{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-direction:normal}.account-content .sidebar{-webkit-box-orient:vertical;-ms-flex-direction:column;flex-direction:column;-ms-flex-line-pack:center;align-content:center;-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start;width:20%;height:100%}.account-content .menu-block{margin-bottom:30px}.account-content .menu-block:last-child{margin-bottom:0}.account-content .menu-block .menu-block-title{padding-bottom:10px;font-size:18px}.account-content .menu-block .menu-block-title .right{display:none}.account-content .menu-block .menubar{border:1px solid #c7c7c7;color:#a5a5a5;position:relative}.account-content .menu-block .menubar li{width:95%;height:50px;margin-left:5%;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:start;-ms-flex-pack:start;justify-content:flex-start;-webkit-box-align:center;-ms-flex-align:center;align-items:center;border-bottom:1px solid #c7c7c7;text-align:center}.account-content .menu-block .menubar li a{color:#5e5e5e;width:100%;text-align:left}.account-content .menu-block .menubar li .icon{display:none;position:absolute;right:12px}.account-content .menu-block .menubar li:first-child{border-top:none}.account-content .menu-block .menubar li:last-child{border-bottom:none}.account-content .menu-block .menubar li.active a{color:#0031f0}.account-content .menu-block .menubar li.active .icon{display:inline-block}.account-content .account-layout{margin-left:40px;width:80%}.account-content .account-layout .account-head .back-icon,.account-content .account-layout .responsive-empty{display:none}.account-table-content{color:#242424;margin-top:1.4%}.account-table-content table{width:100%}.account-table-content table tbody tr{height:45px}.account-table-content table tbody tr td{width:250px}.address-holder{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:start;-ms-flex-pack:start;justify-content:flex-start;-webkit-box-align:start;-ms-flex-align:start;align-items:flex-start;-ms-flex-wrap:wrap;flex-wrap:wrap;width:100%}.address-card{width:260px;border:1px solid #c7c7c7;padding:15px;margin-right:15px;margin-bottom:15px}.address-card .control-group{width:15px;height:15px;margin-top:10px}.address-card .details{font-weight:lighter}.address-card .details span{display:block}.address-card .details .control-links{width:90%;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;-ms-flex-wrap:wrap;flex-wrap:wrap;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.address-card .details .control-links .btn{height:30px}.edit-form{display:-webkit-box;display:-ms-flexbox;display:flex;border:1px solid #c7c7c7;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;min-height:345px;padding:25px}@media only screen and (max-width:770px){.account-content{-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.account-content .sidebar{width:100%}.account-content .sidebar .menu-block .menu-block-title{height:50px;padding-top:13px;border-bottom:1px solid #c7c7c7;border-top:1px solid #c7c7c7}.account-content .sidebar .menu-block .menu-block-title .right{display:block;float:right;-ms-flex-item-align:center;align-self:center}.account-content .sidebar .menu-block .menubar{border:0;display:none}.account-content .sidebar .menu-block .menubar>li{margin-left:0;width:100%}.account-content .sidebar .menu-block .menubar>li .icon{right:0}.account-content .sidebar .menu-block .menubar>li:last-child{border-bottom:1px solid #c7c7c7}.account-content .account-layout{margin-left:0;margin-top:20px;width:100%}.account-content .account-layout .account-head{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;border-bottom:1px solid #c7c7c7;border-top:1px solid #c7c7c7;height:50px;margin-top:10px}.account-content .account-layout .account-head .account-action{margin-top:12px;margin-left:15px}.account-content .account-layout .account-head .back-icon{display:block}.account-content .account-layout .account-head span{margin-top:13px;font-size:18px}.account-content .account-layout .account-head .horizontal-rule{display:none}.account-content .account-layout .account-table-content{margin-top:2%}.account-content .account-layout .account-table-content table tbody tr{height:70px}.account-content .account-layout .account-table-content table tbody tr td{display:block}.account-content .account-layout .account-table-content .address-holder{-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.account-content .account-items-list,.account-content .edit-form{margin-top:20px}.account-content .account-items-list .responsive-empty,.account-content .edit-form .responsive-empty{display:block}.account-content .control-group .control{width:100%}}.sale-container{color:#5e5e5e}.sale-container .sale-section .secton-title{font-size:18px;color:#8e8e8e;padding:15px 0;border-bottom:1px solid #c7c7c7}.sale-container .sale-section .section-content{display:block;padding:20px 0;border-bottom:1px solid #e8e8e8}.sale-container .sale-section .section-content .row{display:block;padding:7px 0}.sale-container .sale-section .section-content .row .title{width:200px;letter-spacing:-.26px;display:inline-block}.sale-container .sale-section .section-content .row .value{letter-spacing:-.26px;display:inline-block}.sale-container .sale-section .section-content .order-box-container{display:inline-block;width:100%}.sale-container .sale-section .section-content .order-box-container .box{float:left;width:25%}.sale-container .sale-section .section-content .order-box-container .box .box-title{padding:10px 0;font-size:18px;color:#8e8e8e}.sale-container .sale-section .section-content .order-box-container .box .box-content{color:#3a3a3a;padding-right:10px}.sale-container .sale-section .section-content .qty-row{display:block}.sale-container .totals{padding-top:20px;display:inline-block;width:100%;border-top:1px solid #e8e8e8}.sale-container .totals .sale-summary{height:130px;float:right;border-collapse:collapse}.sale-container .totals .sale-summary tr td{padding:5px 8px;width:auto;color:#3a3a3a}.sale-container .totals .sale-summary tr.bold{font-weight:600;font-size:15px}.sale-container .totals .sale-summary tr.border td{border-bottom:1px solid #c7c7c7}@media only screen and (max-width:770px){.sale-container .sale-section .section-content{border-bottom:none;padding:10px 0}.sale-container .sale-section .section-content .row{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.sale-container .sale-section .section-content .row .title{line-height:20px}.sale-container .sale-section .section-content .totals{border-top:none}.sale-container .sale-section .section-content .totals .sale-summary{width:100%}.sale-container .sale-section .section-content .totals .sale-summary tr td:nth-child(2){display:none}.sale-container .sale-section .section-content .order-box-container{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.sale-container .sale-section .section-content .order-box-container .box{width:100%;margin:10px auto}.sale-container .sale-section .section-content .qty-row{display:inline}}.verify-account{text-align:center;background:#204d74;width:200px;margin-right:auto;margin-left:auto;border-radius:4px}.verify-account a{color:#fff!important}.cp-spinner{position:absolute;left:calc(50% - 24px);margin-top:calc(40% - 24px)}@media only screen and (max-width:720px){.cp-spinner{left:50%;margin-left:-24px;top:50%;margin-top:-24px}}@media only screen and (max-width:720px){.error-container .wrapper{-webkit-box-orient:vertical!important;-webkit-box-direction:reverse!important;-ms-flex-direction:column-reverse!important;flex-direction:column-reverse!important;margin:10px 0 20px!important;-webkit-box-align:start!important;-ms-flex-align:start!important;align-items:start!important;height:100%!important}}@media only screen and (max-width:770px){.table table{width:100%}.table table thead{display:none}.table table tbody tr td:before{content:attr(data-value);font-size:15px;font-weight:600;display:inline-block;width:120px}.table table tbody td{border-bottom:none!important;display:block;width:100%!important}.table table tbody td div{position:relative;left:100px;top:-20px}.table table tbody tr{border:1px solid #c7c7c7}}.show-wishlist{z-index:-1!important}.filter-row-one .dropdown-filters{position:relative!important;right:1px!important}@media only screen and (max-width:770px){.table .grid-container{margin-top:10px}.table .grid-container .filter-row-one{display:block}.table .grid-container .filter-row-one .dropdown-filters{margin-top:10px}}.rtl{direction:rtl}.rtl .header .header-top div.left-content ul.logo-container{margin-right:0;margin-left:12px}.rtl .header .header-top div.left-content ul.search-container li.search-group .search-field{border:2px solid #c7c7c7;padding-right:12px;padding-left:0;border-radius:2px;border-top-left-radius:0;border-bottom-left-radius:0}.rtl .header .header-top div.left-content ul.search-container li.search-group .search-icon-wrapper{border:2px solid #c7c7c7;border-right:none;border-radius:2px;border-top-right-radius:0;border-bottom-right-radius:0}.rtl .header .header-top div.right-content .right-content-menu>li{border-right:2px solid #c7c7c7;padding:0 15px}.rtl .header .header-top div.right-content .right-content-menu>li:last-child{padding-left:0}.rtl .header .header-top div.right-content .right-content-menu>li:first-child{border-right:0;padding-right:0}.rtl .header .header-top div.right-content .right-content-menu .cart-dropdown-container .dropdown-list{left:0;right:unset!important}.rtl .header .header-top div.right-content .right-content-menu .cart-dropdown-container .count{display:inline-block}.rtl .header .header-top div.right-content .right-content-menu .account,.rtl .header .header-top div.right-content .right-content-menu .currency{right:unset;left:0}.rtl .header .header-top div.right-content .right-content-menu .guest div{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between}.rtl .header .header-bottom .nav>li{float:right;margin-right:0;margin-left:1px}.rtl .header .header-bottom .nav a{padding:.8em .5em .8em .3em!important}.rtl .header .header-bottom .nav li a>.icon{-webkit-transform:rotate(180deg);transform:rotate(180deg)}.rtl .header .header-bottom .nav>li li:hover>ul{left:unset!important;right:100%!important}.rtl .header .header-bottom .nav ul{left:99999em}.rtl .header .search-responsive .search-content .right{float:left}.rtl .dropdown-list{text-align:right}.rtl .dropdown-list.bottom-right{left:0;right:auto}@media only screen and (max-width:720px){.rtl .header .header-top div.right-content .menu-box{margin-left:0;margin-right:5px}.rtl .header .header-top div.right-content .right-content-menu .account{position:absolute;left:0;right:auto}.rtl .header .header-top div.right-content .right-content-menu>li{padding:0;border:0}.rtl .header .header-top div.right-content .search-box{margin-left:5px}.rtl .header .header-bottom .nav>li{float:none}.rtl .header .header-bottom .nav li>.icon{float:left;-webkit-transform:rotate(180deg);transform:rotate(180deg)}.rtl .header .header-bottom .icon.icon-arrow-down{margin-left:5px}}.rtl section.slider-block div.slider-content div.slider-control{left:2%;right:auto}@media only screen and (max-width:720px){.rtl section.slider-block div.slider-content div.slider-control{left:0}}.rtl .main-container-wrapper .product-card .sticker{left:auto;right:20px}.rtl .main-container-wrapper .product-card .cart-wish-wrap .addtocart{margin-right:0;margin-left:10px}.rtl section.product-detail div.layouter .form-container div.product-image-group{margin-right:0;margin-left:30px}.rtl section.product-detail div.layouter .form-container div.product-image-group .add-to-buttons{float:left!important}.rtl section.product-detail div.layouter .form-container div .thumb-list{margin-left:4px;margin-right:0}.rtl section.product-detail div.layouter .form-container .details .accordian .accordian-header{padding:20px 0 20px 15px}.rtl section.product-detail div.layouter .form-container .details .accordian .accordian-header .icon{float:left}.rtl section.product-detail div.layouter .form-container .details .accordian .accordian-header .expand-icon{margin-left:10px}.rtl section.product-detail div.layouter .form-container .details .full-specifications td:first-child{padding-right:0;padding-left:40px}.rtl section.product-detail div.layouter .form-container .details .product-ratings .total-reviews{margin-left:0;margin-right:15px}@media only screen and (max-width:720px){.rtl section.product-detail div.layouter .form-container div.product-image-group{margin-right:0;margin-left:0}}.rtl .main .category-container .layered-filter-wrapper,.rtl .main .category-container .responsive-layred-filter{padding-right:0;padding-left:20px}.rtl .main .top-toolbar .pager{float:left}.rtl .main .top-toolbar .pager .view-mode{margin-right:0;margin-left:20px}.rtl .main .top-toolbar .pager .sorter{margin-right:0;margin-left:10px}.rtl .main .top-toolbar .pager label{margin-right:0;margin-left:5px}.rtl .main .top-toolbar .page-info{float:right}.rtl section.review .review-layouter .review-form{margin-left:0;margin-right:20px}.rtl section.review .review-layouter .review-form .heading .right{float:left}.rtl section.review .review-layouter .review-form .ratings-reviews .right-side .rater .star-name{margin-right:0;margin-left:5px}@media only screen and (max-width:770px){.rtl section.review .review-layouter .review-form{margin-right:0}}.rtl section.cart .cart-content .left-side{width:70%;float:right}.rtl section.cart .cart-content .left-side .misc-controls a.link{margin-left:15px;margin-right:0}.rtl section.cart .cart-content .right-side{width:30%;padding-right:40px;padding-left:0}.rtl .order-summary .item-detail label.right,.rtl .payable-amount label.right{float:left}.rtl .item div{margin-left:15px;margin-right:0!important}.rtl .cart-item-list .item .item-details .misc div.qty-text{margin-right:0;margin-left:10px}.rtl .cart-item-list .item .item-details .misc .remove,.rtl .cart-item-list .item .item-details .misc input.box{margin-right:0;margin-left:30px}.rtl .cart-item-list .item .item-details .misc .control-group label{margin-left:15px;margin-right:0}@media only screen and (max-width:770px){.rtl section.cart .cart-content .left-side{width:100%;float:none}.rtl section.cart .cart-content .left-side .misc-controls div button{margin-right:0}.rtl section.cart .cart-content .right-side{width:100%;padding-right:0}}.rtl .checkout-process .col-right{padding-left:0;padding-right:40px}.rtl .checkout-process .col-main{padding-left:40px;padding-right:0}.rtl .checkout-process .col-main ul.checkout-steps li span{margin-right:7px;margin-left:0}.rtl .checkout-process .col-main .step-content .form-header h1{float:right}.rtl .checkout-process .col-main .step-content .form-header .btn{float:left}.rtl .checkout-process .col-main .step-content .payment-methods .control-info{margin-right:28px;margin-left:0}.rtl .checkout-process .col-main .step-content .address .billing-address,.rtl .checkout-process .col-main .step-content .address .pull-left,.rtl .checkout-process .col-main .step-content .order-description .billing-address,.rtl .checkout-process .col-main .step-content .order-description .pull-left{float:right!important}.rtl .checkout-process .col-main .step-content .address .pull-right,.rtl .checkout-process .col-main .step-content .address .shipping-address,.rtl .checkout-process .col-main .step-content .order-description .pull-right,.rtl .checkout-process .col-main .step-content .order-description .shipping-address{float:left!important}.rtl .checkbox,.rtl .radio{margin:10px 0 5px 5px}.rtl .radio .radio-view{margin-left:5px;margin-right:0}.rtl .radio input{right:0;left:auto}@media only screen and (max-width:770px){.rtl .checkout-process .col-main{padding-left:0}}.rtl .account-content .account-layout{margin-left:0;margin-right:40px}.rtl .account-content .menu-block .menubar li{margin-left:0;margin-right:5%}.rtl .account-content .menu-block .menubar li a{text-align:right}.rtl .account-content .menu-block .menubar li .icon{right:unset;left:12px;-webkit-transform:rotate(180deg);transform:rotate(180deg)}.rtl .account-head .account-action{float:left}.rtl .account-item-card .media-info .info{margin-right:20px;margin-left:0}.rtl .account-item-card .operations a span{float:left}.rtl .table table{text-align:right}.rtl .sale-container .totals .sale-summary{float:left}.rtl .sale-container .sale-section .section-content .order-box-container{display:-webkit-box;display:-ms-flexbox;display:flex}@media (max-width:770px){.rtl .account-content .account-layout{margin-right:0}.rtl .account-content .account-layout .account-head .account-action{margin-left:0}.rtl .account-content .sidebar .menu-block .menu-block-title .right{float:left}.rtl .account-content .sidebar .menu-block .menubar>li{margin-right:0}}.rtl .footer .footer-content .footer-list-container .list-container .list-group li span.icon{margin-left:5px;margin-right:0}@media (max-width:720px){.rtl .footer{padding-right:15px;padding-left:10%}.rtl .footer .footer-list-container{padding-right:0!important}}.rtl .cp-spinner{position:absolute;right:calc(50% - 24px);margin-top:calc(40% - 24px)}@media only screen and (max-width:720px){.rtl .cp-spinner{right:50%;margin-right:-24px;left:auto}}.rtl .product-list .product-card .product-information{padding-left:0;padding-right:30px;float:left}.rtl .zoom-image-direction{left:0;right:476px!important}.banner-container{width:100%;float:left;padding:0 18px;margin-bottom:40px}.banner-container .left-banner{padding-right:20px;width:60%;float:left}.banner-container .left-banner img{width:100%}.banner-container .right-banner{padding-left:20px;width:40%;float:left}.banner-container .right-banner img{width:100%}.banner-container .right-banner img:first-child{padding-bottom:20px;height:50%;display:block}.banner-container .right-banner img:last-child{padding-top:20px;height:50%;display:block}@media (max-width:720px){.banner-container .left-banner{padding-right:0;width:100%}.banner-container .right-banner{padding-left:0;width:100%}.banner-container .right-banner img:first-child{padding-bottom:0;padding-top:25px}.banner-container .right-banner img:last-child{padding-top:25px}} \ No newline at end of file diff --git a/packages/Webkul/Shop/src/Http/Controllers/CartController.php b/packages/Webkul/Shop/src/Http/Controllers/CartController.php index 55bbbb482..3c967a865 100755 --- a/packages/Webkul/Shop/src/Http/Controllers/CartController.php +++ b/packages/Webkul/Shop/src/Http/Controllers/CartController.php @@ -256,7 +256,7 @@ class CartController extends Controller $code = request()->input('code'); $result = Cart::applyCoupon($code); - + dd($result); return $result; } diff --git a/packages/Webkul/Shop/src/Resources/assets/sass/app.scss b/packages/Webkul/Shop/src/Resources/assets/sass/app.scss index f6e235150..b509f28a5 100755 --- a/packages/Webkul/Shop/src/Resources/assets/sass/app.scss +++ b/packages/Webkul/Shop/src/Resources/assets/sass/app.scss @@ -2174,7 +2174,7 @@ section.cart { } } - .payble-amount { + .payable-amount { margin-top: 17px; border-top: 1px solid $border-color; padding-top: 12px; @@ -3710,7 +3710,7 @@ section.review { } } - .order-summary .item-detail, .payble-amount { + .order-summary .item-detail, .payable-amount { label.right { float: left; } 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 f46c443ec..33f9472d7 100755 --- a/packages/Webkul/Shop/src/Resources/views/checkout/onepage.blade.php +++ b/packages/Webkul/Shop/src/Resources/views/checkout/onepage.blade.php @@ -5,18 +5,35 @@ @stop @section('content-wrapper') - - @endsection @push('scripts') + @@ -135,9 +133,7 @@ data: function() { return { currentStep: 1, - completedStep: 0, - address: { billing: { address1: [''], @@ -149,23 +145,14 @@ address1: [''] }, }, - selected_shipping_method: '', - selected_payment_method: '', - disable_button: false, - new_shipping_address: false, - new_billing_address: false, - allAddress: {}, - countryStates: @json(core()->groupedStatesByCountries()), - country: @json(core()->countries()), - resetSummary: true } }, @@ -483,7 +470,31 @@ Vue.component('review-section', { data: function() { return { - templateRender: null, + templateRender: null + } + }, + staticRenderFns: reviewTemplateRenderFns, + mounted: function() { + this.templateRender = reviewHtml.render; + for (var i in reviewHtml.staticRenderFns) { + reviewTemplateRenderFns.push(reviewHtml.staticRenderFns[i]); + } + }, + render: function(h) { + return h('div', [ + (this.templateRender ? + this.templateRender() : + '') + ]); + } + }); + + Vue.component('discount', { + template: '#discount-template', + inject: ['$validator'], + + data: function() { + return { code: null, message: null, qtyRevealed: false, @@ -499,22 +510,7 @@ } }, - staticRenderFns: reviewTemplateRenderFns, - mounted: function() { - this.templateRender = reviewHtml.render; - - for (var i in reviewHtml.staticRenderFns) { - reviewTemplateRenderFns.push(reviewHtml.staticRenderFns[i]); - } - }, - - render: function(h) { - return h('div', [ - (this.templateRender ? - this.templateRender() : - '') - ]); }, methods: { @@ -560,6 +556,7 @@ } } }); + @endpush \ No newline at end of file diff --git a/packages/Webkul/Shop/src/Resources/views/checkout/total/summary.blade.php b/packages/Webkul/Shop/src/Resources/views/checkout/total/summary.blade.php index d7e664298..2e3b9beef 100755 --- a/packages/Webkul/Shop/src/Resources/views/checkout/total/summary.blade.php +++ b/packages/Webkul/Shop/src/Resources/views/checkout/total/summary.blade.php @@ -3,7 +3,7 @@
@@ -24,72 +24,10 @@
@endif -
+
-
-
- @inject('cart_rule', 'Webkul\Discount\Helpers\Discount') - - @if (! request()->is('checkout/cart')) -
-
- - - - @{{ errors.first('code') }} - - - @{{ message }} - - @{{ message }} - - -
-
- - @if(isset($rule)) -
-
- {{ $rule['rule']->name }} {{ __('shop::app.checkout.onepage.applied') }} -
- - - @if ($rule['impact']['amount_given']) - - - - @else - - - - @endif - -
- @endif - -
-
- @{{ message }} -
- - - - - - -
- @endif -
-
+
\ No newline at end of file From cd1ea82d12a582b8e194b4effa30e0f0a73b8f1c Mon Sep 17 00:00:00 2001 From: Prashant Singh Date: Fri, 7 Jun 2019 07:06:19 +0530 Subject: [PATCH 311/678] added checks --- packages/Webkul/Checkout/src/Cart.php | 4 +- .../Discount/src/Config/rule-conditions.php | 1 + .../Webkul/Discount/src/Helpers/Discount.php | 1110 ++--------------- .../src/Http/Controllers/CartController.php | 18 +- packages/Webkul/Shop/src/Http/routes.php | 2 + .../views/checkout/onepage.blade.php | 38 +- 6 files changed, 172 insertions(+), 1001 deletions(-) diff --git a/packages/Webkul/Checkout/src/Cart.php b/packages/Webkul/Checkout/src/Cart.php index 60369775f..03a598ce0 100755 --- a/packages/Webkul/Checkout/src/Cart.php +++ b/packages/Webkul/Checkout/src/Cart.php @@ -1288,14 +1288,14 @@ class Cart { public function applyCoupon($code) { - $result = $this->discount->ruleCheck($code); + $result = $this->discount->applyCouponAbleRule($code); return $result; } public function applyNonCoupon() { - $result = $this->discount->nonRuleCheck(); + $result = $this->discount->applyNonCouponAbleRule(); return $result; } diff --git a/packages/Webkul/Discount/src/Config/rule-conditions.php b/packages/Webkul/Discount/src/Config/rule-conditions.php index 90ea67d0c..b8e147a4f 100644 --- a/packages/Webkul/Discount/src/Config/rule-conditions.php +++ b/packages/Webkul/Discount/src/Config/rule-conditions.php @@ -68,6 +68,7 @@ return [ 'percent_of_product' => 'Percentage of product', 'fixed_amount' => 'Apply as fixed amount', 'buy_a_get_b' => 'Get B amount back', + // 'fixed_amount_cart' => 'Fixed amount for whole cart' ], 'validation' => [ diff --git a/packages/Webkul/Discount/src/Helpers/Discount.php b/packages/Webkul/Discount/src/Helpers/Discount.php index 7e31cc6f0..a70a4e5e9 100644 --- a/packages/Webkul/Discount/src/Helpers/Discount.php +++ b/packages/Webkul/Discount/src/Helpers/Discount.php @@ -36,781 +36,173 @@ class Discount $this->cartRuleCart = $cartRuleCart; } - /** - * Gets the end rules applicable for guests - * autocheck for customer group and channels - */ - public function getGuestEndRules() - { - $rules = $this->cartRule->findWhere(['status' => 1, 'end_other_rules' => 1, 'is_guest' => 1]); - $currentChannel = core()->getCurrentChannel(); - - $guestRules = array(); - foreach ($rules as $rule) { - foreach ($rule->channels as $channel) { - if ($channel->channel_id == $currentChannel->id) { - array_push($guestRules, $rule); - } - } - } - - if (count($guestRules) > 1) { - $leastPriority = 999999999999; - $leastId = 999999999999; - - foreach ($guestRules as $guestRule) { - if ($leastPriority >= $guestRule->priority) { - $leastPriority = $guestRule->priority; - - if ($leastId > $guestRule->id) { - $leastId = $guestRule->id; - } - } - } - - return [$this->cartRule->find($leastId)]; - } - - return $guestRules; - } - - /** - * Get the non ending rules for the guest - * and completed auto check for guests and - * channels - */ - public function getGuestBestRules() - { - $rules = $this->cartRule->findWhere(['status' => 1, 'end_other_rules' => 0, 'is_guest' => 1]); - $currentChannel = core()->getCurrentChannel(); - - $guestRules = array(); - foreach ($rules as $rule) { - foreach ($rule->channels as $channel) { - if ($channel->channel_id == $currentChannel->id) { - array_push($guestRules, $rule); - } - } - } - - return $guestRules; - } - - - /** - * Gets the best rules for auth customers - */ - public function getBestRules() - { - $rules = $this->cartRule->findWhere(['status' => 1, 'end_other_rules' => 0]); - $currentChannel = core()->getCurrentChannel(); - - $suitableRules = array(); - foreach ($rules as $rule) { - foreach ($rule->channels as $channel) { - if ($channel->channel_id == $currentChannel->id) { - if (auth()->guard('customer')->check()) { - foreach ($rule->customer_groups as $customerGroup) { - if (auth()->guard('customer')->user()->customer_group_id == $customerGroup->customer_group_id) { - array_push($suitableRules, $rule); - } - } - } - } - } - } - - return $suitableRules; - } - - /** - * Gets the end rules for the auth customers - */ - public function getEndRules() - { - $rules = $this->cartRule->findWhere(['status' => 1, 'end_other_rules' => 1]); - $currentChannel = core()->getCurrentChannel(); - - $suitableRules = array(); - foreach ($rules as $rule) { - foreach ($rule->channels as $channel) { - if ($channel->channel_id == $currentChannel->id) { - if (auth()->guard('customer')->check()) { - foreach ($rule->customer_groups as $customerGroup) { - if (auth()->guard('customer')->user()->customer_group_id == $customerGroup->customer_group_id) { - array_push($suitableRules, $rule); - } - } - } - } - } - } - - if (count($suitableRules) > 1) { - $leastPriority = 999999999999; - $leastId = 999999999999; - - foreach($suitableRules as $suitableRule) { - if ($leastPriority >= $suitableRule->priority) { - $leastPriority = $suitableRule->priority; - - if ($leastId > $suitableRule->id) { - $leastId = $suitableRule->id; - } - } - } - - return [$this->cartRule->find($leastId)]; - } - - return $suitableRules; - } - - /** - * Get the rules to applied automatically - * depending on user state - */ - public function toApply() + public function applyNonCouponAbleRule() { if (auth()->guard('customer')->check()) { - $endRules = $this->getEndRules(); - - if (isset($endRules) && count($endRules)) { - $this->endRuleActive = true; - - return [ - 'end_rule' => true, - 'rule' => $endRules, - 'count' => count($endRules) - ]; - } else { - $bestRules = $this->getBestRules(); - - return [ - 'end_rule' => false, - 'rule' => $bestRules, - 'count' => count($bestRules) - ]; - } - } else { - $endRules = $this->getGuestEndRules(); - - if (isset($endRules) && count($endRules)) { - $this->endRuleActive = true; - - return [ - 'end_rule' => true, - 'rule' => $endRules, - 'count' => count($endRules) - ]; - } else { - $bestRules = $this->getGuestBestRules(); - - return [ - 'end_rule' => false, - 'rule' => $bestRules, - 'count' => count( $bestRules) - ]; - } - } - } - - /** - * To apply the coupon code based rules - */ - public function applyCouponAble() - { - $rules = $this->toApply(); - - if ($rules['end_rule']) { - $rules = $rules['rule']; - $id = array(); - - foreach($rules as $rule) { - if ($rule->use_coupon) { - array_push($id, $rule); - } - } - - if (count($id)) { - return [ - 'couponable' => true, - 'id' => $id, - 'end_rule' => true - ]; - } else { - return [ - 'couponable' => false, - 'id' => null, - 'end_rule' => null - ]; - } - } else { - $rules = $rules['rule']; - $id = array(); - - foreach ($rules as $rule) { - if ($rule->use_coupon) { - array_push($id, $rule); - } - } - - if (count($id)) { - return [ - 'couponable' => true, - 'id' => $id, - 'end_rule' => false - ]; - } else { - return [ - 'couponable' => false, - 'id' => null, - 'end_rule' => false - ]; - } - } - } - - /** - * To apply the non coupon based rules - */ - public function applyNonCouponAble() - { - $rules = $this->toApply(); - - if (! $rules['end_rule']) { - $rules = $rules['rule']; - $id = array(); - - foreach ($rules as $rule) { - if (! $rule->use_coupon) { - array_push($id, $rule); - } - } - - if (count($id)) { - return [ - 'end_rule' => false, - 'noncouponable' => true, - 'id' => $id, - 'end_rule' => false - ]; - } else { - return [ - 'end_rule' => false, - 'noncouponable' => false, - 'id' => null, - 'end_rule' => false - ]; - } - } else { - $rules = $rules['rule']; - $id = array(); - - foreach ($rules as $rule) { - if (! $rule->use_coupon) { - array_push($id, $rule); - } - } - - if (count($id)) { - return [ - 'end_rule' => true, - 'noncouponable' => true, - 'id' => $id, - 'end_rule' => true - ]; - } else { - return [ - 'end_rule' => true, - 'noncouponable' => false, - 'id' => null, - 'end_rule' => null - ]; - } - } - } - - public function nonRuleCheck() - { - $result = $this->applyNonCouponAble(); - $cart = \Cart::getCart(); - $maxImpacts = array(); - - if (isset($result['id']) && count($result['id'])) { - $rules = array(); - - if (count($result['id']) > 1) { - $leastPriority = 999999999999; - - foreach($result['id'] as $rule) { - if ($rule->priority < $leastPriority) { - array_push($rules, $rule); - } - } - } else if (count($result['id'])) { - array_push($rules, $result['id'][0]); - } - - foreach ($rules as $rule) { - // All of conditions is/are true - $result = 1; - if ($rule->conditions && ($rule->conditions != "null" || $rule->conditions != "")) { - if ($rule->starts_from != null && $rule->ends_till != null) { - if (Carbon::parse($rule->starts_from) < now() && now() < Carbon::parse($rule->ends_till)) { - $conditions = json_decode(json_decode($rule->conditions)); - $test_mode = config('pricerules.test_mode.0'); - - if ($test_mode == config('pricerules.test_mode.0')) { - $result = $this->testAllConditionAreTrue($conditions, $cart); - } else if ($test_mode == config('pricerules.test_mode.1')) { - $result = $this->testAllConditionAreFalse($conditions, $cart); - } else if ($test_mode == config('pricerules.test_mode.2')) { - $result = $this->testAnyConditionIsTrue($conditions, $cart); - } else if ($test_mode == config('pricerules.test_mode.3')) { - $result = $this->testAbyConditionIsFalse($conditions, $cart); - } - } - } else { - $conditions = json_decode(json_decode($rule->conditions)); - $test_mode = config('pricerules.test_mode.0'); - - if ($test_mode == config('pricerules.test_mode.0')) { - $result = $this->testAllConditionAreTrue($conditions, $cart); - } else if ($test_mode == config('pricerules.test_mode.1')) { - $result = $this->testAllConditionAreFalse($conditions, $cart); - } else if ($test_mode == config('pricerules.test_mode.2')) { - $result = $this->testAnyConditionIsTrue($conditions, $cart); - } else if ($test_mode == config('pricerules.test_mode.3')) { - $result = $this->testAbyConditionIsFalse($conditions, $cart); - } - } - } else { - if ($rule->starts_from != null && $rule->ends_till != null) { - if (Carbon::parse($rule->starts_from) < now() && now() < Carbon::parse($rule->ends_till)) { - } else { - $result = 0; - } - } - } - - // check all the conditions associated with the rule - if ($result) { - $action_type = $rule->action_type; - $disc_threshold = $rule->disc_threshold; - $disc_amount = $rule->disc_amount; - $disc_quantity = $rule->disc_quantity; - - $amountDiscounted = 0; - $newQuantity = 0; - - if ($cart->items_qty >= $disc_threshold && $disc_quantity > 0) { - if ($disc_quantity > 1) { - $disc_amount = $disc_amount * $disc_quantity; - } - // add the time conditions if rule is expired and active then make it in active - $leastWorthItem = \Cart::leastWorthItem(); - $realQty = $leastWorthItem['quantity']; - - if ($action_type == config('pricerules.cart.validation.0')) { - if ($realQty <= $disc_quantity) { - $amountDiscounted = (($leastWorthItem['total'] / $realQty) * ($disc_amount / 100)) * $disc_quantity; - } else { - $amountDiscounted = ($leastWorthItem['total'] / $realQty) * ($disc_amount / 100); - } - } else if ($action_type == config('pricerules.cart.validation.1')) { - if ($realQty <= $disc_quantity) { - if ($disc_amount > ($disc_quantity * $leastWorthItem['total'])) { - $amountDiscounted = 0; - } else { - $amountDiscounted = $cart->sub_total - $disc_amount; - } - } else { - if ($disc_amount > $leastWorthItem['total']) { - $amountDiscounted = 0; - } else { - $amountDiscounted = $cart->sub_total - $disc_amount; - } - } - } else if ($action_type == config('pricerules.cart.validation.2')) { - if ($realQty <= $disc_quantity) { - $newQuantity = $this->cartItem->find($leastWorthItem['id'])->quantity + $disc_amount; - } else { - $newQuantity = $this->cartItem->find($leastWorthItem['id'])->quantity + $disc_quantity; - } - } else if ($action_type == config('pricerules.cart.validation.3')) { - $amountDiscounted = $disc_amount; - } - - //standard returns - if ($action_type == config('pricerules.cart.validation.2')) { - array_push($maxImpacts, [ - 'id' => $rule->id, - 'rule' => $rule, - 'item_id' => $leastWorthItem['id'], - 'amount_given' => false, - 'amount' => $newQuantity, - 'action_type' => $action_type - ]); - } else { - array_push($maxImpacts, [ - 'id' => $rule->id, - 'rule' => $rule, - 'item_id' => $leastWorthItem['id'], - 'amount_given' => true, - 'amount' => $amountDiscounted, - 'action_type' => $action_type - ]); - } - } - } - } - } - - $leastItemAvg = 999999999999; - $leastId = -1; - foreach ($maxImpacts as $key => $maxImpact) { - $minItemPrice = array(); - - if ($maxImpact['action_type'] == config('pricerules.cart.validation.2')) { - $amount = $cart->base_grand_total / $maxImpact['amount']; - - if ($amount < $leastItemAvg) { - $leastItemAvg = $amount; - $leastId = $key; - } - } else { - $amount = $maxImpact['amount'] / $cart->items_qty; - - if ($amount < $leastItemAvg) { - $leastItemAvg = $amount; - $leastId = $key; - } - } - } - - if ($leastId != -1) { - $cartRuleCart = $this->cartRuleCart->findWhere([ - 'cart_id' => $cart->id, + $nonCouponAbleRules = $this->cartRule->findWhere([ + 'use_coupon' => 0, + 'status' => 1 + ]); + } else { + $nonCouponAbleRules = $this->cartRule->findWhere([ + 'use_coupon' => 0, + 'is_guest' => 1, + 'status' => 1 ]); - - if (count($cartRuleCart)) { - $this->cartRuleCart->update([ - 'cart_id' => $cart->id, - 'cart_rule_id' => $maxImpacts[$leastId]['rule']->id - ], $cartRuleCart->first()->id); - } else { - $this->cartRuleCart->create([ - 'cart_id' => $cart->id, - 'cart_rule_id' => $maxImpacts[$leastId]['rule']->id - ]); - } - - return ['rule' => $maxImpacts[$leastId]['rule'], 'impact' => $maxImpacts[$leastId], 'success' => true]; - } - } - - public function ruleCheck($code) - { - $rules = $this->applyCouponAble(); - $appliedRule = null; - - if (! isset($rules['id'])) { - return ['message' => trans('admin::app.promotion.status.no-coupon'), 'success' => false]; } - foreach($rules['id'] as $rule) { - if ($rule->auto_generation == 0) { - if ($rule->coupons->code == $code) { - $appliedRule = $rule; + $canBeApplied = array(); - break; - } else { - continue; + // time based filter + foreach($nonCouponAbleRules as $rule) { + $report = $this->checkApplicability($rule); + $report['rule'] = $rule; + + $passed = 0; + if ($rule->starts_from != null && $rule->ends_till == null) { + if (Carbon::parse($rule->starts_from) < now()) { + $passed = 1; } + } else if ($rule->starts_from == null && $rule->ends_till != null) { + if (Carbon::parse($rule->ends_till) > now()) { + $passed = 1; + } + } else if ($rule->starts_from != null && $rule->ends_till != null) { + if (Carbon::parse($rule->starts_from) < now() && now() < Carbon::parse($rule->ends_till)) { + $passed = 1; + } + } else { + $passed = 1; + } + + if ($passed) { + array_push($canBeApplied, $report); } } - if (! isset($appliedRule)) { - return ['message' => trans('admin::app.promotion.status.no-coupon'), 'success' => false]; - } + //min priority + $minPriority = collect($canBeApplied)->min('priority'); - $race = $this->endRace($appliedRule); + $canBeApplied = collect($canBeApplied)->where('priority', $minPriority); - if (! $race) { - return ['message' => trans('admin::app.promotion.status.no-coupon'), 'success' => false]; - } + if (count($canBeApplied) > 1) { + $maxDiscount = collect($canBeApplied)->max('discount'); - $cart = \Cart::getCart(); + $canBeApplied = collect($canBeApplied)->where('discount', $maxDiscount); - // All of conditions is/are true - $result = 1; - if ($appliedRule->conditions && $appliedRule->conditions != "null") { - if ($appliedRule->starts_from != null && $appliedRule->ends_till != null) { - if (Carbon::parse($appliedRule->starts_from) < now() && now() < Carbon::parse($appliedRule->ends_till)) { - $conditions = json_decode(json_decode($appliedRule->conditions)); - $test_mode = config('pricerules.test_mode.0'); - - if ($test_mode == config('pricerules.test_mode.0')) { - $result = $this->testAllConditionAreTrue($conditions, $cart); - } else if ($test_mode == config('pricerules.test_mode.1')) { - $result = $this->testAllConditionAreFalse($conditions, $cart); - } else if ($test_mode == config('pricerules.test_mode.2')) { - $result = $this->testAnyConditionIsTrue($conditions, $cart); - } else if ($test_mode == config('pricerules.test_mode.3')) { - $result = $this->testAbyConditionIsFalse($conditions, $cart); + $leastId = 999999999999; + if (count($canBeApplied) > 1) { + foreach($canBeApplied as $rule) { + if ($rule['rule'] < $leastId) { + $leastId = $rule['rule']->id; } } - } else { - $conditions = json_decode(json_decode($rule->conditions)); - $test_mode = config('pricerules.test_mode.0'); - - if ($test_mode == config('pricerules.test_mode.0')) { - $result = $this->testAllConditionAreTrue($conditions, $cart); - } else if ($test_mode == config('pricerules.test_mode.1')) { - $result = $this->testAllConditionAreFalse($conditions, $cart); - } else if ($test_mode == config('pricerules.test_mode.2')) { - $result = $this->testAnyConditionIsTrue($conditions, $cart); - } else if ($test_mode == config('pricerules.test_mode.3')) { - $result = $this->testAnyConditionIsFalse($conditions, $cart); - } } + } + //find end rule + return $canBeApplied; + } + + public function applyCouponAbleRule() + { + if (auth()->guard('customer')->check()) { + $couponAbleRules = $this->cartRule->findWhere([ + 'use_coupon' => 1 + ]); } else { - if ($appliedRule->starts_from != null && $appliedRule->ends_till != null) { - if (Carbon::parse($appliedRule->starts_from) < now() && now() < Carbon::parse($appliedRule->ends_till)) { - $result = 1; - } else { - $result = 0; + $couponAbleRules = $this->cartRule->findWhere([ + 'use_coupon' => 1, + 'is_guest' => 1 + ]); + } + + // time based filter + foreach($couponAbleRules as $rule) { + if ($rule->starts_from != null && $rule->ends_till == null) { + if (Carbon::parse($rule->starts_from) < now()) { + + } + } else if ($rule->starts_from == null && $rule->ends_till != null) { + if (Carbon::parse($rule->ends_till) < now()) { + + } + } else if ($rule->starts_from != null && $rule->ends_till != null) { + if (Carbon::parse($rule->starts_from) < now() && now() < Carbon::parse($rule->ends_till)) { } } } - // check all the conditions associated with the rule + return $couponAbleRules; + } + + public function checkApplicability($rule) + { + $cart = \Cart::getCart(); + $report = array(); + $result = 0; + //check conditions + if ($rule->conditions != null) { + $conditions = json_decode(json_decode($rule->conditions)); + $test_mode = config('pricerules.test_mode.0'); + + if ($test_mode == config('pricerules.test_mode.0')) { + $result = $this->testIfAllConditionAreTrue($conditions, $cart); + } else if ($test_mode == config('pricerules.test_mode.1')) { + $result = $this->testIfAllConditionAreFalse($conditions, $cart); + } else if ($test_mode == config('pricerules.test_mode.2')) { + $result = $this->testIfAnyConditionIsTrue($conditions, $cart); + } else if ($test_mode == config('pricerules.test_mode.3')) { + $result = $this->testIfAnyConditionIsFalse($conditions, $cart); + } + } + if ($result) { - $action_type = $rule->action_type; - $disc_threshold = $rule->disc_threshold; - $disc_amount = $rule->disc_amount; - $disc_quantity = $rule->disc_quantity; - - $amountDiscounted = 0; - $newQuantity = 0; - - if ($cart->items_qty >= $disc_threshold && $disc_quantity > 0) { - // add the time conditions if rule is expired and active then make it in active - $leastWorthItem = \Cart::leastWorthItem(); - $realQty = $leastWorthItem['quantity']; - - if ($disc_quantity > 1) { - $disc_amount = $disc_amount * $disc_quantity; - } - - if ($action_type == config('pricerules.cart.validation.0')) { - if ($realQty <= $disc_quantity) { - $amountDiscounted = (($leastWorthItem['total'] / $realQty) * ($disc_amount / 100)) * $disc_quantity; - } else { - $amountDiscounted = ($leastWorthItem['total'] / $realQty) * ($disc_amount / 100); - } - } else if ($action_type == config('pricerules.cart.validation.1')) { - if ($realQty <= $disc_quantity) { - if ($disc_amount > ($disc_quantity * $leastWorthItem['total'])) { - $amountDiscounted = 0; - } else { - $amountDiscounted = $cart->sub_total - $disc_amount; - } - } else { - if ($disc_amount > $leastWorthItem['total']) { - $amountDiscounted = 0; - } else { - $amountDiscounted = $cart->sub_total - $disc_amount; - } - } - } else if ($action_type == config('pricerules.cart.validation.2')) { - if ($realQty <= $disc_quantity) { - $amountDiscounted = $this->cartItem->find($leastWorthItem['id'])->quantity + $disc_amount; - } else { - $amountDiscounted = $this->cartItem->find($leastWorthItem['id'])->quantity + $disc_quantity; - } - } else { - $amountDiscounted = 0; - } - - $cartRuleCart = $this->cartRuleCart->findWhere([ - 'cart_id' => $cart->id, - ]); - - if (count($cartRuleCart)) { - $this->cartRuleCart->update([ - 'cart_id' => $cart->id, - 'cart_rule_id' => $appliedRule->id - ], $cartRuleCart->first()->id); - } else { - $this->cartRuleCart->create([ - 'cart_id' => $cart->id, - 'cart_rule_id' => $appliedRule->id - ]); - } - dd($amountDiscounted); - return ['message' => trans('admin::app.promotion.status.coupon-applied'), 'success' => true, 'amount' => $amountDiscounted]; - } else { - return ['message' => trans('admin::app.promotion.status.coupon-failed'), 'success' => false, 'amount' => $amountDiscounted]; - } + $report['conditions'] = true; } else { - return ['message' => trans('admin::app.promotion.status.coupon-failed'), 'success' => false, 'amount' => $amountDiscounted]; + if ($rule->conditions == null) + $report['conditions'] = true; + else + $report['conditions'] = false; } - } - /** - * To remove the couponable rule - */ - public function removeCoupon() - { - $rule = $this->cartRuleCart->findWhere([ - 'cart_id' => \Cart::getCart()->id - ])->first(); - - if ($rule->cart_rule->use_coupon) { - if ($rule->delete()) { - return true; - } else { - return false; - } + //check endrule + if ($rule->end_other_rules) { + $report['end_other_rules'] = true; } else { - return false; - } - } - - /** - * End race between two rules i.e the one already - * applied and one trying to be used - */ - protected function endRace($newRule) - { - $appliedRule = $this->cartRuleCart->findWhere([ - 'cart_id' => \Cart::getCart()->id - ]); - - if (! count($appliedRule)) { - return true; + $report['end_other_rules'] = false; } - $appliedRule = $appliedRule->first()->cart_rule; - - if ($appliedRule->end_other_rules) { - return false; - } else { - if ($newRule->priority > $appliedRule->priority) { - return false; - } else if ($appliedRule->priority == $newRule->priority) { - $appliedRuleImpact = $this->analyzeImpact($appliedRule); - $newRuleImpact = $this->analyzeImpact($newRule); - - if ($newRuleImpact > $appliedRuleImpact) { - return true; - } else { - return false; - } - } else { - return true; - } - } - } - - /** - * Used when race condition occurs between - * any two rules possibly a discounted and - * a non discounted rule - */ - public function analyzeImpact($rule) - { - $cart = \Cart::getCart(); - - $action_type = $rule->action_type; - $disc_threshold = $rule->disc_threshold; - $disc_amount = $rule->disc_amount; - $disc_quantity = $rule->disc_quantity; - - $amountDiscounted = 0; - $newQuantity = 0; + //calculate discount amount + $action_type = $rule->action_type; // action type used + $disc_threshold = $rule->disc_threshold; // atleast quantity by default 1 --> may be omitted in near future + $disc_amount = $rule->disc_amount; // value of discount + $disc_quantity = $rule->disc_quantity; //max quantity allowed to be discounted + $amountDiscounted; $leastWorthItem = \Cart::leastWorthItem(); $realQty = $leastWorthItem['quantity']; - if ($cart->items_qty >= $disc_threshold && $disc_quantity > 0) { - if ($disc_quantity > 1) { - $disc_amount = $disc_amount * $disc_quantity; - } - + if ($cart->items_qty >= $disc_threshold && $realQty >= $disc_quantity) { if ($action_type == config('pricerules.cart.validation.0')) { - if ($realQty <= $disc_quantity) { - $amountDiscounted = (($leastWorthItem['total'] / $realQty) * ($disc_amount / 100)) * $disc_quantity; - } else { - $amountDiscounted = ($leastWorthItem['total'] / $realQty) * ($disc_amount / 100); - } + $amountDiscounted = $leastWorthItem['total'] * ($disc_amount / 100); } else if ($action_type == config('pricerules.cart.validation.1')) { - if ($realQty <= $disc_quantity) { - if ($disc_amount > ($disc_quantity * $leastWorthItem['total'])) { - $amountDiscounted = 0; - } else { - $amountDiscounted = $cart->sub_total - $disc_amount; - } - } else { - if ($disc_amount > $leastWorthItem['total']) { - $amountDiscounted = 0; - } else { - $amountDiscounted = $cart->sub_total - $disc_amount; - } + $amountDiscounted = $leastWorthItem['total'] - $disc_amount; + + if ($amountDiscounted < 0) { + $amountDiscounted = $leastWorthItem['total']; } } else if ($action_type == config('pricerules.cart.validation.2')) { - if ($realQty <= $disc_quantity) { - $newQuantity = $this->cartItem->find($leastWorthItem['id'])->quantity + $disc_amount; - } else { - $newQuantity = $this->cartItem->find($leastWorthItem['id'])->quantity + $disc_quantity; - } - } else if ($action_type == config('pricerules.cart.validation.3')) { $amountDiscounted = $disc_amount; } - - if ($action_type == config('pricerules.cart.validation.2')) { - // $cartRuleCart = $this->cartRuleCart->findWhere([ - // 'cart_id' => $cart->id, - // ]); - - // if (count($cartRuleCart)) { - // $this->cartRuleCart->update([ - // 'cart_id' => $cart->id, - // 'cart_rule_id' => $rule->id - // ], $cartRuleCart->first()->id); - // } else { - // $this->cartRuleCart->create([ - // 'cart_id' => $cart->id, - // 'cart_rule_id' => $rule->id - // ]); - // } - - return $newQuantity; - } else { - // $cartRuleCart = $this->cartRuleCart->findWhere([ - // 'cart_id' => $cart->id, - // ]); - - // if (count($cartRuleCart)) { - // $this->cartRuleCart->update([ - // 'cart_id' => $cart->id, - // 'cart_rule_id' => $rule->id - // ], $cartRuleCart->first()->id); - // } else { - // $this->cartRuleCart->create([ - // 'cart_id' => $cart->id, - // 'cart_rule_id' => $rule->id - // ]); - // } - - return $amountDiscounted; - } } + + $report['discount'] = $amountDiscounted; + $report['priority'] = $rule->priority; + + return $report; } - protected function testAllConditionAreTrue($conditions, $cart) { + protected function testIfAllConditionAreTrue($conditions, $cart) { $shipping_address = $cart->getShippingAddressAttribute(); $shipping_method = $cart->shipping_method; @@ -881,258 +273,6 @@ class Discount break; } - } else if ($test_condition == '()') { - } else if ($test_condition == '!()') { - } - } - // else if ($condition->type == 'boolean') { - // if ($test_conditions[$condition->type][$test_condition]) { - // if ($test_condition == 0) { - // } else if ($test_condition == 1) { - // } - // } - // } - } - return $result; - } - - protected function testAllConditionAreFalse($conditions, $cart) { - $shipping_address = $cart->getShippingAddressAttribute(); - $shipping_method = $cart->shipping_method; - $shipping_country = $shipping_address->country; - $shipping_state = $shipping_address->state; - $shipping_postcode = $shipping_address->postcode; - $shipping_city = $shipping_address->city; - - $payment_method = $cart->payment->method; - $sub_total = $cart->base_sub_total; - - $total_items = $cart->items_qty; - $total_weight = 0; - - foreach($cart->items as $item) { - $total_weight = $total_weight + $item->base_total_weight; - } - - $test_mode = config('pricerules.test_mode.0'); - $test_conditions = config('pricerules.cart.conditions'); - - $result = 1; - foreach ($conditions as $condition) { - $actual_value = ${$condition->attribute}; - $test_value = $condition->value; - $test_condition = $condition->condition; - - if ($condition->type == 'numeric' || $condition->type == 'string' || $condition->type == 'text') { - if ($test_condition == '=') { - if (! ($actual_value != $test_value)) { - $result = 0; - - break; - } - } else if ($test_condition == '>=') { - if (($actual_value >= $test_value)) { - $result = 0; - - break; - } - } else if ($test_condition == '<=') { - if (($actual_value <= $test_value)) { - $result = 0; - - break; - } - } else if ($test_condition == '>') { - if (($actual_value > $test_value)) { - $result = 0; - - break; - } - } else if ($test_condition == '<') { - if (($actual_value < $test_value)) { - $result = 0; - - break; - } - } else if ($test_condition == '{}') { - if (str_contains($actual_value, $test_value)) { - $result = 0; - - break; - } - } else if ($test_condition == '!{}') { - if (! str_contains($actual_value, $test_value)) { - $result = 0; - - break; - } - } else if ($test_condition == '()') { - // dd($test_condition); - } else if ($test_condition == '!()') { - // dd($test_condition); - } - } - // else if ($condition->type == 'boolean') { - // if ($test_conditions[$condition->type][$test_condition]) { - // if ($test_condition == 0) { - // dd($test_condition); - // } else if ($test_condition == 1) { - // dd($test_condition); - // } - // } - // } - } - - return $result; - } - - protected function testAnyConditionIsTrue($conditions, $cart) { - $shipping_address = $cart->getShippingAddressAttribute(); - - $shipping_method = $cart->shipping_method; - $shipping_country = $shipping_address->country; - $shipping_state = $shipping_address->state; - $shipping_postcode = $shipping_address->postcode; - $shipping_city = $shipping_address->city; - - $payment_method = $cart->payment->method; - $sub_total = $cart->base_sub_total; - - $total_items = $cart->items_qty; - $total_weight = 0; - - foreach($cart->items as $item) { - $total_weight = $total_weight + $item->base_total_weight; - } - - $test_mode = config('pricerules.test_mode.0'); - $test_conditions = config('pricerules.cart.conditions'); - $result = 1; - - foreach ($conditions as $condition) { - $actual_value = ${$condition->attribute}; - $test_value = $condition->value; - $test_condition = $condition->condition; - - if ($condition->type == 'numeric' || $condition->type == 'string' || $condition->type == 'text'){ - if ($test_condition == '=') { - if ($actual_value == $test_value) { - break; - } - } else if ($test_condition == '>=') { - if ($actual_value >= $test_value) { - break; - } - } else if ($test_condition == '<=') { - if ($actual_value <= $test_value) { - break; - } - } else if ($test_condition == '>') { - if ($actual_value > $test_value) { - break; - } - } else if ($test_condition == '<') { - if ($actual_value < $test_value) { - break; - } - } else if ($test_condition == '{}') { - if (str_contains($actual_value, $test_value)) { - break; - } - } else if ($test_condition == '!{}') { - if (! (! str_contains($actual_value, $test_value))) { - break; - } - } else if ($test_condition == '()') { - // dd($test_condition); - } else if ($test_condition == '!()') { - // dd($test_condition); - } else { - $result = 0; - } - } - } - - return $result; - } - - protected function testAnyConditionIsFalse($conditions, $cart) { - $shipping_address = $cart->getShippingAddressAttribute(); - - $shipping_method = $cart->shipping_method; - $shipping_country = $shipping_address->country; - $shipping_state = $shipping_address->state; - $shipping_postcode = $shipping_address->postcode; - $shipping_city = $shipping_address->city; - - $payment_method = $cart->payment->method; - $sub_total = $cart->base_sub_total; - - $total_items = $cart->items_qty; - $total_weight = 0; - - foreach($cart->items as $item) { - $total_weight = $total_weight + $item->base_total_weight; - } - - $test_mode = config('pricerules.test_mode.0'); - $test_conditions = config('pricerules.cart.conditions'); - $result = 1; - - foreach ($conditions as $condition) { - $actual_value = ${$condition->attribute}; - $test_value = $condition->value; - $test_condition = $condition->condition; - - if ($condition->type == 'numeric' || $condition->type == 'string' || $condition->type == 'text'){ - if ($test_condition == '=') { - if ($actual_value != $test_value) { - $result = 0; - - break; - } - } else if ($test_condition == '>=') { - if (! ($actual_value >= $test_value)) { - $result = 0; - - break; - } - } else if ($test_condition == '<=') { - if (! ($actual_value <= $test_value)) { - $result = 0; - - break; - } - } else if ($test_condition == '>') { - if (! ($actual_value > $test_value)) { - $result = 0; - - break; - } - } else if ($test_condition == '<') { - if ((! $actual_value < $test_value)) { - $result = 0; - - break; - } - } else if ($test_condition == '{}') { - if (! (str_contains($actual_value, $test_value))) { - $result = 0; - - break; - } - } else if ($test_condition == '!{}') { - if (! (! str_contains($actual_value, $test_value))) { - $result = 0; - - break; - } - } else if ($test_condition == '()') { - // dd($test_condition); - } else if ($test_condition == '!()') { - // dd($test_condition); - } else { - $result = 0; } } } diff --git a/packages/Webkul/Shop/src/Http/Controllers/CartController.php b/packages/Webkul/Shop/src/Http/Controllers/CartController.php index 3c967a865..15088b420 100755 --- a/packages/Webkul/Shop/src/Http/Controllers/CartController.php +++ b/packages/Webkul/Shop/src/Http/Controllers/CartController.php @@ -9,6 +9,7 @@ use Webkul\Checkout\Repositories\CartItemRepository; use Webkul\Product\Repositories\ProductRepository; use Webkul\Customer\Repositories\CustomerRepository; use Webkul\Customer\Repositories\WishlistRepository; +use Webkul\Discount\Repositories\CartRuleCartRepository as CartRuleCart; use Illuminate\Support\Facades\Event; use Cart; @@ -37,6 +38,7 @@ class CartController extends Controller protected $cartItem; protected $customer; protected $product; + protected $cartRuleCart; protected $suppressFlash = false; /** @@ -51,7 +53,8 @@ class CartController extends Controller CartItemRepository $cartItem, CustomerRepository $customer, ProductRepository $product, - WishlistRepository $wishlist + WishlistRepository $wishlist, + CartRuleCart $cartRuleCart ) { @@ -67,6 +70,8 @@ class CartController extends Controller $this->wishlist = $wishlist; + $this->cartRuleCart = $cartRuleCart; + $this->_config = request('_config'); } @@ -260,6 +265,17 @@ class CartController extends Controller return $result; } + /** + * Fetch the non couponable rule + */ + public function getNonCouponAbleRule() + { + $cart = Cart::getCart(); + $nonCouponAbleRules = Cart::applyNonCoupon(); + + return $nonCouponAbleRules; + } + /** * To remove the currently active * couponable rule diff --git a/packages/Webkul/Shop/src/Http/routes.php b/packages/Webkul/Shop/src/Http/routes.php index 26ac06451..c97358e3a 100755 --- a/packages/Webkul/Shop/src/Http/routes.php +++ b/packages/Webkul/Shop/src/Http/routes.php @@ -41,6 +41,8 @@ Route::group(['middleware' => ['web', 'locale', 'theme', 'currency']], function Route::post('checkout/check/coupons', 'Webkul\Shop\Http\Controllers\CartController@applyCoupon')->name('shop.checkout.check.coupons'); + Route::post('checkout/fetch/noncoupon', 'Webkul\Shop\Http\Controllers\CartController@getNonCouponAbleRule')->name('shop.checkout.fetch.non-coupon'); + Route::post('checkout/remove/coupon', 'Webkul\Shop\Http\Controllers\CartController@removeCoupon')->name('shop.checkout.remove.coupon'); //Cart Items Add 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 33f9472d7..7ab890a82 100755 --- a/packages/Webkul/Shop/src/Resources/views/checkout/onepage.blade.php +++ b/packages/Webkul/Shop/src/Resources/views/checkout/onepage.blade.php @@ -284,22 +284,22 @@ this.disable_button = true; this.$http.post("{{ route('shop.checkout.save-payment') }}", {'payment': this.selected_payment_method}) - .then(function(response) { - this_this.disable_button = false; + .then(function(response) { + this_this.disable_button = false; - if (response.data.jump_to_section == 'review') { - reviewHtml = Vue.compile(response.data.html) - this_this.completedStep = 3; - this_this.currentStep = 4; + if (response.data.jump_to_section == 'review') { + reviewHtml = Vue.compile(response.data.html) + this_this.completedStep = 3; + this_this.currentStep = 4; - this_this.getOrderSummary(); - } - }) - .catch(function (error) { - this_this.disable_button = false; + this_this.getOrderSummary(); + } + }) + .catch(function (error) { + this_this.disable_button = false; - this_this.handleErrorResponse(error.response, 'payment-form') - }) + this_this.handleErrorResponse(error.response, 'payment-form') + }); }, placeOrder: function() { @@ -511,6 +511,8 @@ }, mounted: function() { + // shop.checkout.fetch.non-coupon + this.checkNonCouponAble(); }, methods: { @@ -530,6 +532,16 @@ }); }, + checkNonCouponAble: function () { + var this_this = this; + + axios.post('{{ route('shop.checkout.fetch.non-coupon') }}').then(function(response) { + console.log(response.data); + }).catch(function (error) { + console.log(error); + }); + }, + codeChange: function() { if (this.code.length == 0 || this.code.length == 1) { From f924e7ed019e49ff59ae3aa7d03388b5a0e8c1aa Mon Sep 17 00:00:00 2001 From: rahul shukla Date: Fri, 7 Jun 2019 10:06:00 +0530 Subject: [PATCH 312/678] custom price nullable in cart items --- ...custom_price_to_nullable_in_cart_items.php | 30 +++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 packages/Webkul/Checkout/src/Database/Migrations/2019_06_06_195905_update_custom_price_to_nullable_in_cart_items.php diff --git a/packages/Webkul/Checkout/src/Database/Migrations/2019_06_06_195905_update_custom_price_to_nullable_in_cart_items.php b/packages/Webkul/Checkout/src/Database/Migrations/2019_06_06_195905_update_custom_price_to_nullable_in_cart_items.php new file mode 100644 index 000000000..1364f92ef --- /dev/null +++ b/packages/Webkul/Checkout/src/Database/Migrations/2019_06_06_195905_update_custom_price_to_nullable_in_cart_items.php @@ -0,0 +1,30 @@ +decimal('custom_price', 12,4)->nullable()->change(); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + // + } +} From dc96dfb7b2e28cebfc041e5b59d5902ad99ec96b Mon Sep 17 00:00:00 2001 From: rahul shukla Date: Fri, 7 Jun 2019 11:12:40 +0530 Subject: [PATCH 313/678] custom price default to null --- ...195905_update_custom_price_to_nullable_in_cart_items.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/Webkul/Checkout/src/Database/Migrations/2019_06_06_195905_update_custom_price_to_nullable_in_cart_items.php b/packages/Webkul/Checkout/src/Database/Migrations/2019_06_06_195905_update_custom_price_to_nullable_in_cart_items.php index 1364f92ef..feef7a87d 100644 --- a/packages/Webkul/Checkout/src/Database/Migrations/2019_06_06_195905_update_custom_price_to_nullable_in_cart_items.php +++ b/packages/Webkul/Checkout/src/Database/Migrations/2019_06_06_195905_update_custom_price_to_nullable_in_cart_items.php @@ -14,7 +14,11 @@ class UpdateCustomPriceToNullableInCartItems extends Migration public function up() { Schema::table('cart_items', function (Blueprint $table) { - $table->decimal('custom_price', 12,4)->nullable()->change(); + $table->dropColumn('custom_price'); + }); + + Schema::table('cart_items', function (Blueprint $table) { + $table->decimal('custom_price', 12,4)->nullable(); }); } From c6a44b54149696282b9d1d666f50126750545922 Mon Sep 17 00:00:00 2001 From: jitendra Date: Fri, 7 Jun 2019 11:18:46 +0530 Subject: [PATCH 314/678] Updated cart for custom_price --- packages/Webkul/Checkout/src/Cart.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/Webkul/Checkout/src/Cart.php b/packages/Webkul/Checkout/src/Cart.php index 5850f8d52..a68aa485e 100755 --- a/packages/Webkul/Checkout/src/Cart.php +++ b/packages/Webkul/Checkout/src/Cart.php @@ -866,7 +866,7 @@ class Cart { } else if ($this->price->getMinimalPrice($item->child->product_flat) != $item->price) { // $price = (float) $item->custom_price ? $item->custom_price : $item->child->product->price; - if ((float)$item->custom_price) { + if (! is_null($item->custom_price)) { $price = $item->custom_price; } else { $price = $this->price->getMinimalPrice($item->child->product_flat); @@ -890,7 +890,7 @@ class Cart { } else if ($this->price->getMinimalPrice($productFlat) != $item->price) { // $price = (float) $item->custom_price ? $item->custom_price : $item->product->price; - if ((float)$item->custom_price) { + if (! is_null($item->custom_price)) { $price = $item->custom_price; } else { $price = $this->price->getMinimalPrice($productFlat); From ca4d9ef9ba54d28a8121f2243bb7799ed38d18c4 Mon Sep 17 00:00:00 2001 From: jitendra Date: Fri, 7 Jun 2019 15:42:58 +0530 Subject: [PATCH 315/678] Fixed js issue buy now button not exist --- .../views/products/view/configurable-options.blade.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 1f8a305a4..536f6a006 100755 --- 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 @@ -145,7 +145,7 @@ var buyNowLink = $('.btn.buynow').attr('data-href'); var quantity = document.getElementById('quantity').value; - if (this.selectedProductId != '') { + if (this.selectedProductId != '' && buyNowLink) { var splitted = buyNowLink.split("/"); splitted.pop(); From 5585b503cff4ec376e9a73d88edc009437fb775d Mon Sep 17 00:00:00 2001 From: jitendra Date: Fri, 7 Jun 2019 16:36:50 +0530 Subject: [PATCH 316/678] Car controller updated --- .../src/Http/Controllers/CartController.php | 60 ++++++++++--------- 1 file changed, 32 insertions(+), 28 deletions(-) diff --git a/packages/Webkul/Shop/src/Http/Controllers/CartController.php b/packages/Webkul/Shop/src/Http/Controllers/CartController.php index afbff7de4..8d46d9cd3 100755 --- a/packages/Webkul/Shop/src/Http/Controllers/CartController.php +++ b/packages/Webkul/Shop/src/Http/Controllers/CartController.php @@ -157,41 +157,45 @@ class CartController extends Controller */ public function updateBeforeCheckout() { - $request = request()->except('_token'); + try { + $request = request()->except('_token'); - foreach ($request['qty'] as $id => $quantity) { - if ($quantity <= 0) { - session()->flash('warning', trans('shop::app.checkout.cart.quantity.illegal')); + foreach ($request['qty'] as $id => $quantity) { + if ($quantity <= 0) { + session()->flash('warning', trans('shop::app.checkout.cart.quantity.illegal')); - return redirect()->back(); - } - } - - foreach ($request['qty'] as $key => $value) { - $item = $this->cartItem->findOneByField('id', $key); - - $data['quantity'] = $value; - - Event::fire('checkout.cart.update.before', $key); - - $result = Cart::updateItem($item->product_id, $data, $key); - - if ($result == false) { - $this->suppressFlash = true; + return redirect()->back(); + } } - Event::fire('checkout.cart.update.after', $item); + foreach ($request['qty'] as $key => $value) { + $item = $this->cartItem->findOneByField('id', $key); - unset($item); - unset($data); - } + $data['quantity'] = $value; - Cart::collectTotals(); + Event::fire('checkout.cart.update.before', $item); - if ($this->suppressFlash) { - session()->forget('success'); - session()->forget('warning'); - session()->flash('info', trans('shop::app.checkout.cart.partial-cart-update')); + $result = Cart::updateItem($item->product_id, $data, $key); + + if ($result == false) { + $this->suppressFlash = true; + } + + Event::fire('checkout.cart.update.after', $item); + + unset($item); + unset($data); + } + + Cart::collectTotals(); + + if ($this->suppressFlash) { + session()->forget('success'); + session()->forget('warning'); + session()->flash('info', trans('shop::app.checkout.cart.partial-cart-update')); + } + } catch(\Exception $e) { + session()->flash('error', trans($e->getMessage())); } return redirect()->back(); From 66bd3e7989a71600234fc3eab7a010d7174e813f Mon Sep 17 00:00:00 2001 From: jitendra Date: Fri, 7 Jun 2019 17:59:38 +0530 Subject: [PATCH 317/678] Optional index for datagrid action --- packages/Webkul/Ui/src/Resources/views/datagrid/body.blade.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/Webkul/Ui/src/Resources/views/datagrid/body.blade.php b/packages/Webkul/Ui/src/Resources/views/datagrid/body.blade.php index ba5d14a84..46f2ff647 100644 --- a/packages/Webkul/Ui/src/Resources/views/datagrid/body.blade.php +++ b/packages/Webkul/Ui/src/Resources/views/datagrid/body.blade.php @@ -44,7 +44,7 @@ @foreach ($actions as $action) Date: Fri, 7 Jun 2019 18:59:46 +0530 Subject: [PATCH 318/678] Discount rule implemented. --- .../Webkul/Discount/src/Helpers/Discount.php | 129 ++++++++++++++++-- .../src/Http/Controllers/CartController.php | 2 +- .../Shop/src/Resources/assets/sass/app.scss | 3 + .../Webkul/Shop/src/Resources/lang/en/app.php | 8 +- .../views/checkout/onepage.blade.php | 82 ++++++++--- 5 files changed, 189 insertions(+), 35 deletions(-) diff --git a/packages/Webkul/Discount/src/Helpers/Discount.php b/packages/Webkul/Discount/src/Helpers/Discount.php index a70a4e5e9..b14cb15a3 100644 --- a/packages/Webkul/Discount/src/Helpers/Discount.php +++ b/packages/Webkul/Discount/src/Helpers/Discount.php @@ -76,6 +76,7 @@ class Discount } if ($passed) { + $report['used_coupon'] = false; array_push($canBeApplied, $report); } } @@ -93,49 +94,148 @@ class Discount $leastId = 999999999999; if (count($canBeApplied) > 1) { foreach($canBeApplied as $rule) { - if ($rule['rule'] < $leastId) { + if ($rule['rule']->id < $leastId) { $leastId = $rule['rule']->id; } } + + // fighting the edge case for non couponable discount rule + foreach($canBeApplied as $rule) { + if ($rule['rule']->id == $leastId) { + $rule['used_coupon'] = false; + return $rule; + } + } } } + //find end rule - return $canBeApplied; + return $canBeApplied[0]; } - public function applyCouponAbleRule() + public function applyCouponAbleRule($code) { if (auth()->guard('customer')->check()) { $couponAbleRules = $this->cartRule->findWhere([ - 'use_coupon' => 1 + 'use_coupon' => 1, + 'status' => 1 ]); } else { $couponAbleRules = $this->cartRule->findWhere([ 'use_coupon' => 1, - 'is_guest' => 1 + 'is_guest' => 1, + 'status' => 1 ]); } - // time based filter - foreach($couponAbleRules as $rule) { + $rule; + foreach ($couponAbleRules as $couponAbleRule) { + if ($couponAbleRule->coupons->code == $code) { + $rule = $couponAbleRule; + } + } + + $useCouponable = false; + if (isset($rule)) { + $canBeApplied = array(); + + // time based filter + $report = $this->checkApplicability($rule); + $report['rule'] = $rule; + + $passed = 0; if ($rule->starts_from != null && $rule->ends_till == null) { if (Carbon::parse($rule->starts_from) < now()) { - + $passed = 1; } } else if ($rule->starts_from == null && $rule->ends_till != null) { - if (Carbon::parse($rule->ends_till) < now()) { - + if (Carbon::parse($rule->ends_till) > now()) { + $passed = 1; } } else if ($rule->starts_from != null && $rule->ends_till != null) { if (Carbon::parse($rule->starts_from) < now() && now() < Carbon::parse($rule->ends_till)) { + $passed = 1; + } + } else { + $passed = 1; + } + + if ($passed) { + array_push($canBeApplied, $report); + + $useCouponable = true; + $alreadyAppliedRule = $this->cartRuleCart->findWhere([ + 'cart_id' => \Cart::getCart()->id + ]); + + if ($alreadyAppliedRule->count() && ! ($alreadyAppliedRule->first()->cart_rule->priority < $canBeApplied[0]['rule']->priority)) { + unset($report); + + $alreadyAppliedRule = $alreadyAppliedRule->first()->cart_rule; + + // analyze impact + $report = $this->checkApplicability($alreadyAppliedRule); + $report['rule'] = $alreadyAppliedRule; + + array_push($canBeApplied, $report); + + //min priority + $minPriority = collect($canBeApplied)->min('priority'); + //min priority rule + $canBeApplied = collect($canBeApplied)->where('priority', $minPriority); + + if (count($canBeApplied) > 1) { + $maxDiscount = collect($canBeApplied)->max('discount'); + + $canBeApplied = collect($canBeApplied)->where('discount', $maxDiscount); + + $leastId = 999999999999; + if (count($canBeApplied) > 1) { + foreach($canBeApplied as $rule) { + if ($rule['rule']->id < $leastId) { + $leastId = $rule['rule']->id; + } + } + + // fighting the edge case for couponable discount rule + foreach($canBeApplied as $rule) { + if ($rule['rule']->id == $leastId) { + if($rule->use_coupon) { + $useCouponable = true; + } + } + } + } else { + if ($canBeApplied[0]['rule']->use_coupon) { + $useCouponable = true; + } + } + } else if (count($canBeApplied)) { + if ($canBeApplied[0]['rule']->use_coupon) { + $useCouponable = true; + } + } + } + + if ($alreadyAppliedRule->end_other_rules) { + $useCouponable = false; } } } - return $couponAbleRules; + $canBeApplied = array(); + if ($useCouponable) { + $report = $this->checkApplicability($rule); + $report['rule'] = $rule; + $report['used_coupon'] = $useCouponable; + + return $report; + } else { + return false; + } } - public function checkApplicability($rule) + public function checkApplicability($rule = null) { $cart = \Cart::getCart(); $report = array(); @@ -178,7 +278,7 @@ class Discount $disc_amount = $rule->disc_amount; // value of discount $disc_quantity = $rule->disc_quantity; //max quantity allowed to be discounted - $amountDiscounted; + $amountDiscounted = 0; $leastWorthItem = \Cart::leastWorthItem(); $realQty = $leastWorthItem['quantity']; @@ -197,6 +297,9 @@ class Discount } $report['discount'] = $amountDiscounted; + $report['formatted_discount'] = core()->formatPrice($amountDiscounted, $cart->cart_currency_code); + $report['new_grand_total'] = $cart->grand_total - $amountDiscounted; + $report['formatted_new_grand_total'] = core()->formatPrice($cart->grand_total - $amountDiscounted, $cart->cart_currency_code); $report['priority'] = $rule->priority; return $report; diff --git a/packages/Webkul/Shop/src/Http/Controllers/CartController.php b/packages/Webkul/Shop/src/Http/Controllers/CartController.php index 15088b420..c005a22ee 100755 --- a/packages/Webkul/Shop/src/Http/Controllers/CartController.php +++ b/packages/Webkul/Shop/src/Http/Controllers/CartController.php @@ -261,7 +261,7 @@ class CartController extends Controller $code = request()->input('code'); $result = Cart::applyCoupon($code); - dd($result); + return $result; } diff --git a/packages/Webkul/Shop/src/Resources/assets/sass/app.scss b/packages/Webkul/Shop/src/Resources/assets/sass/app.scss index b509f28a5..ac5f07841 100755 --- a/packages/Webkul/Shop/src/Resources/assets/sass/app.scss +++ b/packages/Webkul/Shop/src/Resources/assets/sass/app.scss @@ -2187,6 +2187,9 @@ section.cart { } } } + + .discount-details-group { + } } // cart pages responsive css start diff --git a/packages/Webkul/Shop/src/Resources/lang/en/app.php b/packages/Webkul/Shop/src/Resources/lang/en/app.php index 6320aa674..30fe59da1 100755 --- a/packages/Webkul/Shop/src/Resources/lang/en/app.php +++ b/packages/Webkul/Shop/src/Resources/lang/en/app.php @@ -397,7 +397,7 @@ return [ 'quantity-error' => 'Requested Quantity Is Not Available', 'cart-subtotal' => 'Cart Subtotal', 'cart-remove-action' => 'Do you really want to do this ?', - 'partial-cart-update' => 'Only some of the product(s) were updated' + 'partial-cart-update' => 'Only some of the product(s) were updated', ], 'onepage' => [ @@ -449,7 +449,11 @@ return [ 'delivery-charges' => 'Delivery Charges', 'tax' => 'Tax', 'discount' => 'Discount', - 'price' => 'price' + 'price' => 'price', + 'disc-amount' => 'Amount discounted', + 'new-grand-total' => 'New Grand Total', + 'coupon' => 'Coupon', + 'coupon-applied' => 'Coupon Applied' ], 'success' => [ 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 7ab890a82..8ff3ec2c6 100755 --- a/packages/Webkul/Shop/src/Resources/views/checkout/onepage.blade.php +++ b/packages/Webkul/Shop/src/Resources/views/checkout/onepage.blade.php @@ -11,8 +11,8 @@ @push('scripts') @@ -497,16 +535,14 @@ return { code: null, message: null, - qtyRevealed: false, - amount_given: null, - amount: null, - discounted: null, - discount: { - amount: null, - action: null, - amount_given: null, - message: null - } + end_rule_present: false, + discount_amount: 0, + rule_name: null, + free_shipping: null, + new_grand_total: null, + non_coupon_able: false, + coupon_able: false, + discount_code: null } }, @@ -522,13 +558,16 @@ axios.post('{{ route('shop.checkout.check.coupons') }}', { code: this_this.code }).then(function(response) { - this_this.message = response.data.message; - - this_this.discounted = response.data.success; - this_this.discount.amount = response.data.amount; - this_this.discount.amount_given = response.data.amount_given; + this_this.end_rule_present = response.data.end_other_rules; + this_this.discount_amount = response.data.formatted_discount; + this_this.rule_name = response.data.rule.name; + this_this.free_shipping = response.data.rule.free_shipping; + this_this.new_grand_total = response.data.formatted_new_grand_total; + this_this.non_coupon_able = false; + this_this.coupon_able = true; + this_this.discount_code = this_this.code; }).catch(function(error) { - this_this.discounted = false; + // this_this.discounted = false; }); }, @@ -536,7 +575,12 @@ var this_this = this; axios.post('{{ route('shop.checkout.fetch.non-coupon') }}').then(function(response) { - console.log(response.data); + this_this.end_rule_present = response.data.end_other_rules; + this_this.discount_amount = response.data.formatted_discount; + this_this.rule_name = response.data.rule.name; + this_this.free_shipping = response.data.rule.free_shipping; + this_this.new_grand_total = response.data.formatted_new_grand_total; + this_this.non_coupon_able = true; }).catch(function (error) { console.log(error); }); From c79183342521b371514ba226b4f76b232560a12b Mon Sep 17 00:00:00 2001 From: Prashant Singh Date: Fri, 7 Jun 2019 19:51:45 +0530 Subject: [PATCH 319/678] cart rule bug fixes --- .../Migrations/2019_05_13_024326_create_cart_rule_table.php | 6 ++++++ .../Shop/src/Resources/views/checkout/onepage.blade.php | 2 -- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/packages/Webkul/Discount/src/Database/Migrations/2019_05_13_024326_create_cart_rule_table.php b/packages/Webkul/Discount/src/Database/Migrations/2019_05_13_024326_create_cart_rule_table.php index 151a76602..03f6273ec 100644 --- a/packages/Webkul/Discount/src/Database/Migrations/2019_05_13_024326_create_cart_rule_table.php +++ b/packages/Webkul/Discount/src/Database/Migrations/2019_05_13_024326_create_cart_rule_table.php @@ -13,6 +13,12 @@ class CreateCartRuleTable extends Migration */ public function up() { + Schema::dropIfExists('discount_customer_group'); + Schema::dropIfExists('discount_channels'); + Schema::dropIfExists('discount_rules'); + Schema::dropIfExists('discounts'); + Schema::dropIfExists('products_grid'); + Schema::create('cart_rules', function (Blueprint $table) { $table->increments('id'); $table->string('name')->nullable(); 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 8ff3ec2c6..ecb29a67a 100755 --- a/packages/Webkul/Shop/src/Resources/views/checkout/onepage.blade.php +++ b/packages/Webkul/Shop/src/Resources/views/checkout/onepage.blade.php @@ -567,7 +567,6 @@ this_this.coupon_able = true; this_this.discount_code = this_this.code; }).catch(function(error) { - // this_this.discounted = false; }); }, @@ -582,7 +581,6 @@ this_this.new_grand_total = response.data.formatted_new_grand_total; this_this.non_coupon_able = true; }).catch(function (error) { - console.log(error); }); }, From 3c16cbba737731f7a9a65896eb59b66563176e83 Mon Sep 17 00:00:00 2001 From: Prashant Singh Date: Sat, 8 Jun 2019 16:13:17 +0530 Subject: [PATCH 320/678] provision to remove the couponable and non couponable rule had been added --- .../Webkul/Discount/src/Helpers/Discount.php | 43 +++++++++++++++++++ .../src/Http/Controllers/CartController.php | 8 ++++ packages/Webkul/Shop/src/Http/routes.php | 2 + .../views/checkout/onepage.blade.php | 18 ++++---- .../views/checkout/onepage/review.blade.php | 10 ----- .../views/checkout/success.blade.php | 3 -- 6 files changed, 62 insertions(+), 22 deletions(-) diff --git a/packages/Webkul/Discount/src/Helpers/Discount.php b/packages/Webkul/Discount/src/Helpers/Discount.php index b14cb15a3..e1e27ebf9 100644 --- a/packages/Webkul/Discount/src/Helpers/Discount.php +++ b/packages/Webkul/Discount/src/Helpers/Discount.php @@ -240,6 +240,7 @@ class Discount $cart = \Cart::getCart(); $report = array(); $result = 0; + //check conditions if ($rule->conditions != null) { $conditions = json_decode(json_decode($rule->conditions)); @@ -305,6 +306,48 @@ class Discount return $report; } + public function removeNonCoupon() + { + $cart = \Cart::getCart(); + + $nonCouponAbleRule = $this->cartRuleCart->findWhere([ + 'cart_id' => $cart->id + ]); + + if (count($couponAbleRule) && ! $couponAbleRule->first()->cart_rule->use_coupon) { + $result = $nonCouponAbleRule->delete(); + + if ($result) { + return true; + } else { + return false; + } + } else { + return false; + } + } + + public function removeCoupon() + { + $cart = \Cart::getCart(); + + $couponAbleRule = $this->cartRuleCart->findWhere([ + 'cart_id' => $cart->id + ]); + + if (count($couponAbleRule) && $couponAbleRule->first()->cart_rule->use_coupon) { + $result = $couponAbleRule->delete(); + + if ($result) { + return true; + } else { + return false; + } + } else { + return false; + } + } + protected function testIfAllConditionAreTrue($conditions, $cart) { $shipping_address = $cart->getShippingAddressAttribute(); diff --git a/packages/Webkul/Shop/src/Http/Controllers/CartController.php b/packages/Webkul/Shop/src/Http/Controllers/CartController.php index c005a22ee..a7a3fc6be 100755 --- a/packages/Webkul/Shop/src/Http/Controllers/CartController.php +++ b/packages/Webkul/Shop/src/Http/Controllers/CartController.php @@ -276,6 +276,14 @@ class CartController extends Controller return $nonCouponAbleRules; } + /** + * To save the discount values inside the tables of orders and cart + */ + public function saveDiscount() + { + return ['hellow']; + } + /** * To remove the currently active * couponable rule diff --git a/packages/Webkul/Shop/src/Http/routes.php b/packages/Webkul/Shop/src/Http/routes.php index c97358e3a..59f63da37 100755 --- a/packages/Webkul/Shop/src/Http/routes.php +++ b/packages/Webkul/Shop/src/Http/routes.php @@ -41,6 +41,8 @@ Route::group(['middleware' => ['web', 'locale', 'theme', 'currency']], function Route::post('checkout/check/coupons', 'Webkul\Shop\Http\Controllers\CartController@applyCoupon')->name('shop.checkout.check.coupons'); + Route::post('checkout/save/discounts', 'Webkul\Shop\Http\Controllers\CartController@saveDiscount')->name('shop.checkout.save.discount'); + Route::post('checkout/fetch/noncoupon', 'Webkul\Shop\Http\Controllers\CartController@getNonCouponAbleRule')->name('shop.checkout.fetch.non-coupon'); Route::post('checkout/remove/coupon', 'Webkul\Shop\Http\Controllers\CartController@removeCoupon')->name('shop.checkout.remove.coupon'); 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 ecb29a67a..26445833f 100755 --- a/packages/Webkul/Shop/src/Resources/views/checkout/onepage.blade.php +++ b/packages/Webkul/Shop/src/Resources/views/checkout/onepage.blade.php @@ -58,7 +58,7 @@
- +
@@ -343,6 +343,12 @@ placeOrder: function() { var this_this = this; + axios.post('{{ route('shop.checkout.save.discount') }}').then(function (response) { + console.log(response.data); + }).catch(function (error) { + console.log('error in saving discount'); + }); + this.disable_button = true; this.$http.post("{{ route('shop.checkout.save-order') }}", {'_token': "{{ csrf_token() }}"}) @@ -597,15 +603,9 @@ axios.post('{{ route('shop.checkout.remove.coupon') }}', { code: this_this.code }).then(function(response) { - if (response.data.message == true) { - this_this.discounted = null; - this_this.discount.amount = null; - this_this.discount.action = null; - this_this.discount.amount_given = null; - this_this.discount.message = null; - } + console.log(response.data); }).catch(function(error) { - this_this.discounted = false; + console.log(error.data); }); } } 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 09f4bcfa4..5341e42e4 100755 --- a/packages/Webkul/Shop/src/Resources/views/checkout/onepage/review.blade.php +++ b/packages/Webkul/Shop/src/Resources/views/checkout/onepage/review.blade.php @@ -87,8 +87,6 @@
{!! view_render_event('bagisto.shop.checkout.name.after', ['item' => $item]) !!} - - {!! view_render_event('bagisto.shop.checkout.price.before', ['item' => $item]) !!}
@@ -101,8 +99,6 @@
{!! view_render_event('bagisto.shop.checkout.price.after', ['item' => $item]) !!} - - {!! view_render_event('bagisto.shop.checkout.quantity.before', ['item' => $item]) !!}
@@ -116,27 +112,21 @@ {!! view_render_event('bagisto.shop.checkout.quantity.after', ['item' => $item]) !!} - @if ($product->type == 'configurable') {!! view_render_event('bagisto.shop.checkout.options.after', ['item' => $item]) !!}
- {{ Cart::getProductAttributeOptionDetails($item->child->product)['html'] }} -
{!! view_render_event('bagisto.shop.checkout.options.after', ['item' => $item]) !!} @endif
-
@endforeach -
-
- @endsection \ No newline at end of file From 194fc512615db70d5a339f0271ff2b1dcf25be84 Mon Sep 17 00:00:00 2001 From: Prashant Singh Date: Sat, 8 Jun 2019 20:34:41 +0530 Subject: [PATCH 321/678] Cart rule frontend work done --- .../Webkul/Discount/src/Helpers/Discount.php | 50 ++++++++++++------- .../Webkul/Shop/src/Resources/lang/en/app.php | 3 +- .../views/checkout/onepage.blade.php | 34 ++++++++----- 3 files changed, 55 insertions(+), 32 deletions(-) diff --git a/packages/Webkul/Discount/src/Helpers/Discount.php b/packages/Webkul/Discount/src/Helpers/Discount.php index e1e27ebf9..bdfd823f1 100644 --- a/packages/Webkul/Discount/src/Helpers/Discount.php +++ b/packages/Webkul/Discount/src/Helpers/Discount.php @@ -103,13 +103,17 @@ class Discount foreach($canBeApplied as $rule) { if ($rule['rule']->id == $leastId) { $rule['used_coupon'] = false; + + $this->save($rule['rule']); + return $rule; } } } } - //find end rule + $this->save($canBeApplied[0]['rule']); + return $canBeApplied[0]; } @@ -197,10 +201,10 @@ class Discount } } - // fighting the edge case for couponable discount rule + // fighting the edge case for couponable discount rule foreach($canBeApplied as $rule) { if ($rule['rule']->id == $leastId) { - if($rule->use_coupon) { + if($rule['rule']->use_coupon) { $useCouponable = true; } } @@ -215,10 +219,10 @@ class Discount $useCouponable = true; } } - } - if ($alreadyAppliedRule->end_other_rules) { - $useCouponable = false; + if ($alreadyAppliedRule->end_other_rules) { + $useCouponable = false; + } } } } @@ -229,6 +233,8 @@ class Discount $report['rule'] = $rule; $report['used_coupon'] = $useCouponable; + $this->save($rule); + return $report; } else { return false; @@ -306,39 +312,45 @@ class Discount return $report; } - public function removeNonCoupon() + public function save($rule) { $cart = \Cart::getCart(); - $nonCouponAbleRule = $this->cartRuleCart->findWhere([ + // create or update + $existingRule = $this->cartRuleCart->findWhere([ 'cart_id' => $cart->id ]); - if (count($couponAbleRule) && ! $couponAbleRule->first()->cart_rule->use_coupon) { - $result = $nonCouponAbleRule->delete(); + if (count($existingRule)) { + if ($existingRule->first()->cart_rule_id != $rule->id) { + $existingRule->first()->update([ + 'cart_rule_id' => $rule->id + ]); - if ($result) { return true; - } else { - return false; } } else { - return false; + $this->cartRuleCart->create([ + 'cart_id' => $cart->id, + 'cart_rule_id' => $rule->id + ]); + + return true; } + + return false; } public function removeCoupon() { $cart = \Cart::getCart(); - $couponAbleRule = $this->cartRuleCart->findWhere([ + $existingRule = $this->cartRuleCart->findWhere([ 'cart_id' => $cart->id ]); - if (count($couponAbleRule) && $couponAbleRule->first()->cart_rule->use_coupon) { - $result = $couponAbleRule->delete(); - - if ($result) { + if ($existingRule->count()) { + if ($existingRule->first()->delete()) { return true; } else { return false; diff --git a/packages/Webkul/Shop/src/Resources/lang/en/app.php b/packages/Webkul/Shop/src/Resources/lang/en/app.php index 30fe59da1..29ff6503c 100755 --- a/packages/Webkul/Shop/src/Resources/lang/en/app.php +++ b/packages/Webkul/Shop/src/Resources/lang/en/app.php @@ -453,7 +453,8 @@ return [ 'disc-amount' => 'Amount discounted', 'new-grand-total' => 'New Grand Total', 'coupon' => 'Coupon', - 'coupon-applied' => 'Coupon Applied' + 'coupon-applied' => 'Coupon Applied', + 'remove-coupon' => 'Remove Coupon' ], 'success' => [ 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 26445833f..0217057cb 100755 --- a/packages/Webkul/Shop/src/Resources/views/checkout/onepage.blade.php +++ b/packages/Webkul/Shop/src/Resources/views/checkout/onepage.blade.php @@ -10,7 +10,7 @@ @push('scripts') + + + @endpush +@stop \ No newline at end of file diff --git a/packages/Webkul/Admin/src/Resources/views/promotions/cart-rule/edit.blade.php b/packages/Webkul/Admin/src/Resources/views/promotions/cart-rule/edit.blade.php new file mode 100644 index 000000000..d565e979f --- /dev/null +++ b/packages/Webkul/Admin/src/Resources/views/promotions/cart-rule/edit.blade.php @@ -0,0 +1,582 @@ +@extends('admin::layouts.content') + +@section('page_title') + {{ __('admin::app.promotion.edit-cart-rule') }} +@stop + +@section('content') + +
+ +
+ + @push('scripts') + + + + @endpush +@stop \ No newline at end of file diff --git a/packages/Webkul/Admin/src/Resources/views/promotions/cart-rule/index.blade.php b/packages/Webkul/Admin/src/Resources/views/promotions/cart-rule/index.blade.php new file mode 100644 index 000000000..cf172412a --- /dev/null +++ b/packages/Webkul/Admin/src/Resources/views/promotions/cart-rule/index.blade.php @@ -0,0 +1,27 @@ +@extends('admin::layouts.content') + +@section('page_title') + {{ __('admin::app.promotion.cart-rule') }} +@stop + +@section('content') + +
+ + +
+ @inject('cartRuleGrid','Webkul\Admin\DataGrids\CartRuleDataGrid') + {!! $cartRuleGrid->render() !!} +
+
+@endsection \ No newline at end of file diff --git a/packages/Webkul/Admin/src/Resources/views/promotions/catalog-rule/create.blade.php b/packages/Webkul/Admin/src/Resources/views/promotions/catalog-rule/create.blade.php new file mode 100644 index 000000000..2e9783c23 --- /dev/null +++ b/packages/Webkul/Admin/src/Resources/views/promotions/catalog-rule/create.blade.php @@ -0,0 +1,539 @@ +@extends('admin::layouts.content') + +@section('page_title') + {{ __('admin::app.promotion.add-catalog-rule') }} +@stop + +@section('content') +
+ +
+ + @push('scripts') + + + + @endpush +@stop \ No newline at end of file diff --git a/packages/Webkul/Admin/src/Resources/views/promotions/catalog-rule/edit.blade.php b/packages/Webkul/Admin/src/Resources/views/promotions/catalog-rule/edit.blade.php new file mode 100644 index 000000000..000014dd1 --- /dev/null +++ b/packages/Webkul/Admin/src/Resources/views/promotions/catalog-rule/edit.blade.php @@ -0,0 +1,542 @@ +@extends('admin::layouts.content') + +@section('page_title') + {{ __('admin::app.promotion.edit-catalog-rule') }} +@stop + +@section('content') +
+ +
+ + @push('scripts') + + + + @endpush +@stop \ No newline at end of file diff --git a/packages/Webkul/Admin/src/Resources/views/promotions/catalog-rule/index.blade.php b/packages/Webkul/Admin/src/Resources/views/promotions/catalog-rule/index.blade.php new file mode 100644 index 000000000..f0bbfc8ca --- /dev/null +++ b/packages/Webkul/Admin/src/Resources/views/promotions/catalog-rule/index.blade.php @@ -0,0 +1,31 @@ +@extends('admin::layouts.content') + +@section('page_title') + {{ __('admin::app.promotion.catalog-rule') }} +@stop + +@section('content') + +
+ + +
+ @inject('catalogRuleGrid','Webkul\Admin\DataGrids\CatalogRuleDataGrid') + {!! $catalogRuleGrid->render() !!} +
+
+@endsection \ No newline at end of file diff --git a/packages/Webkul/Attribute/src/Database/Seeders/AttributeOptionTableSeeder.php b/packages/Webkul/Attribute/src/Database/Seeders/AttributeOptionTableSeeder.php index 0135f6e76..992c625c0 100755 --- a/packages/Webkul/Attribute/src/Database/Seeders/AttributeOptionTableSeeder.php +++ b/packages/Webkul/Attribute/src/Database/Seeders/AttributeOptionTableSeeder.php @@ -13,27 +13,27 @@ class AttributeOptionTableSeeder extends Seeder DB::table('attribute_options')->delete(); DB::table('attribute_options')->insert([ - ['id' => '1','admin_name' => 'Red','sort_order' => '1','attribute_id' => '23'], - ['id' => '2','admin_name' => 'Green','sort_order' => '2','attribute_id' => '23'], - ['id' => '3','admin_name' => 'Yellow','sort_order' => '3','attribute_id' => '23'], - ['id' => '4','admin_name' => 'Black','sort_order' => '4','attribute_id' => '23'], - ['id' => '5','admin_name' => 'White','sort_order' => '5','attribute_id' => '23'], - ['id' => '6','admin_name' => 'S','sort_order' => '1','attribute_id' => '24'], - ['id' => '7','admin_name' => 'M','sort_order' => '2','attribute_id' => '24'], - ['id' => '8','admin_name' => 'L','sort_order' => '3','attribute_id' => '24'], - ['id' => '9','admin_name' => 'XL','sort_order' => '4','attribute_id' => '24'] + ['id' => '1', 'admin_name' => 'Red', 'sort_order' => '1', 'attribute_id' => '23'], + ['id' => '2', 'admin_name' => 'Green', 'sort_order' => '2', 'attribute_id' => '23'], + ['id' => '3', 'admin_name' => 'Yellow', 'sort_order' => '3', 'attribute_id' => '23'], + ['id' => '4', 'admin_name' => 'Black', 'sort_order' => '4', 'attribute_id' => '23'], + ['id' => '5', 'admin_name' => 'White', 'sort_order' => '5', 'attribute_id' => '23'], + ['id' => '6', 'admin_name' => 'S', 'sort_order' => '1', 'attribute_id' => '24'], + ['id' => '7', 'admin_name' => 'M', 'sort_order' => '2', 'attribute_id' => '24'], + ['id' => '8', 'admin_name' => 'L', 'sort_order' => '3', 'attribute_id' => '24'], + ['id' => '9', 'admin_name' => 'XL', 'sort_order' => '4', 'attribute_id' => '24'] ]); DB::table('attribute_option_translations')->insert([ - ['id' => '1','locale' => 'en','label' => 'Red','attribute_option_id' => '1'], - ['id' => '2','locale' => 'en','label' => 'Green','attribute_option_id' => '2'], - ['id' => '3','locale' => 'en','label' => 'Yellow','attribute_option_id' => '3'], - ['id' => '4','locale' => 'en','label' => 'Black','attribute_option_id' => '4'], - ['id' => '5','locale' => 'en','label' => 'White','attribute_option_id' => '5'], - ['id' => '6','locale' => 'en','label' => 'S','attribute_option_id' => '6'], - ['id' => '7','locale' => 'en','label' => 'M','attribute_option_id' => '7'], - ['id' => '8','locale' => 'en','label' => 'L','attribute_option_id' => '8'], - ['id' => '9','locale' => 'en','label' => 'XL','attribute_option_id' => '9'] + ['id' => '1', 'locale' => 'en', 'label' => 'Red', 'attribute_option_id' => '1'], + ['id' => '2', 'locale' => 'en', 'label' => 'Green', 'attribute_option_id' => '2'], + ['id' => '3', 'locale' => 'en', 'label' => 'Yellow', 'attribute_option_id' => '3'], + ['id' => '4', 'locale' => 'en', 'label' => 'Black', 'attribute_option_id' => '4'], + ['id' => '5', 'locale' => 'en', 'label' => 'White', 'attribute_option_id' => '5'], + ['id' => '6', 'locale' => 'en', 'label' => 'S', 'attribute_option_id' => '6'], + ['id' => '7', 'locale' => 'en', 'label' => 'M', 'attribute_option_id' => '7'], + ['id' => '8', 'locale' => 'en', 'label' => 'L', 'attribute_option_id' => '8'], + ['id' => '9', 'locale' => 'en', 'label' => 'XL', 'attribute_option_id' => '9'] ]); } } \ No newline at end of file diff --git a/packages/Webkul/Attribute/src/Repositories/AttributeFamilyRepository.php b/packages/Webkul/Attribute/src/Repositories/AttributeFamilyRepository.php index 3deb198de..c66f99c13 100755 --- a/packages/Webkul/Attribute/src/Repositories/AttributeFamilyRepository.php +++ b/packages/Webkul/Attribute/src/Repositories/AttributeFamilyRepository.php @@ -153,6 +153,24 @@ class AttributeFamilyRepository extends Repository return $family; } + public function getPartial() + { + $attributeFamilies = $this->model->all(); + $trimmed = array(); + + foreach($attributeFamilies as $key => $attributeFamily) { + if ($attributeFamily->name != null || $attributeFamily->name != "") { + $trimmed[$key] = [ + 'id' => $attributeFamily->id, + 'code' => $attributeFamily->code, + 'name' => $attributeFamily->name + ]; + } + } + + return $trimmed; + } + /** * @param $id * @return void diff --git a/packages/Webkul/Attribute/src/Repositories/AttributeRepository.php b/packages/Webkul/Attribute/src/Repositories/AttributeRepository.php index 1de148040..0c80612dc 100755 --- a/packages/Webkul/Attribute/src/Repositories/AttributeRepository.php +++ b/packages/Webkul/Attribute/src/Repositories/AttributeRepository.php @@ -210,4 +210,26 @@ class AttributeRepository extends Repository return $attributes[$attributeFamily->id] = $attributeFamily->custom_attributes; } + + /** + * @return Object + */ + public function getPartial() + { + $attributes = $this->model->all(); + $trimmed = array(); + + foreach($attributes as $key => $attribute) { + if ($attribute->code != 'tax_category_id' && ($attribute->type == 'select' || $attribute->type == 'multiselect' || $attribute->code == 'sku')) { + array_push($trimmed, [ + 'id' => $attribute->id, + 'name' => $attribute->name, + 'type' => $attribute->type, + 'code' => $attribute->code + ]); + } + } + + return $trimmed; + } } \ No newline at end of file diff --git a/packages/Webkul/Category/src/Repositories/CategoryRepository.php b/packages/Webkul/Category/src/Repositories/CategoryRepository.php index 7a2f43536..a5b3432d0 100755 --- a/packages/Webkul/Category/src/Repositories/CategoryRepository.php +++ b/packages/Webkul/Category/src/Repositories/CategoryRepository.php @@ -212,4 +212,21 @@ class CategoryRepository extends Repository $category->save(); } } + + public function getPartial() + { + $categories = $this->model->all(); + $trimmed = array(); + + foreach ($categories as $key => $category) { + if ($category->name != null || $category->name != "") { + $trimmed[$key] = [ + 'id' => $category->id, + 'name' => $category->name + ]; + } + } + + return $trimmed; + } } \ No newline at end of file diff --git a/packages/Webkul/Checkout/src/Cart.php b/packages/Webkul/Checkout/src/Cart.php index a68aa485e..694f3fc62 100755 --- a/packages/Webkul/Checkout/src/Cart.php +++ b/packages/Webkul/Checkout/src/Cart.php @@ -12,6 +12,8 @@ use Webkul\Tax\Repositories\TaxCategoryRepository; use Webkul\Checkout\Models\CartPayment; use Webkul\Customer\Repositories\WishlistRepository; use Webkul\Customer\Repositories\CustomerAddressRepository; +use Webkul\Discount\Repositories\CartRuleRepository as CartRule; +use Webkul\Discount\Helpers\Discount; use Webkul\Product\Helpers\Price; /** @@ -24,81 +26,94 @@ use Webkul\Product\Helpers\Price; class Cart { /** - * CartRepository model + * CartRepository instance * * @var mixed */ protected $cart; /** - * CartItemRepository model + * CartItemRepository instance * * @var mixed */ protected $cartItem; /** - * CustomerRepository model + * CustomerRepository instance * * @var mixed */ protected $customer; /** - * CartAddressRepository model + * CartAddressRepository instance * * @var mixed */ protected $cartAddress; /** - * ProductRepository model + * ProductRepository instance * * @var mixed */ protected $product; /** - * TaxCategoryRepository model + * TaxCategoryRepository instance * * @var mixed */ protected $taxCategory; /** - * WishlistRepository model + * WishlistRepository instance * * @var mixed */ protected $wishlist; /** - * CustomerAddressRepository model + * CustomerAddressRepository instance * * @var mixed */ - protected $customerAddress; + protected $customerAddress; + + /** + * CartRule Repository instance + */ + protected $cartRule; + + /** + * Discount helper instance + */ + protected $discount; /** * Suppress the session flash messages - */ + */ protected $suppressFlash; /** * Product price helper instance - */ + */ protected $price; /** * Create a new controller instance. * - * @param Webkul\Checkout\Repositories\CartRepository $cart - * @param Webkul\Checkout\Repositories\CartItemRepository $cartItem - * @param Webkul\Checkout\Repositories\CartAddressRepository $cartAddress - * @param Webkul\Customer\Repositories\CustomerRepository $customer - * @param Webkul\Product\Repositories\ProductRepository $product - * @param Webkul\Product\Repositories\TaxCategoryRepository $taxCategory + * @param Webkul\Checkout\Repositories\CartRepository $cart + * @param Webkul\Checkout\Repositories\CartItemRepository $cartItem + * @param Webkul\Checkout\Repositories\CartAddressRepository $cartAddress + * @param Webkul\Customer\Repositories\CustomerRepository $customer + * @param Webkul\Product\Repositories\ProductRepository $product + * @param Webkul\Product\Repositories\TaxCategoryRepository $taxCategory * @param Webkul\Product\Repositories\CustomerAddressRepository $customerAddress + * @param Webkul\Product\Repositories\CustomerAddressRepository $customerAddress + * @param Webkul\Discount\Repositories\CartRuleRepository $cartRule + * @param Webkul\Helpers\Discount $discount * @return void */ public function __construct( @@ -110,6 +125,8 @@ class Cart { TaxCategoryRepository $taxCategory, WishlistRepository $wishlist, CustomerAddressRepository $customerAddress, + CartRule $cartRule, + Discount $discount, Price $price ) { @@ -129,12 +146,15 @@ class Cart { $this->customerAddress = $customerAddress; + $this->cartRule = $cartRule; + + $this->discount = $discount; + $this->price = $price; $this->suppressFlash = false; } - /** * Return current logged in customer * @@ -1072,6 +1092,59 @@ class Cart { return $finalData; } + /** + * Save discount data for cart + */ + public function saveDiscount() + { + $rule = $impact['rule']; + + $cart = $this->getCart(); + + //update the cart items + foreach($cart->items as $item) { + if ($rule->use_coupon) { + if ($rule->action_type != config('pricerules.cart.validation.0')) { + $item->update([ + 'coupon_code' => $rule->coupon->code, + 'discount_amount' => core()->convertPrice($impact['amount'], $cart->channel_currency_code), + 'base_discount_amount' => $impact['amount'] + ]); + } else { + $item->update([ + 'coupon_code' => $rule->coupon->code, + 'discount_percent' => $rule->disc_amount + ]); + } + } else { + if ($rule->action_type != config('pricerules.cart.validation.0')) { + $item->update([ + 'discount_amount' => core()->convertPrice($impact['amount'], $cart->channel_currency_code), + 'base_discount_amount' => $impact['amount'] + ]); + } else { + $item->update([ + 'discount_percent' => $rule->disc_amount + ]); + } + } + } + + // update the cart + if ($rule->use_coupon) { + $cart->update([ + 'coupon_code' => $rule->coupons->code, + 'discount_amount' => core()->convertPrice($impact['amount'], $cart->channel_currency_code), + 'base_discount_amount' => $impact['amount'] + ]); + } else { + $cart->update([ + 'discount_amount' => core()->convertPrice($impact['amount'], $cart->channel_currency_code), + 'base_discount_amount' => $impact['amount'] + ]); + } + } + /** * Prepares data for order item * @@ -1212,4 +1285,67 @@ class Cart { } } } + + public function applyCoupon($code) + { + $result = $this->discount->applyCouponAbleRule($code); + + return $result; + } + + public function applyNonCoupon() + { + $result = $this->discount->applyNonCouponAbleRule(); + + return $result; + } + + public function removeCoupon() + { + $result = $this->discount->removeCoupon(); + + return $result; + } + + public function leastWorthItem() + { + $cart = $this->getCart(); + $leastValue = 999999999999; + $leastSubTotal = []; + + foreach ($cart->items as $item) { + if ($item->price < $leastValue) { + $leastValue = $item->price; + $leastSubTotal = [ + 'id' => $item->id, + 'total' => $item->total, + 'base_total' => $leastValue, + 'quantity' => $item->quantity + ]; + } + } + + return $leastSubTotal; + } + + public function maxWorthItem() + { + $cart = $this->getCart(); + $maxValue = 0; + $maxSubTotal = []; + + foreach ($cart->items as $item) { + if ($item->base_total > $maxValue) { + $maxValue = $item->total; + $maxSubTotal = [ + 'id' => $item->id, + 'total' => $item->total, + 'base_total' => $maxValue, + 'quantity' => $item->quantity + ]; + } + } + + return $maxSubTotal; + } } \ No newline at end of file diff --git a/packages/Webkul/Core/src/Config/concord.php b/packages/Webkul/Core/src/Config/concord.php index 3585e74c6..b9e18a31e 100644 --- a/packages/Webkul/Core/src/Config/concord.php +++ b/packages/Webkul/Core/src/Config/concord.php @@ -17,6 +17,6 @@ return [ \Webkul\Inventory\Providers\ModuleServiceProvider::class, \Webkul\Product\Providers\ModuleServiceProvider::class,\Webkul\Sales\Providers\ModuleServiceProvider::class, \Webkul\Tax\Providers\ModuleServiceProvider::class, - \Webkul\User\Providers\ModuleServiceProvider::class + \Webkul\User\Providers\ModuleServiceProvider::class,\Webkul\Discount\Providers\ModuleServiceProvider::class, ] ]; \ No newline at end of file diff --git a/packages/Webkul/Customer/src/Database/Seeders/CustomerGroupTableSeeder.php b/packages/Webkul/Customer/src/Database/Seeders/CustomerGroupTableSeeder.php index b4457f230..6a83e7b4d 100755 --- a/packages/Webkul/Customer/src/Database/Seeders/CustomerGroupTableSeeder.php +++ b/packages/Webkul/Customer/src/Database/Seeders/CustomerGroupTableSeeder.php @@ -19,6 +19,10 @@ class CustomerGroupTableSeeder extends Seeder 'id' => 2, 'name' => 'Wholesale', 'is_user_defined' => 0, + ], [ + 'id' => 3, + 'name' => 'Not Logged In', + 'is_user_defined' => 0, ]); } } \ No newline at end of file diff --git a/packages/Webkul/Discount/Untitled-1.txt b/packages/Webkul/Discount/Untitled-1.txt new file mode 100644 index 000000000..b2803cd5d --- /dev/null +++ b/packages/Webkul/Discount/Untitled-1.txt @@ -0,0 +1,8 @@ +Discount Condition: +Attribute Family is all the attributes +Cart Attribute such as +base_total, +grand_total, +shipping_free, +shipping_not_free, + diff --git a/packages/Webkul/Discount/composer.json b/packages/Webkul/Discount/composer.json new file mode 100644 index 000000000..78ac3d63e --- /dev/null +++ b/packages/Webkul/Discount/composer.json @@ -0,0 +1,27 @@ +{ + "name": "bagisto/laravel-discount", + "license": "MIT", + "authors": [ + { + "name": "Prashant Singh", + "email": "prashant.singh852@webkul.com" + } + ], + "require": { + "propaganistas/laravel-intl": "^2.0" + }, + "autoload": { + "psr-4": { + "Webkul\\Discount\\": "src/" + } + }, + "extra": { + "laravel": { + "providers": [ + "Webkul\\Discount\\DiscountServiceProvider" + ], + "aliases": {} + } + }, + "minimum-stability": "dev" +} \ No newline at end of file diff --git a/packages/Webkul/Discount/src/Config/rule-conditions.php b/packages/Webkul/Discount/src/Config/rule-conditions.php new file mode 100644 index 000000000..b8e147a4f --- /dev/null +++ b/packages/Webkul/Discount/src/Config/rule-conditions.php @@ -0,0 +1,179 @@ + [ + 'numeric' => [ + 0 => 'Equals', + 1 => 'Equals or greater', + 2 => 'Equals or lesser', + 3 => 'Greater than', + 4 => 'Lesser than' + ], + + 'text' => [ + 0 => 'is', + 1 => 'is not', + 2 => 'contains', + 3 => 'does not contains' + ], + + 'boolean' => [ + 0 => 'True/Yes', + 1 => 'False/No', + ] + ], + + 'catalog' => [ + 'actions' => [ + 0 => 'admin::app.promotion.catalog.apply-percent', + 1 => 'admin::app.promotion.catalog.apply-fixed', + 2 => 'admin::app.promotion.catalog.adjust-to-percent', + 3 => 'admin::app.promotion.catalog.adjust-to-value' + ], + + 'attributes' => [ + 0 => [ + 'name' => 'Sub-total', + 'type' => 'numeric' + ], + 1 => [ + 'name' => 'Total Items Quantity', + 'type' => 'numeric' + ], + 2 => [ + 'name' => 'Total Weight', + 'type' => 'numeric' + ], + 3 => [ + 'name' => 'Payment Method', + 'type' => 'string' + ], + 4 => [ + 'name' => 'Shipping Postcode', + 'type' => 'string' + ], + 5 => [ + 'name' => 'Shipping State', + 'type' => 'string' + ], + 6 => [ + 'name' => 'Shipping Country', + 'type' => 'string' + ] + ] + ], + + 'cart' => [ + 'actions' => [ + 'percent_of_product' => 'Percentage of product', + 'fixed_amount' => 'Apply as fixed amount', + 'buy_a_get_b' => 'Get B amount back', + // 'fixed_amount_cart' => 'Fixed amount for whole cart' + ], + + 'validation' => [ + 0 => 'percent_of_product', + 1 => 'fixed_amount', + 2 => 'buy_a_get_b', + 3 => 'fixed_amount_cart' + ], + + 'conditions' => [ + 'numeric' => [ + '=' => 'Equals', + '>=' => 'Greater or equals', + '<=' => 'Lesser or equals', + '>' => 'Greater than', + '<' => 'Lesser than', + '{}' => 'Contains' + // '!{}' => 'Does not contains', + // '()' => 'Is one of', + // '!()' => 'Not is one of' + ], + + 'text' => [ + '=' => 'Equals', + '>=' => 'Greater or equals', + '<=' => 'Lesser or equals', + '>' => 'Greater than', + '<' => 'Lesser than', + '{}' => 'Contains', + '!{}' => 'Does not contains' + // '()' => 'Is one of', + // '!()' => 'Not is one of' + ], + + 'string' => [ + '=' => 'Equals', + '>=' => 'Greater or equals', + '<=' => 'Lesser or equals', + '>' => 'Greater than', + '<' => 'Lesser than', + '{}' => 'Contains', + '!{}' => 'Does not contains' + // '()' => 'Is one of', + // '!()' => 'Not is one of' + ], + + 'boolean' => [ + 0 => 'True/Yes', + 1 => 'False/No' + ] + ], + + 'attributes' => [ + 0 => [ + 'code' => 'sub_total', + 'name' => 'Sub Total', + 'type' => 'numeric' + ], + 1 => [ + 'code' => 'total_items', + 'name' => 'Total Items', + 'type' => 'numeric' + ], + 2 => [ + 'code' => 'total_weight', + 'name' => 'Total Weight', + 'type' => 'numeric' + ], + 3 => [ + 'code' => 'shipping_method', + 'name' => 'Shipping Method', + 'type' => 'string' + ], + 4 => [ + 'code' => 'payment_method', + 'name' => 'Payment Method', + 'type' => 'string' + ], + 5 => [ + 'code' => 'shipping_postcode', + 'name' => 'Shipping Postcode', + 'type' => 'string' + ], + 6 => [ + 'code' => 'shipping_state', + 'name' => 'Shipping State', + 'type' => 'string' + ], + 7 => [ + 'code' => 'shipping_country', + 'name' => 'Shipping Country', + 'type' => 'string' + ], + 8 => [ + 'code' => 'shipping_city', + 'name' => 'Shipping City', + 'type' => 'string' + ] + ] + ], + + 'test_mode' => [ + 0 => 'all_are_true', + 1 => 'all_are_false', + 2 => 'any_of_true', + 3 => 'all_of_false' + ] +]; \ No newline at end of file diff --git a/packages/Webkul/Discount/src/Contracts/CartRule.php b/packages/Webkul/Discount/src/Contracts/CartRule.php new file mode 100644 index 000000000..c6da453eb --- /dev/null +++ b/packages/Webkul/Discount/src/Contracts/CartRule.php @@ -0,0 +1,7 @@ +increments('id'); + $table->string('name')->nullable(); + $table->string('description')->nullable(); + $table->datetime('starts_from')->nullable(); + $table->datetime('ends_till')->nullable(); + $table->boolean('status')->default(0); + $table->integer('per_customer')->unsigned()->default(0); + $table->boolean('is_guest')->default(0); + $table->boolean('use_coupon')->default(0); + $table->integer('usage_limit')->unsigned()->default(0); + $table->json('conditions')->nullable(); + $table->json('actions')->nullable(); + $table->boolean('end_other_rules')->default(0); + $table->integer('priority')->unsigned()->default(0); + $table->boolean('uses_attribute_conditions')->default(0); + $table->longtext('product_ids')->nullable(); + $table->integer('sort_order')->unsigned()->default(0); + $table->string('action_type')->nullable(); + $table->decimal('disc_amount', 12, 4)->default(0); + $table->decimal('disc_quantity', 12, 4)->default(0); + $table->string('disc_threshold')->default(0); + $table->integer('coupon_type')->default(1); + $table->boolean('auto_generation')->default(0); + $table->boolean('apply_to_shipping')->default(0); + $table->boolean('free_shipping')->default(0); + $table->timestamps(); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::dropIfExists('cart_rule'); + } +} diff --git a/packages/Webkul/Discount/src/Database/Migrations/2019_05_13_024340_create_cart_rule_channels_table.php b/packages/Webkul/Discount/src/Database/Migrations/2019_05_13_024340_create_cart_rule_channels_table.php new file mode 100644 index 000000000..3808c6545 --- /dev/null +++ b/packages/Webkul/Discount/src/Database/Migrations/2019_05_13_024340_create_cart_rule_channels_table.php @@ -0,0 +1,35 @@ +increments('id'); + $table->integer('cart_rule_id')->unsigned(); + $table->foreign('cart_rule_id')->references('id')->on('cart_rules')->onDelete('cascade'); + $table->integer('channel_id')->unsigned(); + $table->foreign('channel_id')->references('id')->on('channels')->onDelete('cascade'); + $table->timestamps(); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::dropIfExists('cart_rule_channels'); + } +} \ No newline at end of file diff --git a/packages/Webkul/Discount/src/Database/Migrations/2019_05_13_024419_create_cart_rule_customer_groups_table.php b/packages/Webkul/Discount/src/Database/Migrations/2019_05_13_024419_create_cart_rule_customer_groups_table.php new file mode 100644 index 000000000..4396b999a --- /dev/null +++ b/packages/Webkul/Discount/src/Database/Migrations/2019_05_13_024419_create_cart_rule_customer_groups_table.php @@ -0,0 +1,35 @@ +increments('id'); + $table->integer('cart_rule_id')->unsigned(); + $table->foreign('cart_rule_id')->references('id')->on('cart_rules')->onDelete('cascade'); + $table->integer('customer_group_id')->unsigned(); + $table->foreign('customer_group_id')->references('id')->on('customer_groups')->onDelete('cascade'); + $table->timestamps(); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::dropIfExists('cart_rule_customer_groups'); + } +} diff --git a/packages/Webkul/Discount/src/Database/Migrations/2019_05_16_094238_create_cart_rule_labels_table.php b/packages/Webkul/Discount/src/Database/Migrations/2019_05_16_094238_create_cart_rule_labels_table.php new file mode 100644 index 000000000..de1b43599 --- /dev/null +++ b/packages/Webkul/Discount/src/Database/Migrations/2019_05_16_094238_create_cart_rule_labels_table.php @@ -0,0 +1,38 @@ +increments('id'); + $table->integer('channel_id')->unsigned()->nullable(); + $table->foreign('channel_id')->references('id')->on('channels')->onDelete('cascade'); + $table->integer('locale_id')->unsigned()->nullable(); + $table->foreign('locale_id')->references('id')->on('locales')->onDelete('cascade'); + $table->integer('cart_rule_id')->unsigned()->nullable(); + $table->foreign('cart_rule_id')->references('id')->on('cart_rules')->onDelete('cascade'); + $table->text('label')->nullable(); + $table->timestamps(); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::dropIfExists('cart_rule_labels'); + } +} diff --git a/packages/Webkul/Discount/src/Database/Migrations/2019_05_23_175727_create_cart_rule_customers_table.php b/packages/Webkul/Discount/src/Database/Migrations/2019_05_23_175727_create_cart_rule_customers_table.php new file mode 100644 index 000000000..a65435173 --- /dev/null +++ b/packages/Webkul/Discount/src/Database/Migrations/2019_05_23_175727_create_cart_rule_customers_table.php @@ -0,0 +1,36 @@ +increments('id'); + $table->integer('cart_rule_id')->unsigned(); + $table->foreign('cart_rule_id')->references('id')->on('cart_rules')->onDelete('cascade'); + $table->integer('customer_id')->unsigned(); + $table->foreign('customer_id')->references('id')->on('customers')->onDelete('cascade'); + $table->bigInteger('usage_throttle')->unsigned()->default(0); + $table->timestamps(); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::dropIfExists('cartrule_customers'); + } +} diff --git a/packages/Webkul/Discount/src/Database/Migrations/2019_05_23_180457_create_cart_rule_coupons_table.php b/packages/Webkul/Discount/src/Database/Migrations/2019_05_23_180457_create_cart_rule_coupons_table.php new file mode 100644 index 000000000..8c99d442c --- /dev/null +++ b/packages/Webkul/Discount/src/Database/Migrations/2019_05_23_180457_create_cart_rule_coupons_table.php @@ -0,0 +1,40 @@ +increments('id'); + $table->integer('cart_rule_id')->unsigned(); + $table->foreign('cart_rule_id')->references('id')->on('cart_rules')->onDelete('cascade'); + $table->string('prefix')->nullable(); + $table->string('suffix')->nullable(); + $table->string('code')->nullable(); + $table->integer('usage_limit')->unsigned()->default(0); + $table->integer('usage_per_customer')->unsigned()->default(0); + $table->integer('usage_throttle')->unsigned()->default(0); + $table->integer('type')->unsigned()->default(0); + $table->timestamps(); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::dropIfExists('cartrule_coupons'); + } +} diff --git a/packages/Webkul/Discount/src/Database/Migrations/2019_05_24_113949_create_cart_rule_coupons_usage_table.php b/packages/Webkul/Discount/src/Database/Migrations/2019_05_24_113949_create_cart_rule_coupons_usage_table.php new file mode 100644 index 000000000..60f23900e --- /dev/null +++ b/packages/Webkul/Discount/src/Database/Migrations/2019_05_24_113949_create_cart_rule_coupons_usage_table.php @@ -0,0 +1,39 @@ +increments('id'); + $table->integer('coupon_id')->unsigned(); + $table->foreign('coupon_id')->references('id')->on('cart_rules')->onDelete('cascade'); + $table->integer('channel_id')->unsigned(); + $table->foreign('channel_id')->references('id')->on('channels')->onDelete('cascade'); + $table->integer('customer_id')->unsigned(); + $table->foreign('customer_id')->references('id')->on('customers')->onDelete('cascade'); + $table->bigInteger('usage')->unsigned()->default(0); + $table->date('expired_on'); + $table->timestamps(); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::dropIfExists('cart_rule_coupons_usage'); + } +} diff --git a/packages/Webkul/Discount/src/Database/Migrations/2019_05_30_141207_create_cart_rule_cart_table.php b/packages/Webkul/Discount/src/Database/Migrations/2019_05_30_141207_create_cart_rule_cart_table.php new file mode 100644 index 000000000..ec6fc70e8 --- /dev/null +++ b/packages/Webkul/Discount/src/Database/Migrations/2019_05_30_141207_create_cart_rule_cart_table.php @@ -0,0 +1,35 @@ +increments('id'); + $table->integer('cart_rule_id')->unsigned()->nullable(); + $table->foreign('cart_rule_id')->references('id')->on('cart_rules')->onDelete('cascade'); + $table->integer('cart_id')->unsigned()->nullable(); + $table->foreign('cart_id')->references('id')->on('cart')->onDelete('cascade'); + $table->timestamps(); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::dropIfExists('cart_rule_order'); + } +} diff --git a/packages/Webkul/Discount/src/Helpers/Discount.php b/packages/Webkul/Discount/src/Helpers/Discount.php new file mode 100644 index 000000000..bdfd823f1 --- /dev/null +++ b/packages/Webkul/Discount/src/Helpers/Discount.php @@ -0,0 +1,440 @@ +cartRule = $cartRule; + $this->endRuleActive = false; + $this->cartRuleCart = $cartRuleCart; + } + + public function applyNonCouponAbleRule() + { + if (auth()->guard('customer')->check()) { + $nonCouponAbleRules = $this->cartRule->findWhere([ + 'use_coupon' => 0, + 'status' => 1 + ]); + } else { + $nonCouponAbleRules = $this->cartRule->findWhere([ + 'use_coupon' => 0, + 'is_guest' => 1, + 'status' => 1 + ]); + } + + $canBeApplied = array(); + + // time based filter + foreach($nonCouponAbleRules as $rule) { + $report = $this->checkApplicability($rule); + $report['rule'] = $rule; + + $passed = 0; + if ($rule->starts_from != null && $rule->ends_till == null) { + if (Carbon::parse($rule->starts_from) < now()) { + $passed = 1; + } + } else if ($rule->starts_from == null && $rule->ends_till != null) { + if (Carbon::parse($rule->ends_till) > now()) { + $passed = 1; + } + } else if ($rule->starts_from != null && $rule->ends_till != null) { + if (Carbon::parse($rule->starts_from) < now() && now() < Carbon::parse($rule->ends_till)) { + $passed = 1; + } + } else { + $passed = 1; + } + + if ($passed) { + $report['used_coupon'] = false; + array_push($canBeApplied, $report); + } + } + + //min priority + $minPriority = collect($canBeApplied)->min('priority'); + + $canBeApplied = collect($canBeApplied)->where('priority', $minPriority); + + if (count($canBeApplied) > 1) { + $maxDiscount = collect($canBeApplied)->max('discount'); + + $canBeApplied = collect($canBeApplied)->where('discount', $maxDiscount); + + $leastId = 999999999999; + if (count($canBeApplied) > 1) { + foreach($canBeApplied as $rule) { + if ($rule['rule']->id < $leastId) { + $leastId = $rule['rule']->id; + } + } + + // fighting the edge case for non couponable discount rule + foreach($canBeApplied as $rule) { + if ($rule['rule']->id == $leastId) { + $rule['used_coupon'] = false; + + $this->save($rule['rule']); + + return $rule; + } + } + } + } + + $this->save($canBeApplied[0]['rule']); + + return $canBeApplied[0]; + } + + public function applyCouponAbleRule($code) + { + if (auth()->guard('customer')->check()) { + $couponAbleRules = $this->cartRule->findWhere([ + 'use_coupon' => 1, + 'status' => 1 + ]); + } else { + $couponAbleRules = $this->cartRule->findWhere([ + 'use_coupon' => 1, + 'is_guest' => 1, + 'status' => 1 + ]); + } + + $rule; + foreach ($couponAbleRules as $couponAbleRule) { + if ($couponAbleRule->coupons->code == $code) { + $rule = $couponAbleRule; + } + } + + $useCouponable = false; + if (isset($rule)) { + $canBeApplied = array(); + + // time based filter + $report = $this->checkApplicability($rule); + $report['rule'] = $rule; + + $passed = 0; + if ($rule->starts_from != null && $rule->ends_till == null) { + if (Carbon::parse($rule->starts_from) < now()) { + $passed = 1; + } + } else if ($rule->starts_from == null && $rule->ends_till != null) { + if (Carbon::parse($rule->ends_till) > now()) { + $passed = 1; + } + } else if ($rule->starts_from != null && $rule->ends_till != null) { + if (Carbon::parse($rule->starts_from) < now() && now() < Carbon::parse($rule->ends_till)) { + $passed = 1; + } + } else { + $passed = 1; + } + + if ($passed) { + array_push($canBeApplied, $report); + + $useCouponable = true; + $alreadyAppliedRule = $this->cartRuleCart->findWhere([ + 'cart_id' => \Cart::getCart()->id + ]); + + if ($alreadyAppliedRule->count() && ! ($alreadyAppliedRule->first()->cart_rule->priority < $canBeApplied[0]['rule']->priority)) { + unset($report); + + $alreadyAppliedRule = $alreadyAppliedRule->first()->cart_rule; + + // analyze impact + $report = $this->checkApplicability($alreadyAppliedRule); + $report['rule'] = $alreadyAppliedRule; + + array_push($canBeApplied, $report); + + //min priority + $minPriority = collect($canBeApplied)->min('priority'); + //min priority rule + $canBeApplied = collect($canBeApplied)->where('priority', $minPriority); + + if (count($canBeApplied) > 1) { + $maxDiscount = collect($canBeApplied)->max('discount'); + + $canBeApplied = collect($canBeApplied)->where('discount', $maxDiscount); + + $leastId = 999999999999; + if (count($canBeApplied) > 1) { + foreach($canBeApplied as $rule) { + if ($rule['rule']->id < $leastId) { + $leastId = $rule['rule']->id; + } + } + + // fighting the edge case for couponable discount rule + foreach($canBeApplied as $rule) { + if ($rule['rule']->id == $leastId) { + if($rule['rule']->use_coupon) { + $useCouponable = true; + } + } + } + } else { + if ($canBeApplied[0]['rule']->use_coupon) { + $useCouponable = true; + } + } + } else if (count($canBeApplied)) { + if ($canBeApplied[0]['rule']->use_coupon) { + $useCouponable = true; + } + } + + if ($alreadyAppliedRule->end_other_rules) { + $useCouponable = false; + } + } + } + } + + $canBeApplied = array(); + if ($useCouponable) { + $report = $this->checkApplicability($rule); + $report['rule'] = $rule; + $report['used_coupon'] = $useCouponable; + + $this->save($rule); + + return $report; + } else { + return false; + } + } + + public function checkApplicability($rule = null) + { + $cart = \Cart::getCart(); + $report = array(); + $result = 0; + + //check conditions + if ($rule->conditions != null) { + $conditions = json_decode(json_decode($rule->conditions)); + $test_mode = config('pricerules.test_mode.0'); + + if ($test_mode == config('pricerules.test_mode.0')) { + $result = $this->testIfAllConditionAreTrue($conditions, $cart); + } else if ($test_mode == config('pricerules.test_mode.1')) { + $result = $this->testIfAllConditionAreFalse($conditions, $cart); + } else if ($test_mode == config('pricerules.test_mode.2')) { + $result = $this->testIfAnyConditionIsTrue($conditions, $cart); + } else if ($test_mode == config('pricerules.test_mode.3')) { + $result = $this->testIfAnyConditionIsFalse($conditions, $cart); + } + } + + if ($result) { + $report['conditions'] = true; + } else { + if ($rule->conditions == null) + $report['conditions'] = true; + else + $report['conditions'] = false; + } + + //check endrule + if ($rule->end_other_rules) { + $report['end_other_rules'] = true; + } else { + $report['end_other_rules'] = false; + } + + //calculate discount amount + $action_type = $rule->action_type; // action type used + $disc_threshold = $rule->disc_threshold; // atleast quantity by default 1 --> may be omitted in near future + $disc_amount = $rule->disc_amount; // value of discount + $disc_quantity = $rule->disc_quantity; //max quantity allowed to be discounted + + $amountDiscounted = 0; + $leastWorthItem = \Cart::leastWorthItem(); + $realQty = $leastWorthItem['quantity']; + + if ($cart->items_qty >= $disc_threshold && $realQty >= $disc_quantity) { + if ($action_type == config('pricerules.cart.validation.0')) { + $amountDiscounted = $leastWorthItem['total'] * ($disc_amount / 100); + } else if ($action_type == config('pricerules.cart.validation.1')) { + $amountDiscounted = $leastWorthItem['total'] - $disc_amount; + + if ($amountDiscounted < 0) { + $amountDiscounted = $leastWorthItem['total']; + } + } else if ($action_type == config('pricerules.cart.validation.2')) { + $amountDiscounted = $disc_amount; + } + } + + $report['discount'] = $amountDiscounted; + $report['formatted_discount'] = core()->formatPrice($amountDiscounted, $cart->cart_currency_code); + $report['new_grand_total'] = $cart->grand_total - $amountDiscounted; + $report['formatted_new_grand_total'] = core()->formatPrice($cart->grand_total - $amountDiscounted, $cart->cart_currency_code); + $report['priority'] = $rule->priority; + + return $report; + } + + public function save($rule) + { + $cart = \Cart::getCart(); + + // create or update + $existingRule = $this->cartRuleCart->findWhere([ + 'cart_id' => $cart->id + ]); + + if (count($existingRule)) { + if ($existingRule->first()->cart_rule_id != $rule->id) { + $existingRule->first()->update([ + 'cart_rule_id' => $rule->id + ]); + + return true; + } + } else { + $this->cartRuleCart->create([ + 'cart_id' => $cart->id, + 'cart_rule_id' => $rule->id + ]); + + return true; + } + + return false; + } + + public function removeCoupon() + { + $cart = \Cart::getCart(); + + $existingRule = $this->cartRuleCart->findWhere([ + 'cart_id' => $cart->id + ]); + + if ($existingRule->count()) { + if ($existingRule->first()->delete()) { + return true; + } else { + return false; + } + } else { + return false; + } + } + + protected function testIfAllConditionAreTrue($conditions, $cart) { + $shipping_address = $cart->getShippingAddressAttribute(); + + $shipping_method = $cart->shipping_method; + $shipping_country = $shipping_address->country; + $shipping_state = $shipping_address->state; + $shipping_postcode = $shipping_address->postcode; + $shipping_city = $shipping_address->city; + + $payment_method = $cart->payment->method; + $sub_total = $cart->base_sub_total; + + $total_items = $cart->items_qty; + $total_weight = 0; + + foreach($cart->items as $item) { + $total_weight = $total_weight + $item->base_total_weight; + } + + $test_mode = config('pricerules.test_mode.0'); + $test_conditions = config('pricerules.cart.conditions'); + + $result = 1; + foreach ($conditions as $condition) { + $actual_value = ${$condition->attribute}; + $test_value = $condition->value; + $test_condition = $condition->condition; + + if ($condition->type == 'numeric' || $condition->type == 'string' || $condition->type == 'text') { + if ($test_condition == '=') { + if ($actual_value != $test_value) { + $result = 0; + + break; + } + } else if ($test_condition == '>=') { + if (! ($actual_value >= $test_value)) { + $result = 0; + + break; + } + } else if ($test_condition == '<=') { + if (! ($actual_value <= $test_value)) { + $result = 0; + + break; + } + } else if ($test_condition == '>') { + if (! ($actual_value > $test_value)) { + $result = 0; + + break; + } + } else if ($test_condition == '<') { + if (! ($actual_value < $test_value)) { + $result = 0; + + break; + } + } else if ($test_condition == '{}') { + if (! str_contains($actual_value, $test_value)) { + $result = 0; + + break; + } + } else if ($test_condition == '!{}') { + if (str_contains($actual_value, $test_value)) { + $result = 0; + + break; + } + } + } + } + + return $result; + } +} \ No newline at end of file diff --git a/packages/Webkul/Discount/src/Helpers/FindProducts.php b/packages/Webkul/Discount/src/Helpers/FindProducts.php new file mode 100644 index 000000000..fffa421cd --- /dev/null +++ b/packages/Webkul/Discount/src/Helpers/FindProducts.php @@ -0,0 +1,72 @@ +product = $product; + + $this->attribute = $attribute; + + $this->productFlat = $productFlat; + + $this->locale = $locale; + } + + public function findByConditions($conditions) + { + dd($conditions); + /** + * Empty collection instance to hold all the products that satisfy the conditions + */ + $products = array(); + + foreach ($conditions as $condition) { + $attribute = $this->attribute->findOneByField('code', $condition->attribute); + dump($attribute->type); + if ($condition->type == 'select' || $condition->type == 'multiselect') { + $values = $condition->value; + $attributeValues = array(); + + foreach ($condition->options as $option) { + foreach ($values as $value) { + if ($value == $option->id) { + array_push($attributeValues, $option); + } + } + } + + $defaultChannelCode = core()->getDefaultChannel()->code; + $defaultLocaleCode = $this->locale->find(core()->getDefaultChannel()->default_locale_id)->code; + + foreach ($attributeValues as $attributeValue) { + $productFound = $this->productFlat->findByField([$attribute->code => $attributeValue->id, 'locale' => $defaultLocaleCode, 'channel' => $defaultChannelCode]); + + if ($productFound->count()) { + array_push($products, $productFound->toArray()); + } + } + } else { + } + } + + dd(array_flatten($products, 1)); + } +} \ No newline at end of file diff --git a/packages/Webkul/Discount/src/Http/Controllers/CartRuleController.php b/packages/Webkul/Discount/src/Http/Controllers/CartRuleController.php new file mode 100644 index 000000000..914d6bf7a --- /dev/null +++ b/packages/Webkul/Discount/src/Http/Controllers/CartRuleController.php @@ -0,0 +1,426 @@ + @prashant-webkul + * @copyright 2018 Webkul Software Pvt Ltd (http://www.webkul.com) + */ +class CartRuleController extends Controller +{ + /** + * Initialize _config, a default request parameter with route + */ + protected $_config; + + /** + * Attribute $attribute + */ + protected $attribute; + + /** + * AttributeFamily $attributeFamily + */ + protected $attributeFamily; + + /** + * Category $category + */ + protected $category; + + /** + * Product $product + */ + protected $product; + + /** + * Property for Cart rule application + */ + protected $appliedConfig; + + /** + * To hold Cart repository instance + */ + protected $cartRule; + + /** + * To hold Rule Label repository instance + */ + protected $cartRuleLabel; + + /** + * To hold Coupons Repository instance + */ + protected $cartRuleCoupon; + + /** + * To hold the cart repository instance + */ + protected $cart; + + public function __construct(Attribute $attribute, AttributeFamily $attributeFamily, Category $category, Product $product, CatalogRule $catalogRule, CartRule $cartRule, CartRuleCoupons $cartRuleCoupon, CartRuleLabels $cartRuleLabel) + { + $this->_config = request('_config'); + $this->attribute = $attribute; + $this->attributeFamily = $attributeFamily; + $this->category = $category; + $this->product = $product; + $this->cartRule = $cartRule; + $this->cartRuleCoupon = $cartRuleCoupon; + $this->cartRuleLabel = $cartRuleLabel; + $this->appliedConfig = config('pricerules.cart'); + } + + public function index() + { + return view($this->_config['view']); + } + + public function create() + { + return view($this->_config['view'])->with('cart_rule', [$this->appliedConfig, $this->fetchOptionableAttributes(), $this->getStatesAndCountries()]); + } + + public function store() + { + $data = request()->all(); + + $validated = Validator::make($data, [ + 'name' => 'required|string', + 'description' => 'string', + // 'customer_groups' => 'required|array', + 'channels' => 'required|array', + 'status' => 'required|boolean', + 'use_coupon' => 'boolean|required', + // 'usage_limit' => 'numeric|min:0', + // 'per_customer' => 'numeric|min:0', + 'action_type' => 'required|string', + 'disc_amount' => 'required|numeric', + 'disc_quantity' => 'numeric', + 'disc_threshold' => 'numeric', + 'free_shipping' => 'required|boolean', + 'apply_to_shipping' => 'required|boolean', + 'code' => 'string|required_if:auto_generation,0', + 'all_conditions' => 'sometimes|nullable', + 'label' => 'array|nullable' + ]); + + $data['usage_limit'] = 0; + $data['per_customer'] = 0; + + if ($validated->fails()) { + session()->flash('error', 'Validation failed'); + return redirect()->route('admin.cart-rule.create') + ->withErrors($validated) + ->withInput(); + } + + if ($data['starts_from'] == "" || $data['ends_till'] == "") { + $data['starts_from'] = null; + $data['ends_till'] = null; + } + + unset($data['_token']); + + $channels = $data['channels']; + unset($data['channels']); + + $customer_groups = $data['customer_groups']; + unset($data['customer_groups']); + unset($data['criteria']); + + $labels = $data['label']; + unset($data['label']); + unset($data['cart_attributes']); + unset($data['attributes']); + + if (isset($data['disc_amount']) && $data['action_type'] == config('pricerules.cart.validations.2')) { + $data['actions'] = [ + 'action_type' => $data['action_type'], + 'disc_amount' => $data['disc_amount'], + 'disc_threshold' => $data['disc_threshold'] + ]; + + $data['disc_quantity'] = $data['disc_amount']; + } else { + $data['actions'] = [ + 'action_type' => $data['action_type'], + 'disc_amount' => $data['disc_amount'], + 'disc_quantity' => $data['disc_quantity'] + ]; + } + + $data['actions'] = json_encode($data['actions']); + + if (! isset($data['all_conditions']) || $data['all_conditions'] == "[]") { + $data['conditions'] = null; + } else { + $data['conditions'] = json_encode($data['all_conditions']); + } + unset($data['all_conditions']); + + if ($data['use_coupon']) { + // if (isset($data['auto_generation']) && $data['auto_generation']) { + $data['auto_generation'] = 0; + + $coupons['code'] = $data['code']; + unset($data['code']); + // } else { + // $data['auto_generation'] = 1; + // } + + // if (isset($data['prefix'])) { + // $coupons['prefix'] = $data['prefix']; + // unset($data['prefix']); + // } + + // if (isset($data['suffix'])) { + // $coupons['suffix'] = $data['suffix']; + // unset($data['suffix']); + // } + } + + if(isset($data['usage_limit'])) { + $coupons['usage_limit'] = $data['usage_limit']; + } + + $ruleCreated = $this->cartRule->create($data); + + $ruleGroupCreated = $this->cartRule->CustomerGroupSync($customer_groups, $ruleCreated); + $ruleChannelCreated = $this->cartRule->ChannelSync($channels, $ruleCreated); + + if (isset($labels['global'])) { + foreach (core()->getAllChannels() as $channel) { + $label1['channel_id'] = $channel->id; + foreach($channel->locales as $locale) { + $label1['locale_id'] = $locale->id; + $label1['label'] = $labels['global']; + $label1['cart_rule_id'] = $ruleCreated->id; + + $ruleLabelCreated = $this->cartRuleLabel->create($label1); + } + } + } else { + $label2['label'] = $labels['global']; + $label2['cart_rule_id'] = $ruleCreated->id; + $ruleLabelCreated = $this->cartRuleLabel->create($label2); + } + + if(isset($coupons)) { + $coupons['cart_rule_id'] = $ruleCreated->id; + $coupons['usage_per_customer'] = $data['per_customer']; //0 is for unlimited usage + + $couponCreated = $this->cartRuleCoupon->create($coupons); + } + + if ($ruleCreated && $ruleGroupCreated && $ruleChannelCreated) { + if (isset($couponCreated) && $couponCreated) { + session()->flash('success', trans('admin::app.promotion.status.success-coupon')); + } + + session()->flash('success', trans('admin::app.promotion.status.success')); + } else { + session()->flash('success', trans('admin::app.promotion.status.success')); + + return redirect()->back(); + } + + return redirect()->route($this->_config['redirect']); + } + + public function edit($id) + { + $cart_rule = $this->cartRule->find($id); + + return view($this->_config['view'])->with('cart_rule', [$this->appliedConfig, $this->fetchOptionableAttributes(), $this->getStatesAndCountries(), $cart_rule]); + } + + public function update($id) + { + $types = config('price_rules.cart.validations'); + + $validated = Validator::make(request()->all(), [ + 'name' => 'required|string', + 'description' => 'string', + // 'customer_groups' => 'required|array', + 'channels' => 'required|array', + 'status' => 'required|boolean', + 'use_coupon' => 'boolean|required', + // 'usage_limit' => 'numeric|min:0', + // 'per_customer' => 'numeric|min:0', + 'action_type' => 'required|string', + 'disc_amount' => 'required|numeric', + 'disc_quantity' => 'required|numeric', + 'disc_threshold' => 'required|numeric', + 'free_shipping' => 'required|boolean', + 'apply_to_shipping' => 'required|boolean', + 'code' => 'string|required_if:user_coupon,1', + 'all_conditions' => 'present', + 'label' => 'array|nullable' + ]); + + $data['usage_limit'] = 0; + $data['per_customer'] = 0; + + if ($validated->fails()) { + session()->flash('error', 'Validation failed'); + return redirect()->route('admin.cart-rule.create') + ->withErrors($validated) + ->withInput(); + } + + $data = request()->all(); + + if ($data['starts_from'] == "" || $data['ends_till'] == "") { + $data['starts_from'] = null; + $data['ends_till'] = null; + } + + unset($data['_token']); + + $channels = $data['channels']; + unset($data['channels']); + + // $customer_groups = $data['customer_groups']; + // unset($data['customer_groups']); + // unset($data['criteria']); + + if (isset($data['label'])) { + $labels = $data['label']; + unset($data['label']); + } + + unset($data['cart_attributes']); + unset($data['attributes']); + + if (isset($data['disc_amount']) && $data['action_type'] == config('pricerules.cart.validations.2')) { + $data['actions'] = [ + 'action_type' => $data['action_type'], + 'disc_amount' => $data['disc_amount'], + 'disc_threshold' => $data['disc_threshold'] + ]; + + $data['disc_quantity'] = $data['disc_amount']; + } else { + $data['actions'] = [ + 'action_type' => $data['action_type'], + 'disc_amount' => $data['disc_amount'], + 'disc_quantity' => $data['disc_quantity'] + ]; + } + + $data['actions'] = json_encode($data['actions']); + if (! isset($data['all_conditions']) || $data['all_conditions'] == "[]") { + $data['conditions'] = null; + } else { + $data['conditions'] = json_encode($data['all_conditions']); + } + + unset($data['all_conditions']); + + if ($data['use_coupon']) { + // if (isset($data['auto_generation']) && $data['auto_generation']) { + $data['auto_generation'] = 0; + + $coupons['code'] = $data['code']; + unset($data['code']); + // } else { + // $data['auto_generation'] = 1; + // } + + // if (isset($data['prefix'])) { + // $coupons['prefix'] = $data['prefix']; + // unset($data['prefix']); + // } + + // if (isset($data['suffix'])) { + // $coupons['suffix'] = $data['suffix']; + // unset($data['suffix']); + // } + } + + if (isset($data['usage_limit'])) { + $coupons['usage_limit'] = $data['usage_limit']; + } + + $ruleUpdated = $this->cartRule->update($data, $id); + + // $ruleGroupUpdated = $this->cartRule->CustomerGroupSync($customer_groups, $ruleUpdated); + $ruleChannelUpdated = $this->cartRule->ChannelSync($channels, $ruleUpdated); + + $labelsUpdated = $this->cartRule->LabelSync($labels, $ruleUpdated); + + if (isset($coupons)) { + $coupons['cart_rule_id'] = $ruleUpdated->id; + $coupons['usage_per_customer'] = $data['per_customer']; //0 is for unlimited usage + + $couponUpdated = $ruleUpdated->coupons->update($coupons); + } + + if ($ruleUpdated && $ruleChannelUpdated) { + if (isset($couponUpdated) && $couponUpdated) { + session()->flash('info', trans('admin::app.promotion.status.success-coupon')); + } + + session()->flash('info', trans('admin::app.promotion.status.update-success')); + } else { + session()->flash('info', trans('admin::app.promotion.status.update-success')); + + return redirect()->back(); + } + + return redirect()->route($this->_config['redirect']); + } + + public function destroy($id) + { + $cartRule = $this->cartRule->findOrFail($id); + + if ($cartRule->delete()) { + session()->flash('success', trans('admin::app.promotion.status.delete-success')); + + return response()->json(['message' => true], 200); + } else { + session()->flash('success', trans('admin::app.promotion.status.delete-failed')); + + return response()->json(['message' => false], 400); + } + } + + public function getStatesAndCountries() + { + $countries = core()->countries()->toArray(); + $states = core()->groupedStatesByCountries(); + + return [ + 'countries' => $countries, + 'states' => $states + ]; + } + + public function fetchOptionableAttributes() + { + $attributesWithOptions = array(); + + foreach($this->attribute->all() as $attribute) { + if (($attribute->type == 'select' || $attribute->type == 'multiselect') && $attribute->code != 'tax_category_id') { + $attributesWithOptions[$attribute->admin_name] = $attribute->options->toArray(); + } + } + + return $attributesWithOptions; + } +} diff --git a/packages/Webkul/Discount/src/Http/Controllers/CatalogRuleController.php b/packages/Webkul/Discount/src/Http/Controllers/CatalogRuleController.php new file mode 100644 index 000000000..b218bfe19 --- /dev/null +++ b/packages/Webkul/Discount/src/Http/Controllers/CatalogRuleController.php @@ -0,0 +1,307 @@ + @prashant-webkul + * @copyright 2018 Webkul Software Pvt Ltd (http://www.webkul.com) + */ +class CatalogRuleController extends Controller +{ + /** + * Initialize _config, a default request parameter with route + */ + protected $_config; + + /** + * Attribute $attribute + */ + protected $attribute; + + /** + * AttributeFamily $attributeFamily + */ + protected $attributeFamily; + + /** + * Category $category + */ + protected $category; + + /** + * Product $product + */ + protected $product; + + /** + * Property for catalog rule application + */ + protected $appliedConfig; + + /** + * Property for catalog rule application + */ + protected $appliedConditions; + + /** + * Property to hold Catalog Rule Channels Repository + */ + protected $catalogRuleChannels; + + /** + * Property to hold Catalog Rule Customer Groups Repository + */ + protected $catalogRuleCustomerGroups; + + /** + * To hold the catalog repository instance + */ + protected $catalogRule; + + /** + * Find products using conditions helper instance + */ + protected $findProducts; + + public function __construct(Attribute $attribute, AttributeFamily $attributeFamily, Category $category, Product $product, CatalogRule $catalogRule, CatalogRuleChannels $catalogRuleChannels, CatalogRuleCustomerGroups $catalogRuleCustomerGroups, FindProducts $findProducts) + { + $this->_config = request('_config'); + $this->attribute = $attribute; + $this->attributeFamily = $attributeFamily; + $this->category = $category; + $this->product = $product; + $this->catalogRule = $catalogRule; + $this->catalogRuleChannels = $catalogRuleChannels; + $this->catalogRuleCustomerGroups = $catalogRuleCustomerGroups; + $this->appliedConfig = config('pricerules.catalog'); + $this->appliedConditions = config('pricerules.conditions'); + $this->findProducts = $findProducts; + } + + public function index() + { + return view($this->_config['view']); + } + + public function create() + { + return view($this->_config['view'])->with('catalog_rule', [$this->attribute->getPartial(), $this->category->getPartial(), $this->fetchOptionableAttributes(), $this->appliedConfig, $this->appliedConditions, $this->attributeFamily->getPartial()]); + } + + public function store() + { + $this->validate(request(), [ + 'name' => 'required|string', + 'description' => 'string', + 'customer_groups' => 'required', + 'channels' => 'required', + 'starts_from' => 'required|date', + 'ends_till' => 'required|date', + 'status' => 'required|boolean', + 'end_other_rules' => 'required|boolean', + 'priority' => 'required|numeric', + 'criteria' => 'required', + 'all_conditions' => 'required|array', + 'apply' => 'required|numeric|min:0|max:3', + 'disc_amount' => 'sometimes', + 'disc_percent' => 'sometimes', + ]); + + $catalog_rule = request()->all(); + + $catalog_rule_channels = array(); + $catalog_rule_customer_groups = array(); + + $catalog_rule_channels = $catalog_rule['channels']; + $catalog_rule_customer_groups = $catalog_rule['customer_groups']; + unset($catalog_rule['channels']); unset($catalog_rule['customer_groups']); + + unset($catalog_rule['criteria']); + + $catalog_rule['conditions'] = $catalog_rule['all_conditions']; + unset($catalog_rule['all_conditions']); + + if (isset($catalog_rule['disc_amount'])) { + $catalog_rule['action_type'] = $catalog_rule['apply']; + $catalog_rule['actions'] = [ + 'action_type' => $catalog_rule['apply'], + 'disc_amount' => $catalog_rule['disc_amount'] + ]; + } else if (isset($catalog_rule['disc_percent'])) { + $catalog_rule['action_type'] = $catalog_rule['apply']; + $catalog_rule['actions'] = [ + 'action_type' => $catalog_rule['apply'], + 'disc_percent' => $catalog_rule['disc_percent'], + ]; + } + + unset($catalog_rule['apply']); + unset($catalog_rule['attributes']); + unset($catalog_rule['_token']); + unset($catalog_rule['all_actions']); + + $catalog_rule['actions'] = json_encode($catalog_rule['actions']); + $catalog_rule['conditions'] = json_encode($catalog_rule['conditions']); + + $catalogRule = $this->catalogRule->create($catalog_rule); + + foreach($catalog_rule_channels as $catalog_rule_channel) { + $data['catalog_rule_id'] = $catalogRule->id; + $data['channel_id'] = $catalog_rule_channel; + + $catalogRuleChannels = $this->catalogRuleChannels->create($data); + } + + unset($data); + foreach ($catalog_rule_customer_groups as $catalog_rule_customer_group) { + $data['catalog_rule_id'] = $catalogRule->id; + $data['customer_group_id'] = $catalog_rule_customer_group; + + $catalogRuleCustomerGroups = $this->catalogRuleCustomerGroups->create($data); + } + + if($catalogRule && $catalogRuleChannels && $catalogRuleCustomerGroups) { + session()->flash('success', trans('admin::app.promotion.status.success')); + + return redirect()->route('admin.catalog-rule.index'); + } else { + session()->flash('error', trans('admin::app.promotion.status.failed')); + + return redirect()->back(); + } + } + + public function edit($id) + { + $catalog_rule = $this->catalogRule->find($id); + $catalog_rule_channels = $this->catalogRuleChannels->findByField('catalog_rule_id', $id); + $catalog_rule_customer_groups = $this->catalogRuleCustomerGroups->findByField('catalog_rule_id', $id); + + return view($this->_config['view'])->with('catalog_rule', [$this->attribute->getPartial(), $this->category->getPartial(), $this->fetchOptionableAttributes(), $this->appliedConfig, $this->appliedConditions, $catalog_rule, $catalog_rule_channels, $catalog_rule_customer_groups, $this->attributeFamily->getPartial()]); + } + + public function update($id) + { + $this->validate(request(), [ + 'name' => 'required|string', + 'description' => 'string', + 'customer_groups' => 'required', + 'channels' => 'required', + 'starts_from' => 'required|date', + 'ends_till' => 'required|date', + 'status' => 'required|boolean', + 'end_other_rules' => 'required|boolean', + 'priority' => 'required|numeric', + 'criteria' => 'required', + 'all_conditions' => 'required|array', + 'apply' => 'required|numeric|min:0|max:3', + 'disc_amount' => 'sometimes', + 'disc_percent' => 'sometimes', + ]); + + $catalog_rule = request()->all(); + + $catalog_rule_channels = array(); + $catalog_rule_customer_groups = array(); + + $catalog_rule_channels = $catalog_rule['channels']; + $catalog_rule_customer_groups = $catalog_rule['customer_groups']; + unset($catalog_rule['channels']); unset($catalog_rule['customer_groups']); + + unset($catalog_rule['criteria']); + + $catalog_rule['conditions'] = $catalog_rule['all_conditions']; + unset($catalog_rule['all_conditions']); + + if (isset($catalog_rule['disc_amount'])) { + $catalog_rule['action_type'] = $catalog_rule['apply']; + $catalog_rule['actions'] = [ + 'action_type' => $catalog_rule['apply'], + 'disc_amount' => $catalog_rule['disc_amount'] + ]; + } else if (isset($catalog_rule['disc_percent'])) { + $catalog_rule['action_type'] = $catalog_rule['apply']; + $catalog_rule['actions'] = [ + 'action_type' => $catalog_rule['apply'], + 'disc_percent' => $catalog_rule['disc_percent'], + ]; + } + + unset($catalog_rule['apply']); + unset($catalog_rule['attributes']); + unset($catalog_rule['_token']); + unset($catalog_rule['all_actions']); + + $catalog_rule['actions'] = json_encode($catalog_rule['actions']); + $catalog_rule['conditions'] = json_encode($catalog_rule['conditions']); + + $catalogRule = $this->catalogRule->update($catalog_rule, $id); + + $catalogRuleChannels = $this->catalogRule->ChannelSync($catalog_rule_channels, $catalogRule); + $catalogRuleCustomerGroups = $this->catalogRule->CustomerGroupSync($catalog_rule_customer_groups, $catalogRule); + + if($catalogRule && $catalogRuleChannels && $catalogRuleCustomerGroups) { + session()->flash('info', trans('admin::app.promotion.status.update-success')); + + return redirect()->route($this->_config['redirect']); + } else { + session()->flash('error', trans('admin::app.promotion.status.update-failed')); + + return redirect()->back(); + } + } + + public function applyRules() + { + $catalogRules = $this->catalogRule->all(); + $decoded = json_decode($catalogRules->first()->conditions); + $conditions = json_decode($decoded[0]); + $optionableAttributes = $this->fetchOptionableAttributes(); + + $results = $this->findProducts->findByConditions($conditions); + + dd($results); + } + + public function fetchOptionableAttributes() + { + $attributesWithOptions = array(); + + foreach($this->attribute->all() as $attribute) { + if (($attribute->type == 'select' || $attribute->type == 'multiselect') && $attribute->code != 'tax_category_id') { + $attributesWithOptions[$attribute->code] = $attribute->options->toArray(); + } + } + + return $attributesWithOptions; + } + + public function destroy($id) + { + $catalogRule = $this->catalogRule->findOrFail($id); + + if ($catalogRule->delete()) { + session()->flash('success', trans('admin::app.promotion.delete-success')); + + return response()->json(['message' => true], 200); + } else { + session()->flash('success', trans('admin::app.promotion.delete-failed')); + + return response()->json(['message' => false], 400); + } + } +} \ No newline at end of file diff --git a/packages/Webkul/Discount/src/Http/Controllers/Controller.php b/packages/Webkul/Discount/src/Http/Controllers/Controller.php new file mode 100644 index 000000000..dc4b61e7c --- /dev/null +++ b/packages/Webkul/Discount/src/Http/Controllers/Controller.php @@ -0,0 +1,13 @@ +hasMany(CartRuleChannels::modelClass()); + } + + public function customer_groups() + { + return $this->hasMany(CartRuleCustomerGroups::modelClass()); + } + + public function coupons() + { + return $this->hasOne(CartRuleCoupons::modelClass()); + } + + public function labels() + { + return $this->hasMany(CartRuleLabels::modelClass()); + } +} \ No newline at end of file diff --git a/packages/Webkul/Discount/src/Models/CartRuleCart.php b/packages/Webkul/Discount/src/Models/CartRuleCart.php new file mode 100644 index 000000000..66d2b503c --- /dev/null +++ b/packages/Webkul/Discount/src/Models/CartRuleCart.php @@ -0,0 +1,22 @@ +hasOne(CartRule::modelClass(), 'id', 'cart_rule_id'); + } +} \ No newline at end of file diff --git a/packages/Webkul/Discount/src/Models/CartRuleCartProxy.php b/packages/Webkul/Discount/src/Models/CartRuleCartProxy.php new file mode 100644 index 000000000..98245e4d8 --- /dev/null +++ b/packages/Webkul/Discount/src/Models/CartRuleCartProxy.php @@ -0,0 +1,10 @@ +belongsTo(CartRule::modelClass(), 'cart_rule_id'); + } + + public function coupons_usage() + { + return $this->hasOne(CartRuleCouponsUsage::modelClass()); + } +} \ No newline at end of file diff --git a/packages/Webkul/Discount/src/Models/CartRuleCouponsProxy.php b/packages/Webkul/Discount/src/Models/CartRuleCouponsProxy.php new file mode 100644 index 000000000..8f2fb7f23 --- /dev/null +++ b/packages/Webkul/Discount/src/Models/CartRuleCouponsProxy.php @@ -0,0 +1,10 @@ +belongsTo(CartRule::modelClass(), 'cart_rule_id'); + } +} \ No newline at end of file diff --git a/packages/Webkul/Discount/src/Models/CartRuleCustomersProxy.php b/packages/Webkul/Discount/src/Models/CartRuleCustomersProxy.php new file mode 100644 index 000000000..fed8df2c8 --- /dev/null +++ b/packages/Webkul/Discount/src/Models/CartRuleCustomersProxy.php @@ -0,0 +1,10 @@ +belongsTo(CartRule::modelClass(), 'cart_rule_id'); + } + + public function locale() + { + return $this->hasOne(Locale::modelClass(), 'id', 'locale_id'); + } + + public function channel() + { + return $this->hasOne(Channel::modelClass(), 'id', 'channel_id'); + } +} \ No newline at end of file diff --git a/packages/Webkul/Discount/src/Models/CartRuleProxy.php b/packages/Webkul/Discount/src/Models/CartRuleProxy.php new file mode 100644 index 000000000..4f66578b3 --- /dev/null +++ b/packages/Webkul/Discount/src/Models/CartRuleProxy.php @@ -0,0 +1,10 @@ +hasMany(CatalogRuleChannels::modelClass()); + } + + public function customer_groups() + { + return $this->hasMany(CatalogRuleCustomerGroups::modelClass()); + } +} \ No newline at end of file diff --git a/packages/Webkul/Discount/src/Models/CatalogRuleChannels.php b/packages/Webkul/Discount/src/Models/CatalogRuleChannels.php new file mode 100644 index 000000000..d31ebf9de --- /dev/null +++ b/packages/Webkul/Discount/src/Models/CatalogRuleChannels.php @@ -0,0 +1,19 @@ +belongsTo(CatalogRule::modelClass(), 'catalog_rule_id'); + } +} \ No newline at end of file diff --git a/packages/Webkul/Discount/src/Models/CatalogRuleChannelsProxy.php b/packages/Webkul/Discount/src/Models/CatalogRuleChannelsProxy.php new file mode 100644 index 000000000..c723f5482 --- /dev/null +++ b/packages/Webkul/Discount/src/Models/CatalogRuleChannelsProxy.php @@ -0,0 +1,10 @@ +belongsTo(CatalogRule::modelClass(), 'catalog_rule_id'); + } +} \ No newline at end of file diff --git a/packages/Webkul/Discount/src/Models/CatalogRuleCustomerGroupsProxy.php b/packages/Webkul/Discount/src/Models/CatalogRuleCustomerGroupsProxy.php new file mode 100644 index 000000000..12de4951a --- /dev/null +++ b/packages/Webkul/Discount/src/Models/CatalogRuleCustomerGroupsProxy.php @@ -0,0 +1,10 @@ +loadMigrationsFrom(__DIR__ . '/../Database/Migrations'); + } + + /** + * Register services. + * + * @return void + */ + public function register() + { + $this->registerConfig(); + } + + /** + * To merge the price rule configuration in price rule configuration + */ + protected function registerConfig() + { + $this->mergeConfigFrom( + dirname(__DIR__) . '/Config/rule-conditions.php', 'pricerules' + ); + } +} \ No newline at end of file diff --git a/packages/Webkul/Discount/src/Providers/ModuleServiceProvider.php b/packages/Webkul/Discount/src/Providers/ModuleServiceProvider.php new file mode 100644 index 000000000..f654e68fa --- /dev/null +++ b/packages/Webkul/Discount/src/Providers/ModuleServiceProvider.php @@ -0,0 +1,23 @@ + + * @copyright 2018 Webkul Software Pvt Ltd (http://www.webkul.com) + */ +class CartRuleCartRepository extends Repository +{ + /** + * Specify Model class name + * + * @return mixed + */ + function model() + { + return 'Webkul\Discount\Contracts\CartRuleCart'; + } +} \ No newline at end of file diff --git a/packages/Webkul/Discount/src/Repositories/CartRuleChannelsRepository.php b/packages/Webkul/Discount/src/Repositories/CartRuleChannelsRepository.php new file mode 100644 index 000000000..fe8680e40 --- /dev/null +++ b/packages/Webkul/Discount/src/Repositories/CartRuleChannelsRepository.php @@ -0,0 +1,24 @@ + + * @copyright 2018 Webkul Software Pvt Ltd (http://www.webkul.com) + */ +class CartRuleChannelsRepository extends Repository +{ + /** + * Specify Model class name + * + * @return mixed + */ + function model() + { + return 'Webkul\Discount\Contracts\CartRuleChannels'; + } +} diff --git a/packages/Webkul/Discount/src/Repositories/CartRuleCouponsRepository.php b/packages/Webkul/Discount/src/Repositories/CartRuleCouponsRepository.php new file mode 100644 index 000000000..6db964d5b --- /dev/null +++ b/packages/Webkul/Discount/src/Repositories/CartRuleCouponsRepository.php @@ -0,0 +1,18 @@ + + * @copyright 2018 Webkul Software Pvt Ltd (http://www.webkul.com) + */ +class CartRuleCustomerGroupsRepository extends Repository +{ + /** + * Specify Model class name + * + * @return mixed + */ + function model() + { + return 'Webkul\Discount\Contracts\CartRuleCustomerGroups'; + } +} diff --git a/packages/Webkul/Discount/src/Repositories/CartRuleLabelsRepository.php b/packages/Webkul/Discount/src/Repositories/CartRuleLabelsRepository.php new file mode 100644 index 000000000..ba5ba2aaa --- /dev/null +++ b/packages/Webkul/Discount/src/Repositories/CartRuleLabelsRepository.php @@ -0,0 +1,18 @@ + + * @copyright 2018 Webkul Software Pvt Ltd (http://www.webkul.com) + */ +class CartRuleRepository extends Repository +{ + protected $cartRuleChannels; + + protected $cartRuleCustomerGroups; + + protected $cartRuleCoupons; + + protected $cartRuleLabels; + + /** + * + */ + public function __construct(CartRuleChannels $cartRuleChannels, CartRuleCustomerGroups $cartRuleCustomerGroups, CartRuleCoupons $cartRuleCoupons, CartRuleLabels $cartRuleLabels, App $app) + { + $this->cartRuleChannels = $cartRuleChannels; + $this->cartRuleCustomerGroups = $cartRuleCustomerGroups; + $this->cartRuleCoupons = $cartRuleCoupons; + $this->cartRuleLabel = $cartRuleLabels; + + parent::__construct($app); + } + + /** + * Specify Model class name + * + * @return mixed + */ + function model() + { + return 'Webkul\Discount\Contracts\CartRule'; + } + + /** + * To sync the customer groups related records + */ + public function CustomerGroupSync($newCustomerGroups, $cartRule) + { + $oldCustomerGroups = array(); + foreach ($cartRule->customer_groups as $oldCustomerGroup) { + array_push($oldCustomerGroups, ['id' => $oldCustomerGroup->id, 'customer_group_id' => $oldCustomerGroup->customer_group_id]); + } + + foreach ($oldCustomerGroups as $key => $oldCustomerGroup) { + $found = 0; + foreach ($newCustomerGroups as $newCustomerGroup) { + if ($oldCustomerGroup['customer_group_id'] == $newCustomerGroup) { + $found = 1; + } + } + + if ($found == 0) { + $this->cartRuleCustomerGroups->find($oldCustomerGroup['id'])->delete(); + } else { + $found = 0; + } + } + + //unset the commons + if (count($newCustomerGroups) && count($oldCustomerGroups)) { + foreach ($oldCustomerGroups as $oldCustomerGroup) { + $found = 0; + foreach ($newCustomerGroups as $key => $newCustomerGroup) { + if ($oldCustomerGroup['customer_group_id'] == $newCustomerGroup) { + unset($newCustomerGroups[$key]); + } + } + } + } + + //create the left ones + foreach ($newCustomerGroups as $newCustomerGroup) { + $data['customer_group_id'] = $newCustomerGroup; + $data['cart_rule_id'] = $cartRule->id; + + $this->cartRuleCustomerGroups->create($data); + } + + return true; + } + + /** + * To sync the channels related records + */ + public function ChannelSync($newChannels, $cartRule) + { + $oldChannels = array(); + foreach ($cartRule->channels as $oldChannel) { + array_push($oldChannels, ['id' => $oldChannel->id, 'channel_id' => $oldChannel->channel_id]); + } + + foreach ($oldChannels as $key => $oldChannel) { + $found = 0; + foreach ($newChannels as $newChannel) { + if ($oldChannel['channel_id'] == $newChannel) { + $found = 1; + } + } + + if ($found == 0) { + $this->cartRuleChannels->find($oldChannel['id'])->delete(); + } else { + $found = 0; + } + } + + //unset the commons + if (count($newChannels) && count($oldChannels)) { + foreach ($oldChannels as $oldChannel) { + $found = 0; + foreach ($newChannels as $key => $newChannel) { + if ($oldChannel['channel_id'] == $newChannel) { + unset($newChannels[$key]); + } + } + } + } + + //create the left ones + foreach ($newChannels as $newChannel) { + $data['channel_id'] = $newChannel; + $data['cart_rule_id'] = $cartRule->id; + $this->cartRuleChannels->create($data); + } + + return true; + } + + /** + * To sync the labels associated with the cart rule + */ + public function LabelSync($labels, $cartRule) + { + foreach ($labels as $channelCode => $value) { + $localeCode = array_keys($value)[0]; + $localeValue = array_values($value)[0]; + + $updated = 0; + foreach ($cartRule->labels as $label) { + if ($label->channel->code == $channelCode && $label->locale->code == $localeCode) { + $label->update([ + 'label' => $localeValue + ]); + + $updated = 1; + } + } + + if ($updated == 0) { + foreach (core()->getAllChannels() as $channel) { + if ($channel->code == $channelCode) { + $newLabel['channel_id'] = $channel->id; + } + + foreach($channel->locales as $locale) { + if ($localeCode == $locale->code) { + $newLabel['locale_id'] = $locale->id; + $newLabel['label'] = $localeValue; + $newLabel['cart_rule_id'] = $cartRule->id; + + $ruleLabelCreated = $this->CartRuleLabels->create($newLabel); + } + } + } + } + + $updated = 0; + } + + return true; + } + + /** + * To sync the coupons associated with the cart rule + */ + public function CouponSync($coupon, $cartRule) + { + + } +} \ No newline at end of file diff --git a/packages/Webkul/Discount/src/Repositories/CatalogRuleChannelsRepository.php b/packages/Webkul/Discount/src/Repositories/CatalogRuleChannelsRepository.php new file mode 100644 index 000000000..dbdf996ec --- /dev/null +++ b/packages/Webkul/Discount/src/Repositories/CatalogRuleChannelsRepository.php @@ -0,0 +1,24 @@ + + * @copyright 2018 Webkul Software Pvt Ltd (http://www.webkul.com) + */ +class CatalogRuleChannelsRepository extends Repository +{ + /** + * Specify Model class name + * + * @return mixed + */ + function model() + { + return 'Webkul\Discount\Contracts\CatalogRuleChannels'; + } +} diff --git a/packages/Webkul/Discount/src/Repositories/CatalogRuleCustomerGroupsRepository.php b/packages/Webkul/Discount/src/Repositories/CatalogRuleCustomerGroupsRepository.php new file mode 100644 index 000000000..76323d394 --- /dev/null +++ b/packages/Webkul/Discount/src/Repositories/CatalogRuleCustomerGroupsRepository.php @@ -0,0 +1,24 @@ + + * @copyright 2018 Webkul Software Pvt Ltd (http://www.webkul.com) + */ +class CatalogRuleCustomerGroupsRepository extends Repository +{ + /** + * Specify Model class name + * + * @return mixed + */ + function model() + { + return 'Webkul\Discount\Contracts\CatalogRuleCustomerGroups'; + } +} \ No newline at end of file diff --git a/packages/Webkul/Discount/src/Repositories/CatalogRuleProducts.php b/packages/Webkul/Discount/src/Repositories/CatalogRuleProducts.php new file mode 100644 index 000000000..142179ddc --- /dev/null +++ b/packages/Webkul/Discount/src/Repositories/CatalogRuleProducts.php @@ -0,0 +1,24 @@ + + * @copyright 2018 Webkul Software Pvt Ltd (http://www.webkul.com) + */ +class CatalogRuleProductsRepository extends Repository +{ + /** + * Specify Model class name + * + * @return mixed + */ + function model() + { + return 'Webkul\Discount\Contracts\CatalogRuleProducts'; + } +} diff --git a/packages/Webkul/Discount/src/Repositories/CatalogRuleProductsPrice.php b/packages/Webkul/Discount/src/Repositories/CatalogRuleProductsPrice.php new file mode 100644 index 000000000..f330516dc --- /dev/null +++ b/packages/Webkul/Discount/src/Repositories/CatalogRuleProductsPrice.php @@ -0,0 +1,24 @@ + + * @copyright 2018 Webkul Software Pvt Ltd (http://www.webkul.com) + */ +class CatalogRuleProductsPriceRepository extends Repository +{ + /** + * Specify Model class name + * + * @return mixed + */ + function model() + { + return 'Webkul\Discount\Contracts\CatalogRuleProductsPrice'; + } +} \ No newline at end of file diff --git a/packages/Webkul/Discount/src/Repositories/CatalogRuleRepository.php b/packages/Webkul/Discount/src/Repositories/CatalogRuleRepository.php new file mode 100644 index 000000000..d70f9ff75 --- /dev/null +++ b/packages/Webkul/Discount/src/Repositories/CatalogRuleRepository.php @@ -0,0 +1,137 @@ + + * @copyright 2018 Webkul Software Pvt Ltd (http://www.webkul.com) + */ +class CatalogRuleRepository extends Repository +{ + protected $catalogRuleChannels; + + protected $catalogRuleCustomerGroups; + + /** + * + */ + public function __construct(CatalogRuleChannels $catalogRuleChannels, CatalogRuleCustomerGroups $catalogRuleCustomerGroups, App $app) + { + $this->catalogRuleChannels = $catalogRuleChannels; + $this->catalogRuleCustomerGroups = $catalogRuleCustomerGroups; + + parent::__construct($app); + } + + /** + * Specify Model class name + * + * @return mixed + */ + function model() + { + return 'Webkul\Discount\Contracts\CatalogRule'; + } + + /** + * To sync the customer groups related records + */ + public function CustomerGroupSync($newCustomerGroups, $catalogRule) + { + $oldCustomerGroups = array(); + foreach ($catalogRule->customer_groups as $oldCustomerGroup) { + array_push($oldCustomerGroups, ['id' => $oldCustomerGroup->id, 'customer_group_id' => $oldCustomerGroup->customer_group_id]); + } + + foreach ($oldCustomerGroups as $key => $oldCustomerGroup) { + $found = 0; + foreach($newCustomerGroups as $newCustomerGroup) { + if ($oldCustomerGroup['customer_group_id'] == $newCustomerGroup) { + $found = 1; + } + } + + if ($found == 0) { + $this->catalogRuleCustomerGroups->find($oldCustomerGroup['id'])->delete(); + } else { + $found = 0; + } + } + + //unset the commons + if (count($newCustomerGroups) && count($oldCustomerGroups)) { + foreach ($oldCustomerGroups as $oldCustomerGroup) { + $found = 0; + foreach ($newCustomerGroups as $key => $newCustomerGroup) { + if ($oldCustomerGroup['customer_group_id'] == $newCustomerGroup) { + unset($newCustomerGroups[$key]); + } + } + } + } + + //create the left ones + foreach ($newCustomerGroups as $newCustomerGroup) { + $data['customer_group_id'] = $newCustomerGroup; + $data['catalog_rule_id'] = $catalogRule->id; + + $this->catalogRuleCustomerGroups->create($data); + } + + return true; + } + + /** + * To sync the channels related records + */ + public function ChannelSync($newChannels, $catalogRule) + { + $oldChannels = array(); + foreach ($catalogRule->channels as $oldChannel) { + array_push($oldChannels, ['id' => $oldChannel->id, 'channel_id' => $oldChannel->channel_id]); + } + + foreach ($oldChannels as $key => $oldChannel) { + $found = 0; + foreach($newChannels as $newChannel) { + if ($oldChannel['channel_id'] == $newChannel) { + $found = 1; + } + } + + if ($found == 0) { + $this->catalogRuleChannels->find($oldChannel['id'])->delete(); + } else { + $found = 0; + } + } + + //unset the commons + if (count($newChannels) && count($oldChannels)) { + foreach ($oldChannels as $oldChannel) { + $found = 0; + foreach ($newChannels as $key => $newChannel) { + if ($oldChannel['channel_id'] == $newChannel) { + unset($newChannels[$key]); + } + } + } + } + + //create the left ones + foreach ($newChannels as $newChannel) { + $data['channel_id'] = $newChannel; + $data['catalog_rule_id'] = $catalogRule->id; + $this->catalogRuleChannels->create($data); + } + + return true; + } +} \ No newline at end of file diff --git a/packages/Webkul/Product/src/Contracts/ProductGrid.php b/packages/Webkul/Product/src/Contracts/ProductGrid.php deleted file mode 100644 index 7d4848d6c..000000000 --- a/packages/Webkul/Product/src/Contracts/ProductGrid.php +++ /dev/null @@ -1,7 +0,0 @@ -increments('id'); - $table->integer('product_id')->unsigned(); - $table->foreign('product_id')->references('id')->on('products')->onDelete('cascade'); - $table->string('attribute_family_name')->nullable(); - $table->string('sku')->nullable(); - $table->string('type')->nullable(); - $table->string('name')->nullable(); - $table->string('quantity')->default(0); - $table->string('cost')->default(0); - $table->string('price')->nullable(); - $table->string('status')->nullable(); - }); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::dropIfExists('products_grid'); - } -} diff --git a/packages/Webkul/Product/src/Database/Migrations/2018_11_27_113535_remove_cost_column_from_datagrid.php b/packages/Webkul/Product/src/Database/Migrations/2018_11_27_113535_remove_cost_column_from_datagrid.php deleted file mode 100755 index 7bc776467..000000000 --- a/packages/Webkul/Product/src/Database/Migrations/2018_11_27_113535_remove_cost_column_from_datagrid.php +++ /dev/null @@ -1,32 +0,0 @@ -dropColumn('cost'); - }); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::table('products_grid', function (Blueprint $table) { - $table->string('cost')->nullable(); - }); - } -} diff --git a/packages/Webkul/Product/src/Http/Requests/ProductForm.php b/packages/Webkul/Product/src/Http/Requests/ProductForm.php index 06fcb610b..be0ba0d4d 100755 --- a/packages/Webkul/Product/src/Http/Requests/ProductForm.php +++ b/packages/Webkul/Product/src/Http/Requests/ProductForm.php @@ -104,11 +104,15 @@ class ProductForm extends FormRequest } if ($attribute->type == 'text' && $attribute->validation) { - array_push($validations, $attribute->validation); + if ($attribute->validation == 'decimal') { + array_push($validations, new \Webkul\Core\Contracts\Validations\Decimal); + } else { + array_push($validations, $attribute->validation); + } } if ($attribute->type == 'price') { - array_push($validations, 'decimal'); + array_push($validations, new \Webkul\Core\Contracts\Validations\Decimal); } if ($attribute->is_unique) { diff --git a/packages/Webkul/Product/src/Models/ProductGrid.php b/packages/Webkul/Product/src/Models/ProductGrid.php deleted file mode 100755 index a2e015d7a..000000000 --- a/packages/Webkul/Product/src/Models/ProductGrid.php +++ /dev/null @@ -1,20 +0,0 @@ -belongsTo(ProductProxy::modelClass(), 'product_id'); - } -} \ No newline at end of file diff --git a/packages/Webkul/Product/src/Models/ProductGridProxy.php b/packages/Webkul/Product/src/Models/ProductGridProxy.php deleted file mode 100644 index e80da1675..000000000 --- a/packages/Webkul/Product/src/Models/ProductGridProxy.php +++ /dev/null @@ -1,10 +0,0 @@ - 'Free Shipping', 'description' => 'This is a free shipping', 'active' => true, + 'default_rate' => '0', 'class' => 'Webkul\Shipping\Carriers\Free', ] ]; \ No newline at end of file diff --git a/packages/Webkul/Shop/publishable/assets/css/shop.css b/packages/Webkul/Shop/publishable/assets/css/shop.css index a74033e95..4f71e11da 100755 --- a/packages/Webkul/Shop/publishable/assets/css/shop.css +++ b/packages/Webkul/Shop/publishable/assets/css/shop.css @@ -1 +1 @@ -@import url(https://fonts.googleapis.com/css?family=Montserrat:400,500);.icon{display:inline-block;background-size:cover}.dropdown-right-icon{background-image:URL("../images/icon-dropdown-left.svg");width:8px;height:8px;margin-left:auto;margin-bottom:2px}.icon-menu-close{background-image:URL("../images/icon-menu-close.svg");width:24px;height:24px;margin-left:auto}.icon-menu-close-adj{background-image:URL("../images/cross-icon-adj.svg");margin-left:auto}.grid-view-icon{background-image:URL("../images/icon-grid-view.svg");width:24px;height:24px}.list-view-icon{background-image:URL("../images/icon-list-view.svg");width:24px;height:24px}.sort-icon{background-image:URL("../images/icon-sort.svg");width:32px;height:32px}.filter-icon{background-image:URL("../images/icon-filter.svg");width:32px;height:32px}.whishlist-icon{background-image:URL("../images/wishlist.svg");width:24px;height:24px}.share-icon{background-image:URL("../images/icon-share.svg");width:24px;height:24px}.icon-menu{background-image:URL("../images/icon-menu.svg");width:24px;height:24px}.icon-search{background-image:URL("../images/icon-search.svg");width:24px;height:24px}.icon-menu-back{background-image:URL("../images/icon-menu-back.svg");width:24px;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}.cart-icon{background-image:url("../images/icon-cart.svg");width:24px;height:24px}.wishlist-icon{background-image:url("../images/wishlist.svg");width:32px;height:32px}.icon-arrow-up{background-image:url("../images/arrow-up.svg");width:16px;height:16px}.icon-arrow-down{background-image:url("../images/arrow-down.svg");width:16px;height:16px}.expand-icon{background-image:url("../images/Expand-Light.svg");width:18px;height:18px}.expand-on-icon{background-image:url("../images/Expand-Light-On.svg");width:18px;height:18px}.icon-menu-close-adj{background-image:url("../images/cross-icon-adj.svg");width:32px;height:32px}.icon-facebook{background-image:url("../images/facebook.svg")}.icon-twitter{background-image:url("../images/twitter.svg")}.icon-google-plus{background-image:url("../images/google-plus.svg")}.icon-instagram{background-image:url("../images/instagram.svg")}.icon-linkedin{background-image:url("../images/linkedin.svg")}.icon-dropdown{background-image:url("../images/icon-dropdown.svg")}@-webkit-keyframes spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}@keyframes spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}body{margin:0;padding:0;font-weight:500;max-width:100%;width:auto;color:#242424;font-size:16px}*{font-family:Montserrat,sans-serif}::-webkit-input-placeholder{font-family:Montserrat,sans-serif}textarea{resize:none}input{font-family:Montserrat,sans-serif}.btn{border-radius:0!important}.mb-10{margin-bottom:10px}.mb-15{margin-bottom:15px}.mb-20{margin-bottom:20px}.mb-25{margin-bottom:25px}.mb-30{margin-bottom:30px}.mb-35{margin-bottom:35px}.mb-40{margin-bottom:40px}.mb-45{margin-bottom:45px}.mb-50{margin-bottom:50px}.mb-60{margin-bottom:60px}.mb-70{margin-bottom:70px}.mb-80{margin-bottom:80px}.mb-90{margin-bottom:90px}.mt-5{margin-top:5px}.mt-10{margin-top:10px}.mt-15{margin-top:15px}.mt-20{margin-top:20px}.mt-25{margin-top:25px}.mt-30{margin-top:30px}.mt-35{margin-top:35px}.mt-40{margin-top:40px}.mt-45{margin-top:45px}.mt-50{margin-top:50px}.mt-60{margin-top:60px}.mt-70{margin-top:70px}.mt-80{margin-top:80px}.mt-90{margin-top:90px}.pagination.shop{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-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.bold{font-weight:700;color:#3a3a3a}.radio-container{display:block;position:relative;padding-left:35px;margin-bottom:12px;cursor:pointer;font-size:16px;user-select:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none}.radio-container input{position:absolute;opacity:0;cursor:pointer;top:0;left:0}.radio-container .checkmark{position:absolute;top:0;left:0;height:16px;width:16px;background-color:#fff;border:2px solid #ff6472;border-radius:50%}.radio-container .checkmark:after{content:"";position:absolute;display:none;top:2px;left:2px;width:8px;height:8px;border-radius:50%;background:#ff6472}.radio-container input:checked~.checkmark:after{display:block}.radio-container input:disabled~.checkmark{display:block;border:2px solid rgba(255,100,113,.4)}.cp-spinner{width:48px;height:48px;display:inline-block;-webkit-box-sizing:border-box;box-sizing:border-box}.cp-round:before{border-radius:50%;border:6px solid #bababa}.cp-round:after,.cp-round:before{content:" ";width:48px;height:48px;display:inline-block;-webkit-box-sizing:border-box;box-sizing:border-box;position:absolute;top:0;left:0}.cp-round:after{border-radius:50%;border-top:6px solid #0031f0;border-right:6px solid transparent;border-bottom:6px solid transparent;border-left:6px solid transparent;-webkit-animation:spin 1s ease-in-out infinite;animation:spin 1s ease-in-out infinite}.pull-right{float:right}.add-to-wishlist .wishlist-icon:hover{background-image:url("../images/wishlist-added.svg")}.product-price{margin-bottom:14px;width:100%;font-weight:600}.product-price .price-label{font-size:14px;font-weight:400}.product-price .regular-price{color:#a5a5a5;text-decoration:line-through;margin-right:10px}.product-price .special-price{color:#ff6472}.horizontal-rule{display:block;width:100%;height:1px;background:#c7c7c7}.account-head .account-heading{font-size:28px;color:#242424;text-transform:capitalize;text-align:left}.account-head .account-action{font-size:17px;margin-top:1%;color:#0031f0;float:right}.account-head .horizontal-rule{margin-top:1.1%;width:100%;height:1px;vertical-align:middle;background:#c7c7c7}.account-item-card{-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;-webkit-box-align:center;-ms-flex-align:center;align-items:center;width:100%;height:125px}.account-item-card,.account-item-card .media-info{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row}.account-item-card .media-info .media{height:125px;width:110px}.account-item-card .media-info .info{margin-left:20px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-pack:space-evenly;-ms-flex-pack:space-evenly;justify-content:space-evenly}.account-item-card .media-info .info .stars .icon{height:16px;width:16px}.account-item-card .operations{height:120px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.account-item-card .operations a{width:100%}.account-item-card .operations a span{float:right}.account-items-list{display:block;width:100%}.account-items-list .grid-container{margin-top:40px}.search-result-status{width:100%;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.grid-container{margin-top:20px}.main-container-wrapper{max-width:1300px;width:auto;padding-left:15px;padding-right:15px;margin-left:auto;margin-right:auto}.main-container-wrapper .content-container{display:block;margin-bottom:40px}.main-container-wrapper .product-grid-4{display:grid;grid-template-columns:repeat(auto-fill,minmax(235px,1fr));grid-auto-rows:auto;grid-column-gap:30px;grid-row-gap:15px;justify-items:end}.main-container-wrapper .product-grid-3{display:grid;grid-template-columns:repeat(auto-fill,minmax(235px,1fr));grid-gap:27px;grid-auto-rows:auto;justify-items:center}.main-container-wrapper .product-card{position:relative;padding:15px}.main-container-wrapper .product-card .product-image{max-height:350px;max-width:280px;margin-bottom:10px;background:#f2f2f2}.main-container-wrapper .product-card .product-image img{display:block;width:100%}.main-container-wrapper .product-card .product-name{margin-bottom:14px;width:100%;color:#242424}.main-container-wrapper .product-card .product-name a{color:#242424}.main-container-wrapper .product-card .product-description{display:none}.main-container-wrapper .product-card .product-ratings{width:100%}.main-container-wrapper .product-card .product-ratings .icon{width:16px;height:16px}.main-container-wrapper .product-card .cart-wish-wrap{display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start;-webkit-box-align:center;-ms-flex-align:center;align-items:center;height:40px}.main-container-wrapper .product-card .cart-wish-wrap .addtocart{margin-right:10px;text-transform:uppercase;text-align:left;-webkit-box-shadow:1px 1px 0 #ccc;box-shadow:1px 1px 0 #ccc}.main-container-wrapper .product-card .cart-wish-wrap .add-to-wishlist{margin-top:5px;background:transparent;border:0;cursor:pointer;padding:0}.main-container-wrapper .product-card .sticker{border-radius:100px;position:absolute;top:20px;left:20px;text-transform:uppercase;padding:4px 13px;font-size:14px;color:#fff;-webkit-box-shadow:1px 1px 1px #ccc;box-shadow:1px 1px 1px #ccc}.main-container-wrapper .product-card .sticker.sale{background:#ff6472}.main-container-wrapper .product-card .sticker.new{background:#2ed04c}.main-container-wrapper .product-card:hover{outline:1px solid #eaeaec;box-shadow:0 1px 2px rgba(0,0,0,.05);-webkit-box-shadow:0 2px 16px 4px rgba(40,44,63,.07);box-shadow:0 2px 16px 4px rgba(40,44,63,.07)}@media only screen and (max-width:580px){.main-container-wrapper .main-container-wrapper{padding:0}}@media only screen and (max-width:551px){.main-container-wrapper .product-grid-3{grid-template-columns:48.5% 48.5%;grid-column-gap:20px}}@media only screen and (max-width:854px){.main-container-wrapper .product-grid-4{grid-template-columns:29.5% 29.5% 29.5%;grid-column-gap:35px}}@media only screen and (max-width:653px){.main-container-wrapper .product-grid-4{grid-template-columns:48.5% 48.5%;grid-column-gap:17px}}@media only screen and (max-width:425px){.main-container-wrapper .product-card{font-size:90%}.main-container-wrapper .product-card .btn.btn-md{padding:5px}.main-container-wrapper .product-grid-4{grid-template-columns:48.5% 48.5%;grid-column-gap:10px}}.main-container-wrapper .product-list{min-height:200px}.main-container-wrapper .product-list .product-card{width:100%;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-align:center;-ms-flex-align:center;align-items:center;margin-bottom:20px}.main-container-wrapper .product-list .product-card .product-image{float:left;width:30%;height:350px}.main-container-wrapper .product-list .product-card .product-image img{height:100%}.main-container-wrapper .product-list .product-card .product-information{float:right;width:70%;padding-left:30px}.main-container-wrapper .product-list .product-card:last-child{margin-bottom:0}.main-container-wrapper .product-list.empty h2{font-size:20px}.main-container-wrapper section.featured-products{display:block;margin-bottom:5%}.main-container-wrapper section.featured-products .featured-heading{width:100%;text-align:center;text-transform:uppercase;font-size:18px;margin-bottom:20px}.main-container-wrapper section.featured-products .featured-heading .featured-separator{color:#d3d3d3}.main-container-wrapper section.news-update{display:block;-webkit-box-sizing:border-box;box-sizing:border-box;width:100%;margin-bottom:5%}.main-container-wrapper section.news-update .news-update-grid{display:grid;grid-template-columns:58.5% 40%;grid-gap:20px}.main-container-wrapper section.news-update .news-update-grid .block1{display:block;-webkit-box-sizing:border-box;box-sizing:border-box}.main-container-wrapper section.news-update .news-update-grid .block1 img{display:-webkit-box;display:-ms-flexbox;display:flex;height:100%;width:100%}.main-container-wrapper section.news-update .news-update-grid .block2{display:block;-webkit-box-sizing:border-box;box-sizing:border-box;display:grid;grid-template-rows:repeat(2,minmax(50%,1fr));grid-row-gap:20px}.main-container-wrapper section.news-update .news-update-grid .block2 .sub-block1{display:block;-webkit-box-sizing:border-box;box-sizing:border-box}.main-container-wrapper section.news-update .news-update-grid .block2 .sub-block1 img{width:100%}.main-container-wrapper section.news-update .news-update-grid .block2 .sub-block2{display:block;-webkit-box-sizing:border-box;box-sizing:border-box}.main-container-wrapper section.news-update .news-update-grid .block2 .sub-block2 img{width:100%}section.slider-block{display:block;margin-left:auto;margin-right:auto;margin-bottom:5%}section.slider-block div.slider-content{position:relative;height:500px;margin-left:auto;margin-right:auto}section.slider-block div.slider-content ul.slider-images .show-content{display:none}section.slider-block div.slider-content ul.slider-images li{position:absolute;visibility:hidden}section.slider-block div.slider-content ul.slider-images li.show{display:block;position:relative;visibility:visible;width:100%;-webkit-animation-name:example;animation-name:example;-webkit-animation-duration:4s;animation-duration:4s}section.slider-block div.slider-content ul.slider-images li.show .show-content{display:-webkit-box;display:-ms-flexbox;display:flex;position:absolute;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;color:#242424;height:100%;width:100%;top:0}@-webkit-keyframes example{0%{opacity:.1}to{opacity:1}}@keyframes example{0%{opacity:.1}to{opacity:1}}section.slider-block div.slider-content ul.slider-images li img{height:500px;width:100%}section.slider-block div.slider-content div.slider-control{display:block;cursor:pointer;position:absolute;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;bottom:2%;right:2%}section.slider-block div.slider-content div.slider-control .dark-left-icon{background-color:#f2f2f2;height:48px;width:48px;max-height:100%;max-width:100%}section.slider-block div.slider-content div.slider-control .light-right-icon{background-color:#242424;height:48px;width:48px;max-height:100%;max-width:100%}@media only screen and (max-width:770px){section.slider-block div.slider-content div.slider-control{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;bottom:46%;right:0;width:100%}}.header{margin-top:16px;margin-bottom:21px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.header .header-top{margin-bottom:16px;max-width:100%;width:auto;margin-left:auto;margin-right:auto;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between}.header .header-top,.header .header-top div.left-content{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.header .header-top div.left-content{-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start}.header .header-top div.left-content ul.logo-container{margin-right:12px}.header .header-top div.left-content ul.logo-container li{display:-webkit-box;display:-ms-flexbox;display:flex}.header .header-top div.left-content ul.logo-container li img{max-width:120px;max-height:40px}.header .header-top div.left-content ul.search-container li.search-group{display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.header .header-top div.left-content ul.search-container li.search-group .search-field{height:38px;border:2px solid #c7c7c7;border-radius:3px;border-right:none;border-top-right-radius:0;border-bottom-right-radius:0;padding-left:12px;font-size:14px}.header .header-top div.left-content ul.search-container li.search-group .search-icon-wrapper{-webkit-box-sizing:border-box;box-sizing:border-box;height:38px;width:38px;border:2px solid #c7c7c7;border-top-right-radius:3px;border-bottom-right-radius:3px}.header .header-top div.left-content ul.search-container li.search-group .search-icon-wrapper button{background:#fff;border:0;padding:3px 5px}.header .header-top div.right-content .right-content-menu>li{display:inline-block;border-right:2px solid #c7c7c7;padding:0 15px;min-height:15px;padding-top:3px}.header .header-top div.right-content .right-content-menu>li:first-child{padding-left:0}.header .header-top div.right-content .right-content-menu>li:last-child{border-right:0;padding-right:0}.header .header-top div.right-content .right-content-menu>li .icon{vertical-align:middle}.header .header-top div.right-content .right-content-menu>li .icon:not(.arrow-down-icon){margin-right:5px}.header .header-top div.right-content .right-content-menu>li .arrow-down-icon{width:12px;height:6px}.header .header-top div.right-content .right-content-menu .cart-dropdown-container{border-right:0;padding-right:0}.header .header-top div.right-content .right-content-menu .cart-link{pointer-events:none}.header .header-top div.right-content .right-content-menu ul.dropdown-list{display:none;margin-top:14px}.header .header-top div.right-content .right-content-menu ul.dropdown-list li{border-right:none;padding:5px 10px;display:block}.header .header-top div.right-content .right-content-menu ul.dropdown-list li a{color:#333}.header .header-top div.right-content .right-content-menu .currency{position:absolute;right:0;width:100px}.header .header-top div.right-content .right-content-menu .account{position:absolute;right:0}.header .header-top div.right-content .right-content-menu .account li{padding:20px!important}.header .header-top div.right-content .right-content-menu .account li ul{margin-top:5px}.header .header-top div.right-content .right-content-menu .account li ul>li{padding:5px 10px 5px 0!important}.header .header-top div.right-content .right-content-menu .guest{width:300px}.header .header-top div.right-content .right-content-menu .guest .btn.btn-sm{padding:9px 25px}.header .header-top div.right-content .right-content-menu .cart-dropdown-container .dropdown-list{width:387px}.header .header-top div.right-content .right-content-menu .cart-dropdown-container .dropdown-list .dropdown-container{padding:0}.header .header-top div.right-content .right-content-menu .cart-dropdown-container .dropdown-list .dropdown-container .dropdown-cart{color:#242424}.header .header-top div.right-content .right-content-menu .cart-dropdown-container .dropdown-list .dropdown-container .dropdown-cart>.dropdown-header{width:100%;padding:8px 16px;border-bottom:1px solid #c7c7c7}.header .header-top div.right-content .right-content-menu .cart-dropdown-container .dropdown-list .dropdown-container .dropdown-cart>.dropdown-header p{display:inline;line-height:25px}.header .header-top div.right-content .right-content-menu .cart-dropdown-container .dropdown-list .dropdown-container .dropdown-cart>.dropdown-header i{float:right;height:22px;width:22px}.header .header-top div.right-content .right-content-menu .cart-dropdown-container .dropdown-list .dropdown-container .dropdown-cart>.dropdown-header p.heading{font-weight:lighter}.header .header-top div.right-content .right-content-menu .cart-dropdown-container .dropdown-list .dropdown-container .dropdown-content{padding-top:8px;margin-bottom:55px;width:100%;max-height:329px;overflow-y:auto}.header .header-top div.right-content .right-content-menu .cart-dropdown-container .dropdown-list .dropdown-container .dropdown-content .item{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;border-bottom:1px solid #c7c7c7;padding:8px 16px}.header .header-top div.right-content .right-content-menu .cart-dropdown-container .dropdown-list .dropdown-container .dropdown-content .item img{height:75px;width:75px;margin-right:8px}.header .header-top div.right-content .right-content-menu .cart-dropdown-container .dropdown-list .dropdown-container .dropdown-content .item-details{height:auto}.header .header-top div.right-content .right-content-menu .cart-dropdown-container .dropdown-list .dropdown-container .item-details .item-name{font-size:16px;font-weight:700;margin-bottom:8px}.header .header-top div.right-content .right-content-menu .cart-dropdown-container .dropdown-list .dropdown-container .item-details .item-options{font-size:16px;margin-bottom:8px}.header .header-top div.right-content .right-content-menu .cart-dropdown-container .dropdown-list .dropdown-container .item-details .item-price{margin-bottom:8px}.header .header-top div.right-content .right-content-menu .cart-dropdown-container .dropdown-list .dropdown-container .item-details .item-qty{font-weight:lighter;margin-bottom:8px}.header .header-top div.right-content .right-content-menu .cart-dropdown-container .dropdown-list .dropdown-container .dropdown-footer{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;-webkit-box-align:center;-ms-flex-align:center;align-items:center;padding:8px 16px;position:absolute;bottom:0;width:100%;background:#fff;border-top:1px solid #c7c7c7}.header .header-top div.right-content .right-content-menu .cart-dropdown-container .dropdown-list .dropdown-container .dropdown-footer .btn{margin:0;max-width:170px;text-align:center}.header .header-top div.right-content .menu-box,.header .header-top div.right-content .search-box{display:none}.header .header-bottom{height:47px;margin-left:auto;margin-right:auto;border-top:1px solid #c7c7c7;border-bottom:1px solid #c7c7c7;display:block}.header .header-bottom ul.nav{display:block;font-size:16px;max-width:100%;width:auto;margin-left:auto;margin-right:auto}.header .header-bottom .nav ul{margin:0;padding:0;-webkit-box-shadow:1px 1px 1px 0 rgba(0,0,0,.4);box-shadow:1px 1px 1px 0 rgba(0,0,0,.4)}.header .header-bottom .nav a{display:block;color:#242424;text-decoration:none;padding:.8em .3em .8em .5em;text-transform:capitalize;letter-spacing:-.38px;position:relative}.header .header-bottom .nav li>.icon{display:none}.header .header-bottom .nav{vertical-align:top;display:inline-block}.header .header-bottom .nav li{position:relative}.header .header-bottom .nav>li{float:left;margin-right:1px;height:45px}.header .header-bottom .nav>li>a{margin-bottom:1px}.header .header-bottom .nav>li>a .icon{display:none}.header .header-bottom .nav li li a{margin-top:1px;white-space:normal;word-break:break-word;width:200px}.header .header-bottom .nav li a:first-child:nth-last-child(2):before{content:"";position:absolute;height:0;width:0;border:5px solid transparent;top:50%;right:5px}.header .header-bottom .nav ul{position:absolute;white-space:nowrap;border:1px solid #c7c7c7;background-color:#fff;z-index:10000;left:-99999em}.header .header-bottom .nav>li:hover{background-color:#f2f2f2}.header .header-bottom .nav>li:hover>ul{left:auto;min-width:100%}.header .header-bottom .nav>li li:hover{background-color:#f2f2f2}.header .header-bottom .nav>li li:hover>ul{left:100%;margin-left:1px;top:-2px}.header .header-bottom .nav>li:hover>a:first-child:nth-last-child(2):before,.header .header-bottom .nav li li>a:first-child:nth-last-child(2):before{margin-top:-5px}.header .header-bottom .nav li li:hover>a:first-child:nth-last-child(2):before{right:10px}.header .search-responsive{display:none}.header .search-responsive .search-content{border-bottom:1px solid #c7c7c7;border-top:1px solid #c7c7c7;height:50px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between}.header .search-responsive .search-content .search{width:80%;border:none;font-size:16px}.header .search-responsive .search-content .right{float:right}@media (max-width:720px){.header .currency-switcher{display:none!important}.header .header-top div.right-content{display:inherit}.header .header-top div.right-content .menu-box{display:inline-block;margin-left:10px}.header .header-top div.right-content .search-box{display:inline-block;margin-right:10px}.header .header-top div.right-content .right-content-menu>li{border-right:none;padding:0 2px}.header .header-top div.right-content .right-content-menu>li .icon:not(.arrow-down-icon){margin-right:0}.header .header-top div.right-content .right-content-menu .cart-link{pointer-events:all}.header .header-top div.right-content .right-content-menu .arrow-down-icon,.header .header-top div.right-content .right-content-menu .cart-dropdown-container .dropdown-container,.header .header-top div.right-content .right-content-menu .name{display:none}.header .header-bottom{height:auto;display:none}.header .header-bottom .nav a{display:inline-block}.header .header-bottom .nav li,.header .header-bottom ul.nav{height:auto}.header .header-bottom .nav>li{float:none}.header .header-bottom .nav li>.icon{float:right;display:block}.header .header-bottom .icon.icon-arrow-down{margin-right:5px}.header .header-bottom .nav li .left{height:16px;width:16px}.header .header-bottom .nav li a>.icon{display:none}.header .header-bottom .nav ul{position:unset;border:none;-webkit-box-shadow:none;box-shadow:none}.header .header-bottom .nav>li li:hover>ul{margin-left:0;top:0}ul.account-dropdown-container,ul.cart-dropdown-container,ul.search-container{display:none!important}}@media (max-width:400px){.header .header-top div.right-content .right-content-menu .guest{width:240px}.header .header-top div.right-content .right-content-menu .guest .btn.btn-sm{padding:7px 14px}}.footer{background-color:#f2f2f2;padding-left:10%;padding-right:10%;width:100%;display:inline-block}.footer .footer-content .footer-list-container{display:grid;padding:40px 10px;grid-template-columns:repeat(auto-fit,minmax(250px,1fr));grid-auto-rows:auto;grid-row-gap:1vh}.footer .footer-content .footer-list-container .list-container .list-heading{text-transform:uppercase;color:#a5a5a5}.footer .footer-content .footer-list-container .list-container .list-group{padding-top:25px}.footer .footer-content .footer-list-container .list-container .list-group a{color:#242424}.footer .footer-content .footer-list-container .list-container .list-group li{margin-bottom:12px;list-style-type:none;text-transform:uppercase}.footer .footer-content .footer-list-container .list-container .list-group li span.icon{display:inline-block;vertical-align:middle;margin-right:5px;height:24px;width:24px}.footer .footer-content .footer-list-container .list-container .form-container{padding-top:5px}.footer .footer-content .footer-list-container .list-container .form-container .control-group .subscribe-field{width:100%}.footer .footer-content .footer-list-container .list-container .form-container .control-group .btn-primary{background-color:#242424;margin-top:8px;border-radius:0;text-align:center}.footer .footer-content .footer-list-container .list-container .form-container .control-group .locale-switcher{width:100%}.footer .footer-content .footer-list-container .list-container .currency{display:none}@media (max-width:720px){.footer{padding-left:15px}.footer .footer-list-container{padding-left:0!important}.footer .currency{display:block!important}}.footer-bottom{width:100%;height:70px;font-size:16px;color:#a5a5a5;letter-spacing:-.26px;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:center;-ms-flex-pack:center;justify-content:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.footer-bottom p{padding:0 15px}.main .category-container{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;width:100%}.main .category-container .layered-filter-wrapper,.main .category-container .responsive-layred-filter{width:25%;float:left;padding-right:20px;min-height:1px}.main .category-container .layered-filter-wrapper .filter-title,.main .category-container .responsive-layred-filter .filter-title{border-bottom:1px solid #c7c7c7;color:#242424;padding:10px 0}.main .category-container .layered-filter-wrapper .filter-attributes .filter-attributes-item,.main .category-container .responsive-layred-filter .filter-attributes .filter-attributes-item{border-bottom:1px solid #c7c7c7;padding-bottom:10px}.main .category-container .layered-filter-wrapper .filter-attributes .filter-attributes-item .filter-attributes-title,.main .category-container .responsive-layred-filter .filter-attributes .filter-attributes-item .filter-attributes-title{padding:10px 40px 0 10px;color:#5e5e5e;cursor:pointer;position:relative}.main .category-container .layered-filter-wrapper .filter-attributes .filter-attributes-item .filter-attributes-title .remove-filter-link,.main .category-container .responsive-layred-filter .filter-attributes .filter-attributes-item .filter-attributes-title .remove-filter-link{font-weight:400;color:#0031f0;margin-right:10px}.main .category-container .layered-filter-wrapper .filter-attributes .filter-attributes-item .filter-attributes-title .icon,.main .category-container .responsive-layred-filter .filter-attributes .filter-attributes-item .filter-attributes-title .icon{background-image:url("../images/icon-dropdown.svg")!important;width:10px;height:10px;position:absolute;right:15px;top:14px}.main .category-container .layered-filter-wrapper .filter-attributes .filter-attributes-item .filter-attributes-content,.main .category-container .responsive-layred-filter .filter-attributes .filter-attributes-item .filter-attributes-content{padding:10px;display:none}.main .category-container .layered-filter-wrapper .filter-attributes .filter-attributes-item .filter-attributes-content ol.items,.main .category-container .responsive-layred-filter .filter-attributes .filter-attributes-item .filter-attributes-content ol.items{padding:0;margin:0;list-style:none none}.main .category-container .layered-filter-wrapper .filter-attributes .filter-attributes-item .filter-attributes-content ol.items li.item,.main .category-container .responsive-layred-filter .filter-attributes .filter-attributes-item .filter-attributes-content ol.items li.item{padding:8px 0;color:#5e5e5e}.main .category-container .layered-filter-wrapper .filter-attributes .filter-attributes-item .filter-attributes-content ol.items li.item .checkbox,.main .category-container .responsive-layred-filter .filter-attributes .filter-attributes-item .filter-attributes-content ol.items li.item .checkbox{margin:0}.main .category-container .layered-filter-wrapper .filter-attributes .filter-attributes-item .filter-attributes-content ol.items li.item .checkbox .checkbox-view,.main .category-container .responsive-layred-filter .filter-attributes .filter-attributes-item .filter-attributes-content ol.items li.item .checkbox .checkbox-view{height:16px;width:16px;background-image:url("../images/checkbox.svg")}.main .category-container .layered-filter-wrapper .filter-attributes .filter-attributes-item .filter-attributes-content ol.items li.item .checkbox input:checked+.checkbox-view,.main .category-container .responsive-layred-filter .filter-attributes .filter-attributes-item .filter-attributes-content ol.items li.item .checkbox input:checked+.checkbox-view{background-image:url("../images/checkbox-checked.svg")}.main .category-container .layered-filter-wrapper .filter-attributes .filter-attributes-item .filter-attributes-content ol.items li.item .color-swatch,.main .category-container .responsive-layred-filter .filter-attributes .filter-attributes-item .filter-attributes-content ol.items li.item .color-swatch{display:inline-block;margin-right:5px;min-width:20px;height:20px;border:1px solid #c7c7c7;border-radius:3px;float:right}.main .category-container .layered-filter-wrapper .filter-attributes .filter-attributes-item .filter-attributes-content .price-range-wrapper,.main .category-container .responsive-layred-filter .filter-attributes .filter-attributes-item .filter-attributes-content .price-range-wrapper{margin-top:21px}.main .category-container .layered-filter-wrapper .filter-attributes .filter-attributes-item.active .filter-attributes-content,.main .category-container .responsive-layred-filter .filter-attributes .filter-attributes-item.active .filter-attributes-content{display:block}.main .category-container .layered-filter-wrapper .filter-attributes .filter-attributes-item.active .filter-attributes-title .icon,.main .category-container .responsive-layred-filter .filter-attributes .filter-attributes-item.active .filter-attributes-title .icon{background-image:url("../images//arrow-up.svg")!important}.main .category-container .responsive-layred-filter{display:none;width:100%;float:none;padding-right:0;margin-top:-25px!important}.main .category-container .category-block{width:80%;display:block}.main .category-container .category-block .hero-image{display:inline-block;visibility:visible;width:100%}.main .category-container .category-block .hero-image img{height:400px;width:100%}.main .top-toolbar{width:100%;display:inline-block}.main .top-toolbar .page-info{float:left;color:#242424;line-height:45px}.main .top-toolbar .page-info span{display:none}.main .top-toolbar .page-info span:first-child{display:inline}.main .top-toolbar .pager{float:right}.main .top-toolbar .pager label{margin-right:5px}.main .top-toolbar .pager select{background:#f2f2f2;border:1px solid #c7c7c7;border-radius:3px;color:#242424;padding:10px}.main .top-toolbar .pager .view-mode{display:inline-block;margin-right:20px}.main .top-toolbar .pager .view-mode a,.main .top-toolbar .pager .view-mode span{display:inline-block;vertical-align:middle}.main .top-toolbar .pager .view-mode a.grid-view,.main .top-toolbar .pager .view-mode span.grid-view{margin-right:10px}.main .top-toolbar .pager .view-mode .sort-filter{display:none}.main .top-toolbar .pager .sorter{display:inline-block;margin-right:10px}.main .top-toolbar .pager .limiter{display:inline-block}.main .bottom-toolbar{display:block;margin-top:40px;margin-bottom:40px;text-align:center}@media only screen and (max-width:840px){.main .category-container .responsive-layred-filter,.main .layered-filter-wrapper{display:none}.main .category-block{width:100%!important}.main .category-block .top-toolbar{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.main .category-block .top-toolbar .page-info{border-bottom:1px solid #c7c7c7;line-height:15px;margin-top:10px}.main .category-block .top-toolbar .page-info span{display:inline}.main .category-block .top-toolbar .page-info span:first-child{display:none}.main .category-block .top-toolbar .page-info .sort-filter{float:right;cursor:pointer}.main .category-block .top-toolbar .pager{margin-top:20px;display:none}.main .category-block .top-toolbar .pager .view-mode{display:none}.main .category-block .responsive-layred-filter{display:block}}section.product-detail{color:#242424}section.product-detail div.category-breadcrumbs{display:inline}section.product-detail div.layouter{display:block;margin-top:20px;margin-bottom:20px}section.product-detail div.layouter .form-container{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;width:100%}section.product-detail div.layouter .form-container div.product-image-group{margin-right:30px;width:604px;height:650px;max-width:604px;position:-webkit-sticky;position:sticky;top:10px}section.product-detail div.layouter .form-container div.product-image-group div{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;cursor:pointer}section.product-detail div.layouter .form-container div.product-image-group div .thumb-list{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;margin-right:4px;min-width:120px;overflow:hidden;position:relative;-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start;max-height:480px}section.product-detail div.layouter .form-container div.product-image-group div .thumb-list .thumb-frame{border:2px solid transparent;background:#f2f2f2;width:120px;max-height:120px}section.product-detail div.layouter .form-container div.product-image-group div .thumb-list .thumb-frame.active{border-color:#0031f0}section.product-detail div.layouter .form-container div.product-image-group div .thumb-list .thumb-frame img{height:100%;width:100%}section.product-detail div.layouter .form-container div.product-image-group div .thumb-list .gallery-control{width:100%;position:absolute;text-align:center;cursor:pointer;z-index:1}section.product-detail div.layouter .form-container div.product-image-group div .thumb-list .gallery-control .overlay{opacity:.3;background:#242424;width:100%;height:18px;position:absolute;left:0;z-index:-1}section.product-detail div.layouter .form-container div.product-image-group div .thumb-list .gallery-control .icon{z-index:2}section.product-detail div.layouter .form-container div.product-image-group div .thumb-list .gallery-control.top{top:0}section.product-detail div.layouter .form-container div.product-image-group div .thumb-list .gallery-control.bottom{bottom:0}section.product-detail div.layouter .form-container div.product-image-group div .product-hero-image{display:block;position:relative;background:#f2f2f2;width:100%;max-height:480px;height:100%}section.product-detail div.layouter .form-container div.product-image-group div .product-hero-image img{width:100%;height:auto;max-height:480px}section.product-detail div.layouter .form-container div.product-image-group div .product-hero-image .add-to-wishlist{background-image:url("../images/wishlist.svg");position:absolute;top:10px;right:12px;background-color:transparent;border:0;cursor:pointer;padding:0;width:32px;height:32px}section.product-detail div.layouter .form-container div.product-image-group div .product-hero-image .add-to-wishlist:hover{background-image:url("../images/wishlist-added.svg")}section.product-detail div.layouter .form-container div.product-image-group div .product-hero-image .share{position:absolute;top:10px;right:45px}section.product-detail div.layouter .form-container div.product-image-group .add-to-buttons{display:none;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;margin-top:10px;width:79.5%;float:right;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between}section.product-detail div.layouter .form-container div.product-image-group .add-to-buttons .addtocart{width:49%;background:#000;white-space:normal;text-transform:uppercase}section.product-detail div.layouter .form-container div.product-image-group .add-to-buttons .buynow{width:49%;white-space:nowrap;text-transform:uppercase}section.product-detail div.layouter .form-container .details{width:50%;overflow-wrap:break-word}section.product-detail div.layouter .form-container .details .product-price{margin-bottom:14px}section.product-detail div.layouter .form-container .details .product-price .sticker{display:none}section.product-detail div.layouter .form-container .details .product-ratings{margin-bottom:20px}section.product-detail div.layouter .form-container .details .product-ratings .icon{width:16px;height:16px}section.product-detail div.layouter .form-container .details .product-ratings .total-reviews{display:inline-block;margin-left:15px}section.product-detail div.layouter .form-container .details .product-heading{font-size:24px;color:#242424;margin-bottom:15px}section.product-detail div.layouter .form-container .details .product-price{margin-bottom:15px}section.product-detail div.layouter .form-container .details .product-price .special-price{font-size:24px}section.product-detail div.layouter .form-container .details .stock-status{margin-bottom:15px;font-weight:600;color:#fc6868}section.product-detail div.layouter .form-container .details .stock-status.active{color:#4caf50}section.product-detail div.layouter .form-container .details .description{margin-bottom:15px}section.product-detail div.layouter .form-container .details .description ul{padding-left:40px;list-style:disc}section.product-detail div.layouter .form-container .details .quantity{padding-top:15px;border-top:1px solid hsla(0,0%,64%,.2)}section.product-detail div.layouter .form-container .details .full-description *{max-width:100%}section.product-detail div.layouter .form-container .details .full-description ul{padding-left:40px;list-style:disc}section.product-detail div.layouter .form-container .details .full-specifications td{padding:10px 0;color:#5e5e5e}section.product-detail div.layouter .form-container .details .full-specifications td:first-child{padding-right:40px}section.product-detail div.layouter .form-container .details .accordian .accordian-header{padding-left:0;font-weight:600}section.product-detail div.layouter .form-container .details .accordian .accordian-content{padding:20px 0}section.product-detail div.layouter .form-container .details .attributes{display:block;width:100%;border-bottom:1px solid hsla(0,0%,64%,.2)}section.product-detail div.layouter .form-container .details .attributes .attribute.control-group{margin-bottom:20px}section.product-detail div.layouter .form-container .details .attributes .attribute.control-group .swatch-container{margin-top:10px;display:inline-block}section.product-detail div.layouter .form-container .details .attributes .attribute.control-group .swatch-container .swatch{display:inline-block;margin-right:5px;min-width:40px;height:40px}section.product-detail div.layouter .form-container .details .attributes .attribute.control-group .swatch-container .swatch span{min-width:38px;height:38px;float:left;border:1px solid #c7c7c7;border-radius:3px;line-height:36px;text-align:center;cursor:pointer;padding:0 10px}section.product-detail div.layouter .form-container .details .attributes .attribute.control-group .swatch-container .swatch img{width:38px;height:38px;border:1px solid #c7c7c7;border-radius:3px;cursor:pointer;background:#f2f2f2}section.product-detail div.layouter .form-container .details .attributes .attribute.control-group .swatch-container .swatch input:checked+img,section.product-detail div.layouter .form-container .details .attributes .attribute.control-group .swatch-container .swatch input:checked+span{border:1px solid #242424}section.product-detail div.layouter .form-container .details .attributes .attribute.control-group .swatch-container .swatch input{display:none}section.product-detail div.layouter .form-container .details .attributes .attribute.control-group .swatch-container .no-options{color:#ff6472}section.product-detail div.layouter .form-container .details .quantity-change{cursor:pointer;text-align:center}section.product-detail div.layouter .form-container .details .quantity-change:focus{border-color:#c7c7c7!important}@media only screen and (max-width:720px){section.product-detail div.layouter .form-container{-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}section.product-detail div.layouter .form-container div.product-image-group{margin-right:0;max-width:none;width:auto;min-height:400px;height:auto;position:unset}section.product-detail div.layouter .form-container div.product-image-group .loader{margin-left:47%}section.product-detail div.layouter .form-container div.product-image-group div{-webkit-box-orient:vertical;-webkit-box-direction:reverse;-ms-flex-direction:column-reverse;flex-direction:column-reverse}section.product-detail div.layouter .form-container div.product-image-group div .thumb-list{margin-top:5px;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;overflow-x:scroll;margin-right:0}section.product-detail div.layouter .form-container div.product-image-group div .thumb-list .thumb-frame img{height:100%;width:auto}section.product-detail div.layouter .form-container div.product-image-group div .thumb-list .gallery-control{display:none}section.product-detail div.layouter .form-container div.product-image-group div .product-hero-image{display:-webkit-box;display:-ms-flexbox;display:flex}section.product-detail div.layouter .form-container div.product-image-group div .product-hero-image img{margin-left:auto;margin-right:auto;width:480px}section.product-detail div.layouter .form-container div.product-image-group div .wrap{-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;width:100%!important}section.product-detail div.layouter .form-container div.product-image-group .add-to-buttons{width:100%}section.product-detail div.layouter .form-container .details{width:100%;margin-top:20px}}@media only screen and (max-width:510px){section.product-detail div.layouter .form-container div.product-image-group .product-hero-image img{width:100%!important}}.rating-reviews .rating-header{padding:20px 0}.rating-reviews .stars .icon{width:16px;height:16px}.rating-reviews .overall{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-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between}.rating-reviews .overall .review-info .number{font-size:34px}.rating-reviews .overall .review-info .total-reviews{margin-top:10px}.rating-reviews .reviews{margin-top:40px;margin-bottom:40px}.rating-reviews .reviews .review{margin-bottom:25px}.rating-reviews .reviews .review .title{margin-bottom:5px}.rating-reviews .reviews .review .stars{margin-bottom:15px;display:inline-block}.rating-reviews .reviews .review .message{margin-bottom:10px}.rating-reviews .reviews .review .reviewer-details{color:#5e5e5e}.rating-reviews .reviews .view-all{margin-top:15px;color:#0031f0;margin-bottom:15px}section.cart{width:100%;color:#242424;margin-bottom:80px;margin-top:20px}section.cart .title{font-size:24px}section.cart .cart-content{margin-top:20px;width:100%;display:inline-block}section.cart .cart-content .left-side{width:70%;float:left}section.cart .cart-content .left-side .misc-controls{width:100%;display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;margin-top:20px}section.cart .cart-content .left-side .misc-controls a.link,section.cart .cart-content .left-side .misc-controls div button{margin-right:15px}section.cart .cart-content .right-side{width:30%;display:inline-block;padding-left:40px}.cart-item-list .item{padding:10px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;border:1px solid #c7c7c7;border-radius:2px}.cart-item-list .item .item-image{margin-right:15px}.cart-item-list .item .item-image img{height:160px;width:160px}.cart-item-list .item .item-details{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start;width:100%}.cart-item-list .item .item-details .item-title{font-size:18px;margin-bottom:10px;font-weight:600}.cart-item-list .item .item-details .item-title a{color:#242424}.cart-item-list .item .item-details .price{margin-bottom:10px;font-size:18px;font-weight:600}.cart-item-list .item .item-details .summary{margin-bottom:17px}.cart-item-list .item .item-details .misc{display:-webkit-box;display:-ms-flexbox;display:flex;width:100%;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start;-webkit-box-align:start;-ms-flex-align:start;align-items:flex-start}.cart-item-list .item .item-details .misc .control-group{font-size:16px!important;width:220px;margin:0}.cart-item-list .item .item-details .misc .control-group .wrap{display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.cart-item-list .item .item-details .misc .control-group label{margin-right:15px}.cart-item-list .item .item-details .misc .control-group .control{height:38px;width:60px;border-radius:3px;text-align:center;line-height:38px}.cart-item-list .item .item-details .misc .remove,.cart-item-list .item .item-details .misc .towishlist{margin-top:18px;margin-right:15px}.cart-item-list .item .item-details .misc .quantity-change{cursor:pointer}.cart-item-list .item .item-details .misc .quantity-change:focus{border-color:#c7c7c7!important}.cart-item-list .item .error-message{color:#ff6472}.order-summary h3{font-size:16px;margin-top:0}.order-summary .item-detail{margin-top:12px}.order-summary .item-detail label.right{float:right}.order-summary .payble-amount{margin-top:17px;border-top:1px solid #c7c7c7;padding-top:12px}.order-summary .payble-amount label{font-weight:700}.order-summary .payble-amount label.right{float:right}@media only screen and (max-width:815px){section.cart .cart-content{display:block}section.cart .cart-content .left-side{width:100%;float:none}section.cart .cart-content .left-side .misc-controls{position:relative;top:180px;margin-top:0}section.cart .cart-content .right-side{width:100%;padding-left:0;position:relative;top:-20px}}@media only screen and (max-width:600px){section.cart .cart-content .left-side .cart-item-list .item{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}section.cart .cart-content .left-side .cart-item-list .item .item-details{margin-top:10px}section.cart .cart-content .left-side .cart-item-list .item .item-details .misc{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;line-height:40px}}@media only screen and (max-width:574px){section.cart .cart-content .left-side .misc-controls{display:block;top:160px}section.cart .cart-content .left-side .misc-controls div button{width:100%;margin-top:10px}section.cart .cart-content .left-side .misc-controls div a{margin-top:10px;width:100%;text-align:center}section.cart .cart-content .right-side{top:-100px}}.checkout-method-group .line-one{display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.checkout-method-group .line-one .radio-container{padding-left:28px}.checkout-method-group .line-one .method-label{margin-top:4px}.checkout-method-group .line-two{margin-left:30px}.checkout-process{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;width:100%;margin-top:20px;margin-bottom:20px;font-size:16px;color:#242424}.checkout-process .col-main{width:70%;margin-right:5%}.checkout-process .col-main ul.checkout-steps{display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;width:100%;padding-bottom:15px;border-bottom:1px solid #c7c7c7}.checkout-process .col-main ul.checkout-steps li{height:48px;display:-webkit-box;display:-ms-flexbox;display:flex}.checkout-process .col-main ul.checkout-steps li .decorator{height:48px;width:48px;border:1px solid #000;border-radius:50%;display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;border:1px solid #c7c7c7;background-repeat:no-repeat;background-position:50%}.checkout-process .col-main ul.checkout-steps li .decorator.address-info{background-image:url("../images/address.svg")}.checkout-process .col-main ul.checkout-steps li .decorator.shipping{background-image:url("../images/shipping.svg")}.checkout-process .col-main ul.checkout-steps li .decorator.payment{background-image:url("../images/payment.svg")}.checkout-process .col-main ul.checkout-steps li .decorator.review{background-image:url("../images/finish.svg")}.checkout-process .col-main ul.checkout-steps li.completed{cursor:pointer}.checkout-process .col-main ul.checkout-steps li.completed .decorator{background-image:url("../images/complete.svg")}.checkout-process .col-main ul.checkout-steps li span{margin-left:7px;margin-top:auto;margin-bottom:auto}.checkout-process .col-main ul.checkout-steps li.active{color:#2650ef}.checkout-process .col-main ul.checkout-steps li.active .decorator{border:1px solid #2650ef}.checkout-process .col-main .step-content{padding-top:20px}.checkout-process .col-main .step-content .form-header{display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;width:100%;height:30px}.checkout-process .col-main .step-content .form-header .checkout-step-heading{font-size:24px;font-weight:700;float:left}.checkout-process .col-main .step-content .form-header .btn{float:right;font-size:14px}.checkout-process .col-main .step-content .form-container{border-bottom:1px solid #c7c7c7;padding-top:20px;padding-bottom:20px}.checkout-process .col-main .step-content .shipping-methods{font-size:16px}.checkout-process .col-main .step-content .shipping-methods .ship-method-carrier{margin-bottom:15px;font-weight:700}.checkout-process .col-main .step-content .payment-methods .radio-container{padding-left:28px}.checkout-process .col-main .step-content .payment-methods .control-info{margin-left:28px}.checkout-process .col-main .step-content .address-summary{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:start;-ms-flex-pack:start;justify-content:flex-start;-webkit-box-align:center;-ms-flex-align:center;align-items:center;width:100%}.checkout-process .col-main .step-content .address-summary div.billing-address{margin-right:25%}.checkout-process .col-main .step-content .address-summary div.billing-address .horizontal-rule,.checkout-process .col-main .step-content .address-summary div.shipping-address .horizontal-rule{width:40px;background:#242424}.checkout-process .col-main .step-content .address-summary .label{width:10%}.checkout-process .col-main .step-content .address-summary .address-card-list{width:85%}.checkout-process .col-main .step-content .cart-item-list .item .row .title{width:100px;display:inline-block;color:#a5a5a5;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:25%;padding-left:40px}@media only screen and (max-width:770px){.checkout-process .col-main{width:100%;padding-right:0}.checkout-process .col-main ul.checkout-steps{border-bottom:none;padding-bottom:0}.checkout-process .col-main ul.checkout-steps span{display:none}.checkout-process .col-main ul.checkout-steps .line{-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;border-bottom:1px solid #c7c7c7;margin-left:5px;margin-right:5px}.checkout-process .step-content{padding-top:0}.checkout-process .step-content .control-group .control{width:100%}.checkout-process .col-right{display:none}}@media only screen and (max-width:480px){.checkout-process .col-main .step-content .address,.checkout-process .col-main .step-content .order-description{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.checkout-process .col-main .step-content .address .billing-address,.checkout-process .col-main .step-content .address .pull-left,.checkout-process .col-main .step-content .order-description .billing-address,.checkout-process .col-main .step-content .order-description .pull-left{width:100%!important}.checkout-process .col-main .step-content .address .pull-right,.checkout-process .col-main .step-content .address .shipping-address,.checkout-process .col-main .step-content .order-description .pull-right,.checkout-process .col-main .step-content .order-description .shipping-address{width:100%!important;margin-top:20px}}.attached-products-wrapper{margin-bottom:80px}.attached-products-wrapper .title{margin-bottom:40px;font-size:18px;color:#242424;text-align:center;position:relative}.attached-products-wrapper .title .border-bottom{border-bottom:1px solid hsla(0,0%,64%,.2);display:inline-block;width:100px;position:absolute;top:40px;left:50%;margin-left:-50px}.attached-products-wrapper .horizontal-rule{height:1px;background:#c7c7c7;width:148px;margin-bottom:24px;margin-left:auto;margin-right:auto}section.review .category-breadcrumbs{display:inline}section.review .review-layouter{display:-webkit-box;display:-ms-flexbox;display:flex}section.review .review-layouter .product-info{font-size:24px;max-width:25%}section.review .review-layouter .product-info .product-image img{height:280px;width:280px}section.review .review-layouter .product-info .product-name a{color:#242424}section.review .review-layouter .product-info .product-price .pro-price{color:#ff6472}section.review .review-layouter .product-info .product-price .pro-price-not{margin-left:10px;font-size:16px;color:#a5a5a5}section.review .review-layouter .product-info .product-price .offer{margin-left:10px;font-size:16px}section.review .review-layouter .review-form{margin-left:20px;width:55%}section.review .review-layouter .review-form .heading{color:#242424;font-weight:600}section.review .review-layouter .review-form .heading .right{float:right;margin-top:-10px}section.review .review-layouter .review-form .star{font-size:23px;color:#d4d4d4;-webkit-transition:all .2s;transition:all .2s}section.review .review-layouter .review-form .star:before{content:"\2605"}section.review .review-layouter .review-form .control-group .control{width:100%}section.review .review-layouter .review-form .review-detail{height:150px;border:1px solid #b22222;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}section.review .review-layouter .review-form .review-detail .rating-review{margin-top:40px;margin-left:20px;width:48%}section.review .review-layouter .review-form .review-detail .rating-review .avg-rating-count span{font-size:34px;text-align:center}section.review .review-layouter .review-form .review-detail .rating-calculate .progress-only{width:20px;border:1px solid blue}section.review .review-layouter .ratings-reviews{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between}section.review .review-layouter .ratings-reviews .left-side{padding:40px 20px;width:50%}section.review .review-layouter .ratings-reviews .left-side .rate{font-size:34px}section.review .review-layouter .ratings-reviews .left-side .stars .icon{height:16px;width:16px}section.review .review-layouter .ratings-reviews .right-side{width:50%}section.review .review-layouter .ratings-reviews .right-side .rater{display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;padding-top:5px;width:100%}section.review .review-layouter .ratings-reviews .right-side .rater .star-name{margin-right:5px;width:35px}section.review .review-layouter .ratings-reviews .right-side .rater .rate-number{width:15px}section.review .review-layouter .ratings-reviews .right-side .rater .percentage{width:50px;margin-right:10px}section.review .review-layouter .ratings-reviews .right-side .rater .percentage span{float:right;white-space:nowrap}section.review .review-layouter .ratings-reviews .right-side .rater .line-bar{height:4px;width:calc(100% - 100px);margin-right:5px;margin-left:5px;background:#d8d8d8}section.review .review-layouter .ratings-reviews .right-side .rater .line-bar .line-value{background-color:#0031f0}@media only screen and (max-width:770px){section.review .category-breadcrumbs{display:none}section.review .review-layouter{-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}section.review .review-layouter .product-info{max-width:100%}section.review .review-layouter .product-info .product-image,section.review .review-layouter .product-info .product-name,section.review .review-layouter .product-info .product-price{max-width:280px;margin-left:auto;margin-right:auto}section.review .review-layouter .review-form{width:100%;margin-left:0}section.review .review-layouter .review-form .heading .right{margin-top:50px}section.review .review-layouter .review-form .ratings-reviews{-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;width:100%}section.review .review-layouter .review-form .ratings-reviews .left-side{width:100%;padding:0 0 40px;margin-top:-30px}section.review .review-layouter .review-form .ratings-reviews .right-side{width:100%}section.review .review-layouter .review-form .ratings-reviews .right-side .rater .percentage{margin-right:0}}.auth-content{padding-top:5%;padding-bottom:5%}.auth-content .sign-up-text{margin-bottom:2%;margin-left:auto;margin-right:auto;font-size:18px;color:#a5a5a5;text-align:center}.auth-content .login-form{margin-left:auto;margin-right:auto;display:-webkit-box;display:-ms-flexbox;display:flex;border:1px solid #c7c7c7;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;max-width:500px;min-width:320px;padding:25px}.auth-content .login-form .login-text{font-size:24px;font-weight:600;margin-bottom:30px}.auth-content .login-form .control-group{margin-bottom:15px!important}.auth-content .login-form .control-group .control{width:100%!important}.auth-content .login-form .forgot-password-link{font-size:17px;color:#0031f0;margin-bottom:5%}.auth-content .login-form .signup-confirm{margin-bottom:5%}.auth-content .login-form .btn-primary{width:100%;text-transform:uppercase}.account-content{width:100%;-webkit-box-orient:horizontal;-ms-flex-direction:row;flex-direction:row;margin-top:5.5%;margin-bottom:5.5%}.account-content,.account-content .sidebar{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-direction:normal}.account-content .sidebar{-webkit-box-orient:vertical;-ms-flex-direction:column;flex-direction:column;-ms-flex-line-pack:center;align-content:center;-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start;width:20%;height:100%}.account-content .menu-block{margin-bottom:30px}.account-content .menu-block:last-child{margin-bottom:0}.account-content .menu-block .menu-block-title{padding-bottom:10px;font-size:18px}.account-content .menu-block .menu-block-title .right{display:none}.account-content .menu-block .menubar{border:1px solid #c7c7c7;color:#a5a5a5;position:relative}.account-content .menu-block .menubar li{width:95%;height:50px;margin-left:5%;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:start;-ms-flex-pack:start;justify-content:flex-start;-webkit-box-align:center;-ms-flex-align:center;align-items:center;border-bottom:1px solid #c7c7c7;text-align:center}.account-content .menu-block .menubar li a{color:#5e5e5e;width:100%;text-align:left}.account-content .menu-block .menubar li .icon{display:none;position:absolute;right:12px}.account-content .menu-block .menubar li:first-child{border-top:none}.account-content .menu-block .menubar li:last-child{border-bottom:none}.account-content .menu-block .menubar li.active a{color:#0031f0}.account-content .menu-block .menubar li.active .icon{display:inline-block}.account-content .account-layout{margin-left:40px;width:80%}.account-content .account-layout .account-head .back-icon,.account-content .account-layout .responsive-empty{display:none}.account-table-content{color:#242424;margin-top:1.4%}.account-table-content table{width:100%}.account-table-content table tbody tr{height:45px}.account-table-content table tbody tr td{width:250px}.address-holder{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:start;-ms-flex-pack:start;justify-content:flex-start;-webkit-box-align:start;-ms-flex-align:start;align-items:flex-start;-ms-flex-wrap:wrap;flex-wrap:wrap;width:100%}.address-card{width:260px;border:1px solid #c7c7c7;padding:15px;margin-right:15px;margin-bottom:15px}.address-card .control-group{width:15px;height:15px;margin-top:10px}.address-card .details{font-weight:lighter}.address-card .details span{display:block}.address-card .details .control-links{width:90%;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;-ms-flex-wrap:wrap;flex-wrap:wrap;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.address-card .details .control-links .btn{height:30px}.edit-form{display:-webkit-box;display:-ms-flexbox;display:flex;border:1px solid #c7c7c7;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;min-height:345px;padding:25px}@media only screen and (max-width:770px){.account-content{-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.account-content .sidebar{width:100%}.account-content .sidebar .menu-block .menu-block-title{height:50px;padding-top:13px;border-bottom:1px solid #c7c7c7;border-top:1px solid #c7c7c7}.account-content .sidebar .menu-block .menu-block-title .right{display:block;float:right;-ms-flex-item-align:center;align-self:center}.account-content .sidebar .menu-block .menubar{border:0;display:none}.account-content .sidebar .menu-block .menubar>li{margin-left:0;width:100%}.account-content .sidebar .menu-block .menubar>li .icon{right:0}.account-content .sidebar .menu-block .menubar>li:last-child{border-bottom:1px solid #c7c7c7}.account-content .account-layout{margin-left:0;margin-top:20px;width:100%}.account-content .account-layout .account-head{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;border-bottom:1px solid #c7c7c7;border-top:1px solid #c7c7c7;height:50px;margin-top:10px}.account-content .account-layout .account-head .account-action{margin-top:12px;margin-left:15px}.account-content .account-layout .account-head .back-icon{display:block}.account-content .account-layout .account-head span{margin-top:13px;font-size:18px}.account-content .account-layout .account-head .horizontal-rule{display:none}.account-content .account-layout .account-table-content{margin-top:2%}.account-content .account-layout .account-table-content table tbody tr{height:70px}.account-content .account-layout .account-table-content table tbody tr td{display:block}.account-content .account-layout .account-table-content .address-holder{-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.account-content .account-items-list,.account-content .edit-form{margin-top:20px}.account-content .account-items-list .responsive-empty,.account-content .edit-form .responsive-empty{display:block}.account-content .control-group .control{width:100%}}.sale-container{color:#5e5e5e}.sale-container .sale-section .secton-title{font-size:18px;color:#8e8e8e;padding:15px 0;border-bottom:1px solid #c7c7c7}.sale-container .sale-section .section-content{display:block;padding:20px 0;border-bottom:1px solid #e8e8e8}.sale-container .sale-section .section-content .row{display:block;padding:7px 0}.sale-container .sale-section .section-content .row .title{width:200px;letter-spacing:-.26px;display:inline-block}.sale-container .sale-section .section-content .row .value{letter-spacing:-.26px;display:inline-block}.sale-container .sale-section .section-content .order-box-container{display:inline-block;width:100%}.sale-container .sale-section .section-content .order-box-container .box{float:left;width:25%}.sale-container .sale-section .section-content .order-box-container .box .box-title{padding:10px 0;font-size:18px;color:#8e8e8e}.sale-container .sale-section .section-content .order-box-container .box .box-content{color:#3a3a3a;padding-right:10px}.sale-container .sale-section .section-content .qty-row{display:block}.sale-container .totals{padding-top:20px;display:inline-block;width:100%;border-top:1px solid #e8e8e8}.sale-container .totals .sale-summary{height:130px;float:right;border-collapse:collapse}.sale-container .totals .sale-summary tr td{padding:5px 8px;width:auto;color:#3a3a3a}.sale-container .totals .sale-summary tr.bold{font-weight:600;font-size:15px}.sale-container .totals .sale-summary tr.border td{border-bottom:1px solid #c7c7c7}@media only screen and (max-width:770px){.sale-container .sale-section .section-content{border-bottom:none;padding:10px 0}.sale-container .sale-section .section-content .row{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.sale-container .sale-section .section-content .row .title{line-height:20px}.sale-container .sale-section .section-content .totals{border-top:none}.sale-container .sale-section .section-content .totals .sale-summary{width:100%}.sale-container .sale-section .section-content .totals .sale-summary tr td:nth-child(2){display:none}.sale-container .sale-section .section-content .order-box-container{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.sale-container .sale-section .section-content .order-box-container .box{width:100%;margin:10px auto}.sale-container .sale-section .section-content .qty-row{display:inline}}.verify-account{text-align:center;background:#204d74;width:200px;margin-right:auto;margin-left:auto;border-radius:4px}.verify-account a{color:#fff!important}.cp-spinner{position:absolute;left:calc(50% - 24px);margin-top:calc(40% - 24px)}@media only screen and (max-width:720px){.cp-spinner{left:50%;margin-left:-24px;top:50%;margin-top:-24px}}@media only screen and (max-width:720px){.error-container .wrapper{-webkit-box-orient:vertical!important;-webkit-box-direction:reverse!important;-ms-flex-direction:column-reverse!important;flex-direction:column-reverse!important;margin:10px 0 20px!important;-webkit-box-align:start!important;-ms-flex-align:start!important;align-items:start!important;height:100%!important}}@media only screen and (max-width:770px){.table table{width:100%}.table table thead{display:none}.table table tbody tr td:before{content:attr(data-value);font-size:15px;font-weight:600;display:inline-block;width:120px}.table table tbody td{border-bottom:none!important;display:block;width:100%!important}.table table tbody td div{position:relative;left:100px;top:-20px}.table table tbody tr{border:1px solid #c7c7c7}}.show-wishlist{z-index:-1!important}.filter-row-one .dropdown-filters{position:relative!important;right:1px!important}@media only screen and (max-width:770px){.table .grid-container{margin-top:10px}.table .grid-container .filter-row-one{display:block}.table .grid-container .filter-row-one .dropdown-filters{margin-top:10px}}.rtl{direction:rtl}.rtl .header .header-top div.left-content ul.logo-container{margin-right:0;margin-left:12px}.rtl .header .header-top div.left-content ul.search-container li.search-group .search-field{border:2px solid #c7c7c7;padding-right:12px;padding-left:0;border-radius:2px;border-top-left-radius:0;border-bottom-left-radius:0}.rtl .header .header-top div.left-content ul.search-container li.search-group .search-icon-wrapper{border:2px solid #c7c7c7;border-right:none;border-radius:2px;border-top-right-radius:0;border-bottom-right-radius:0}.rtl .header .header-top div.right-content .right-content-menu>li{border-right:2px solid #c7c7c7;padding:0 15px}.rtl .header .header-top div.right-content .right-content-menu>li:last-child{padding-left:0}.rtl .header .header-top div.right-content .right-content-menu>li:first-child{border-right:0;padding-right:0}.rtl .header .header-top div.right-content .right-content-menu .cart-dropdown-container .dropdown-list{left:0;right:unset!important}.rtl .header .header-top div.right-content .right-content-menu .cart-dropdown-container .count{display:inline-block}.rtl .header .header-top div.right-content .right-content-menu .account,.rtl .header .header-top div.right-content .right-content-menu .currency{right:unset;left:0}.rtl .header .header-top div.right-content .right-content-menu .guest div{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between}.rtl .header .header-bottom .nav>li{float:right;margin-right:0;margin-left:1px}.rtl .header .header-bottom .nav a{padding:.8em .5em .8em .3em!important}.rtl .header .header-bottom .nav li a>.icon{-webkit-transform:rotate(180deg);transform:rotate(180deg)}.rtl .header .header-bottom .nav>li li:hover>ul{left:unset!important;right:100%!important}.rtl .header .header-bottom .nav ul{left:99999em}.rtl .header .search-responsive .search-content .right{float:left}.rtl .dropdown-list{text-align:right}.rtl .dropdown-list.bottom-right{left:0;right:auto}@media only screen and (max-width:720px){.rtl .header .header-top div.right-content .menu-box{margin-left:0;margin-right:5px}.rtl .header .header-top div.right-content .right-content-menu .account{position:absolute;left:0;right:auto}.rtl .header .header-top div.right-content .right-content-menu>li{padding:0;border:0}.rtl .header .header-top div.right-content .search-box{margin-left:5px}.rtl .header .header-bottom .nav>li{float:none}.rtl .header .header-bottom .nav li>.icon{float:left;-webkit-transform:rotate(180deg);transform:rotate(180deg)}.rtl .header .header-bottom .icon.icon-arrow-down{margin-left:5px}}.rtl section.slider-block div.slider-content div.slider-control{left:2%;right:auto}@media only screen and (max-width:720px){.rtl section.slider-block div.slider-content div.slider-control{left:0}}.rtl .main-container-wrapper .product-card .sticker{left:auto;right:20px}.rtl .main-container-wrapper .product-card .cart-wish-wrap .addtocart{margin-right:0;margin-left:10px}.rtl section.product-detail div.layouter .form-container div.product-image-group{margin-right:0;margin-left:30px}.rtl section.product-detail div.layouter .form-container div.product-image-group .add-to-buttons{float:left!important}.rtl section.product-detail div.layouter .form-container div .thumb-list{margin-left:4px;margin-right:0}.rtl section.product-detail div.layouter .form-container .details .accordian .accordian-header{padding:20px 0 20px 15px}.rtl section.product-detail div.layouter .form-container .details .accordian .accordian-header .icon{float:left}.rtl section.product-detail div.layouter .form-container .details .accordian .accordian-header .expand-icon{margin-left:10px}.rtl section.product-detail div.layouter .form-container .details .full-specifications td:first-child{padding-right:0;padding-left:40px}.rtl section.product-detail div.layouter .form-container .details .product-ratings .total-reviews{margin-left:0;margin-right:15px}@media only screen and (max-width:720px){.rtl section.product-detail div.layouter .form-container div.product-image-group{margin-right:0;margin-left:0}}.rtl .main .category-container .layered-filter-wrapper,.rtl .main .category-container .responsive-layred-filter{padding-right:0;padding-left:20px}.rtl .main .top-toolbar .pager{float:left}.rtl .main .top-toolbar .pager .view-mode{margin-right:0;margin-left:20px}.rtl .main .top-toolbar .pager .sorter{margin-right:0;margin-left:10px}.rtl .main .top-toolbar .pager label{margin-right:0;margin-left:5px}.rtl .main .top-toolbar .page-info{float:right}.rtl section.review .review-layouter .review-form{margin-left:0;margin-right:20px}.rtl section.review .review-layouter .review-form .heading .right{float:left}.rtl section.review .review-layouter .review-form .ratings-reviews .right-side .rater .star-name{margin-right:0;margin-left:5px}@media only screen and (max-width:770px){.rtl section.review .review-layouter .review-form{margin-right:0}}.rtl section.cart .cart-content .left-side{width:70%;float:right}.rtl section.cart .cart-content .left-side .misc-controls a.link{margin-left:15px;margin-right:0}.rtl section.cart .cart-content .right-side{width:30%;padding-right:40px;padding-left:0}.rtl .order-summary .item-detail label.right,.rtl .payble-amount label.right{float:left}.rtl .item div{margin-left:15px;margin-right:0!important}.rtl .cart-item-list .item .item-details .misc div.qty-text{margin-right:0;margin-left:10px}.rtl .cart-item-list .item .item-details .misc .remove,.rtl .cart-item-list .item .item-details .misc input.box{margin-right:0;margin-left:30px}.rtl .cart-item-list .item .item-details .misc .control-group label{margin-left:15px;margin-right:0}@media only screen and (max-width:770px){.rtl section.cart .cart-content .left-side{width:100%;float:none}.rtl section.cart .cart-content .left-side .misc-controls div button{margin-right:0}.rtl section.cart .cart-content .right-side{width:100%;padding-right:0}}.rtl .checkout-process .col-right{padding-left:0;padding-right:40px}.rtl .checkout-process .col-main{padding-left:40px;padding-right:0}.rtl .checkout-process .col-main ul.checkout-steps li span{margin-right:7px;margin-left:0}.rtl .checkout-process .col-main .step-content .form-header h1{float:right}.rtl .checkout-process .col-main .step-content .form-header .btn{float:left}.rtl .checkout-process .col-main .step-content .payment-methods .control-info{margin-right:28px;margin-left:0}.rtl .checkout-process .col-main .step-content .address .billing-address,.rtl .checkout-process .col-main .step-content .address .pull-left,.rtl .checkout-process .col-main .step-content .order-description .billing-address,.rtl .checkout-process .col-main .step-content .order-description .pull-left{float:right!important}.rtl .checkout-process .col-main .step-content .address .pull-right,.rtl .checkout-process .col-main .step-content .address .shipping-address,.rtl .checkout-process .col-main .step-content .order-description .pull-right,.rtl .checkout-process .col-main .step-content .order-description .shipping-address{float:left!important}.rtl .checkbox,.rtl .radio{margin:10px 0 5px 5px}.rtl .radio .radio-view{margin-left:5px;margin-right:0}.rtl .radio input{right:0;left:auto}@media only screen and (max-width:770px){.rtl .checkout-process .col-main{padding-left:0}}.rtl .account-content .account-layout{margin-left:0;margin-right:40px}.rtl .account-content .menu-block .menubar li{margin-left:0;margin-right:5%}.rtl .account-content .menu-block .menubar li a{text-align:right}.rtl .account-content .menu-block .menubar li .icon{right:unset;left:12px;-webkit-transform:rotate(180deg);transform:rotate(180deg)}.rtl .account-head .account-action{float:left}.rtl .account-item-card .media-info .info{margin-right:20px;margin-left:0}.rtl .account-item-card .operations a span{float:left}.rtl .table table{text-align:right}.rtl .sale-container .totals .sale-summary{float:left}.rtl .sale-container .sale-section .section-content .order-box-container{display:-webkit-box;display:-ms-flexbox;display:flex}@media (max-width:770px){.rtl .account-content .account-layout{margin-right:0}.rtl .account-content .account-layout .account-head .account-action{margin-left:0}.rtl .account-content .sidebar .menu-block .menu-block-title .right{float:left}.rtl .account-content .sidebar .menu-block .menubar>li{margin-right:0}}.rtl .footer .footer-content .footer-list-container .list-container .list-group li span.icon{margin-left:5px;margin-right:0}@media (max-width:720px){.rtl .footer{padding-right:15px;padding-left:10%}.rtl .footer .footer-list-container{padding-right:0!important}}.rtl .cp-spinner{position:absolute;right:calc(50% - 24px);margin-top:calc(40% - 24px)}@media only screen and (max-width:720px){.rtl .cp-spinner{right:50%;margin-right:-24px;left:auto}}.rtl .product-list .product-card .product-information{padding-left:0;padding-right:30px;float:left}.rtl .zoom-image-direction{left:0;right:476px!important}.banner-container{width:100%;float:left;padding:0 18px;margin-bottom:40px}.banner-container .left-banner{padding-right:20px;width:60%;float:left}.banner-container .left-banner img{width:100%}.banner-container .right-banner{padding-left:20px;width:40%;float:left}.banner-container .right-banner img{width:100%}.banner-container .right-banner img:first-child{padding-bottom:20px;height:50%;display:block}.banner-container .right-banner img:last-child{padding-top:20px;height:50%;display:block}@media (max-width:720px){.banner-container .left-banner{padding-right:0;width:100%}.banner-container .right-banner{padding-left:0;width:100%}.banner-container .right-banner img:first-child{padding-bottom:0;padding-top:25px}.banner-container .right-banner img:last-child{padding-top:25px}} \ No newline at end of file +@import url(https://fonts.googleapis.com/css?family=Montserrat:400,500);.icon{display:inline-block;background-size:cover}.dropdown-right-icon{background-image:URL("../images/icon-dropdown-left.svg");width:8px;height:8px;margin-left:auto;margin-bottom:2px}.icon-menu-close{background-image:URL("../images/icon-menu-close.svg");width:24px;height:24px;margin-left:auto}.icon-menu-close-adj{background-image:URL("../images/cross-icon-adj.svg");margin-left:auto}.grid-view-icon{background-image:URL("../images/icon-grid-view.svg");width:24px;height:24px}.list-view-icon{background-image:URL("../images/icon-list-view.svg");width:24px;height:24px}.sort-icon{background-image:URL("../images/icon-sort.svg");width:32px;height:32px}.filter-icon{background-image:URL("../images/icon-filter.svg");width:32px;height:32px}.whishlist-icon{background-image:URL("../images/wishlist.svg");width:24px;height:24px}.share-icon{background-image:URL("../images/icon-share.svg");width:24px;height:24px}.icon-menu{background-image:URL("../images/icon-menu.svg");width:24px;height:24px}.icon-search{background-image:URL("../images/icon-search.svg");width:24px;height:24px}.icon-menu-back{background-image:URL("../images/icon-menu-back.svg");width:24px;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}.cart-icon{background-image:url("../images/icon-cart.svg");width:24px;height:24px}.wishlist-icon{background-image:url("../images/wishlist.svg");width:32px;height:32px}.icon-arrow-up{background-image:url("../images/arrow-up.svg");width:16px;height:16px}.icon-arrow-down{background-image:url("../images/arrow-down.svg");width:16px;height:16px}.expand-icon{background-image:url("../images/Expand-Light.svg");width:18px;height:18px}.expand-on-icon{background-image:url("../images/Expand-Light-On.svg");width:18px;height:18px}.icon-menu-close-adj{background-image:url("../images/cross-icon-adj.svg");width:32px;height:32px}.icon-facebook{background-image:url("../images/facebook.svg")}.icon-twitter{background-image:url("../images/twitter.svg")}.icon-google-plus{background-image:url("../images/google-plus.svg")}.icon-instagram{background-image:url("../images/instagram.svg")}.icon-linkedin{background-image:url("../images/linkedin.svg")}.icon-dropdown{background-image:url("../images/icon-dropdown.svg")}@-webkit-keyframes spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}@keyframes spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}body{margin:0;padding:0;font-weight:500;max-width:100%;width:auto;color:#242424;font-size:16px}*{font-family:Montserrat,sans-serif}::-webkit-input-placeholder{font-family:Montserrat,sans-serif}textarea{resize:none}input{font-family:Montserrat,sans-serif}.btn{border-radius:0!important}.mb-10{margin-bottom:10px}.mb-15{margin-bottom:15px}.mb-20{margin-bottom:20px}.mb-25{margin-bottom:25px}.mb-30{margin-bottom:30px}.mb-35{margin-bottom:35px}.mb-40{margin-bottom:40px}.mb-45{margin-bottom:45px}.mb-50{margin-bottom:50px}.mb-60{margin-bottom:60px}.mb-70{margin-bottom:70px}.mb-80{margin-bottom:80px}.mb-90{margin-bottom:90px}.mt-5{margin-top:5px}.mt-10{margin-top:10px}.mt-15{margin-top:15px}.mt-20{margin-top:20px}.mt-25{margin-top:25px}.mt-30{margin-top:30px}.mt-35{margin-top:35px}.mt-40{margin-top:40px}.mt-45{margin-top:45px}.mt-50{margin-top:50px}.mt-60{margin-top:60px}.mt-70{margin-top:70px}.mt-80{margin-top:80px}.mt-90{margin-top:90px}.pagination.shop{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-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.bold{font-weight:700;color:#3a3a3a}.radio-container{display:block;position:relative;padding-left:35px;margin-bottom:12px;cursor:pointer;font-size:16px;user-select:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none}.radio-container input{position:absolute;opacity:0;cursor:pointer;top:0;left:0}.radio-container .checkmark{position:absolute;top:0;left:0;height:16px;width:16px;background-color:#fff;border:2px solid #ff6472;border-radius:50%}.radio-container .checkmark:after{content:"";position:absolute;display:none;top:2px;left:2px;width:8px;height:8px;border-radius:50%;background:#ff6472}.radio-container input:checked~.checkmark:after{display:block}.radio-container input:disabled~.checkmark{display:block;border:2px solid rgba(255,100,113,.4)}.cp-spinner{width:48px;height:48px;display:inline-block;-webkit-box-sizing:border-box;box-sizing:border-box}.cp-round:before{border-radius:50%;border:6px solid #bababa}.cp-round:after,.cp-round:before{content:" ";width:48px;height:48px;display:inline-block;-webkit-box-sizing:border-box;box-sizing:border-box;position:absolute;top:0;left:0}.cp-round:after{border-radius:50%;border-top:6px solid #0031f0;border-right:6px solid transparent;border-bottom:6px solid transparent;border-left:6px solid transparent;-webkit-animation:spin 1s ease-in-out infinite;animation:spin 1s ease-in-out infinite}.pull-right{float:right}.add-to-wishlist .wishlist-icon:hover{background-image:url("../images/wishlist-added.svg")}.product-price{margin-bottom:14px;width:100%;font-weight:600}.product-price .price-label{font-size:14px;font-weight:400}.product-price .regular-price{color:#a5a5a5;text-decoration:line-through;margin-right:10px}.product-price .special-price{color:#ff6472}.horizontal-rule{display:block;width:100%;height:1px;background:#c7c7c7}.account-head .account-heading{font-size:28px;color:#242424;text-transform:capitalize;text-align:left}.account-head .account-action{font-size:17px;margin-top:1%;color:#0031f0;float:right}.account-head .horizontal-rule{margin-top:1.1%;width:100%;height:1px;vertical-align:middle;background:#c7c7c7}.account-item-card{-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;-webkit-box-align:center;-ms-flex-align:center;align-items:center;width:100%;height:125px}.account-item-card,.account-item-card .media-info{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row}.account-item-card .media-info .media{height:125px;width:110px}.account-item-card .media-info .info{margin-left:20px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-pack:space-evenly;-ms-flex-pack:space-evenly;justify-content:space-evenly}.account-item-card .media-info .info .stars .icon{height:16px;width:16px}.account-item-card .operations{height:120px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.account-item-card .operations a{width:100%}.account-item-card .operations a span{float:right}.account-items-list{display:block;width:100%}.account-items-list .grid-container{margin-top:40px}.search-result-status{width:100%;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.grid-container{margin-top:20px}.main-container-wrapper{max-width:1300px;width:auto;padding-left:15px;padding-right:15px;margin-left:auto;margin-right:auto}.main-container-wrapper .content-container{display:block;margin-bottom:40px}.main-container-wrapper .product-grid-4{display:grid;grid-template-columns:repeat(auto-fill,minmax(235px,1fr));grid-auto-rows:auto;grid-column-gap:30px;grid-row-gap:15px;justify-items:end}.main-container-wrapper .product-grid-3{display:grid;grid-template-columns:repeat(auto-fill,minmax(235px,1fr));grid-gap:27px;grid-auto-rows:auto;justify-items:center}.main-container-wrapper .product-card{position:relative;padding:15px}.main-container-wrapper .product-card .product-image{max-height:350px;max-width:280px;margin-bottom:10px;background:#f2f2f2}.main-container-wrapper .product-card .product-image img{display:block;width:100%}.main-container-wrapper .product-card .product-name{margin-bottom:14px;width:100%;color:#242424}.main-container-wrapper .product-card .product-name a{color:#242424}.main-container-wrapper .product-card .product-description{display:none}.main-container-wrapper .product-card .product-ratings{width:100%}.main-container-wrapper .product-card .product-ratings .icon{width:16px;height:16px}.main-container-wrapper .product-card .cart-wish-wrap{display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start;-webkit-box-align:center;-ms-flex-align:center;align-items:center;height:40px}.main-container-wrapper .product-card .cart-wish-wrap .addtocart{margin-right:10px;text-transform:uppercase;text-align:left;-webkit-box-shadow:1px 1px 0 #ccc;box-shadow:1px 1px 0 #ccc}.main-container-wrapper .product-card .cart-wish-wrap .add-to-wishlist{margin-top:5px;background:transparent;border:0;cursor:pointer;padding:0}.main-container-wrapper .product-card .sticker{border-radius:100px;position:absolute;top:20px;left:20px;text-transform:uppercase;padding:4px 13px;font-size:14px;color:#fff;-webkit-box-shadow:1px 1px 1px #ccc;box-shadow:1px 1px 1px #ccc}.main-container-wrapper .product-card .sticker.sale{background:#ff6472}.main-container-wrapper .product-card .sticker.new{background:#2ed04c}.main-container-wrapper .product-card:hover{outline:1px solid #eaeaec;box-shadow:0 1px 2px rgba(0,0,0,.05);-webkit-box-shadow:0 2px 16px 4px rgba(40,44,63,.07);box-shadow:0 2px 16px 4px rgba(40,44,63,.07)}@media only screen and (max-width:580px){.main-container-wrapper .main-container-wrapper{padding:0}}@media only screen and (max-width:551px){.main-container-wrapper .product-grid-3{grid-template-columns:48.5% 48.5%;grid-column-gap:20px}}@media only screen and (max-width:854px){.main-container-wrapper .product-grid-4{grid-template-columns:29.5% 29.5% 29.5%;grid-column-gap:35px}}@media only screen and (max-width:653px){.main-container-wrapper .product-grid-4{grid-template-columns:48.5% 48.5%;grid-column-gap:17px}}@media only screen and (max-width:425px){.main-container-wrapper .product-card{font-size:90%}.main-container-wrapper .product-card .btn.btn-md{padding:5px}.main-container-wrapper .product-grid-4{grid-template-columns:48.5% 48.5%;grid-column-gap:10px}}.main-container-wrapper .product-list{min-height:200px}.main-container-wrapper .product-list .product-card{width:100%;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-align:center;-ms-flex-align:center;align-items:center;margin-bottom:20px}.main-container-wrapper .product-list .product-card .product-image{float:left;width:30%;height:350px}.main-container-wrapper .product-list .product-card .product-image img{height:100%}.main-container-wrapper .product-list .product-card .product-information{float:right;width:70%;padding-left:30px}.main-container-wrapper .product-list .product-card:last-child{margin-bottom:0}.main-container-wrapper .product-list.empty h2{font-size:20px}.main-container-wrapper section.featured-products{display:block;margin-bottom:5%}.main-container-wrapper section.featured-products .featured-heading{width:100%;text-align:center;text-transform:uppercase;font-size:18px;margin-bottom:20px}.main-container-wrapper section.featured-products .featured-heading .featured-separator{color:#d3d3d3}.main-container-wrapper section.news-update{display:block;-webkit-box-sizing:border-box;box-sizing:border-box;width:100%;margin-bottom:5%}.main-container-wrapper section.news-update .news-update-grid{display:grid;grid-template-columns:58.5% 40%;grid-gap:20px}.main-container-wrapper section.news-update .news-update-grid .block1{display:block;-webkit-box-sizing:border-box;box-sizing:border-box}.main-container-wrapper section.news-update .news-update-grid .block1 img{display:-webkit-box;display:-ms-flexbox;display:flex;height:100%;width:100%}.main-container-wrapper section.news-update .news-update-grid .block2{display:block;-webkit-box-sizing:border-box;box-sizing:border-box;display:grid;grid-template-rows:repeat(2,minmax(50%,1fr));grid-row-gap:20px}.main-container-wrapper section.news-update .news-update-grid .block2 .sub-block1{display:block;-webkit-box-sizing:border-box;box-sizing:border-box}.main-container-wrapper section.news-update .news-update-grid .block2 .sub-block1 img{width:100%}.main-container-wrapper section.news-update .news-update-grid .block2 .sub-block2{display:block;-webkit-box-sizing:border-box;box-sizing:border-box}.main-container-wrapper section.news-update .news-update-grid .block2 .sub-block2 img{width:100%}section.slider-block{display:block;margin-left:auto;margin-right:auto;margin-bottom:5%}section.slider-block div.slider-content{position:relative;height:500px;margin-left:auto;margin-right:auto}section.slider-block div.slider-content ul.slider-images .show-content{display:none}section.slider-block div.slider-content ul.slider-images li{position:absolute;visibility:hidden}section.slider-block div.slider-content ul.slider-images li.show{display:block;position:relative;visibility:visible;width:100%;-webkit-animation-name:example;animation-name:example;-webkit-animation-duration:4s;animation-duration:4s}section.slider-block div.slider-content ul.slider-images li.show .show-content{display:-webkit-box;display:-ms-flexbox;display:flex;position:absolute;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;color:#242424;height:100%;width:100%;top:0}@-webkit-keyframes example{0%{opacity:.1}to{opacity:1}}@keyframes example{0%{opacity:.1}to{opacity:1}}section.slider-block div.slider-content ul.slider-images li img{height:500px;width:100%}section.slider-block div.slider-content div.slider-control{display:block;cursor:pointer;position:absolute;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;bottom:2%;right:2%}section.slider-block div.slider-content div.slider-control .dark-left-icon{background-color:#f2f2f2;height:48px;width:48px;max-height:100%;max-width:100%}section.slider-block div.slider-content div.slider-control .light-right-icon{background-color:#242424;height:48px;width:48px;max-height:100%;max-width:100%}@media only screen and (max-width:770px){section.slider-block div.slider-content div.slider-control{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;bottom:46%;right:0;width:100%}}.header{margin-top:16px;margin-bottom:21px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.header .header-top{margin-bottom:16px;max-width:100%;width:auto;margin-left:auto;margin-right:auto;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between}.header .header-top,.header .header-top div.left-content{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.header .header-top div.left-content{-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start}.header .header-top div.left-content ul.logo-container{margin-right:12px}.header .header-top div.left-content ul.logo-container li{display:-webkit-box;display:-ms-flexbox;display:flex}.header .header-top div.left-content ul.logo-container li img{max-width:120px;max-height:40px}.header .header-top div.left-content ul.search-container li.search-group{display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.header .header-top div.left-content ul.search-container li.search-group .search-field{height:38px;border:2px solid #c7c7c7;border-radius:3px;border-right:none;border-top-right-radius:0;border-bottom-right-radius:0;padding-left:12px;font-size:14px}.header .header-top div.left-content ul.search-container li.search-group .search-icon-wrapper{-webkit-box-sizing:border-box;box-sizing:border-box;height:38px;width:38px;border:2px solid #c7c7c7;border-top-right-radius:3px;border-bottom-right-radius:3px}.header .header-top div.left-content ul.search-container li.search-group .search-icon-wrapper button{background:#fff;border:0;padding:3px 5px}.header .header-top div.right-content .right-content-menu>li{display:inline-block;border-right:2px solid #c7c7c7;padding:0 15px;min-height:15px;padding-top:3px}.header .header-top div.right-content .right-content-menu>li:first-child{padding-left:0}.header .header-top div.right-content .right-content-menu>li:last-child{border-right:0;padding-right:0}.header .header-top div.right-content .right-content-menu>li .icon{vertical-align:middle}.header .header-top div.right-content .right-content-menu>li .icon:not(.arrow-down-icon){margin-right:5px}.header .header-top div.right-content .right-content-menu>li .arrow-down-icon{width:12px;height:6px}.header .header-top div.right-content .right-content-menu .cart-dropdown-container{border-right:0;padding-right:0}.header .header-top div.right-content .right-content-menu .cart-link{pointer-events:none}.header .header-top div.right-content .right-content-menu ul.dropdown-list{display:none;margin-top:14px}.header .header-top div.right-content .right-content-menu ul.dropdown-list li{border-right:none;padding:5px 10px;display:block}.header .header-top div.right-content .right-content-menu ul.dropdown-list li a{color:#333}.header .header-top div.right-content .right-content-menu .currency{position:absolute;right:0;width:100px}.header .header-top div.right-content .right-content-menu .account{position:absolute;right:0}.header .header-top div.right-content .right-content-menu .account li{padding:20px!important}.header .header-top div.right-content .right-content-menu .account li ul{margin-top:5px}.header .header-top div.right-content .right-content-menu .account li ul>li{padding:5px 10px 5px 0!important}.header .header-top div.right-content .right-content-menu .guest{width:300px}.header .header-top div.right-content .right-content-menu .guest .btn.btn-sm{padding:9px 25px}.header .header-top div.right-content .right-content-menu .cart-dropdown-container .dropdown-list{width:387px}.header .header-top div.right-content .right-content-menu .cart-dropdown-container .dropdown-list .dropdown-container{padding:0}.header .header-top div.right-content .right-content-menu .cart-dropdown-container .dropdown-list .dropdown-container .dropdown-cart{color:#242424}.header .header-top div.right-content .right-content-menu .cart-dropdown-container .dropdown-list .dropdown-container .dropdown-cart>.dropdown-header{width:100%;padding:8px 16px;border-bottom:1px solid #c7c7c7}.header .header-top div.right-content .right-content-menu .cart-dropdown-container .dropdown-list .dropdown-container .dropdown-cart>.dropdown-header p{display:inline;line-height:25px}.header .header-top div.right-content .right-content-menu .cart-dropdown-container .dropdown-list .dropdown-container .dropdown-cart>.dropdown-header i{float:right;height:22px;width:22px}.header .header-top div.right-content .right-content-menu .cart-dropdown-container .dropdown-list .dropdown-container .dropdown-cart>.dropdown-header p.heading{font-weight:lighter}.header .header-top div.right-content .right-content-menu .cart-dropdown-container .dropdown-list .dropdown-container .dropdown-content{padding-top:8px;margin-bottom:55px;width:100%;max-height:329px;overflow-y:auto}.header .header-top div.right-content .right-content-menu .cart-dropdown-container .dropdown-list .dropdown-container .dropdown-content .item{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;border-bottom:1px solid #c7c7c7;padding:8px 16px}.header .header-top div.right-content .right-content-menu .cart-dropdown-container .dropdown-list .dropdown-container .dropdown-content .item img{height:75px;width:75px;margin-right:8px}.header .header-top div.right-content .right-content-menu .cart-dropdown-container .dropdown-list .dropdown-container .dropdown-content .item-details{height:auto}.header .header-top div.right-content .right-content-menu .cart-dropdown-container .dropdown-list .dropdown-container .item-details .item-name{font-size:16px;font-weight:700;margin-bottom:8px}.header .header-top div.right-content .right-content-menu .cart-dropdown-container .dropdown-list .dropdown-container .item-details .item-options{font-size:16px;margin-bottom:8px}.header .header-top div.right-content .right-content-menu .cart-dropdown-container .dropdown-list .dropdown-container .item-details .item-price{margin-bottom:8px}.header .header-top div.right-content .right-content-menu .cart-dropdown-container .dropdown-list .dropdown-container .item-details .item-qty{font-weight:lighter;margin-bottom:8px}.header .header-top div.right-content .right-content-menu .cart-dropdown-container .dropdown-list .dropdown-container .dropdown-footer{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;-webkit-box-align:center;-ms-flex-align:center;align-items:center;padding:8px 16px;position:absolute;bottom:0;width:100%;background:#fff;border-top:1px solid #c7c7c7}.header .header-top div.right-content .right-content-menu .cart-dropdown-container .dropdown-list .dropdown-container .dropdown-footer .btn{margin:0;max-width:170px;text-align:center}.header .header-top div.right-content .menu-box,.header .header-top div.right-content .search-box{display:none}.header .header-bottom{height:47px;margin-left:auto;margin-right:auto;border-top:1px solid #c7c7c7;border-bottom:1px solid #c7c7c7;display:block}.header .header-bottom ul.nav{display:block;font-size:16px;max-width:100%;width:auto;margin-left:auto;margin-right:auto}.header .header-bottom .nav ul{margin:0;padding:0;-webkit-box-shadow:1px 1px 1px 0 rgba(0,0,0,.4);box-shadow:1px 1px 1px 0 rgba(0,0,0,.4)}.header .header-bottom .nav a{display:block;color:#242424;text-decoration:none;padding:.8em .3em .8em .5em;text-transform:capitalize;letter-spacing:-.38px;position:relative}.header .header-bottom .nav li>.icon{display:none}.header .header-bottom .nav{vertical-align:top;display:inline-block}.header .header-bottom .nav li{position:relative}.header .header-bottom .nav>li{float:left;margin-right:1px;height:45px}.header .header-bottom .nav>li>a{margin-bottom:1px}.header .header-bottom .nav>li>a .icon{display:none}.header .header-bottom .nav li li a{margin-top:1px;white-space:normal;word-break:break-word;width:200px}.header .header-bottom .nav li a:first-child:nth-last-child(2):before{content:"";position:absolute;height:0;width:0;border:5px solid transparent;top:50%;right:5px}.header .header-bottom .nav ul{position:absolute;white-space:nowrap;border:1px solid #c7c7c7;background-color:#fff;z-index:10000;left:-99999em}.header .header-bottom .nav>li:hover{background-color:#f2f2f2}.header .header-bottom .nav>li:hover>ul{left:auto;min-width:100%}.header .header-bottom .nav>li li:hover{background-color:#f2f2f2}.header .header-bottom .nav>li li:hover>ul{left:100%;margin-left:1px;top:-2px}.header .header-bottom .nav>li:hover>a:first-child:nth-last-child(2):before,.header .header-bottom .nav li li>a:first-child:nth-last-child(2):before{margin-top:-5px}.header .header-bottom .nav li li:hover>a:first-child:nth-last-child(2):before{right:10px}.header .search-responsive{display:none}.header .search-responsive .search-content{border-bottom:1px solid #c7c7c7;border-top:1px solid #c7c7c7;height:50px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between}.header .search-responsive .search-content .search{width:80%;border:none;font-size:16px}.header .search-responsive .search-content .right{float:right}@media (max-width:720px){.header .currency-switcher{display:none!important}.header .header-top div.right-content{display:inherit}.header .header-top div.right-content .menu-box{display:inline-block;margin-left:10px}.header .header-top div.right-content .search-box{display:inline-block;margin-right:10px}.header .header-top div.right-content .right-content-menu>li{border-right:none;padding:0 2px}.header .header-top div.right-content .right-content-menu>li .icon:not(.arrow-down-icon){margin-right:0}.header .header-top div.right-content .right-content-menu .cart-link{pointer-events:all}.header .header-top div.right-content .right-content-menu .arrow-down-icon,.header .header-top div.right-content .right-content-menu .cart-dropdown-container .dropdown-container,.header .header-top div.right-content .right-content-menu .name{display:none}.header .header-bottom{height:auto;display:none}.header .header-bottom .nav a{display:inline-block}.header .header-bottom .nav li,.header .header-bottom ul.nav{height:auto}.header .header-bottom .nav>li{float:none}.header .header-bottom .nav li>.icon{float:right;display:block}.header .header-bottom .icon.icon-arrow-down{margin-right:5px}.header .header-bottom .nav li .left{height:16px;width:16px}.header .header-bottom .nav li a>.icon{display:none}.header .header-bottom .nav ul{position:unset;border:none;-webkit-box-shadow:none;box-shadow:none}.header .header-bottom .nav>li li:hover>ul{margin-left:0;top:0}ul.account-dropdown-container,ul.cart-dropdown-container,ul.search-container{display:none!important}}@media (max-width:400px){.header .header-top div.right-content .right-content-menu .guest{width:240px}.header .header-top div.right-content .right-content-menu .guest .btn.btn-sm{padding:7px 14px}}.footer{background-color:#f2f2f2;padding-left:10%;padding-right:10%;width:100%;display:inline-block}.footer .footer-content .footer-list-container{display:grid;padding:40px 10px;grid-template-columns:repeat(auto-fit,minmax(250px,1fr));grid-auto-rows:auto;grid-row-gap:1vh}.footer .footer-content .footer-list-container .list-container .list-heading{text-transform:uppercase;color:#a5a5a5}.footer .footer-content .footer-list-container .list-container .list-group{padding-top:25px}.footer .footer-content .footer-list-container .list-container .list-group a{color:#242424}.footer .footer-content .footer-list-container .list-container .list-group li{margin-bottom:12px;list-style-type:none;text-transform:uppercase}.footer .footer-content .footer-list-container .list-container .list-group li span.icon{display:inline-block;vertical-align:middle;margin-right:5px;height:24px;width:24px}.footer .footer-content .footer-list-container .list-container .form-container{padding-top:5px}.footer .footer-content .footer-list-container .list-container .form-container .control-group .subscribe-field{width:100%}.footer .footer-content .footer-list-container .list-container .form-container .control-group .btn-primary{background-color:#242424;margin-top:8px;border-radius:0;text-align:center}.footer .footer-content .footer-list-container .list-container .form-container .control-group .locale-switcher{width:100%}.footer .footer-content .footer-list-container .list-container .currency{display:none}@media (max-width:720px){.footer{padding-left:15px}.footer .footer-list-container{padding-left:0!important}.footer .currency{display:block!important}}.footer-bottom{width:100%;height:70px;font-size:16px;color:#a5a5a5;letter-spacing:-.26px;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:center;-ms-flex-pack:center;justify-content:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.footer-bottom p{padding:0 15px}.main .category-container{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;width:100%}.main .category-container .layered-filter-wrapper,.main .category-container .responsive-layred-filter{width:25%;float:left;padding-right:20px;min-height:1px}.main .category-container .layered-filter-wrapper .filter-title,.main .category-container .responsive-layred-filter .filter-title{border-bottom:1px solid #c7c7c7;color:#242424;padding:10px 0}.main .category-container .layered-filter-wrapper .filter-attributes .filter-attributes-item,.main .category-container .responsive-layred-filter .filter-attributes .filter-attributes-item{border-bottom:1px solid #c7c7c7;padding-bottom:10px}.main .category-container .layered-filter-wrapper .filter-attributes .filter-attributes-item .filter-attributes-title,.main .category-container .responsive-layred-filter .filter-attributes .filter-attributes-item .filter-attributes-title{padding:10px 40px 0 10px;color:#5e5e5e;cursor:pointer;position:relative}.main .category-container .layered-filter-wrapper .filter-attributes .filter-attributes-item .filter-attributes-title .remove-filter-link,.main .category-container .responsive-layred-filter .filter-attributes .filter-attributes-item .filter-attributes-title .remove-filter-link{font-weight:400;color:#0031f0;margin-right:10px}.main .category-container .layered-filter-wrapper .filter-attributes .filter-attributes-item .filter-attributes-title .icon,.main .category-container .responsive-layred-filter .filter-attributes .filter-attributes-item .filter-attributes-title .icon{background-image:url("../images/icon-dropdown.svg")!important;width:10px;height:10px;position:absolute;right:15px;top:14px}.main .category-container .layered-filter-wrapper .filter-attributes .filter-attributes-item .filter-attributes-content,.main .category-container .responsive-layred-filter .filter-attributes .filter-attributes-item .filter-attributes-content{padding:10px;display:none}.main .category-container .layered-filter-wrapper .filter-attributes .filter-attributes-item .filter-attributes-content ol.items,.main .category-container .responsive-layred-filter .filter-attributes .filter-attributes-item .filter-attributes-content ol.items{padding:0;margin:0;list-style:none none}.main .category-container .layered-filter-wrapper .filter-attributes .filter-attributes-item .filter-attributes-content ol.items li.item,.main .category-container .responsive-layred-filter .filter-attributes .filter-attributes-item .filter-attributes-content ol.items li.item{padding:8px 0;color:#5e5e5e}.main .category-container .layered-filter-wrapper .filter-attributes .filter-attributes-item .filter-attributes-content ol.items li.item .checkbox,.main .category-container .responsive-layred-filter .filter-attributes .filter-attributes-item .filter-attributes-content ol.items li.item .checkbox{margin:0}.main .category-container .layered-filter-wrapper .filter-attributes .filter-attributes-item .filter-attributes-content ol.items li.item .checkbox .checkbox-view,.main .category-container .responsive-layred-filter .filter-attributes .filter-attributes-item .filter-attributes-content ol.items li.item .checkbox .checkbox-view{height:16px;width:16px;background-image:url("../images/checkbox.svg")}.main .category-container .layered-filter-wrapper .filter-attributes .filter-attributes-item .filter-attributes-content ol.items li.item .checkbox input:checked+.checkbox-view,.main .category-container .responsive-layred-filter .filter-attributes .filter-attributes-item .filter-attributes-content ol.items li.item .checkbox input:checked+.checkbox-view{background-image:url("../images/checkbox-checked.svg")}.main .category-container .layered-filter-wrapper .filter-attributes .filter-attributes-item .filter-attributes-content ol.items li.item .color-swatch,.main .category-container .responsive-layred-filter .filter-attributes .filter-attributes-item .filter-attributes-content ol.items li.item .color-swatch{display:inline-block;margin-right:5px;min-width:20px;height:20px;border:1px solid #c7c7c7;border-radius:3px;float:right}.main .category-container .layered-filter-wrapper .filter-attributes .filter-attributes-item .filter-attributes-content .price-range-wrapper,.main .category-container .responsive-layred-filter .filter-attributes .filter-attributes-item .filter-attributes-content .price-range-wrapper{margin-top:21px}.main .category-container .layered-filter-wrapper .filter-attributes .filter-attributes-item.active .filter-attributes-content,.main .category-container .responsive-layred-filter .filter-attributes .filter-attributes-item.active .filter-attributes-content{display:block}.main .category-container .layered-filter-wrapper .filter-attributes .filter-attributes-item.active .filter-attributes-title .icon,.main .category-container .responsive-layred-filter .filter-attributes .filter-attributes-item.active .filter-attributes-title .icon{background-image:url("../images//arrow-up.svg")!important}.main .category-container .responsive-layred-filter{display:none;width:100%;float:none;padding-right:0;margin-top:-25px!important}.main .category-container .category-block{width:80%;display:block}.main .category-container .category-block .hero-image{display:inline-block;visibility:visible;width:100%}.main .category-container .category-block .hero-image img{height:400px;width:100%}.main .top-toolbar{width:100%;display:inline-block}.main .top-toolbar .page-info{float:left;color:#242424;line-height:45px}.main .top-toolbar .page-info span{display:none}.main .top-toolbar .page-info span:first-child{display:inline}.main .top-toolbar .pager{float:right}.main .top-toolbar .pager label{margin-right:5px}.main .top-toolbar .pager select{background:#f2f2f2;border:1px solid #c7c7c7;border-radius:3px;color:#242424;padding:10px}.main .top-toolbar .pager .view-mode{display:inline-block;margin-right:20px}.main .top-toolbar .pager .view-mode a,.main .top-toolbar .pager .view-mode span{display:inline-block;vertical-align:middle}.main .top-toolbar .pager .view-mode a.grid-view,.main .top-toolbar .pager .view-mode span.grid-view{margin-right:10px}.main .top-toolbar .pager .view-mode .sort-filter{display:none}.main .top-toolbar .pager .sorter{display:inline-block;margin-right:10px}.main .top-toolbar .pager .limiter{display:inline-block}.main .bottom-toolbar{display:block;margin-top:40px;margin-bottom:40px;text-align:center}@media only screen and (max-width:840px){.main .category-container .responsive-layred-filter,.main .layered-filter-wrapper{display:none}.main .category-block{width:100%!important}.main .category-block .top-toolbar{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.main .category-block .top-toolbar .page-info{border-bottom:1px solid #c7c7c7;line-height:15px;margin-top:10px}.main .category-block .top-toolbar .page-info span{display:inline}.main .category-block .top-toolbar .page-info span:first-child{display:none}.main .category-block .top-toolbar .page-info .sort-filter{float:right;cursor:pointer}.main .category-block .top-toolbar .pager{margin-top:20px;display:none}.main .category-block .top-toolbar .pager .view-mode{display:none}.main .category-block .responsive-layred-filter{display:block}}section.product-detail{color:#242424}section.product-detail div.category-breadcrumbs{display:inline}section.product-detail div.layouter{display:block;margin-top:20px;margin-bottom:20px}section.product-detail div.layouter .form-container{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;width:100%}section.product-detail div.layouter .form-container div.product-image-group{margin-right:30px;width:604px;height:650px;max-width:604px;position:-webkit-sticky;position:sticky;top:10px}section.product-detail div.layouter .form-container div.product-image-group div{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;cursor:pointer}section.product-detail div.layouter .form-container div.product-image-group div .thumb-list{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;margin-right:4px;min-width:120px;overflow:hidden;position:relative;-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start;max-height:480px}section.product-detail div.layouter .form-container div.product-image-group div .thumb-list .thumb-frame{border:2px solid transparent;background:#f2f2f2;width:120px;max-height:120px}section.product-detail div.layouter .form-container div.product-image-group div .thumb-list .thumb-frame.active{border-color:#0031f0}section.product-detail div.layouter .form-container div.product-image-group div .thumb-list .thumb-frame img{height:100%;width:100%}section.product-detail div.layouter .form-container div.product-image-group div .thumb-list .gallery-control{width:100%;position:absolute;text-align:center;cursor:pointer;z-index:1}section.product-detail div.layouter .form-container div.product-image-group div .thumb-list .gallery-control .overlay{opacity:.3;background:#242424;width:100%;height:18px;position:absolute;left:0;z-index:-1}section.product-detail div.layouter .form-container div.product-image-group div .thumb-list .gallery-control .icon{z-index:2}section.product-detail div.layouter .form-container div.product-image-group div .thumb-list .gallery-control.top{top:0}section.product-detail div.layouter .form-container div.product-image-group div .thumb-list .gallery-control.bottom{bottom:0}section.product-detail div.layouter .form-container div.product-image-group div .product-hero-image{display:block;position:relative;background:#f2f2f2;width:100%;max-height:480px;height:100%}section.product-detail div.layouter .form-container div.product-image-group div .product-hero-image img{width:100%;height:auto;max-height:480px}section.product-detail div.layouter .form-container div.product-image-group div .product-hero-image .add-to-wishlist{background-image:url("../images/wishlist.svg");position:absolute;top:10px;right:12px;background-color:transparent;border:0;cursor:pointer;padding:0;width:32px;height:32px}section.product-detail div.layouter .form-container div.product-image-group div .product-hero-image .add-to-wishlist:hover{background-image:url("../images/wishlist-added.svg")}section.product-detail div.layouter .form-container div.product-image-group div .product-hero-image .share{position:absolute;top:10px;right:45px}section.product-detail div.layouter .form-container div.product-image-group .add-to-buttons{display:none;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;margin-top:10px;width:79.5%;float:right;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between}section.product-detail div.layouter .form-container div.product-image-group .add-to-buttons .addtocart{width:49%;background:#000;white-space:normal;text-transform:uppercase}section.product-detail div.layouter .form-container div.product-image-group .add-to-buttons .buynow{width:49%;white-space:nowrap;text-transform:uppercase}section.product-detail div.layouter .form-container .details{width:50%;overflow-wrap:break-word}section.product-detail div.layouter .form-container .details .product-price{margin-bottom:14px}section.product-detail div.layouter .form-container .details .product-price .sticker{display:none}section.product-detail div.layouter .form-container .details .product-ratings{margin-bottom:20px}section.product-detail div.layouter .form-container .details .product-ratings .icon{width:16px;height:16px}section.product-detail div.layouter .form-container .details .product-ratings .total-reviews{display:inline-block;margin-left:15px}section.product-detail div.layouter .form-container .details .product-heading{font-size:24px;color:#242424;margin-bottom:15px}section.product-detail div.layouter .form-container .details .product-price{margin-bottom:15px}section.product-detail div.layouter .form-container .details .product-price .special-price{font-size:24px}section.product-detail div.layouter .form-container .details .stock-status{margin-bottom:15px;font-weight:600;color:#fc6868}section.product-detail div.layouter .form-container .details .stock-status.active{color:#4caf50}section.product-detail div.layouter .form-container .details .description{margin-bottom:15px}section.product-detail div.layouter .form-container .details .description ul{padding-left:40px;list-style:disc}section.product-detail div.layouter .form-container .details .quantity{padding-top:15px;border-top:1px solid hsla(0,0%,64%,.2)}section.product-detail div.layouter .form-container .details .full-description *{max-width:100%}section.product-detail div.layouter .form-container .details .full-description ul{padding-left:40px;list-style:disc}section.product-detail div.layouter .form-container .details .full-specifications td{padding:10px 0;color:#5e5e5e}section.product-detail div.layouter .form-container .details .full-specifications td:first-child{padding-right:40px}section.product-detail div.layouter .form-container .details .accordian .accordian-header{padding-left:0;font-weight:600}section.product-detail div.layouter .form-container .details .accordian .accordian-content{padding:20px 0}section.product-detail div.layouter .form-container .details .attributes{display:block;width:100%;border-bottom:1px solid hsla(0,0%,64%,.2)}section.product-detail div.layouter .form-container .details .attributes .attribute.control-group{margin-bottom:20px}section.product-detail div.layouter .form-container .details .attributes .attribute.control-group .swatch-container{margin-top:10px;display:inline-block}section.product-detail div.layouter .form-container .details .attributes .attribute.control-group .swatch-container .swatch{display:inline-block;margin-right:5px;min-width:40px;height:40px}section.product-detail div.layouter .form-container .details .attributes .attribute.control-group .swatch-container .swatch span{min-width:38px;height:38px;float:left;border:1px solid #c7c7c7;border-radius:3px;line-height:36px;text-align:center;cursor:pointer;padding:0 10px}section.product-detail div.layouter .form-container .details .attributes .attribute.control-group .swatch-container .swatch img{width:38px;height:38px;border:1px solid #c7c7c7;border-radius:3px;cursor:pointer;background:#f2f2f2}section.product-detail div.layouter .form-container .details .attributes .attribute.control-group .swatch-container .swatch input:checked+img,section.product-detail div.layouter .form-container .details .attributes .attribute.control-group .swatch-container .swatch input:checked+span{border:1px solid #242424}section.product-detail div.layouter .form-container .details .attributes .attribute.control-group .swatch-container .swatch input{display:none}section.product-detail div.layouter .form-container .details .attributes .attribute.control-group .swatch-container .no-options{color:#ff6472}section.product-detail div.layouter .form-container .details .quantity-change{cursor:pointer;text-align:center}section.product-detail div.layouter .form-container .details .quantity-change:focus{border-color:#c7c7c7!important}@media only screen and (max-width:720px){section.product-detail div.layouter .form-container{-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}section.product-detail div.layouter .form-container div.product-image-group{margin-right:0;max-width:none;width:auto;min-height:400px;height:auto;position:unset}section.product-detail div.layouter .form-container div.product-image-group .loader{margin-left:47%}section.product-detail div.layouter .form-container div.product-image-group div{-webkit-box-orient:vertical;-webkit-box-direction:reverse;-ms-flex-direction:column-reverse;flex-direction:column-reverse}section.product-detail div.layouter .form-container div.product-image-group div .thumb-list{margin-top:5px;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;overflow-x:scroll;margin-right:0}section.product-detail div.layouter .form-container div.product-image-group div .thumb-list .thumb-frame img{height:100%;width:auto}section.product-detail div.layouter .form-container div.product-image-group div .thumb-list .gallery-control{display:none}section.product-detail div.layouter .form-container div.product-image-group div .product-hero-image{display:-webkit-box;display:-ms-flexbox;display:flex}section.product-detail div.layouter .form-container div.product-image-group div .product-hero-image img{margin-left:auto;margin-right:auto;width:480px}section.product-detail div.layouter .form-container div.product-image-group div .wrap{-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;width:100%!important}section.product-detail div.layouter .form-container div.product-image-group .add-to-buttons{width:100%}section.product-detail div.layouter .form-container .details{width:100%;margin-top:20px}}@media only screen and (max-width:510px){section.product-detail div.layouter .form-container div.product-image-group .product-hero-image img{width:100%!important}}.rating-reviews .rating-header{padding:20px 0}.rating-reviews .stars .icon{width:16px;height:16px}.rating-reviews .overall{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-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between}.rating-reviews .overall .review-info .number{font-size:34px}.rating-reviews .overall .review-info .total-reviews{margin-top:10px}.rating-reviews .reviews{margin-top:40px;margin-bottom:40px}.rating-reviews .reviews .review{margin-bottom:25px}.rating-reviews .reviews .review .title{margin-bottom:5px}.rating-reviews .reviews .review .stars{margin-bottom:15px;display:inline-block}.rating-reviews .reviews .review .message{margin-bottom:10px}.rating-reviews .reviews .review .reviewer-details{color:#5e5e5e}.rating-reviews .reviews .view-all{margin-top:15px;color:#0031f0;margin-bottom:15px}section.cart{width:100%;color:#242424;margin-bottom:80px;margin-top:20px}section.cart .title{font-size:24px}section.cart .cart-content{margin-top:20px;width:100%;display:inline-block}section.cart .cart-content .left-side{width:70%;float:left}section.cart .cart-content .left-side .misc-controls{width:100%;display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;margin-top:20px}section.cart .cart-content .left-side .misc-controls a.link,section.cart .cart-content .left-side .misc-controls div button{margin-right:15px}section.cart .cart-content .right-side{width:30%;display:inline-block;padding-left:40px}.cart-item-list .item{padding:10px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;border:1px solid #c7c7c7;border-radius:2px}.cart-item-list .item .item-image{margin-right:15px}.cart-item-list .item .item-image img{height:160px;width:160px}.cart-item-list .item .item-details{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start;width:100%}.cart-item-list .item .item-details .item-title{font-size:18px;margin-bottom:10px;font-weight:600}.cart-item-list .item .item-details .item-title a{color:#242424}.cart-item-list .item .item-details .price{margin-bottom:10px;font-size:18px;font-weight:600}.cart-item-list .item .item-details .summary{margin-bottom:17px}.cart-item-list .item .item-details .misc{display:-webkit-box;display:-ms-flexbox;display:flex;width:100%;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start;-webkit-box-align:start;-ms-flex-align:start;align-items:flex-start}.cart-item-list .item .item-details .misc .control-group{font-size:16px!important;width:220px;margin:0}.cart-item-list .item .item-details .misc .control-group .wrap{display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.cart-item-list .item .item-details .misc .control-group label{margin-right:15px}.cart-item-list .item .item-details .misc .control-group .control{height:38px;width:60px;border-radius:3px;text-align:center;line-height:38px}.cart-item-list .item .item-details .misc .remove,.cart-item-list .item .item-details .misc .towishlist{margin-top:18px;margin-right:15px}.cart-item-list .item .item-details .misc .quantity-change{cursor:pointer}.cart-item-list .item .item-details .misc .quantity-change:focus{border-color:#c7c7c7!important}.cart-item-list .item .error-message{color:#ff6472}.order-summary h3{font-size:16px;margin-top:0}.order-summary .item-detail{margin-top:12px}.order-summary .item-detail label.right{float:right}.order-summary .payable-amount{margin-top:17px;border-top:1px solid #c7c7c7;padding-top:12px}.order-summary .payable-amount label{font-weight:700}.order-summary .payable-amount label.right{float:right}@media only screen and (max-width:815px){section.cart .cart-content{display:block}section.cart .cart-content .left-side{width:100%;float:none}section.cart .cart-content .left-side .misc-controls{position:relative;top:180px;margin-top:0}section.cart .cart-content .right-side{width:100%;padding-left:0;position:relative;top:-20px}}@media only screen and (max-width:600px){section.cart .cart-content .left-side .cart-item-list .item{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}section.cart .cart-content .left-side .cart-item-list .item .item-details{margin-top:10px}section.cart .cart-content .left-side .cart-item-list .item .item-details .misc{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;line-height:40px}}@media only screen and (max-width:574px){section.cart .cart-content .left-side .misc-controls{display:block;top:160px}section.cart .cart-content .left-side .misc-controls div button{width:100%;margin-top:10px}section.cart .cart-content .left-side .misc-controls div a{margin-top:10px;width:100%;text-align:center}section.cart .cart-content .right-side{top:-100px}}.checkout-method-group .line-one{display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.checkout-method-group .line-one .radio-container{padding-left:28px}.checkout-method-group .line-one .method-label{margin-top:4px}.checkout-method-group .line-two{margin-left:30px}.checkout-process{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;width:100%;margin-top:20px;margin-bottom:20px;font-size:16px;color:#242424}.checkout-process .col-main{width:70%;margin-right:5%}.checkout-process .col-main ul.checkout-steps{display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;width:100%;padding-bottom:15px;border-bottom:1px solid #c7c7c7}.checkout-process .col-main ul.checkout-steps li{height:48px;display:-webkit-box;display:-ms-flexbox;display:flex}.checkout-process .col-main ul.checkout-steps li .decorator{height:48px;width:48px;border:1px solid #000;border-radius:50%;display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;border:1px solid #c7c7c7;background-repeat:no-repeat;background-position:50%}.checkout-process .col-main ul.checkout-steps li .decorator.address-info{background-image:url("../images/address.svg")}.checkout-process .col-main ul.checkout-steps li .decorator.shipping{background-image:url("../images/shipping.svg")}.checkout-process .col-main ul.checkout-steps li .decorator.payment{background-image:url("../images/payment.svg")}.checkout-process .col-main ul.checkout-steps li .decorator.review{background-image:url("../images/finish.svg")}.checkout-process .col-main ul.checkout-steps li.completed{cursor:pointer}.checkout-process .col-main ul.checkout-steps li.completed .decorator{background-image:url("../images/complete.svg")}.checkout-process .col-main ul.checkout-steps li span{margin-left:7px;margin-top:auto;margin-bottom:auto}.checkout-process .col-main ul.checkout-steps li.active{color:#2650ef}.checkout-process .col-main ul.checkout-steps li.active .decorator{border:1px solid #2650ef}.checkout-process .col-main .step-content{padding-top:20px}.checkout-process .col-main .step-content .form-header{display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;width:100%;height:30px}.checkout-process .col-main .step-content .form-header .checkout-step-heading{font-size:24px;font-weight:700;float:left}.checkout-process .col-main .step-content .form-header .btn{float:right;font-size:14px}.checkout-process .col-main .step-content .form-container{border-bottom:1px solid #c7c7c7;padding-top:20px;padding-bottom:20px}.checkout-process .col-main .step-content .shipping-methods{font-size:16px}.checkout-process .col-main .step-content .shipping-methods .ship-method-carrier{margin-bottom:15px;font-weight:700}.checkout-process .col-main .step-content .payment-methods .radio-container{padding-left:28px}.checkout-process .col-main .step-content .payment-methods .control-info{margin-left:28px}.checkout-process .col-main .step-content .address-summary{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:start;-ms-flex-pack:start;justify-content:flex-start;-webkit-box-align:center;-ms-flex-align:center;align-items:center;width:100%}.checkout-process .col-main .step-content .address-summary div.billing-address{margin-right:25%}.checkout-process .col-main .step-content .address-summary div.billing-address .horizontal-rule,.checkout-process .col-main .step-content .address-summary div.shipping-address .horizontal-rule{width:40px;background:#242424}.checkout-process .col-main .step-content .address-summary .label{width:10%}.checkout-process .col-main .step-content .address-summary .address-card-list{width:85%}.checkout-process .col-main .step-content .cart-item-list .item .row .title{width:100px;display:inline-block;color:#a5a5a5;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:25%;padding-left:40px}@media only screen and (max-width:770px){.checkout-process .col-main{width:100%;padding-right:0}.checkout-process .col-main ul.checkout-steps{border-bottom:none;padding-bottom:0}.checkout-process .col-main ul.checkout-steps span{display:none}.checkout-process .col-main ul.checkout-steps .line{-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;border-bottom:1px solid #c7c7c7;margin-left:5px;margin-right:5px}.checkout-process .step-content{padding-top:0}.checkout-process .step-content .control-group .control{width:100%}.checkout-process .col-right{display:none}}@media only screen and (max-width:480px){.checkout-process .col-main .step-content .address,.checkout-process .col-main .step-content .order-description{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.checkout-process .col-main .step-content .address .billing-address,.checkout-process .col-main .step-content .address .pull-left,.checkout-process .col-main .step-content .order-description .billing-address,.checkout-process .col-main .step-content .order-description .pull-left{width:100%!important}.checkout-process .col-main .step-content .address .pull-right,.checkout-process .col-main .step-content .address .shipping-address,.checkout-process .col-main .step-content .order-description .pull-right,.checkout-process .col-main .step-content .order-description .shipping-address{width:100%!important;margin-top:20px}}.attached-products-wrapper{margin-bottom:80px}.attached-products-wrapper .title{margin-bottom:40px;font-size:18px;color:#242424;text-align:center;position:relative}.attached-products-wrapper .title .border-bottom{border-bottom:1px solid hsla(0,0%,64%,.2);display:inline-block;width:100px;position:absolute;top:40px;left:50%;margin-left:-50px}.attached-products-wrapper .horizontal-rule{height:1px;background:#c7c7c7;width:148px;margin-bottom:24px;margin-left:auto;margin-right:auto}section.review .category-breadcrumbs{display:inline}section.review .review-layouter{display:-webkit-box;display:-ms-flexbox;display:flex}section.review .review-layouter .product-info{font-size:24px;max-width:25%}section.review .review-layouter .product-info .product-image img{height:280px;width:280px}section.review .review-layouter .product-info .product-name a{color:#242424}section.review .review-layouter .product-info .product-price .pro-price{color:#ff6472}section.review .review-layouter .product-info .product-price .pro-price-not{margin-left:10px;font-size:16px;color:#a5a5a5}section.review .review-layouter .product-info .product-price .offer{margin-left:10px;font-size:16px}section.review .review-layouter .review-form{margin-left:20px;width:55%}section.review .review-layouter .review-form .heading{color:#242424;font-weight:600}section.review .review-layouter .review-form .heading .right{float:right;margin-top:-10px}section.review .review-layouter .review-form .star{font-size:23px;color:#d4d4d4;-webkit-transition:all .2s;transition:all .2s}section.review .review-layouter .review-form .star:before{content:"\2605"}section.review .review-layouter .review-form .control-group .control{width:100%}section.review .review-layouter .review-form .review-detail{height:150px;border:1px solid #b22222;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}section.review .review-layouter .review-form .review-detail .rating-review{margin-top:40px;margin-left:20px;width:48%}section.review .review-layouter .review-form .review-detail .rating-review .avg-rating-count span{font-size:34px;text-align:center}section.review .review-layouter .review-form .review-detail .rating-calculate .progress-only{width:20px;border:1px solid blue}section.review .review-layouter .ratings-reviews{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between}section.review .review-layouter .ratings-reviews .left-side{padding:40px 20px;width:50%}section.review .review-layouter .ratings-reviews .left-side .rate{font-size:34px}section.review .review-layouter .ratings-reviews .left-side .stars .icon{height:16px;width:16px}section.review .review-layouter .ratings-reviews .right-side{width:50%}section.review .review-layouter .ratings-reviews .right-side .rater{display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;padding-top:5px;width:100%}section.review .review-layouter .ratings-reviews .right-side .rater .star-name{margin-right:5px;width:35px}section.review .review-layouter .ratings-reviews .right-side .rater .rate-number{width:15px}section.review .review-layouter .ratings-reviews .right-side .rater .percentage{width:50px;margin-right:10px}section.review .review-layouter .ratings-reviews .right-side .rater .percentage span{float:right;white-space:nowrap}section.review .review-layouter .ratings-reviews .right-side .rater .line-bar{height:4px;width:calc(100% - 100px);margin-right:5px;margin-left:5px;background:#d8d8d8}section.review .review-layouter .ratings-reviews .right-side .rater .line-bar .line-value{background-color:#0031f0}@media only screen and (max-width:770px){section.review .category-breadcrumbs{display:none}section.review .review-layouter{-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}section.review .review-layouter .product-info{max-width:100%}section.review .review-layouter .product-info .product-image,section.review .review-layouter .product-info .product-name,section.review .review-layouter .product-info .product-price{max-width:280px;margin-left:auto;margin-right:auto}section.review .review-layouter .review-form{width:100%;margin-left:0}section.review .review-layouter .review-form .heading .right{margin-top:50px}section.review .review-layouter .review-form .ratings-reviews{-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;width:100%}section.review .review-layouter .review-form .ratings-reviews .left-side{width:100%;padding:0 0 40px;margin-top:-30px}section.review .review-layouter .review-form .ratings-reviews .right-side{width:100%}section.review .review-layouter .review-form .ratings-reviews .right-side .rater .percentage{margin-right:0}}.auth-content{padding-top:5%;padding-bottom:5%}.auth-content .sign-up-text{margin-bottom:2%;margin-left:auto;margin-right:auto;font-size:18px;color:#a5a5a5;text-align:center}.auth-content .login-form{margin-left:auto;margin-right:auto;display:-webkit-box;display:-ms-flexbox;display:flex;border:1px solid #c7c7c7;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;max-width:500px;min-width:320px;padding:25px}.auth-content .login-form .login-text{font-size:24px;font-weight:600;margin-bottom:30px}.auth-content .login-form .control-group{margin-bottom:15px!important}.auth-content .login-form .control-group .control{width:100%!important}.auth-content .login-form .forgot-password-link{font-size:17px;color:#0031f0;margin-bottom:5%}.auth-content .login-form .signup-confirm{margin-bottom:5%}.auth-content .login-form .btn-primary{width:100%;text-transform:uppercase}.account-content{width:100%;-webkit-box-orient:horizontal;-ms-flex-direction:row;flex-direction:row;margin-top:5.5%;margin-bottom:5.5%}.account-content,.account-content .sidebar{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-direction:normal}.account-content .sidebar{-webkit-box-orient:vertical;-ms-flex-direction:column;flex-direction:column;-ms-flex-line-pack:center;align-content:center;-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start;width:20%;height:100%}.account-content .menu-block{margin-bottom:30px}.account-content .menu-block:last-child{margin-bottom:0}.account-content .menu-block .menu-block-title{padding-bottom:10px;font-size:18px}.account-content .menu-block .menu-block-title .right{display:none}.account-content .menu-block .menubar{border:1px solid #c7c7c7;color:#a5a5a5;position:relative}.account-content .menu-block .menubar li{width:95%;height:50px;margin-left:5%;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:start;-ms-flex-pack:start;justify-content:flex-start;-webkit-box-align:center;-ms-flex-align:center;align-items:center;border-bottom:1px solid #c7c7c7;text-align:center}.account-content .menu-block .menubar li a{color:#5e5e5e;width:100%;text-align:left}.account-content .menu-block .menubar li .icon{display:none;position:absolute;right:12px}.account-content .menu-block .menubar li:first-child{border-top:none}.account-content .menu-block .menubar li:last-child{border-bottom:none}.account-content .menu-block .menubar li.active a{color:#0031f0}.account-content .menu-block .menubar li.active .icon{display:inline-block}.account-content .account-layout{margin-left:40px;width:80%}.account-content .account-layout .account-head .back-icon,.account-content .account-layout .responsive-empty{display:none}.account-table-content{color:#242424;margin-top:1.4%}.account-table-content table{width:100%}.account-table-content table tbody tr{height:45px}.account-table-content table tbody tr td{width:250px}.address-holder{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:start;-ms-flex-pack:start;justify-content:flex-start;-webkit-box-align:start;-ms-flex-align:start;align-items:flex-start;-ms-flex-wrap:wrap;flex-wrap:wrap;width:100%}.address-card{width:260px;border:1px solid #c7c7c7;padding:15px;margin-right:15px;margin-bottom:15px}.address-card .control-group{width:15px;height:15px;margin-top:10px}.address-card .details{font-weight:lighter}.address-card .details span{display:block}.address-card .details .control-links{width:90%;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;-ms-flex-wrap:wrap;flex-wrap:wrap;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.address-card .details .control-links .btn{height:30px}.edit-form{display:-webkit-box;display:-ms-flexbox;display:flex;border:1px solid #c7c7c7;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;min-height:345px;padding:25px}@media only screen and (max-width:770px){.account-content{-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.account-content .sidebar{width:100%}.account-content .sidebar .menu-block .menu-block-title{height:50px;padding-top:13px;border-bottom:1px solid #c7c7c7;border-top:1px solid #c7c7c7}.account-content .sidebar .menu-block .menu-block-title .right{display:block;float:right;-ms-flex-item-align:center;align-self:center}.account-content .sidebar .menu-block .menubar{border:0;display:none}.account-content .sidebar .menu-block .menubar>li{margin-left:0;width:100%}.account-content .sidebar .menu-block .menubar>li .icon{right:0}.account-content .sidebar .menu-block .menubar>li:last-child{border-bottom:1px solid #c7c7c7}.account-content .account-layout{margin-left:0;margin-top:20px;width:100%}.account-content .account-layout .account-head{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;border-bottom:1px solid #c7c7c7;border-top:1px solid #c7c7c7;height:50px;margin-top:10px}.account-content .account-layout .account-head .account-action{margin-top:12px;margin-left:15px}.account-content .account-layout .account-head .back-icon{display:block}.account-content .account-layout .account-head span{margin-top:13px;font-size:18px}.account-content .account-layout .account-head .horizontal-rule{display:none}.account-content .account-layout .account-table-content{margin-top:2%}.account-content .account-layout .account-table-content table tbody tr{height:70px}.account-content .account-layout .account-table-content table tbody tr td{display:block}.account-content .account-layout .account-table-content .address-holder{-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.account-content .account-items-list,.account-content .edit-form{margin-top:20px}.account-content .account-items-list .responsive-empty,.account-content .edit-form .responsive-empty{display:block}.account-content .control-group .control{width:100%}}.sale-container{color:#5e5e5e}.sale-container .sale-section .secton-title{font-size:18px;color:#8e8e8e;padding:15px 0;border-bottom:1px solid #c7c7c7}.sale-container .sale-section .section-content{display:block;padding:20px 0;border-bottom:1px solid #e8e8e8}.sale-container .sale-section .section-content .row{display:block;padding:7px 0}.sale-container .sale-section .section-content .row .title{width:200px;letter-spacing:-.26px;display:inline-block}.sale-container .sale-section .section-content .row .value{letter-spacing:-.26px;display:inline-block}.sale-container .sale-section .section-content .order-box-container{display:inline-block;width:100%}.sale-container .sale-section .section-content .order-box-container .box{float:left;width:25%}.sale-container .sale-section .section-content .order-box-container .box .box-title{padding:10px 0;font-size:18px;color:#8e8e8e}.sale-container .sale-section .section-content .order-box-container .box .box-content{color:#3a3a3a;padding-right:10px}.sale-container .sale-section .section-content .qty-row{display:block}.sale-container .totals{padding-top:20px;display:inline-block;width:100%;border-top:1px solid #e8e8e8}.sale-container .totals .sale-summary{height:130px;float:right;border-collapse:collapse}.sale-container .totals .sale-summary tr td{padding:5px 8px;width:auto;color:#3a3a3a}.sale-container .totals .sale-summary tr.bold{font-weight:600;font-size:15px}.sale-container .totals .sale-summary tr.border td{border-bottom:1px solid #c7c7c7}@media only screen and (max-width:770px){.sale-container .sale-section .section-content{border-bottom:none;padding:10px 0}.sale-container .sale-section .section-content .row{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.sale-container .sale-section .section-content .row .title{line-height:20px}.sale-container .sale-section .section-content .totals{border-top:none}.sale-container .sale-section .section-content .totals .sale-summary{width:100%}.sale-container .sale-section .section-content .totals .sale-summary tr td:nth-child(2){display:none}.sale-container .sale-section .section-content .order-box-container{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.sale-container .sale-section .section-content .order-box-container .box{width:100%;margin:10px auto}.sale-container .sale-section .section-content .qty-row{display:inline}}.verify-account{text-align:center;background:#204d74;width:200px;margin-right:auto;margin-left:auto;border-radius:4px}.verify-account a{color:#fff!important}.cp-spinner{position:absolute;left:calc(50% - 24px);margin-top:calc(40% - 24px)}@media only screen and (max-width:720px){.cp-spinner{left:50%;margin-left:-24px;top:50%;margin-top:-24px}}@media only screen and (max-width:720px){.error-container .wrapper{-webkit-box-orient:vertical!important;-webkit-box-direction:reverse!important;-ms-flex-direction:column-reverse!important;flex-direction:column-reverse!important;margin:10px 0 20px!important;-webkit-box-align:start!important;-ms-flex-align:start!important;align-items:start!important;height:100%!important}}@media only screen and (max-width:770px){.table table{width:100%}.table table thead{display:none}.table table tbody tr td:before{content:attr(data-value);font-size:15px;font-weight:600;display:inline-block;width:120px}.table table tbody td{border-bottom:none!important;display:block;width:100%!important}.table table tbody td div{position:relative;left:100px;top:-20px}.table table tbody tr{border:1px solid #c7c7c7}}.show-wishlist{z-index:-1!important}.filter-row-one .dropdown-filters{position:relative!important;right:1px!important}@media only screen and (max-width:770px){.table .grid-container{margin-top:10px}.table .grid-container .filter-row-one{display:block}.table .grid-container .filter-row-one .dropdown-filters{margin-top:10px}}.rtl{direction:rtl}.rtl .header .header-top div.left-content ul.logo-container{margin-right:0;margin-left:12px}.rtl .header .header-top div.left-content ul.search-container li.search-group .search-field{border:2px solid #c7c7c7;padding-right:12px;padding-left:0;border-radius:2px;border-top-left-radius:0;border-bottom-left-radius:0}.rtl .header .header-top div.left-content ul.search-container li.search-group .search-icon-wrapper{border:2px solid #c7c7c7;border-right:none;border-radius:2px;border-top-right-radius:0;border-bottom-right-radius:0}.rtl .header .header-top div.right-content .right-content-menu>li{border-right:2px solid #c7c7c7;padding:0 15px}.rtl .header .header-top div.right-content .right-content-menu>li:last-child{padding-left:0}.rtl .header .header-top div.right-content .right-content-menu>li:first-child{border-right:0;padding-right:0}.rtl .header .header-top div.right-content .right-content-menu .cart-dropdown-container .dropdown-list{left:0;right:unset!important}.rtl .header .header-top div.right-content .right-content-menu .cart-dropdown-container .count{display:inline-block}.rtl .header .header-top div.right-content .right-content-menu .account,.rtl .header .header-top div.right-content .right-content-menu .currency{right:unset;left:0}.rtl .header .header-top div.right-content .right-content-menu .guest div{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between}.rtl .header .header-bottom .nav>li{float:right;margin-right:0;margin-left:1px}.rtl .header .header-bottom .nav a{padding:.8em .5em .8em .3em!important}.rtl .header .header-bottom .nav li a>.icon{-webkit-transform:rotate(180deg);transform:rotate(180deg)}.rtl .header .header-bottom .nav>li li:hover>ul{left:unset!important;right:100%!important}.rtl .header .header-bottom .nav ul{left:99999em}.rtl .header .search-responsive .search-content .right{float:left}.rtl .dropdown-list{text-align:right}.rtl .dropdown-list.bottom-right{left:0;right:auto}@media only screen and (max-width:720px){.rtl .header .header-top div.right-content .menu-box{margin-left:0;margin-right:5px}.rtl .header .header-top div.right-content .right-content-menu .account{position:absolute;left:0;right:auto}.rtl .header .header-top div.right-content .right-content-menu>li{padding:0;border:0}.rtl .header .header-top div.right-content .search-box{margin-left:5px}.rtl .header .header-bottom .nav>li{float:none}.rtl .header .header-bottom .nav li>.icon{float:left;-webkit-transform:rotate(180deg);transform:rotate(180deg)}.rtl .header .header-bottom .icon.icon-arrow-down{margin-left:5px}}.rtl section.slider-block div.slider-content div.slider-control{left:2%;right:auto}@media only screen and (max-width:720px){.rtl section.slider-block div.slider-content div.slider-control{left:0}}.rtl .main-container-wrapper .product-card .sticker{left:auto;right:20px}.rtl .main-container-wrapper .product-card .cart-wish-wrap .addtocart{margin-right:0;margin-left:10px}.rtl section.product-detail div.layouter .form-container div.product-image-group{margin-right:0;margin-left:30px}.rtl section.product-detail div.layouter .form-container div.product-image-group .add-to-buttons{float:left!important}.rtl section.product-detail div.layouter .form-container div .thumb-list{margin-left:4px;margin-right:0}.rtl section.product-detail div.layouter .form-container .details .accordian .accordian-header{padding:20px 0 20px 15px}.rtl section.product-detail div.layouter .form-container .details .accordian .accordian-header .icon{float:left}.rtl section.product-detail div.layouter .form-container .details .accordian .accordian-header .expand-icon{margin-left:10px}.rtl section.product-detail div.layouter .form-container .details .full-specifications td:first-child{padding-right:0;padding-left:40px}.rtl section.product-detail div.layouter .form-container .details .product-ratings .total-reviews{margin-left:0;margin-right:15px}@media only screen and (max-width:720px){.rtl section.product-detail div.layouter .form-container div.product-image-group{margin-right:0;margin-left:0}}.rtl .main .category-container .layered-filter-wrapper,.rtl .main .category-container .responsive-layred-filter{padding-right:0;padding-left:20px}.rtl .main .top-toolbar .pager{float:left}.rtl .main .top-toolbar .pager .view-mode{margin-right:0;margin-left:20px}.rtl .main .top-toolbar .pager .sorter{margin-right:0;margin-left:10px}.rtl .main .top-toolbar .pager label{margin-right:0;margin-left:5px}.rtl .main .top-toolbar .page-info{float:right}.rtl section.review .review-layouter .review-form{margin-left:0;margin-right:20px}.rtl section.review .review-layouter .review-form .heading .right{float:left}.rtl section.review .review-layouter .review-form .ratings-reviews .right-side .rater .star-name{margin-right:0;margin-left:5px}@media only screen and (max-width:770px){.rtl section.review .review-layouter .review-form{margin-right:0}}.rtl section.cart .cart-content .left-side{width:70%;float:right}.rtl section.cart .cart-content .left-side .misc-controls a.link{margin-left:15px;margin-right:0}.rtl section.cart .cart-content .right-side{width:30%;padding-right:40px;padding-left:0}.rtl .order-summary .item-detail label.right,.rtl .payable-amount label.right{float:left}.rtl .item div{margin-left:15px;margin-right:0!important}.rtl .cart-item-list .item .item-details .misc div.qty-text{margin-right:0;margin-left:10px}.rtl .cart-item-list .item .item-details .misc .remove,.rtl .cart-item-list .item .item-details .misc input.box{margin-right:0;margin-left:30px}.rtl .cart-item-list .item .item-details .misc .control-group label{margin-left:15px;margin-right:0}@media only screen and (max-width:770px){.rtl section.cart .cart-content .left-side{width:100%;float:none}.rtl section.cart .cart-content .left-side .misc-controls div button{margin-right:0}.rtl section.cart .cart-content .right-side{width:100%;padding-right:0}}.rtl .checkout-process .col-right{padding-left:0;padding-right:40px}.rtl .checkout-process .col-main{padding-left:40px;padding-right:0}.rtl .checkout-process .col-main ul.checkout-steps li span{margin-right:7px;margin-left:0}.rtl .checkout-process .col-main .step-content .form-header h1{float:right}.rtl .checkout-process .col-main .step-content .form-header .btn{float:left}.rtl .checkout-process .col-main .step-content .payment-methods .control-info{margin-right:28px;margin-left:0}.rtl .checkout-process .col-main .step-content .address .billing-address,.rtl .checkout-process .col-main .step-content .address .pull-left,.rtl .checkout-process .col-main .step-content .order-description .billing-address,.rtl .checkout-process .col-main .step-content .order-description .pull-left{float:right!important}.rtl .checkout-process .col-main .step-content .address .pull-right,.rtl .checkout-process .col-main .step-content .address .shipping-address,.rtl .checkout-process .col-main .step-content .order-description .pull-right,.rtl .checkout-process .col-main .step-content .order-description .shipping-address{float:left!important}.rtl .checkbox,.rtl .radio{margin:10px 0 5px 5px}.rtl .radio .radio-view{margin-left:5px;margin-right:0}.rtl .radio input{right:0;left:auto}@media only screen and (max-width:770px){.rtl .checkout-process .col-main{padding-left:0}}.rtl .account-content .account-layout{margin-left:0;margin-right:40px}.rtl .account-content .menu-block .menubar li{margin-left:0;margin-right:5%}.rtl .account-content .menu-block .menubar li a{text-align:right}.rtl .account-content .menu-block .menubar li .icon{right:unset;left:12px;-webkit-transform:rotate(180deg);transform:rotate(180deg)}.rtl .account-head .account-action{float:left}.rtl .account-item-card .media-info .info{margin-right:20px;margin-left:0}.rtl .account-item-card .operations a span{float:left}.rtl .table table{text-align:right}.rtl .sale-container .totals .sale-summary{float:left}.rtl .sale-container .sale-section .section-content .order-box-container{display:-webkit-box;display:-ms-flexbox;display:flex}@media (max-width:770px){.rtl .account-content .account-layout{margin-right:0}.rtl .account-content .account-layout .account-head .account-action{margin-left:0}.rtl .account-content .sidebar .menu-block .menu-block-title .right{float:left}.rtl .account-content .sidebar .menu-block .menubar>li{margin-right:0}}.rtl .footer .footer-content .footer-list-container .list-container .list-group li span.icon{margin-left:5px;margin-right:0}@media (max-width:720px){.rtl .footer{padding-right:15px;padding-left:10%}.rtl .footer .footer-list-container{padding-right:0!important}}.rtl .cp-spinner{position:absolute;right:calc(50% - 24px);margin-top:calc(40% - 24px)}@media only screen and (max-width:720px){.rtl .cp-spinner{right:50%;margin-right:-24px;left:auto}}.rtl .product-list .product-card .product-information{padding-left:0;padding-right:30px;float:left}.rtl .zoom-image-direction{left:0;right:476px!important}.banner-container{width:100%;float:left;padding:0 18px;margin-bottom:40px}.banner-container .left-banner{padding-right:20px;width:60%;float:left}.banner-container .left-banner img{width:100%}.banner-container .right-banner{padding-left:20px;width:40%;float:left}.banner-container .right-banner img{width:100%}.banner-container .right-banner img:first-child{padding-bottom:20px;height:50%;display:block}.banner-container .right-banner img:last-child{padding-top:20px;height:50%;display:block}@media (max-width:720px){.banner-container .left-banner{padding-right:0;width:100%}.banner-container .right-banner{padding-left:0;width:100%}.banner-container .right-banner img:first-child{padding-bottom:0;padding-top:25px}.banner-container .right-banner img:last-child{padding-top:25px}} \ No newline at end of file diff --git a/packages/Webkul/Shop/src/Http/Controllers/CartController.php b/packages/Webkul/Shop/src/Http/Controllers/CartController.php index 8d46d9cd3..82a00be47 100755 --- a/packages/Webkul/Shop/src/Http/Controllers/CartController.php +++ b/packages/Webkul/Shop/src/Http/Controllers/CartController.php @@ -9,6 +9,7 @@ use Webkul\Checkout\Repositories\CartItemRepository; use Webkul\Product\Repositories\ProductRepository; use Webkul\Customer\Repositories\CustomerRepository; use Webkul\Customer\Repositories\WishlistRepository; +use Webkul\Discount\Repositories\CartRuleCartRepository as CartRuleCart; use Illuminate\Support\Facades\Event; use Cart; @@ -33,15 +34,11 @@ class CartController extends Controller * @param $productView */ protected $_config; - protected $cart; - protected $cartItem; - protected $customer; - protected $product; - + protected $cartRuleCart; protected $suppressFlash = false; /** @@ -56,7 +53,8 @@ class CartController extends Controller CartItemRepository $cartItem, CustomerRepository $customer, ProductRepository $product, - WishlistRepository $wishlist + WishlistRepository $wishlist, + CartRuleCart $cartRuleCart ) { @@ -72,6 +70,8 @@ class CartController extends Controller $this->wishlist = $wishlist; + $this->cartRuleCart = $cartRuleCart; + $this->_config = request('_config'); } @@ -252,4 +252,60 @@ class CartController extends Controller return redirect()->back(); } } + + /** + * To apply coupon rules + */ + public function applyCoupon() + { + $this->validate(request(), [ + 'code' => 'string|required' + ]); + + $code = request()->input('code'); + + $result = Cart::applyCoupon($code); + + return $result; + } + + /** + * Fetch the non couponable rule + */ + public function getNonCouponAbleRule() + { + $cart = Cart::getCart(); + $nonCouponAbleRules = Cart::applyNonCoupon(); + + return $nonCouponAbleRules; + } + + /** + * To save the discount values inside the tables of orders and cart + */ + public function saveDiscount() + { + return ['hellow']; + } + + /** + * To remove the currently active + * couponable rule + */ + public function removeCoupon() + { + $result = Cart::removeCoupon(); + + if ($result) { + return response()->json([ + 'success' => true, + 'message' => trans('admin::app.promotion.status.coupon-removed') + ]); + } else { + return response()->json([ + 'success' => false, + 'message' => trans('admin::app.promotion.status.coupon-remove-failed') + ]); + } + } } \ No newline at end of file diff --git a/packages/Webkul/Shop/src/Http/Controllers/HomeController.php b/packages/Webkul/Shop/src/Http/Controllers/HomeController.php index dc4f55dac..4f8e149a1 100755 --- a/packages/Webkul/Shop/src/Http/Controllers/HomeController.php +++ b/packages/Webkul/Shop/src/Http/Controllers/HomeController.php @@ -3,8 +3,6 @@ namespace Webkul\Shop\Http\Controllers; use Webkul\Shop\Http\Controllers\Controller; -use Illuminate\Http\Request; -use Illuminate\Http\Response; use Webkul\Core\Repositories\SliderRepository; /** @@ -16,9 +14,7 @@ use Webkul\Core\Repositories\SliderRepository; class HomeController extends Controller { protected $_config; - protected $sliderRepository; - protected $current_channel; public function __construct(SliderRepository $sliderRepository) @@ -34,7 +30,6 @@ use Webkul\Core\Repositories\SliderRepository; public function index() { $currentChannel = core()->getCurrentChannel(); - $sliderData = $this->sliderRepository->findByField('channel_id', $currentChannel->id)->toArray(); return view($this->_config['view'], compact('sliderData')); diff --git a/packages/Webkul/Shop/src/Http/Controllers/OnepageController.php b/packages/Webkul/Shop/src/Http/Controllers/OnepageController.php index 4ce942230..f1a0662b5 100755 --- a/packages/Webkul/Shop/src/Http/Controllers/OnepageController.php +++ b/packages/Webkul/Shop/src/Http/Controllers/OnepageController.php @@ -15,7 +15,7 @@ use Webkul\Sales\Repositories\OrderRepository; /** * Chekout controller for the customer and guest for placing order * - * @author Jitendra Singh + * @author Jitendra Singh * @copyright 2018 Webkul Software Pvt Ltd (http://www.webkul.com) */ class OnepageController extends Controller @@ -126,10 +126,12 @@ class OnepageController extends Controller $cart = Cart::getCart(); + $rule = Cart::applyNonCoupon(); + return response()->json([ - 'jump_to_section' => 'review', - 'html' => view('shop::checkout.onepage.review', compact('cart'))->render() - ]); + 'jump_to_section' => 'review', + 'html' => view('shop::checkout.onepage.review', compact('cart', 'rule'))->render() + ]); } /** @@ -150,9 +152,9 @@ class OnepageController extends Controller if ($redirectUrl = Payment::getRedirectUrl($cart)) { return response()->json([ - 'success' => true, - 'redirect_url' => $redirectUrl - ]); + 'success' => true, + 'redirect_url' => $redirectUrl + ]); } $order = $this->orderRepository->create(Cart::prepareDataForOrder()); @@ -162,8 +164,8 @@ class OnepageController extends Controller session()->flash('order', $order); return response()->json([ - 'success' => true, - ]); + 'success' => true, + ]); } /** diff --git a/packages/Webkul/Shop/src/Http/routes.php b/packages/Webkul/Shop/src/Http/routes.php index 79e570ca3..59f63da37 100755 --- a/packages/Webkul/Shop/src/Http/routes.php +++ b/packages/Webkul/Shop/src/Http/routes.php @@ -39,6 +39,14 @@ Route::group(['middleware' => ['web', 'locale', 'theme', 'currency']], function 'view' => 'shop::checkout.cart.index' ])->name('shop.checkout.cart.index'); + Route::post('checkout/check/coupons', 'Webkul\Shop\Http\Controllers\CartController@applyCoupon')->name('shop.checkout.check.coupons'); + + Route::post('checkout/save/discounts', 'Webkul\Shop\Http\Controllers\CartController@saveDiscount')->name('shop.checkout.save.discount'); + + Route::post('checkout/fetch/noncoupon', 'Webkul\Shop\Http\Controllers\CartController@getNonCouponAbleRule')->name('shop.checkout.fetch.non-coupon'); + + Route::post('checkout/remove/coupon', 'Webkul\Shop\Http\Controllers\CartController@removeCoupon')->name('shop.checkout.remove.coupon'); + //Cart Items Add Route::post('checkout/cart/add/{id}', 'Webkul\Shop\Http\Controllers\CartController@add')->defaults('_config', [ 'redirect' => 'shop.checkout.cart.index' diff --git a/packages/Webkul/Shop/src/Resources/assets/sass/app.scss b/packages/Webkul/Shop/src/Resources/assets/sass/app.scss index db79dd970..ac5f07841 100755 --- a/packages/Webkul/Shop/src/Resources/assets/sass/app.scss +++ b/packages/Webkul/Shop/src/Resources/assets/sass/app.scss @@ -38,116 +38,6 @@ input { border-radius: 0px !important; } -//margin bottom classes -.mb-10 { - margin-bottom: 10px; -} - -.mb-15 { - margin-bottom: 15px; -} - -.mb-20 { - margin-bottom: 20px; -} - -.mb-25 { - margin-bottom: 25px; -} - -.mb-30 { - margin-bottom: 30px; -} - -.mb-35 { - margin-bottom: 35px; -} - -.mb-40 { - margin-bottom: 40px; -} - -.mb-45 { - margin-bottom: 45px; -} - -.mb-50 { - margin-bottom: 50px; -} - -.mb-60 { - margin-bottom: 60px; -} - -.mb-70 { - margin-bottom: 70px; -} - -.mb-80 { - margin-bottom: 80px; -} - -.mb-90 { - margin-bottom: 90px; -} - -//margin-top -.mt-5 { - margin-top: 5px; -} - -.mt-10 { - margin-top: 10px; -} - -.mt-15 { - margin-top: 15px; -} - -.mt-20 { - margin-top: 20px; -} - -.mt-25 { - margin-top: 25px; -} - -.mt-30 { - margin-top: 30px; -} - -.mt-35 { - margin-top: 35px; -} - -.mt-40 { - margin-top: 40px; -} - -.mt-45 { - margin-top: 45px; -} - -.mt-50 { - margin-top: 50px; -} - -.mt-60 { - margin-top: 60px; -} - -.mt-70 { - margin-top: 70px; -} - -.mt-80 { - margin-top: 80px; -} - -.mt-90 { - margin-top: 90px; -} - //pagination .pagination.shop{ display: flex; @@ -2284,7 +2174,7 @@ section.cart { } } - .payble-amount { + .payable-amount { margin-top: 17px; border-top: 1px solid $border-color; padding-top: 12px; @@ -2297,6 +2187,9 @@ section.cart { } } } + + .discount-details-group { + } } // cart pages responsive css start @@ -3820,7 +3713,7 @@ section.review { } } - .order-summary .item-detail, .payble-amount { + .order-summary .item-detail, .payable-amount { label.right { float: left; } diff --git a/packages/Webkul/Shop/src/Resources/lang/en/app.php b/packages/Webkul/Shop/src/Resources/lang/en/app.php index 9365c1adf..06e4ae39b 100755 --- a/packages/Webkul/Shop/src/Resources/lang/en/app.php +++ b/packages/Webkul/Shop/src/Resources/lang/en/app.php @@ -397,7 +397,7 @@ return [ 'quantity-error' => 'Requested Quantity Is Not Available', 'cart-subtotal' => 'Cart Subtotal', 'cart-remove-action' => 'Do you really want to do this ?', - 'partial-cart-update' => 'Only some of the product(s) were updated' + 'partial-cart-update' => 'Only some of the product(s) were updated', ], 'onepage' => [ @@ -434,6 +434,12 @@ return [ 'place-order' => 'Place Order', 'new-address' => 'Add New Address', 'save_as_address' => 'Save as Address', + 'apply-coupon' => 'Apply Coupon', + 'amt-payable' => 'Amount Payable', + 'got' => 'Got', + 'free' => 'Free', + 'coupon-used' => 'Coupon Used', + 'applied' => 'Applied', 'back' => 'Back' ], @@ -444,7 +450,12 @@ return [ 'delivery-charges' => 'Delivery Charges', 'tax' => 'Tax', 'discount' => 'Discount', - 'price' => 'price' + 'price' => 'price', + 'disc-amount' => 'Amount discounted', + 'new-grand-total' => 'New Grand Total', + 'coupon' => 'Coupon', + 'coupon-applied' => 'Coupon Applied', + 'remove-coupon' => 'Remove Coupon' ], 'success' => [ 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 59d2c7f65..435920b9a 100755 --- a/packages/Webkul/Shop/src/Resources/views/checkout/onepage.blade.php +++ b/packages/Webkul/Shop/src/Resources/views/checkout/onepage.blade.php @@ -5,18 +5,73 @@ @stop @section('content-wrapper') - - @endsection @push('scripts') + @endpush \ No newline at end of file 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 8ef912c1c..5341e42e4 100755 --- a/packages/Webkul/Shop/src/Resources/views/checkout/onepage/review.blade.php +++ b/packages/Webkul/Shop/src/Resources/views/checkout/onepage/review.blade.php @@ -87,8 +87,6 @@
{!! view_render_event('bagisto.shop.checkout.name.after', ['item' => $item]) !!} - - {!! view_render_event('bagisto.shop.checkout.price.before', ['item' => $item]) !!}
@@ -101,8 +99,6 @@
{!! view_render_event('bagisto.shop.checkout.price.after', ['item' => $item]) !!} - - {!! view_render_event('bagisto.shop.checkout.quantity.before', ['item' => $item]) !!}
@@ -116,27 +112,21 @@ {!! view_render_event('bagisto.shop.checkout.quantity.after', ['item' => $item]) !!} - @if ($product->type == 'configurable') {!! view_render_event('bagisto.shop.checkout.options.after', ['item' => $item]) !!}
- {{ Cart::getProductAttributeOptionDetails($item->child->product)['html'] }} -
{!! view_render_event('bagisto.shop.checkout.options.after', ['item' => $item]) !!} @endif
-
@endforeach -
-
@@ -165,11 +155,7 @@
- @include('shop::checkout.total.summary', ['cart' => $cart]) -
-
-
\ No newline at end of file diff --git a/packages/Webkul/Shop/src/Resources/views/checkout/success.blade.php b/packages/Webkul/Shop/src/Resources/views/checkout/success.blade.php index e17fbaae3..0608ef3dc 100755 --- a/packages/Webkul/Shop/src/Resources/views/checkout/success.blade.php +++ b/packages/Webkul/Shop/src/Resources/views/checkout/success.blade.php @@ -7,7 +7,6 @@ @section('content-wrapper')
-

{{ __('shop::app.checkout.success.thanks') }}

{{ __('shop::app.checkout.success.order-id-info', ['order_id' => $order->id]) }}

@@ -19,7 +18,5 @@ {{ __('shop::app.checkout.cart.continue-shopping') }}
-
- @endsection \ No newline at end of file diff --git a/packages/Webkul/Shop/src/Resources/views/checkout/total/summary.blade.php b/packages/Webkul/Shop/src/Resources/views/checkout/total/summary.blade.php index 941772b4c..2e3b9beef 100755 --- a/packages/Webkul/Shop/src/Resources/views/checkout/total/summary.blade.php +++ b/packages/Webkul/Shop/src/Resources/views/checkout/total/summary.blade.php @@ -24,8 +24,10 @@
@endif -
+
+ +
\ No newline at end of file diff --git a/packages/Webkul/Shop/src/Resources/views/products/list/card.blade.php b/packages/Webkul/Shop/src/Resources/views/products/list/card.blade.php index d36d0c443..c0d9f588c 100755 --- a/packages/Webkul/Shop/src/Resources/views/products/list/card.blade.php +++ b/packages/Webkul/Shop/src/Resources/views/products/list/card.blade.php @@ -14,7 +14,7 @@ diff --git a/packages/Webkul/Shop/src/Resources/views/products/price.blade.php b/packages/Webkul/Shop/src/Resources/views/products/price.blade.php index 09abe08f2..a6d740bc4 100755 --- a/packages/Webkul/Shop/src/Resources/views/products/price.blade.php +++ b/packages/Webkul/Shop/src/Resources/views/products/price.blade.php @@ -7,7 +7,6 @@ {{ __('shop::app.products.price-label') }} {{ core()->currency($priceHelper->getMinimalPrice($product)) }} - @else @if ($priceHelper->haveSpecialPrice($product))
@@ -17,13 +16,10 @@ {{ core()->currency($product->price) }} {{ core()->currency($priceHelper->getSpecialPrice($product)) }} - @else {{ core()->currency($product->price) }} @endif - @endif -
{!! view_render_event('bagisto.shop.products.price.after', ['product' => $product]) !!} \ No newline at end of file diff --git a/packages/Webkul/Ui/src/Resources/assets/images/icon-note.svg b/packages/Webkul/Ui/src/Resources/assets/images/icon-note.svg new file mode 100644 index 000000000..fb6fbbfef --- /dev/null +++ b/packages/Webkul/Ui/src/Resources/assets/images/icon-note.svg @@ -0,0 +1,13 @@ + + + + Icon-Note-Large + Created with Sketch. + + + + + + + + \ No newline at end of file diff --git a/packages/Webkul/Ui/src/Resources/assets/images/icon-promotion-active.svg b/packages/Webkul/Ui/src/Resources/assets/images/icon-promotion-active.svg new file mode 100644 index 000000000..f3543efd0 --- /dev/null +++ b/packages/Webkul/Ui/src/Resources/assets/images/icon-promotion-active.svg @@ -0,0 +1,18 @@ + + + + Icon-Promition-Active + Created with Sketch. + + + + + + + + + + + + + \ No newline at end of file diff --git a/packages/Webkul/Ui/src/Resources/assets/images/icon-promotion.svg b/packages/Webkul/Ui/src/Resources/assets/images/icon-promotion.svg new file mode 100644 index 000000000..f3329e941 --- /dev/null +++ b/packages/Webkul/Ui/src/Resources/assets/images/icon-promotion.svg @@ -0,0 +1,18 @@ + + + + Icon-Promition + Created with Sketch. + + + + + + + + + + + + + \ No newline at end of file diff --git a/packages/Webkul/Ui/src/Resources/assets/sass/app.scss b/packages/Webkul/Ui/src/Resources/assets/sass/app.scss index 1d8ca2938..d4413f8bf 100755 --- a/packages/Webkul/Ui/src/Resources/assets/sass/app.scss +++ b/packages/Webkul/Ui/src/Resources/assets/sass/app.scss @@ -15,6 +15,116 @@ outline: none; } +//margin bottom classes +.mb-10 { + margin-bottom: 10px; +} + +.mb-15 { + margin-bottom: 15px; +} + +.mb-20 { + margin-bottom: 20px; +} + +.mb-25 { + margin-bottom: 25px; +} + +.mb-30 { + margin-bottom: 30px; +} + +.mb-35 { + margin-bottom: 35px; +} + +.mb-40 { + margin-bottom: 40px; +} + +.mb-45 { + margin-bottom: 45px; +} + +.mb-50 { + margin-bottom: 50px; +} + +.mb-60 { + margin-bottom: 60px; +} + +.mb-70 { + margin-bottom: 70px; +} + +.mb-80 { + margin-bottom: 80px; +} + +.mb-90 { + margin-bottom: 90px; +} + +//margin-top +.mt-5 { + margin-top: 5px; +} + +.mt-10 { + margin-top: 10px; +} + +.mt-15 { + margin-top: 15px; +} + +.mt-20 { + margin-top: 20px; +} + +.mt-25 { + margin-top: 25px; +} + +.mt-30 { + margin-top: 30px; +} + +.mt-35 { + margin-top: 35px; +} + +.mt-40 { + margin-top: 40px; +} + +.mt-45 { + margin-top: 45px; +} + +.mt-50 { + margin-top: 50px; +} + +.mt-60 { + margin-top: 60px; +} + +.mt-70 { + margin-top: 70px; +} + +.mt-80 { + margin-top: 80px; +} + +.mt-90 { + margin-top: 90px; +} + body { letter-spacing: -0.26px; line-height: 19px; @@ -74,6 +184,13 @@ h5 { display: none !important; } +.row { + display: flex; + flex-direction: row; + justify-content: space-between; + align-items: center; +} + .btn { @include box-shadow( 0 1px 4px 0 rgba(0, 0, 0, 0.2), @@ -118,6 +235,11 @@ h5 { color: #ffffff; } + &.btn-white { + background: #ffffff; + color: #000; + } + &:disabled, &[disabled="disabled"], &[disabled="disabled"]:hover, diff --git a/packages/Webkul/Ui/src/Resources/assets/sass/icons.scss b/packages/Webkul/Ui/src/Resources/assets/sass/icons.scss index 9a506cd4c..b4cd4286b 100755 --- a/packages/Webkul/Ui/src/Resources/assets/sass/icons.scss +++ b/packages/Webkul/Ui/src/Resources/assets/sass/icons.scss @@ -34,6 +34,11 @@ background-image: url("../images/Icon-Settings.svg"); } +.promotion-icon { + @extend %menu-properties; + background-image: url("../images/icon-promotion.svg"); +} + .angle-right-icon { background-image: url("../images/Angle-Right.svg"); width: 17px; @@ -220,6 +225,12 @@ height: 47px; } +.note-icon { + background-image: url("../images/icon-note.svg"); + width: 24px; + height: 24px; +} + .active { .dashboard-icon { background-image: url("../images/Icon-Dashboard-Active.svg"); @@ -245,6 +256,10 @@ background-image: url("../images/Icon-Configure-Active.svg"); } + .promotion-icon { + background-image: url("../images/icon-promotion-active.svg"); + } + > .arrow-down-icon { background-image: url("../images/Arrow-Down.svg"); width: 14px; diff --git a/packages/Webkul/Ui/src/Resources/views/datagrid/body.blade.php b/packages/Webkul/Ui/src/Resources/views/datagrid/body.blade.php index 46f2ff647..4a782f3b3 100644 --- a/packages/Webkul/Ui/src/Resources/views/datagrid/body.blade.php +++ b/packages/Webkul/Ui/src/Resources/views/datagrid/body.blade.php @@ -53,7 +53,11 @@ data-method="{{ $action['method'] }}" data-action="{{ route($action['route'], $record->{$index}) }}" - data-token="{{ csrf_token() }}"> + data-token="{{ csrf_token() }}" + + @if (isset($action['title'])) + title="{{ $action['title'] }}" + @endif> @endforeach diff --git a/tests/Browser/ProductCategoryTest.php b/tests/Browser/ProductCategoryTest.php new file mode 100644 index 000000000..4c8b2658b --- /dev/null +++ b/tests/Browser/ProductCategoryTest.php @@ -0,0 +1,49 @@ +all(); + $products = app('Webkul\Product\Repositories\ProductRepository')->all(); + + $slugs = array(); + + foreach ($categories as $category) { + if ($category->slug != 'root') { + array_push($slugs, $category->slug); + } + } + + $slugIndex = array_rand($slugs); + $testSlug = $slugs[$slugIndex]; + $testProduct = array(); + + foreach ($products as $product) { + $categories = $product->categories; + + if ($categories->last()->slug == $testSlug) { + array_push($testProduct, ['name' => $product->name, 'url_key' => $product->url_key]); + + break; + } + } + + $this->browse(function (Browser $browser) use($testSlug, $testProduct) { + $browser->visit(route('shop.categories.index', $testSlug)); + $browser->assertSeeLink($testProduct[0]['name']); + $browser->pause(5000); + }); + } +} \ No newline at end of file From e495232c53eb2012b6856f2bba976521bc4bf956 Mon Sep 17 00:00:00 2001 From: Prashant Singh Date: Mon, 10 Jun 2019 13:34:24 +0530 Subject: [PATCH 325/678] removed an extra dependency from composer.json --- composer.json | 1 - 1 file changed, 1 deletion(-) diff --git a/composer.json b/composer.json index 0e268403b..e4e0e4b2f 100755 --- a/composer.json +++ b/composer.json @@ -39,7 +39,6 @@ "laravel/dusk": "^4.0", "mockery/mockery": "^1.0", "nunomaduro/collision": "^2.0", - "phploc/phploc": "^5.0@dev", "phpunit/phpunit": "^7.0" }, "replace": { From c8f7608c46b9d60c44be163cc8d59e2f2930d075 Mon Sep 17 00:00:00 2001 From: Prashant Singh <41140572+prashant-webkul@users.noreply.github.com> Date: Mon, 10 Jun 2019 13:35:48 +0530 Subject: [PATCH 326/678] Development (#990) * Some syntax issue fixes * Adding discount things inside promotions in admin * routes updated for creating discount rules * fixed customer profile redirect parameter issue * added cart and catalog rule routes to admin section * migrations for discount almost to be finished, final revision left * migrations for discounts complete * catalog rule form underway * catalog rule * Made some dynamic form fields in catalog rule create form * made some changes for custom validations used in ProductForm request class * working on prepopulating the values fields in conditions * need another revisit on discount rules tables and then prepare for actions * removed discounts table * catalog rule form changed to muliti attribute set for single condition * new icons added for promotion and customer note. new action for customer added to take notes on the customers * catalog and cart rule designs stable, now moving towards validations on client side and backend * catalog rules migrations added * catalog rule models added with contracts and proxies * fixed customer group bug in customer registration controller * fixed customer registration bug due to last fix * fixed product card image not found issue * catalog rule translations added * Added migrations for cart rules and catalog rule products their contracts and remaining necessary files related to them. * making cart attributes for cart rules * Added more fields for cart rules * working on conditions for cart rule form * minor changes in migrations related to price rules * currency and locale switcher now only available for a channel on storefront when more than on locale and currency are assigned to that channel * part of conditions on the cart rule form added * daily sync * cart rate migrations updated * Added select and multi select attributes options fetching with ajax on catalog rule form * changed some migrations and data being populated at runtime inside catalog rule form * catalog rule create complete, migrations changes, translations added * catalog rule edit form complete * catalog rule form complete, now moving towards catalog rule products * added delete functionality for catalog rules * added cart rule preferences for coupon codes * cart rule submission problem due to repository issue * Cart rule form and migrations complete * Models and Repositories updated for cart rule usage * base sync with master * designing process to get suitable discount rules * cart rule form completed * added helpers in cart and discount to apply rules on cart at checkout or not * cart rule coupon implementation in progress for discount coupon in shop checkout pages * cart rules working * added coupon box on checkout screen * removed the conditions empty bug * Nearing to completion of coupon based rules * made some changes in cart rule coupon application on checkout related to new designs * some bug fixes * calculation for automatic cart rules complete * non couponable cart rules implemented, now moving on to binding them on frontend * some conditions improvements in couponable cart rules * some bug fixes * removed some bugs from summary blade for cart rule * added the table for cart rule cart for managing rules with cart and removed various bug fixes * some bug fixes * Removed bugs and added coupon based cart rule removal functionality * some bug fixes * cart rule labels refactoring in midway * Cart rule labels bug fixed * removed margin classes from shop to UI * Refactoring cart rule on front end * added checks * Discount rule implemented. * cart rule bug fixes * provision to remove the couponable and non couponable rule had been added * Cart rule frontend work done * altered some frontend variables on onepage checkout * Altered cart rules to some extent * removed an extra dependency from composer.json From 3b0ef1badedba4f22f867bb8975fb003ce2bc3ac Mon Sep 17 00:00:00 2001 From: Prashant Singh Date: Mon, 10 Jun 2019 13:57:09 +0530 Subject: [PATCH 327/678] Removed php loc from require dev of composer.json --- composer.json | 1 - 1 file changed, 1 deletion(-) diff --git a/composer.json b/composer.json index 0e268403b..e4e0e4b2f 100755 --- a/composer.json +++ b/composer.json @@ -39,7 +39,6 @@ "laravel/dusk": "^4.0", "mockery/mockery": "^1.0", "nunomaduro/collision": "^2.0", - "phploc/phploc": "^5.0@dev", "phpunit/phpunit": "^7.0" }, "replace": { From cfb16da64a8eb67b8fecd0e3942ce057571df55d Mon Sep 17 00:00:00 2001 From: Prashant Singh Date: Mon, 10 Jun 2019 15:21:45 +0530 Subject: [PATCH 328/678] fixed issue #994 --- .../Discount/src/Http/Controllers/CartRuleController.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/Webkul/Discount/src/Http/Controllers/CartRuleController.php b/packages/Webkul/Discount/src/Http/Controllers/CartRuleController.php index 914d6bf7a..5e4998f54 100644 --- a/packages/Webkul/Discount/src/Http/Controllers/CartRuleController.php +++ b/packages/Webkul/Discount/src/Http/Controllers/CartRuleController.php @@ -138,8 +138,8 @@ class CartRuleController extends Controller $channels = $data['channels']; unset($data['channels']); - $customer_groups = $data['customer_groups']; - unset($data['customer_groups']); + // $customer_groups = $data['customer_groups']; + // unset($data['customer_groups']); unset($data['criteria']); $labels = $data['label']; From 0d3539f3c9a670e1998cf7f654d057b221cb1cbf Mon Sep 17 00:00:00 2001 From: Prashant Singh Date: Mon, 10 Jun 2019 15:29:19 +0530 Subject: [PATCH 329/678] fixed validation issues in cart rule #993 & #997 --- .../src/Resources/views/promotions/cart-rule/create.blade.php | 4 ++-- .../src/Resources/views/promotions/cart-rule/edit.blade.php | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/Webkul/Admin/src/Resources/views/promotions/cart-rule/create.blade.php b/packages/Webkul/Admin/src/Resources/views/promotions/cart-rule/create.blade.php index 3dfed56a9..8270f4aca 100644 --- a/packages/Webkul/Admin/src/Resources/views/promotions/cart-rule/create.blade.php +++ b/packages/Webkul/Admin/src/Resources/views/promotions/cart-rule/create.blade.php @@ -41,7 +41,7 @@
- + @{{ errors.first('name') }}
@@ -49,7 +49,7 @@
- + @{{ errors.first('description') }}
diff --git a/packages/Webkul/Admin/src/Resources/views/promotions/cart-rule/edit.blade.php b/packages/Webkul/Admin/src/Resources/views/promotions/cart-rule/edit.blade.php index d565e979f..65f3f7292 100644 --- a/packages/Webkul/Admin/src/Resources/views/promotions/cart-rule/edit.blade.php +++ b/packages/Webkul/Admin/src/Resources/views/promotions/cart-rule/edit.blade.php @@ -43,7 +43,7 @@
- + @{{ errors.first('name') }}
@@ -51,7 +51,7 @@
- + @{{ errors.first('description') }}
From 451000c0d5e208ac646a37ef577f9208d519c7d9 Mon Sep 17 00:00:00 2001 From: Prashant Singh Date: Mon, 10 Jun 2019 16:41:31 +0530 Subject: [PATCH 330/678] disabled customer groups from cart rules --- .../Webkul/Discount/src/Http/Controllers/CartRuleController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/Webkul/Discount/src/Http/Controllers/CartRuleController.php b/packages/Webkul/Discount/src/Http/Controllers/CartRuleController.php index 5e4998f54..f39223ac9 100644 --- a/packages/Webkul/Discount/src/Http/Controllers/CartRuleController.php +++ b/packages/Webkul/Discount/src/Http/Controllers/CartRuleController.php @@ -199,7 +199,7 @@ class CartRuleController extends Controller $ruleCreated = $this->cartRule->create($data); - $ruleGroupCreated = $this->cartRule->CustomerGroupSync($customer_groups, $ruleCreated); + // $ruleGroupCreated = $this->cartRule->CustomerGroupSync($customer_groups, $ruleCreated); $ruleChannelCreated = $this->cartRule->ChannelSync($channels, $ruleCreated); if (isset($labels['global'])) { From e20e29b0bd6625b96bf290179e3ba2f19a012ef7 Mon Sep 17 00:00:00 2001 From: Prashant Singh Date: Mon, 10 Jun 2019 16:44:39 +0530 Subject: [PATCH 331/678] Fixed bug in cart rule form --- .../Discount/src/Http/Controllers/CartRuleController.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/Webkul/Discount/src/Http/Controllers/CartRuleController.php b/packages/Webkul/Discount/src/Http/Controllers/CartRuleController.php index f39223ac9..7157a2a03 100644 --- a/packages/Webkul/Discount/src/Http/Controllers/CartRuleController.php +++ b/packages/Webkul/Discount/src/Http/Controllers/CartRuleController.php @@ -194,7 +194,7 @@ class CartRuleController extends Controller } if(isset($data['usage_limit'])) { - $coupons['usage_limit'] = $data['usage_limit']; + $coupons['limit'] = $data['usage_limit']; } $ruleCreated = $this->cartRule->create($data); @@ -226,7 +226,7 @@ class CartRuleController extends Controller $couponCreated = $this->cartRuleCoupon->create($coupons); } - if ($ruleCreated && $ruleGroupCreated && $ruleChannelCreated) { + if ($ruleCreated && $ruleChannelCreated) { if (isset($couponCreated) && $couponCreated) { session()->flash('success', trans('admin::app.promotion.status.success-coupon')); } @@ -353,7 +353,7 @@ class CartRuleController extends Controller } if (isset($data['usage_limit'])) { - $coupons['usage_limit'] = $data['usage_limit']; + $coupons['limit'] = $data['usage_limit']; } $ruleUpdated = $this->cartRule->update($data, $id); From 80ac7bba7225b607bdf8eb325e0da5de024ad5ff Mon Sep 17 00:00:00 2001 From: rahul shukla Date: Mon, 10 Jun 2019 17:11:56 +0530 Subject: [PATCH 332/678] customer document --- composer.json | 3 +- config/app.php | 1 + .../Resources/views/customers/edit.blade.php | 5 + .../Webkul/CustomerDocument/composer.json | 24 ++++ .../CustomerDocument/src/Config/menu.php | 12 ++ .../src/Contracts/CustomerDocument.php | 7 ++ ..._06_07_122059_customer_documents_table.php | 35 ++++++ .../src/Http/Controllers/Controller.php | 13 ++ .../Http/Controllers/DocumentController.php | 112 ++++++++++++++++++ .../src/Http/admin-routes.php | 26 ++++ .../src/Http/front-routes.php | 21 ++++ .../src/Models/CustomerDocument.php | 13 ++ .../src/Models/CustomerDocumentProxy.php | 10 ++ .../CustomerDocumentServiceProvider.php | 53 +++++++++ .../src/Providers/EventServiceProvider.php | 21 ++++ .../src/Providers/ModuleServiceProvider.php | 12 ++ .../CustomerDocumentRepository.php | 25 ++++ .../src/Resources/lang/en/app.php | 17 +++ .../views/admin/customers/upload.blade.php | 76 ++++++++++++ .../views/shop/customers/document.blade.php | 55 +++++++++ 20 files changed, 540 insertions(+), 1 deletion(-) create mode 100644 packages/Webkul/CustomerDocument/composer.json create mode 100644 packages/Webkul/CustomerDocument/src/Config/menu.php create mode 100644 packages/Webkul/CustomerDocument/src/Contracts/CustomerDocument.php create mode 100644 packages/Webkul/CustomerDocument/src/Database/migrations/2019_06_07_122059_customer_documents_table.php create mode 100644 packages/Webkul/CustomerDocument/src/Http/Controllers/Controller.php create mode 100644 packages/Webkul/CustomerDocument/src/Http/Controllers/DocumentController.php create mode 100644 packages/Webkul/CustomerDocument/src/Http/admin-routes.php create mode 100644 packages/Webkul/CustomerDocument/src/Http/front-routes.php create mode 100644 packages/Webkul/CustomerDocument/src/Models/CustomerDocument.php create mode 100644 packages/Webkul/CustomerDocument/src/Models/CustomerDocumentProxy.php create mode 100644 packages/Webkul/CustomerDocument/src/Providers/CustomerDocumentServiceProvider.php create mode 100644 packages/Webkul/CustomerDocument/src/Providers/EventServiceProvider.php create mode 100644 packages/Webkul/CustomerDocument/src/Providers/ModuleServiceProvider.php create mode 100644 packages/Webkul/CustomerDocument/src/Repositories/CustomerDocumentRepository.php create mode 100644 packages/Webkul/CustomerDocument/src/Resources/lang/en/app.php create mode 100644 packages/Webkul/CustomerDocument/src/Resources/views/admin/customers/upload.blade.php create mode 100644 packages/Webkul/CustomerDocument/src/Resources/views/shop/customers/document.blade.php diff --git a/composer.json b/composer.json index 0b5a05026..ef7ac4994 100755 --- a/composer.json +++ b/composer.json @@ -84,7 +84,8 @@ "Webkul\\Paypal\\": "packages/Webkul/Paypal/src", "Webkul\\Sales\\": "packages/Webkul/Sales/src", "Webkul\\Tax\\": "packages/Webkul/Tax/src", - "Webkul\\API\\": "packages/Webkul/API" + "Webkul\\API\\": "packages/Webkul/API", + "Webkul\\CustomerDocument\\": "packages/Webkul/CustomerDocument/src" } }, "autoload-dev": { diff --git a/config/app.php b/config/app.php index edd6fd40b..7820f103c 100755 --- a/config/app.php +++ b/config/app.php @@ -245,6 +245,7 @@ return [ Webkul\Sales\Providers\SalesServiceProvider::class, Webkul\Tax\Providers\TaxServiceProvider::class, Webkul\API\Providers\APIServiceProvider::class, + Webkul\CustomerDocument\Providers\CustomerDocumentServiceProvider::class, ], /* diff --git a/packages/Webkul/Admin/src/Resources/views/customers/edit.blade.php b/packages/Webkul/Admin/src/Resources/views/customers/edit.blade.php index a14dd01e0..aa476fb4a 100755 --- a/packages/Webkul/Admin/src/Resources/views/customers/edit.blade.php +++ b/packages/Webkul/Admin/src/Resources/views/customers/edit.blade.php @@ -6,6 +6,9 @@ @section('content')
+ + {!! view_render_event('bagisto.admin.customer.edit.before', ['customer' => $customer]) !!} +
+ + {!! view_render_event('bagisto.admin.customer.edit.after', ['customer' => $customer]) !!}
@stop \ No newline at end of file diff --git a/packages/Webkul/CustomerDocument/composer.json b/packages/Webkul/CustomerDocument/composer.json new file mode 100644 index 000000000..383539bb4 --- /dev/null +++ b/packages/Webkul/CustomerDocument/composer.json @@ -0,0 +1,24 @@ +{ + "name": "bagisto/customer-document", + "license": "MIT", + "authors": [ + { + "name": "Rahul Shukla", + "email": "rahulshukla517@webkul.com" + } + ], + "autoload": { + "psr-4": { + "Webkul\\CustomerDocument\\": "src/" + } + }, + "extra": { + "laravel": { + "providers": [ + "Webkul\\CustomerDocument\\CustomerDocumentServiceProvider" + ], + "aliases": {} + } + }, + "minimum-stability": "dev" +} \ No newline at end of file diff --git a/packages/Webkul/CustomerDocument/src/Config/menu.php b/packages/Webkul/CustomerDocument/src/Config/menu.php new file mode 100644 index 000000000..b469239ea --- /dev/null +++ b/packages/Webkul/CustomerDocument/src/Config/menu.php @@ -0,0 +1,12 @@ + 'account.documents', + 'name' => 'customerdocument::app.admin.customers.documents', + 'route' =>'customer.documents.index', + 'sort' => 6 + ] +]; + +?> \ No newline at end of file diff --git a/packages/Webkul/CustomerDocument/src/Contracts/CustomerDocument.php b/packages/Webkul/CustomerDocument/src/Contracts/CustomerDocument.php new file mode 100644 index 000000000..44ca2e742 --- /dev/null +++ b/packages/Webkul/CustomerDocument/src/Contracts/CustomerDocument.php @@ -0,0 +1,7 @@ +increments('id'); + $table->string('name'); + $table->string('path'); + $table->integer('customer_id')->unsigned(); + $table->foreign('customer_id')->references('id')->on('customers')->onDelete('cascade'); + $table->timestamps(); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::dropIfExists('customer_documents'); + } +} diff --git a/packages/Webkul/CustomerDocument/src/Http/Controllers/Controller.php b/packages/Webkul/CustomerDocument/src/Http/Controllers/Controller.php new file mode 100644 index 000000000..ec04aa1e9 --- /dev/null +++ b/packages/Webkul/CustomerDocument/src/Http/Controllers/Controller.php @@ -0,0 +1,13 @@ + + * @copyright 2018 Webkul Software Pvt Ltd (http://www.webkul.com) + */ +class DocumentController extends Controller +{ + /** + * Contains route related configuration + * + * @var array + */ + protected $_config; + + /** + * CustomerDocumentRepository object + * + * @var array + */ + protected $customerDocument; + + /** + * Create a new controller instance. + * + * @param \Webkul\Customer\Repositories\CustomerDocumentRepository $customerDocument + */ + public function __construct(CustomerDocumentRepository $customerDocument) + { + $this->_config = request('_config'); + + $this->customerDocument = $customerDocument; + } + + /** + * Display a listing of the resource. + * + * @return \Illuminate\Http\Response + */ + public function index() + { + $documents = $this->customerDocument->findWhere(['customer_id' => auth()->guard('customer')->user()->id]); + + return view($this->_config['view'], compact('documents')); + } + + /** + * upload document + * + * @return \Illuminate\Http\Response + */ + public function upload() + { + $data = request()->all(); + + if (request()->hasFile('file')) { + $dir = 'customer'; + $document['path'] = request()->file('file')->store($dir); + } + + $document['customer_id'] = $data['customer_id']; + $document['name'] = $data['name']; + + $this->customerDocument->create($document); + + session()->flash('success', trans('customerdocument::app.admin.customers.upload-success')); + + return redirect()->back(); + } + + /** + * download the file for the specified resource. + * + * @param int $id + * @return \Illuminate\Http\Response + */ + public function download($id) + { + $document = $this->customerDocument->findOrfail($id); + + return Storage::download($document['path']); + } + + /** + * Remove the specified resource from storage.. + * + * @param int $id + * @return \Illuminate\Http\Response + */ + public function delete($id) + { + $document = $this->customerDocument->findOrfail($id); + + $this->customerDocument->delete($id); + + Storage::delete($document['path']); + + session()->flash('success', trans('customerdocument::app.admin.customers.delete-success')); + + return redirect()->back(); + } +} \ No newline at end of file diff --git a/packages/Webkul/CustomerDocument/src/Http/admin-routes.php b/packages/Webkul/CustomerDocument/src/Http/admin-routes.php new file mode 100644 index 000000000..303622754 --- /dev/null +++ b/packages/Webkul/CustomerDocument/src/Http/admin-routes.php @@ -0,0 +1,26 @@ + ['web']], function () { + + Route::prefix('admin')->group(function () { + + Route::group(['middleware' => ['admin']], function () { + + //document Management Routes + Route::post('upload-document', 'Webkul\CustomerDocument\Http\Controllers\DocumentController@upload')->defaults('_config', [ + 'redirect' => 'admin.customer.index' + ])->name('admin.customer.document.upload'); + + Route::get('download-document/{id}', 'Webkul\CustomerDocument\Http\Controllers\DocumentController@download')->defaults('_config', [ + 'redirect' => 'admin.customer.index' + ])->name('admin.customer.document.download'); + + Route::get('delete-document/{id}', 'Webkul\CustomerDocument\Http\Controllers\DocumentController@delete')->defaults('_config', [ + 'redirect' => 'admin.customer.index' + ])->name('admin.customer.document.delete'); + + }); + + }); + +}); diff --git a/packages/Webkul/CustomerDocument/src/Http/front-routes.php b/packages/Webkul/CustomerDocument/src/Http/front-routes.php new file mode 100644 index 000000000..51aa04022 --- /dev/null +++ b/packages/Webkul/CustomerDocument/src/Http/front-routes.php @@ -0,0 +1,21 @@ + ['web', 'locale', 'theme', 'currency']], function () { + + Route::prefix('customer')->group(function () { + + Route::group(['middleware' => ['customer']], function () { + + Route::prefix('account')->group(function () { + + Route::get('documents', 'Webkul\CustomerDocument\Http\Controllers\DocumentController@index')->defaults('_config', [ + 'view' => 'customerdocument::shop.customers.document' + ])->name('customer.documents.index'); + + Route::get('download-document/{id}', 'Webkul\CustomerDocument\Http\Controllers\DocumentController@download')->defaults('_config', [ + 'redirect' => 'admin.customer.index' + ])->name('customer.document.download'); + }); + }); + }); +}); \ No newline at end of file diff --git a/packages/Webkul/CustomerDocument/src/Models/CustomerDocument.php b/packages/Webkul/CustomerDocument/src/Models/CustomerDocument.php new file mode 100644 index 000000000..690f5d3a0 --- /dev/null +++ b/packages/Webkul/CustomerDocument/src/Models/CustomerDocument.php @@ -0,0 +1,13 @@ +loadRoutesFrom(__DIR__ . '/../Http/admin-routes.php'); + + $this->loadRoutesFrom(__DIR__ . '/../Http/front-routes.php'); + + $this->loadTranslationsFrom(__DIR__ . '/../Resources/lang', 'customerdocument'); + + $this->loadViewsFrom(__DIR__ . '/../Resources/views', 'customerdocument'); + + $this->loadMigrationsFrom(__DIR__ . '/../Database/migrations'); + + $this->app->register(ModuleServiceProvider::class); + + $this->app->register(EventServiceProvider::class); + } + + /** + * Register services. + * + * @return void + */ + public function register() + { + $this->registerConfig(); + } + + /** + * Register package config. + * + * @return void + */ + protected function registerConfig() + { + $this->mergeConfigFrom( + dirname(__DIR__) . '/Config/menu.php', 'menu.customer' + ); + } +} \ No newline at end of file diff --git a/packages/Webkul/CustomerDocument/src/Providers/EventServiceProvider.php b/packages/Webkul/CustomerDocument/src/Providers/EventServiceProvider.php new file mode 100644 index 000000000..0feff68cc --- /dev/null +++ b/packages/Webkul/CustomerDocument/src/Providers/EventServiceProvider.php @@ -0,0 +1,21 @@ +addTemplate('customerdocument::admin.customers.upload'); + }); + } +} \ No newline at end of file diff --git a/packages/Webkul/CustomerDocument/src/Providers/ModuleServiceProvider.php b/packages/Webkul/CustomerDocument/src/Providers/ModuleServiceProvider.php new file mode 100644 index 000000000..49aaf5ace --- /dev/null +++ b/packages/Webkul/CustomerDocument/src/Providers/ModuleServiceProvider.php @@ -0,0 +1,12 @@ + + * @copyright 2018 Webkul Software Pvt Ltd (http://www.webkul.com) + */ +class CustomerDocumentRepository extends Repository +{ + /** + * Specify Model class name + * + * @return mixed + */ + + function model() + { + return 'Webkul\CustomerDocument\Contracts\CustomerDocument'; + } +} \ No newline at end of file diff --git a/packages/Webkul/CustomerDocument/src/Resources/lang/en/app.php b/packages/Webkul/CustomerDocument/src/Resources/lang/en/app.php new file mode 100644 index 000000000..d7fbf56ac --- /dev/null +++ b/packages/Webkul/CustomerDocument/src/Resources/lang/en/app.php @@ -0,0 +1,17 @@ +[ + 'customers' => [ + 'documents' => 'Documents', + 'add-document' => 'Add Document', + 'submit' => 'Submit', + 'file' => 'File', + 'name' => 'Name', + 'download' => 'Download', + 'upload-success' => 'Document uploaded successfully.', + 'delete-success' => 'Document deleted successfully.', + 'empty' => 'You Do not Have Any Documents.' + ], + ], +]; \ No newline at end of file diff --git a/packages/Webkul/CustomerDocument/src/Resources/views/admin/customers/upload.blade.php b/packages/Webkul/CustomerDocument/src/Resources/views/admin/customers/upload.blade.php new file mode 100644 index 000000000..0d5235107 --- /dev/null +++ b/packages/Webkul/CustomerDocument/src/Resources/views/admin/customers/upload.blade.php @@ -0,0 +1,76 @@ +findWhere(['customer_id' => $customer->id]); + +?> + + +
+ + + +
+ + + + + + + + + + + @foreach ($documents as $document) + + + + + + @endforeach + +
{{ __('customerdocument::app.admin.customers.name') }}{{ __('customerdocument::app.admin.customers.download') }}
{{ $document->name }} + + + + + + + +
+
+ +
+
+ + +

{{ __('customerdocument::app.admin.customers.add-document') }}

+ +
+
+ @csrf() + + + +
+ + + @{{ errors.first('name') }} +
+ +
+ + + @{{ errors.first('file') }} +
+ + + +
+
+
\ No newline at end of file diff --git a/packages/Webkul/CustomerDocument/src/Resources/views/shop/customers/document.blade.php b/packages/Webkul/CustomerDocument/src/Resources/views/shop/customers/document.blade.php new file mode 100644 index 000000000..3e9844e62 --- /dev/null +++ b/packages/Webkul/CustomerDocument/src/Resources/views/shop/customers/document.blade.php @@ -0,0 +1,55 @@ +@extends('shop::layouts.master') + +@section('page_title') + {{ __('customerdocument::app.admin.customers.documents') }} +@endsection + +@section('content-wrapper') + + +@endsection \ No newline at end of file From 8b5ac835e08fedad48e0773d58fd4cc6bb2b0de8 Mon Sep 17 00:00:00 2001 From: Prashant Singh Date: Mon, 10 Jun 2019 18:26:12 +0530 Subject: [PATCH 333/678] Fixed bugs in creation of cart rule form --- packages/Webkul/Discount/src/Helpers/Discount.php | 8 ++++++-- .../src/Http/Controllers/CartRuleController.php | 12 ++++++------ 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/packages/Webkul/Discount/src/Helpers/Discount.php b/packages/Webkul/Discount/src/Helpers/Discount.php index bdfd823f1..30fcb5bce 100644 --- a/packages/Webkul/Discount/src/Helpers/Discount.php +++ b/packages/Webkul/Discount/src/Helpers/Discount.php @@ -112,9 +112,13 @@ class Discount } } - $this->save($canBeApplied[0]['rule']); + if ($canBeApplied->count()) { + $this->save($canBeApplied[0]['rule']); - return $canBeApplied[0]; + return $canBeApplied[0]; + } else { + return false; + } } public function applyCouponAbleRule($code) diff --git a/packages/Webkul/Discount/src/Http/Controllers/CartRuleController.php b/packages/Webkul/Discount/src/Http/Controllers/CartRuleController.php index 7157a2a03..092f9071a 100644 --- a/packages/Webkul/Discount/src/Http/Controllers/CartRuleController.php +++ b/packages/Webkul/Discount/src/Http/Controllers/CartRuleController.php @@ -193,9 +193,9 @@ class CartRuleController extends Controller // } } - if(isset($data['usage_limit'])) { - $coupons['limit'] = $data['usage_limit']; - } + // if(isset($data['usage_limit'])) { + // $coupons['limit'] = $data['usage_limit']; + // } $ruleCreated = $this->cartRule->create($data); @@ -352,9 +352,9 @@ class CartRuleController extends Controller // } } - if (isset($data['usage_limit'])) { - $coupons['limit'] = $data['usage_limit']; - } + // if (isset($data['usage_limit'])) { + // $coupons['limit'] = $data['usage_limit']; + // } $ruleUpdated = $this->cartRule->update($data, $id); From 64c249983db9f795c48f434d0ab41fc3b6267283 Mon Sep 17 00:00:00 2001 From: Prashant Singh Date: Mon, 10 Jun 2019 18:28:17 +0530 Subject: [PATCH 334/678] Fixed --- .../Discount/src/Http/Controllers/CartRuleController.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/packages/Webkul/Discount/src/Http/Controllers/CartRuleController.php b/packages/Webkul/Discount/src/Http/Controllers/CartRuleController.php index 092f9071a..c55873a15 100644 --- a/packages/Webkul/Discount/src/Http/Controllers/CartRuleController.php +++ b/packages/Webkul/Discount/src/Http/Controllers/CartRuleController.php @@ -191,6 +191,8 @@ class CartRuleController extends Controller // $coupons['suffix'] = $data['suffix']; // unset($data['suffix']); // } + + $coupons['limit'] = 0; } // if(isset($data['usage_limit'])) { @@ -350,6 +352,7 @@ class CartRuleController extends Controller // $coupons['suffix'] = $data['suffix']; // unset($data['suffix']); // } + $coupons['limit'] = 0; } // if (isset($data['usage_limit'])) { From a7592b233d59c1f0df74403a887d8afc88bdec12 Mon Sep 17 00:00:00 2001 From: Prashant Singh Date: Tue, 11 Jun 2019 12:26:54 +0530 Subject: [PATCH 335/678] Fixed bug #1003 --- packages/Webkul/Discount/src/Helpers/Discount.php | 10 +++++----- .../src/Http/Controllers/CartRuleController.php | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/packages/Webkul/Discount/src/Helpers/Discount.php b/packages/Webkul/Discount/src/Helpers/Discount.php index 30fcb5bce..c5bb028dc 100644 --- a/packages/Webkul/Discount/src/Helpers/Discount.php +++ b/packages/Webkul/Discount/src/Helpers/Discount.php @@ -5,7 +5,7 @@ namespace Webkul\Discount\Helpers; use Webkul\Discount\Repositories\CartRuleRepository as CartRule; use Webkul\Discount\Repositories\CartRuleCartRepository as CartRuleCart; use Carbon\Carbon; - +use Arr; class Discount { @@ -113,9 +113,9 @@ class Discount } if ($canBeApplied->count()) { - $this->save($canBeApplied[0]['rule']); + $this->save(array_first($canBeApplied)['rule']); - return $canBeApplied[0]; + return array_first($canBeApplied); } else { return false; } @@ -214,12 +214,12 @@ class Discount } } } else { - if ($canBeApplied[0]['rule']->use_coupon) { + if (array_first($canBeApplied)['rule']->use_coupon) { $useCouponable = true; } } } else if (count($canBeApplied)) { - if ($canBeApplied[0]['rule']->use_coupon) { + if (array_first($canBeApplied)['rule']->use_coupon) { $useCouponable = true; } } diff --git a/packages/Webkul/Discount/src/Http/Controllers/CartRuleController.php b/packages/Webkul/Discount/src/Http/Controllers/CartRuleController.php index c55873a15..09257d3a5 100644 --- a/packages/Webkul/Discount/src/Http/Controllers/CartRuleController.php +++ b/packages/Webkul/Discount/src/Http/Controllers/CartRuleController.php @@ -368,7 +368,7 @@ class CartRuleController extends Controller if (isset($coupons)) { $coupons['cart_rule_id'] = $ruleUpdated->id; - $coupons['usage_per_customer'] = $data['per_customer']; //0 is for unlimited usage + // $coupons['usage_per_customer'] = $data['per_customer']; //0 is for unlimited usage $couponUpdated = $ruleUpdated->coupons->update($coupons); } From de126e38edf46ee36e43a60d1af7cab2f8043db3 Mon Sep 17 00:00:00 2001 From: Prashant Singh Date: Tue, 11 Jun 2019 12:32:34 +0530 Subject: [PATCH 336/678] fixed issue with cart rule disc_quantity as validation was allowing zero at the time of creation --- .../src/Resources/views/promotions/cart-rule/create.blade.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/Webkul/Admin/src/Resources/views/promotions/cart-rule/create.blade.php b/packages/Webkul/Admin/src/Resources/views/promotions/cart-rule/create.blade.php index 8270f4aca..9fae27f7e 100644 --- a/packages/Webkul/Admin/src/Resources/views/promotions/cart-rule/create.blade.php +++ b/packages/Webkul/Admin/src/Resources/views/promotions/cart-rule/create.blade.php @@ -273,7 +273,7 @@
- + @{{ errors.first('disc_quantity') }}
From 6b9be23cb0608f0952a910b0b94472df2ff7814c Mon Sep 17 00:00:00 2001 From: Prashant Singh Date: Tue, 11 Jun 2019 14:38:57 +0530 Subject: [PATCH 337/678] fixed issue in cart rule for add condition button and exception while updating cart rule --- .../src/Resources/views/promotions/cart-rule/create.blade.php | 4 ++-- .../src/Resources/views/promotions/cart-rule/edit.blade.php | 4 ++-- .../Discount/src/Http/Controllers/CartRuleController.php | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/packages/Webkul/Admin/src/Resources/views/promotions/cart-rule/create.blade.php b/packages/Webkul/Admin/src/Resources/views/promotions/cart-rule/create.blade.php index 9fae27f7e..a67a17501 100644 --- a/packages/Webkul/Admin/src/Resources/views/promotions/cart-rule/create.blade.php +++ b/packages/Webkul/Admin/src/Resources/views/promotions/cart-rule/create.blade.php @@ -183,8 +183,6 @@
- - Add Condition
Any of the condition is true
@@ -239,6 +237,8 @@
+ + Add Condition
diff --git a/packages/Webkul/Admin/src/Resources/views/promotions/cart-rule/edit.blade.php b/packages/Webkul/Admin/src/Resources/views/promotions/cart-rule/edit.blade.php index 65f3f7292..fc16e4586 100644 --- a/packages/Webkul/Admin/src/Resources/views/promotions/cart-rule/edit.blade.php +++ b/packages/Webkul/Admin/src/Resources/views/promotions/cart-rule/edit.blade.php @@ -183,8 +183,6 @@
- - Add Condition
Any of the condition is true
@@ -239,6 +237,8 @@ + + Add Condition diff --git a/packages/Webkul/Discount/src/Http/Controllers/CartRuleController.php b/packages/Webkul/Discount/src/Http/Controllers/CartRuleController.php index 09257d3a5..66fe52b21 100644 --- a/packages/Webkul/Discount/src/Http/Controllers/CartRuleController.php +++ b/packages/Webkul/Discount/src/Http/Controllers/CartRuleController.php @@ -192,7 +192,7 @@ class CartRuleController extends Controller // unset($data['suffix']); // } - $coupons['limit'] = 0; + // $coupons['limit'] = 0; } // if(isset($data['usage_limit'])) { @@ -352,7 +352,7 @@ class CartRuleController extends Controller // $coupons['suffix'] = $data['suffix']; // unset($data['suffix']); // } - $coupons['limit'] = 0; + // $coupons['limit'] = 0; } // if (isset($data['usage_limit'])) { From 22a81efdb375ea1f9717d0ca5b5aa492cd669811 Mon Sep 17 00:00:00 2001 From: Prashant Singh Date: Tue, 11 Jun 2019 14:51:28 +0530 Subject: [PATCH 338/678] fixed issue #1011 --- packages/Webkul/Admin/publishable/assets/css/admin.css | 2 +- packages/Webkul/Admin/publishable/assets/js/admin.js | 2 +- .../Webkul/Admin/publishable/assets/mix-manifest.json | 4 ++-- packages/Webkul/Admin/src/Resources/lang/en/app.php | 1 + .../Resources/views/promotions/cart-rule/create.blade.php | 8 ++++---- .../Resources/views/promotions/cart-rule/edit.blade.php | 6 +++--- 6 files changed, 12 insertions(+), 11 deletions(-) diff --git a/packages/Webkul/Admin/publishable/assets/css/admin.css b/packages/Webkul/Admin/publishable/assets/css/admin.css index 982352bd3..c7abc5460 100755 --- a/packages/Webkul/Admin/publishable/assets/css/admin.css +++ b/packages/Webkul/Admin/publishable/assets/css/admin.css @@ -1 +1 @@ -@import url(https://fonts.googleapis.com/css?family=Montserrat:400,500);body{margin:0;color:#3a3a3a;font-family:Montserrat,sans-serif;font-size:14px;font-weight:500;position:static;min-height:100%;width:100%}::-webkit-scrollbar{width:12px}::-webkit-scrollbar-track{-webkit-box-shadow:inset 0 0 6px hsla(0,0%,100%,.3);border-radius:10px}::-webkit-scrollbar-thumb{border-radius:10px;-webkit-box-shadow:inset 0 0 6px rgba(0,0,0,.5)}.navbar-top{height:60px;background:#fff;font-size:0;-webkit-box-shadow:0 3px 6px 0 rgba(0,0,0,.05);box-shadow:0 3px 6px 0 rgba(0,0,0,.05);border-bottom:1px solid hsla(0,0%,64%,.2);position:fixed;left:0;right:0;z-index:5}.navbar-top .navbar-top-left{width:50%;height:60px;display:inline-block;vertical-align:middle}.navbar-top .navbar-top-left .brand-logo{padding:10px}.navbar-top .navbar-top-right{width:50%;height:60px;text-align:right;display:inline-block;vertical-align:middle}.navbar-top .navbar-top-right .profile-info{display:inline-block;vertical-align:middle;text-align:left;min-width:50px;padding:12px 0;margin:0 25px 0 30px;font-size:15px;cursor:pointer;position:relative}.navbar-top .navbar-top-right .profile-info .dropdown-list{top:63px}.navbar-top .navbar-top-right .profile-info .name{color:#000311;display:block;text-align:left}.navbar-top .navbar-top-right .profile-info .role{font-size:14px;color:#8e8e8e;display:block;text-align:left}.navbar-top .navbar-top-right .profile-info i.icon{margin-left:10px}.navbar-left{position:fixed;left:0;top:60px;width:90px;padding-top:20px;border-right:1px solid hsla(0,0%,64%,.2);height:auto;bottom:0;z-index:2}.navbar-left ul.menubar li.menu-item{padding:10px 5px;font-size:11px;text-align:center;text-transform:uppercase}.navbar-left ul.menubar li.menu-item a{color:#a2a2a2}.navbar-left ul.menubar li.menu-item.active a{color:#0041ff}.content-container{padding-left:90px;position:absolute;margin-top:60px;top:0;right:0;left:0;bottom:0;height:calc(100% - 60px);width:100%}.content-container .inner-section{height:100%}.content-container .aside-nav{width:280px;position:fixed;top:60px;bottom:0;border-right:1px solid hsla(0,0%,64%,.2);background:#f8f9fa;padding-top:10px;padding-bottom:10px;z-index:4}.content-container .aside-nav ul{overflow-y:auto;height:90%}.content-container .aside-nav a{padding:15px;display:block;color:#000311}.content-container .aside-nav .active a{background:#fff;border-top:1px solid hsla(0,0%,64%,.2);border-bottom:1px solid hsla(0,0%,64%,.2)}.content-container .aside-nav .active i{float:right}.content-container .content-wrapper{padding:25px;margin-left:305px}.content-container .content{margin-top:25px}.content-container .content.full-page{padding:25px}.content-container .content .page-header{display:inline-block;margin-bottom:20px;width:100%}.content-container .content .page-header .page-title{float:left}.content-container .content .page-header .page-title .back-link{float:left;margin-right:10px;width:24px;height:24px;cursor:pointer;margin-top:5px}.content-container .content .page-header .page-title h1{margin-bottom:0;vertical-align:middle;display:inline-block;line-height:normal}.content-container .content .page-header .page-action{float:right}.content-container .content .page-header .page-action *{display:inline-block}.content-container .content .page-header .page-action a{margin-left:25px}.content-container .content .page-header .control-group{width:180px;display:inline-block;margin-bottom:0;margin-left:20px}.content-container .content .page-header .control{width:100%;margin:0}.content-container .content .page-content{width:100%;display:inline-block}.control-group label{width:70%}.control-group label .locale{float:right;color:#8e8e8e}.control-group .mce-tinymce{margin-top:10px;margin-bottom:5px}.dashboard .page-header{margin-bottom:0!important;padding-bottom:15px;border-bottom:1px solid hsla(0,0%,64%,.2)}.dashboard .page-content{margin-top:15px}.dashboard .card{height:445px;background:#fff;border:1px solid #e7e7e7;-webkit-box-shadow:0 5px 10px 2px rgba(0,0,0,.08);box-shadow:0 5px 10px 2px rgba(0,0,0,.08);border-radius:2px;padding:20px 0 0 20px}.dashboard .card .card-title{font-size:14px;color:#a2a2a2;letter-spacing:-.26px;text-transform:uppercase}.dashboard .card .card-info{width:100%;height:100%;display:inline-block}.dashboard .card .card-info.center{text-align:center}.dashboard .card .card-info ul li{border-bottom:1px solid hsla(0,0%,64%,.2);width:100%;display:inline-block;padding:10px 0;position:relative}.dashboard .card .card-info ul li .image{height:60px;width:60px;float:left;margin-right:15px}.dashboard .card .card-info ul li .image.product{background:#f2f2f2}.dashboard .card .card-info ul li .image img{width:100%}.dashboard .card .card-info ul li .description{margin-top:10px}.dashboard .card .card-info ul li .description .name{color:#0041ff}.dashboard .card .card-info ul li .description .info{color:#3a3a3a;margin-top:5px}.dashboard .card .card-info ul li .icon.angle-right-icon{position:absolute;right:30px;top:50%;margin-top:-8px}.dashboard .card .card-info ul li:last-child{border-bottom:0}.dashboard .card .card-info .no-result-found{margin-top:146px}.dashboard .card .card-info .no-result-found p{margin:0;color:#a2a2a2}.dashboard .dashboard-stats{display:grid;grid-template-columns:repeat(auto-fill,minmax(320px,1fr));grid-auto-rows:auto;grid-column-gap:30px;grid-row-gap:15px}.dashboard .dashboard-stats .dashboard-card{height:100px;background:#fff;border:1px solid #e7e7e7;-webkit-box-shadow:0 5px 10px 2px rgba(0,0,0,.08);box-shadow:0 5px 10px 2px rgba(0,0,0,.08);border-radius:5px;position:relative;padding:15px}.dashboard .dashboard-stats .dashboard-card .title{font-size:14px;color:#a2a2a2;text-transform:uppercase}.dashboard .dashboard-stats .dashboard-card .data{padding-top:13px;font-size:32px;color:#0041ff}.dashboard .dashboard-stats .dashboard-card .data .progress{font-size:14px;color:#8e8e8e;float:right;margin-top:9px}.dashboard .dashboard-stats .dashboard-card .data .progress .icon{vertical-align:middle}.dashboard .graph-stats{margin-top:30px;width:100%;display:inline-block}.dashboard .graph-stats .left-card-container{float:left;width:75%;padding-right:9px}.dashboard .graph-stats .right-card-container{float:left;width:25%;padding-left:21px}.dashboard .sale-stock{width:100%;display:inline-block;display:grid;grid-template-columns:repeat(auto-fill,minmax(435px,1fr));grid-auto-rows:auto;grid-column-gap:30px;grid-row-gap:15px;margin-top:30px}.sale-container .sale-section{font-size:16px}.sale-container .sale-section .secton-title{font-size:18px;color:#8e8e8e;padding:15px 0;border-bottom:1px solid hsla(0,0%,64%,.2)}.sale-container .sale-section .section-content{display:block;padding:20px 0}.sale-container .sale-section .section-content .row{display:block;padding:7px 0}.sale-container .sale-section .section-content .row .title{width:200px;color:#3a3a3a;letter-spacing:-.26px;display:inline-block}.sale-container .sale-section .section-content .row .value{color:#3a3a3a;letter-spacing:-.26px;display:inline-block}.sale-container .table .qty-row{display:block;margin-bottom:5px}.sale-container .table .qty-row:last-child{margin-bottom:0}.sale-container .table .radio{margin:0}.sale-container .sale-summary{margin-top:2%;height:130px;float:right}.sale-container .sale-summary tr td{padding:5px 8px}.sale-container .sale-summary tr.bold{font-weight:600;font-size:15px}.sale-container .sale-summary tr.border td{border-bottom:1px solid hsla(0,0%,64%,.2)}.stars{margin-top:5px}.stars .icon{width:16px;height:16px}.export-import{cursor:pointer}.export-import .export-icon,.export-import .import-icon{position:relative;top:10px}.export-import span{margin-left:2px}.configuration-image{position:relative;height:33px;width:33px;top:15px;border-radius:3px;margin-right:5px}.download{position:relative;height:24px!important;width:24px!important;top:12px;margin-right:10px}.aside-nav-toggle{height:48px;width:100%;padding-top:15px;border-top:1px solid hsla(0,0%,64%,.2)}.aside-nav-toggle .close-icon,.aside-nav-toggle .open-icon{position:absolute;cursor:pointer;left:45%}.aside-nav-toggle.open{display:none}.linked-product-search-result{-webkit-box-shadow:0 2px 4px 0 rgba(0,0,0,.16),0 0 9px 0 rgba(0,0,0,.16);box-shadow:0 2px 4px 0 rgba(0,0,0,.16),0 0 9px 0 rgba(0,0,0,.16);z-index:10;text-align:left;border-radius:3px;background-color:#fff;width:70%;max-height:200px;overflow-y:auto}.linked-product-search-result li{padding:10px;border-bottom:1px solid #e8e8e8;cursor:pointer}.rtl{direction:rtl}.rtl .navbar-top .navbar-top-right{text-align:left}.rtl .navbar-top .navbar-top-right .profile-info{margin:0 30px 0 25px}.rtl .navbar-top .navbar-top-right .profile-info i.icon{margin-left:0;margin-right:10px}.rtl .navbar-left{border-left:1px solid hsla(0,0%,64%,.2);border-right:none;left:calc(100% - 90px)}.rtl .content-container{padding-right:90px;padding-left:0}.rtl .content-container .content .page-header .page-title{float:right}.rtl .content-container .content .page-header .page-action{float:left}.rtl .content-container .content .page-header .page-action a{margin-left:0}.rtl .content-container .content .page-header .control-group{margin-right:20px;margin-left:0}.rtl .content-container .content .page-header .control-group.date:after{margin-top:6px;position:absolute;margin-right:-35px}.rtl .content-container .content .page-header .control-group.date:last-child{margin-left:0}.rtl .content-container .content-wrapper{padding:25px 305px 25px 25px;margin-left:0}.rtl .content-container .aside-nav .active i{float:left;-webkit-transform:rotate(180deg);transform:rotate(180deg)}.rtl .dashboard .dashboard-stats .dashboard-card .data span{float:left}.rtl .dashboard .card{padding:20px 20px 0 0}.rtl .dashboard .card .card-info ul li .image{float:right;margin-right:0;margin-left:15px}.rtl .dashboard .card .card-info ul li .icon.angle-right-icon{left:30px;right:auto;-webkit-transform:rotate(180deg);transform:rotate(180deg)}.rtl .dashboard .graph-stats .left-card-container{float:right;padding-right:0}.rtl .dashboard .graph-stats .right-card-container{float:right;padding-left:0;padding-right:30px}.rtl .sale-container .sale-summary{float:left}.rtl .grid-container .filter-row-one .search-filter{border:2px solid #c7c7c7;border-radius:2px}.rtl .grid-container .filter-row-one .search-filter .control{border:none;padding-right:10px}.rtl .grid-container .filter-row-one .search-filter .icon-wrapper{border:none;padding-top:2px;padding-right:5px;border-right:2px solid #c7c7c7;border-radius:0}.rtl .grid-container .filter-row-two .filter-tag .icon.cross-icon,.rtl .grid-container .filter-row-two .filter-tag .wrapper{margin-right:10px;margin-left:0}.rtl .grid-container .filter-row-one .dropdown-filters{right:unset;left:25px}.rtl .grid-container .filter-wrapper .filter-row-one .dropdown-filters .more-filters .dropdown-toggle .dropdown-header span{padding-right:5px}.rtl .grid-container .table tbody td.action a:first-child{margin-left:10px;margin-right:0}.rtl .table table{text-align:right}.rtl .table table .massaction-remove{margin-right:5px!important;margin-left:10px}.rtl .table table .btn.btn-primary{margin-right:10px!important}.rtl .dropdown-list.bottom-right{left:0;right:auto}.rtl .dropdown-list .dropdown-container{text-align:right}.rtl .accordian .accordian-header .icon{float:left}.rtl .tree-container .tree-item{padding-right:30px}.rtl .tree-container .tree-item .expand-icon,.rtl .tree-container .tree-item .folder-icon{margin-left:10px;margin-right:0}.rtl .tree-container>.tree-item{padding-right:0}.rtl .radio .radio-view{margin-left:5px}.rtl .image-wrapper .image-item{margin-right:0;margin-left:20px}.rtl .image-wrapper .image-item .remove-image{margin-right:0}.rtl .control-group label.required:before{content:"*";color:#fc6868;font-weight:700}.rtl .control-group label.required:after{content:none}.rtl .control-group label .locale{float:left}.rtl .control-group.date:after{margin-top:15px;position:absolute;margin-right:-35px}.rtl .pagination .page-item .icon{-webkit-transform:rotate(180deg);transform:rotate(180deg)}.pagination{margin-top:30px} \ No newline at end of file +@import url(https://fonts.googleapis.com/css?family=Montserrat:400,500);body{margin:0;color:#3a3a3a;font-family:Montserrat,sans-serif;font-size:14px;font-weight:500;position:static;min-height:100%;width:100%}::-webkit-scrollbar{width:12px}::-webkit-scrollbar-track{-webkit-box-shadow:inset 0 0 6px hsla(0,0%,100%,.3);border-radius:10px}::-webkit-scrollbar-thumb{border-radius:10px;-webkit-box-shadow:inset 0 0 6px rgba(0,0,0,.5)}.navbar-top{height:60px;background:#fff;font-size:0;-webkit-box-shadow:0 3px 6px 0 rgba(0,0,0,.05);box-shadow:0 3px 6px 0 rgba(0,0,0,.05);border-bottom:1px solid hsla(0,0%,64%,.2);position:fixed;left:0;right:0;z-index:5}.navbar-top .navbar-top-left{width:50%;height:60px;display:inline-block;vertical-align:middle}.navbar-top .navbar-top-left .brand-logo{padding:10px}.navbar-top .navbar-top-right{width:50%;height:60px;text-align:right;display:inline-block;vertical-align:middle}.navbar-top .navbar-top-right .profile-info{display:inline-block;vertical-align:middle;text-align:left;min-width:50px;padding:12px 0;margin:0 25px 0 30px;font-size:15px;cursor:pointer;position:relative}.navbar-top .navbar-top-right .profile-info .dropdown-list{top:63px}.navbar-top .navbar-top-right .profile-info .name{color:#000311;display:block;text-align:left}.navbar-top .navbar-top-right .profile-info .role{font-size:14px;color:#8e8e8e;display:block;text-align:left}.navbar-top .navbar-top-right .profile-info i.icon{margin-left:10px}.navbar-left{position:fixed;left:0;top:60px;width:90px;padding-top:20px;border-right:1px solid hsla(0,0%,64%,.2);height:auto;bottom:0;z-index:2}.navbar-left ul.menubar li.menu-item{padding:10px 5px;font-size:11px;text-align:center;text-transform:uppercase}.navbar-left ul.menubar li.menu-item a{color:#a2a2a2}.navbar-left ul.menubar li.menu-item.active a{color:#0041ff}.content-container{padding-left:90px;position:absolute;margin-top:60px;top:0;right:0;left:0;bottom:0;height:calc(100% - 60px);width:100%}.content-container .inner-section{height:100%}.content-container .aside-nav{width:280px;position:fixed;top:60px;bottom:0;border-right:1px solid hsla(0,0%,64%,.2);background:#f8f9fa;padding-top:10px;padding-bottom:10px;z-index:4}.content-container .aside-nav ul{overflow-y:auto;height:90%}.content-container .aside-nav a{padding:15px;display:block;color:#000311}.content-container .aside-nav .active a{background:#fff;border-top:1px solid hsla(0,0%,64%,.2);border-bottom:1px solid hsla(0,0%,64%,.2)}.content-container .aside-nav .active i{float:right}.content-container .content-wrapper{padding:25px;margin-left:305px}.content-container .content{margin-top:25px}.content-container .content.full-page{padding:25px}.content-container .content .page-header{display:inline-block;margin-bottom:20px;width:100%}.content-container .content .page-header .page-title{float:left}.content-container .content .page-header .page-title .back-link{float:left;margin-right:10px;width:24px;height:24px;cursor:pointer;margin-top:-2px}.content-container .content .page-header .page-title h1{margin-bottom:0;vertical-align:middle;display:inline-block;line-height:normal}.content-container .content .page-header .page-action{float:right}.content-container .content .page-header .page-action *{display:inline-block}.content-container .content .page-header .page-action a{margin-left:25px}.content-container .content .page-header .control-group{width:180px;display:inline-block;margin-bottom:0;margin-left:20px}.content-container .content .page-header .control{width:100%;margin:0}.content-container .content .page-content{width:100%;display:inline-block}.control-container{border:1px solid #c7c7c7;padding:10px;width:63%}.control-container .title-bar{display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;width:100%}.control-container .title-bar .icon{cursor:pointer}.control-container .title-bar .icon.cross-icon{height:24px;width:24px}.control-container .control-group{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;-ms-flex-line-pack:center;align-content:center;-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start;padding:10px;border:1px solid #c7c7c7;border-radius:2px;margin-right:15px;margin-bottom:0}.control-container .control-group::last-child{margin-right:0}.boolean-control-container{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:start;-ms-flex-pack:start;justify-content:flex-start;width:750px}.boolean-control-container .control-group{width:200px}.control-group label{width:70%}.control-group label .locale{float:right;color:#8e8e8e}.control-group .mce-tinymce{margin-top:10px;margin-bottom:5px}.dashboard .page-header{margin-bottom:0!important;padding-bottom:15px;border-bottom:1px solid hsla(0,0%,64%,.2)}.dashboard .page-content{margin-top:15px}.dashboard .card{height:445px;background:#fff;border:1px solid #e7e7e7;-webkit-box-shadow:0 5px 10px 2px rgba(0,0,0,.08);box-shadow:0 5px 10px 2px rgba(0,0,0,.08);border-radius:2px;padding:20px 0 0 20px}.dashboard .card .card-title{font-size:14px;color:#a2a2a2;letter-spacing:-.26px;text-transform:uppercase}.dashboard .card .card-info{width:100%;height:100%;display:inline-block}.dashboard .card .card-info.center{text-align:center}.dashboard .card .card-info ul li{border-bottom:1px solid hsla(0,0%,64%,.2);width:100%;display:inline-block;padding:10px 0;position:relative}.dashboard .card .card-info ul li .image{height:60px;width:60px;float:left;margin-right:15px}.dashboard .card .card-info ul li .image.product{background:#f2f2f2}.dashboard .card .card-info ul li .image img{width:100%}.dashboard .card .card-info ul li .description{margin-top:10px}.dashboard .card .card-info ul li .description .name{color:#0041ff}.dashboard .card .card-info ul li .description .info{color:#3a3a3a;margin-top:5px}.dashboard .card .card-info ul li .icon.angle-right-icon{position:absolute;right:30px;top:50%;margin-top:-8px}.dashboard .card .card-info ul li:last-child{border-bottom:0}.dashboard .card .card-info .no-result-found{margin-top:146px}.dashboard .card .card-info .no-result-found p{margin:0;color:#a2a2a2}.dashboard .dashboard-stats{display:grid;grid-template-columns:repeat(auto-fill,minmax(320px,1fr));grid-auto-rows:auto;grid-column-gap:30px;grid-row-gap:15px}.dashboard .dashboard-stats .dashboard-card{height:100px;background:#fff;border:1px solid #e7e7e7;-webkit-box-shadow:0 5px 10px 2px rgba(0,0,0,.08);box-shadow:0 5px 10px 2px rgba(0,0,0,.08);border-radius:5px;position:relative;padding:15px}.dashboard .dashboard-stats .dashboard-card .title{font-size:14px;color:#a2a2a2;text-transform:uppercase}.dashboard .dashboard-stats .dashboard-card .data{padding-top:13px;font-size:32px;color:#0041ff}.dashboard .dashboard-stats .dashboard-card .data .progress{font-size:14px;color:#8e8e8e;float:right;margin-top:9px}.dashboard .dashboard-stats .dashboard-card .data .progress .icon{vertical-align:middle}.dashboard .graph-stats{margin-top:30px;width:100%;display:inline-block}.dashboard .graph-stats .left-card-container{float:left;width:75%;padding-right:9px}.dashboard .graph-stats .right-card-container{float:left;width:25%;padding-left:21px}.dashboard .sale-stock{width:100%;display:inline-block;display:grid;grid-template-columns:repeat(auto-fill,minmax(435px,1fr));grid-auto-rows:auto;grid-column-gap:30px;grid-row-gap:15px;margin-top:30px}.sale-container .sale-section{font-size:16px}.sale-container .sale-section .secton-title{font-size:18px;color:#8e8e8e;padding:15px 0;border-bottom:1px solid hsla(0,0%,64%,.2)}.sale-container .sale-section .section-content{display:block;padding:20px 0}.sale-container .sale-section .section-content .row{display:block;padding:7px 0}.sale-container .sale-section .section-content .row .title{width:200px;color:#3a3a3a;letter-spacing:-.26px;display:inline-block}.sale-container .sale-section .section-content .row .value{color:#3a3a3a;letter-spacing:-.26px;display:inline-block}.sale-container .table .qty-row{display:block;margin-bottom:5px}.sale-container .table .qty-row:last-child{margin-bottom:0}.sale-container .table .radio{margin:0}.sale-container .sale-summary{margin-top:2%;height:130px;float:right}.sale-container .sale-summary tr td{padding:5px 8px}.sale-container .sale-summary tr.bold{font-weight:600;font-size:15px}.sale-container .sale-summary tr.border td{border-bottom:1px solid hsla(0,0%,64%,.2)}.stars{margin-top:5px}.stars .icon{width:16px;height:16px}.export-import{cursor:pointer}.export-import .export-icon,.export-import .import-icon{position:relative;top:10px}.export-import span{margin-left:2px}.configuration-image{position:relative;height:33px;width:33px;top:15px;border-radius:3px;margin-right:5px}.download{position:relative;height:24px!important;width:24px!important;top:12px;margin-right:10px}.aside-nav-toggle{height:48px;width:100%;padding-top:15px;border-top:1px solid hsla(0,0%,64%,.2)}.aside-nav-toggle .close-icon,.aside-nav-toggle .open-icon{position:absolute;cursor:pointer;left:45%}.aside-nav-toggle.open{display:none}.linked-product-search-result{-webkit-box-shadow:0 2px 4px 0 rgba(0,0,0,.16),0 0 9px 0 rgba(0,0,0,.16);box-shadow:0 2px 4px 0 rgba(0,0,0,.16),0 0 9px 0 rgba(0,0,0,.16);z-index:10;text-align:left;border-radius:3px;background-color:#fff;width:70%;max-height:200px;overflow-y:auto}.linked-product-search-result li{padding:10px;border-bottom:1px solid #e8e8e8;cursor:pointer}.rtl{direction:rtl}.rtl .navbar-top .navbar-top-right{text-align:left}.rtl .navbar-top .navbar-top-right .profile-info{margin:0 30px 0 25px}.rtl .navbar-top .navbar-top-right .profile-info i.icon{margin-left:0;margin-right:10px}.rtl .navbar-left{border-left:1px solid hsla(0,0%,64%,.2);border-right:none;left:calc(100% - 90px)}.rtl .content-container{padding-right:90px;padding-left:0}.rtl .content-container .content .page-header .page-title{float:right}.rtl .content-container .content .page-header .page-action{float:left}.rtl .content-container .content .page-header .page-action a{margin-left:0}.rtl .content-container .content .page-header .control-group{margin-right:20px;margin-left:0}.rtl .content-container .content .page-header .control-group.date:after{margin-top:6px;position:absolute;margin-right:-35px}.rtl .content-container .content .page-header .control-group.date:last-child{margin-left:0}.rtl .content-container .content-wrapper{padding:25px 305px 25px 25px;margin-left:0}.rtl .content-container .aside-nav .active i{float:left;-webkit-transform:rotate(180deg);transform:rotate(180deg)}.rtl .dashboard .dashboard-stats .dashboard-card .data span{float:left}.rtl .dashboard .card{padding:20px 20px 0 0}.rtl .dashboard .card .card-info ul li .image{float:right;margin-right:0;margin-left:15px}.rtl .dashboard .card .card-info ul li .icon.angle-right-icon{left:30px;right:auto;-webkit-transform:rotate(180deg);transform:rotate(180deg)}.rtl .dashboard .graph-stats .left-card-container{float:right;padding-right:0}.rtl .dashboard .graph-stats .right-card-container{float:right;padding-left:0;padding-right:30px}.rtl .sale-container .sale-summary{float:left}.rtl .grid-container .filter-row-one .search-filter{border:2px solid #c7c7c7;border-radius:2px}.rtl .grid-container .filter-row-one .search-filter .control{border:none;padding-right:10px}.rtl .grid-container .filter-row-one .search-filter .icon-wrapper{border:none;padding-top:2px;padding-right:5px;border-right:2px solid #c7c7c7;border-radius:0}.rtl .grid-container .filter-row-two .filter-tag .icon.cross-icon,.rtl .grid-container .filter-row-two .filter-tag .wrapper{margin-right:10px;margin-left:0}.rtl .grid-container .filter-row-one .dropdown-filters{right:unset;left:25px}.rtl .grid-container .filter-wrapper .filter-row-one .dropdown-filters .more-filters .dropdown-toggle .dropdown-header span{padding-right:5px}.rtl .grid-container .table tbody td.action a:first-child{margin-left:10px;margin-right:0}.rtl .table table{text-align:right}.rtl .table table .massaction-remove{margin-right:5px!important;margin-left:10px}.rtl .table table .btn.btn-primary{margin-right:10px!important}.rtl .dropdown-list.bottom-right{left:0;right:auto}.rtl .dropdown-list .dropdown-container{text-align:right}.rtl .accordian .accordian-header .icon{float:left}.rtl .tree-container .tree-item{padding-right:30px}.rtl .tree-container .tree-item .expand-icon,.rtl .tree-container .tree-item .folder-icon{margin-left:10px;margin-right:0}.rtl .tree-container>.tree-item{padding-right:0}.rtl .radio .radio-view{margin-left:5px}.rtl .image-wrapper .image-item{margin-right:0;margin-left:20px}.rtl .image-wrapper .image-item .remove-image{margin-right:0}.rtl .control-group label.required:before{content:"*";color:#fc6868;font-weight:700}.rtl .control-group label.required:after{content:none}.rtl .control-group label .locale{float:left}.rtl .control-group.date:after{margin-top:15px;position:absolute;margin-right:-35px}.rtl .pagination .page-item .icon{-webkit-transform:rotate(180deg);transform:rotate(180deg)}.pagination{margin-top:30px} \ No newline at end of file diff --git a/packages/Webkul/Admin/publishable/assets/js/admin.js b/packages/Webkul/Admin/publishable/assets/js/admin.js index fa129e60a..5a7b20f43 100755 --- a/packages/Webkul/Admin/publishable/assets/js/admin.js +++ b/packages/Webkul/Admin/publishable/assets/js/admin.js @@ -1 +1 @@ -!function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:r})},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="/",n(n.s=0)}({0:function(e,t,n){n("J66Q"),e.exports=n("MT9B")},"162o":function(e,t,n){(function(e){var r=void 0!==e&&e||"undefined"!=typeof self&&self||window,i=Function.prototype.apply;function o(e,t){this._id=e,this._clearFn=t}t.setTimeout=function(){return new o(i.call(setTimeout,r,arguments),clearTimeout)},t.setInterval=function(){return new o(i.call(setInterval,r,arguments),clearInterval)},t.clearTimeout=t.clearInterval=function(e){e&&e.close()},o.prototype.unref=o.prototype.ref=function(){},o.prototype.close=function(){this._clearFn.call(r,this._id)},t.enroll=function(e,t){clearTimeout(e._idleTimeoutId),e._idleTimeout=t},t.unenroll=function(e){clearTimeout(e._idleTimeoutId),e._idleTimeout=-1},t._unrefActive=t.active=function(e){clearTimeout(e._idleTimeoutId);var t=e._idleTimeout;t>=0&&(e._idleTimeoutId=setTimeout(function(){e._onTimeout&&e._onTimeout()},t))},n("mypn"),t.setImmediate="undefined"!=typeof self&&self.setImmediate||void 0!==e&&e.setImmediate||this&&this.setImmediate,t.clearImmediate="undefined"!=typeof self&&self.clearImmediate||void 0!==e&&e.clearImmediate||this&&this.clearImmediate}).call(t,n("DuR2"))},"21It":function(e,t,n){"use strict";var r=n("FtD3");e.exports=function(e,t,n){var i=n.config.validateStatus;n.status&&i&&!i(n.status)?t(r("Request failed with status code "+n.status,n.config,null,n.request,n)):e(n)}},"3IRH":function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),e.webpackPolyfill=1),e}},"5VQ+":function(e,t,n){"use strict";var r=n("cGG2");e.exports=function(e,t){r.forEach(e,function(n,r){r!==t&&r.toUpperCase()===t.toUpperCase()&&(e[t]=n,delete e[r])})}},"7GwW":function(e,t,n){"use strict";var r=n("cGG2"),i=n("21It"),o=n("DQCr"),a=n("oJlt"),u=n("GHBc"),s=n("FtD3"),c="undefined"!=typeof window&&window.btoa&&window.btoa.bind(window)||n("thJu");e.exports=function(e){return new Promise(function(t,l){var f=e.data,d=e.headers;r.isFormData(f)&&delete d["Content-Type"];var p=new XMLHttpRequest,h="onreadystatechange",v=!1;if("undefined"==typeof window||!window.XDomainRequest||"withCredentials"in p||u(e.url)||(p=new window.XDomainRequest,h="onload",v=!0,p.onprogress=function(){},p.ontimeout=function(){}),e.auth){var m=e.auth.username||"",g=e.auth.password||"";d.Authorization="Basic "+c(m+":"+g)}if(p.open(e.method.toUpperCase(),o(e.url,e.params,e.paramsSerializer),!0),p.timeout=e.timeout,p[h]=function(){if(p&&(4===p.readyState||v)&&(0!==p.status||p.responseURL&&0===p.responseURL.indexOf("file:"))){var n="getAllResponseHeaders"in p?a(p.getAllResponseHeaders()):null,r={data:e.responseType&&"text"!==e.responseType?p.response:p.responseText,status:1223===p.status?204:p.status,statusText:1223===p.status?"No Content":p.statusText,headers:n,config:e,request:p};i(t,l,r),p=null}},p.onerror=function(){l(s("Network Error",e,null,p)),p=null},p.ontimeout=function(){l(s("timeout of "+e.timeout+"ms exceeded",e,"ECONNABORTED",p)),p=null},r.isStandardBrowserEnv()){var y=n("p1b6"),b=(e.withCredentials||u(e.url))&&e.xsrfCookieName?y.read(e.xsrfCookieName):void 0;b&&(d[e.xsrfHeaderName]=b)}if("setRequestHeader"in p&&r.forEach(d,function(e,t){void 0===f&&"content-type"===t.toLowerCase()?delete d[t]:p.setRequestHeader(t,e)}),e.withCredentials&&(p.withCredentials=!0),e.responseType)try{p.responseType=e.responseType}catch(t){if("json"!==e.responseType)throw t}"function"==typeof e.onDownloadProgress&&p.addEventListener("progress",e.onDownloadProgress),"function"==typeof e.onUploadProgress&&p.upload&&p.upload.addEventListener("progress",e.onUploadProgress),e.cancelToken&&e.cancelToken.promise.then(function(e){p&&(p.abort(),l(e),p=null)}),void 0===f&&(f=null),p.send(f)})}},"7t+N":function(e,t,n){var r;!function(t,n){"use strict";"object"==typeof e&&"object"==typeof e.exports?e.exports=t.document?n(t,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return n(e)}:n(t)}("undefined"!=typeof window?window:this,function(n,i){"use strict";var o=[],a=n.document,u=Object.getPrototypeOf,s=o.slice,c=o.concat,l=o.push,f=o.indexOf,d={},p=d.toString,h=d.hasOwnProperty,v=h.toString,m=v.call(Object),g={},y=function(e){return"function"==typeof e&&"number"!=typeof e.nodeType},b=function(e){return null!=e&&e===e.window},_={type:!0,src:!0,nonce:!0,noModule:!0};function w(e,t,n){var r,i,o=(n=n||a).createElement("script");if(o.text=e,t)for(r in _)(i=t[r]||t.getAttribute&&t.getAttribute(r))&&o.setAttribute(r,i);n.head.appendChild(o).parentNode.removeChild(o)}function x(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?d[p.call(e)]||"object":typeof e}var T=function(e,t){return new T.fn.init(e,t)},C=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g;function $(e){var t=!!e&&"length"in e&&e.length,n=x(e);return!y(e)&&!b(e)&&("array"===n||0===t||"number"==typeof t&&t>0&&t-1 in e)}T.fn=T.prototype={jquery:"3.4.1",constructor:T,length:0,toArray:function(){return s.call(this)},get:function(e){return null==e?s.call(this):e<0?this[e+this.length]:this[e]},pushStack:function(e){var t=T.merge(this.constructor(),e);return t.prevObject=this,t},each:function(e){return T.each(this,e)},map:function(e){return this.pushStack(T.map(this,function(t,n){return e.call(t,n,t)}))},slice:function(){return this.pushStack(s.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(e){var t=this.length,n=+e+(e<0?t:0);return this.pushStack(n>=0&&n+~]|"+I+")"+I+"*"),W=new RegExp(I+"|>"),Y=new RegExp(H),V=new RegExp("^"+R+"$"),Z={ID:new RegExp("^#("+R+")"),CLASS:new RegExp("^\\.("+R+")"),TAG:new RegExp("^("+R+"|[*])"),ATTR:new RegExp("^"+P),PSEUDO:new RegExp("^"+H),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+I+"*(even|odd|(([+-]|)(\\d*)n|)"+I+"*(?:([+-]|)"+I+"*(\\d+)|))"+I+"*\\)|)","i"),bool:new RegExp("^(?:"+F+")$","i"),needsContext:new RegExp("^"+I+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+I+"*((?:-\\d)?\\d*)"+I+"*\\)|)(?=[^-]|$)","i")},G=/HTML$/i,K=/^(?:input|select|textarea|button)$/i,X=/^h\d$/i,J=/^[^{]+\{\s*\[native \w/,Q=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ee=/[+~]/,te=new RegExp("\\\\([\\da-f]{1,6}"+I+"?|("+I+")|.)","ig"),ne=function(e,t,n){var r="0x"+t-65536;return r!=r||n?t:r<0?String.fromCharCode(r+65536):String.fromCharCode(r>>10|55296,1023&r|56320)},re=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,ie=function(e,t){return t?"\0"===e?"�":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},oe=function(){d()},ae=_e(function(e){return!0===e.disabled&&"fieldset"===e.nodeName.toLowerCase()},{dir:"parentNode",next:"legend"});try{N.apply(O=L.call(w.childNodes),w.childNodes),O[w.childNodes.length].nodeType}catch(e){N={apply:O.length?function(e,t){j.apply(e,L.call(t))}:function(e,t){for(var n=e.length,r=0;e[n++]=t[r++];);e.length=n-1}}}function ue(e,t,r,i){var o,u,c,l,f,h,g,y=t&&t.ownerDocument,x=t?t.nodeType:9;if(r=r||[],"string"!=typeof e||!e||1!==x&&9!==x&&11!==x)return r;if(!i&&((t?t.ownerDocument||t:w)!==p&&d(t),t=t||p,v)){if(11!==x&&(f=Q.exec(e)))if(o=f[1]){if(9===x){if(!(c=t.getElementById(o)))return r;if(c.id===o)return r.push(c),r}else if(y&&(c=y.getElementById(o))&&b(t,c)&&c.id===o)return r.push(c),r}else{if(f[2])return N.apply(r,t.getElementsByTagName(e)),r;if((o=f[3])&&n.getElementsByClassName&&t.getElementsByClassName)return N.apply(r,t.getElementsByClassName(o)),r}if(n.qsa&&!k[e+" "]&&(!m||!m.test(e))&&(1!==x||"object"!==t.nodeName.toLowerCase())){if(g=e,y=t,1===x&&W.test(e)){for((l=t.getAttribute("id"))?l=l.replace(re,ie):t.setAttribute("id",l=_),u=(h=a(e)).length;u--;)h[u]="#"+l+" "+be(h[u]);g=h.join(","),y=ee.test(e)&&ge(t.parentNode)||t}try{return N.apply(r,y.querySelectorAll(g)),r}catch(t){k(e,!0)}finally{l===_&&t.removeAttribute("id")}}}return s(e.replace(U,"$1"),t,r,i)}function se(){var e=[];return function t(n,i){return e.push(n+" ")>r.cacheLength&&delete t[e.shift()],t[n+" "]=i}}function ce(e){return e[_]=!0,e}function le(e){var t=p.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function fe(e,t){for(var n=e.split("|"),i=n.length;i--;)r.attrHandle[n[i]]=t}function de(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(r)return r;if(n)for(;n=n.nextSibling;)if(n===t)return-1;return e?1:-1}function pe(e){return function(t){return"input"===t.nodeName.toLowerCase()&&t.type===e}}function he(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}function ve(e){return function(t){return"form"in t?t.parentNode&&!1===t.disabled?"label"in t?"label"in t.parentNode?t.parentNode.disabled===e:t.disabled===e:t.isDisabled===e||t.isDisabled!==!e&&ae(t)===e:t.disabled===e:"label"in t&&t.disabled===e}}function me(e){return ce(function(t){return t=+t,ce(function(n,r){for(var i,o=e([],n.length,t),a=o.length;a--;)n[i=o[a]]&&(n[i]=!(r[i]=n[i]))})})}function ge(e){return e&&void 0!==e.getElementsByTagName&&e}for(t in n=ue.support={},o=ue.isXML=function(e){var t=e.namespaceURI,n=(e.ownerDocument||e).documentElement;return!G.test(t||n&&n.nodeName||"HTML")},d=ue.setDocument=function(e){var t,i,a=e?e.ownerDocument||e:w;return a!==p&&9===a.nodeType&&a.documentElement?(h=(p=a).documentElement,v=!o(p),w!==p&&(i=p.defaultView)&&i.top!==i&&(i.addEventListener?i.addEventListener("unload",oe,!1):i.attachEvent&&i.attachEvent("onunload",oe)),n.attributes=le(function(e){return e.className="i",!e.getAttribute("className")}),n.getElementsByTagName=le(function(e){return e.appendChild(p.createComment("")),!e.getElementsByTagName("*").length}),n.getElementsByClassName=J.test(p.getElementsByClassName),n.getById=le(function(e){return h.appendChild(e).id=_,!p.getElementsByName||!p.getElementsByName(_).length}),n.getById?(r.filter.ID=function(e){var t=e.replace(te,ne);return function(e){return e.getAttribute("id")===t}},r.find.ID=function(e,t){if(void 0!==t.getElementById&&v){var n=t.getElementById(e);return n?[n]:[]}}):(r.filter.ID=function(e){var t=e.replace(te,ne);return function(e){var n=void 0!==e.getAttributeNode&&e.getAttributeNode("id");return n&&n.value===t}},r.find.ID=function(e,t){if(void 0!==t.getElementById&&v){var n,r,i,o=t.getElementById(e);if(o){if((n=o.getAttributeNode("id"))&&n.value===e)return[o];for(i=t.getElementsByName(e),r=0;o=i[r++];)if((n=o.getAttributeNode("id"))&&n.value===e)return[o]}return[]}}),r.find.TAG=n.getElementsByTagName?function(e,t){return void 0!==t.getElementsByTagName?t.getElementsByTagName(e):n.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){for(;n=o[i++];)1===n.nodeType&&r.push(n);return r}return o},r.find.CLASS=n.getElementsByClassName&&function(e,t){if(void 0!==t.getElementsByClassName&&v)return t.getElementsByClassName(e)},g=[],m=[],(n.qsa=J.test(p.querySelectorAll))&&(le(function(e){h.appendChild(e).innerHTML="",e.querySelectorAll("[msallowcapture^='']").length&&m.push("[*^$]="+I+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||m.push("\\["+I+"*(?:value|"+F+")"),e.querySelectorAll("[id~="+_+"-]").length||m.push("~="),e.querySelectorAll(":checked").length||m.push(":checked"),e.querySelectorAll("a#"+_+"+*").length||m.push(".#.+[+~]")}),le(function(e){e.innerHTML="";var t=p.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&m.push("name"+I+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&m.push(":enabled",":disabled"),h.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&m.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),m.push(",.*:")})),(n.matchesSelector=J.test(y=h.matches||h.webkitMatchesSelector||h.mozMatchesSelector||h.oMatchesSelector||h.msMatchesSelector))&&le(function(e){n.disconnectedMatch=y.call(e,"*"),y.call(e,"[s!='']:x"),g.push("!=",H)}),m=m.length&&new RegExp(m.join("|")),g=g.length&&new RegExp(g.join("|")),t=J.test(h.compareDocumentPosition),b=t||J.test(h.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)for(;t=t.parentNode;)if(t===e)return!0;return!1},S=t?function(e,t){if(e===t)return f=!0,0;var r=!e.compareDocumentPosition-!t.compareDocumentPosition;return r||(1&(r=(e.ownerDocument||e)===(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!n.sortDetached&&t.compareDocumentPosition(e)===r?e===p||e.ownerDocument===w&&b(w,e)?-1:t===p||t.ownerDocument===w&&b(w,t)?1:l?M(l,e)-M(l,t):0:4&r?-1:1)}:function(e,t){if(e===t)return f=!0,0;var n,r=0,i=e.parentNode,o=t.parentNode,a=[e],u=[t];if(!i||!o)return e===p?-1:t===p?1:i?-1:o?1:l?M(l,e)-M(l,t):0;if(i===o)return de(e,t);for(n=e;n=n.parentNode;)a.unshift(n);for(n=t;n=n.parentNode;)u.unshift(n);for(;a[r]===u[r];)r++;return r?de(a[r],u[r]):a[r]===w?-1:u[r]===w?1:0},p):p},ue.matches=function(e,t){return ue(e,null,null,t)},ue.matchesSelector=function(e,t){if((e.ownerDocument||e)!==p&&d(e),n.matchesSelector&&v&&!k[t+" "]&&(!g||!g.test(t))&&(!m||!m.test(t)))try{var r=y.call(e,t);if(r||n.disconnectedMatch||e.document&&11!==e.document.nodeType)return r}catch(e){k(t,!0)}return ue(t,p,null,[e]).length>0},ue.contains=function(e,t){return(e.ownerDocument||e)!==p&&d(e),b(e,t)},ue.attr=function(e,t){(e.ownerDocument||e)!==p&&d(e);var i=r.attrHandle[t.toLowerCase()],o=i&&D.call(r.attrHandle,t.toLowerCase())?i(e,t,!v):void 0;return void 0!==o?o:n.attributes||!v?e.getAttribute(t):(o=e.getAttributeNode(t))&&o.specified?o.value:null},ue.escape=function(e){return(e+"").replace(re,ie)},ue.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},ue.uniqueSort=function(e){var t,r=[],i=0,o=0;if(f=!n.detectDuplicates,l=!n.sortStable&&e.slice(0),e.sort(S),f){for(;t=e[o++];)t===e[o]&&(i=r.push(o));for(;i--;)e.splice(r[i],1)}return l=null,e},i=ue.getText=function(e){var t,n="",r=0,o=e.nodeType;if(o){if(1===o||9===o||11===o){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=i(e)}else if(3===o||4===o)return e.nodeValue}else for(;t=e[r++];)n+=i(t);return n},(r=ue.selectors={cacheLength:50,createPseudo:ce,match:Z,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(te,ne),e[3]=(e[3]||e[4]||e[5]||"").replace(te,ne),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||ue.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&ue.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return Z.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&Y.test(n)&&(t=a(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(te,ne).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=C[e+" "];return t||(t=new RegExp("(^|"+I+")"+e+"("+I+"|$)"))&&C(e,function(e){return t.test("string"==typeof e.className&&e.className||void 0!==e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(e,t,n){return function(r){var i=ue.attr(r,e);return null==i?"!="===t:!t||(i+="","="===t?i===n:"!="===t?i!==n:"^="===t?n&&0===i.indexOf(n):"*="===t?n&&i.indexOf(n)>-1:"$="===t?n&&i.slice(-n.length)===n:"~="===t?(" "+i.replace(q," ")+" ").indexOf(n)>-1:"|="===t&&(i===n||i.slice(0,n.length+1)===n+"-"))}},CHILD:function(e,t,n,r,i){var o="nth"!==e.slice(0,3),a="last"!==e.slice(-4),u="of-type"===t;return 1===r&&0===i?function(e){return!!e.parentNode}:function(t,n,s){var c,l,f,d,p,h,v=o!==a?"nextSibling":"previousSibling",m=t.parentNode,g=u&&t.nodeName.toLowerCase(),y=!s&&!u,b=!1;if(m){if(o){for(;v;){for(d=t;d=d[v];)if(u?d.nodeName.toLowerCase()===g:1===d.nodeType)return!1;h=v="only"===e&&!h&&"nextSibling"}return!0}if(h=[a?m.firstChild:m.lastChild],a&&y){for(b=(p=(c=(l=(f=(d=m)[_]||(d[_]={}))[d.uniqueID]||(f[d.uniqueID]={}))[e]||[])[0]===x&&c[1])&&c[2],d=p&&m.childNodes[p];d=++p&&d&&d[v]||(b=p=0)||h.pop();)if(1===d.nodeType&&++b&&d===t){l[e]=[x,p,b];break}}else if(y&&(b=p=(c=(l=(f=(d=t)[_]||(d[_]={}))[d.uniqueID]||(f[d.uniqueID]={}))[e]||[])[0]===x&&c[1]),!1===b)for(;(d=++p&&d&&d[v]||(b=p=0)||h.pop())&&((u?d.nodeName.toLowerCase()!==g:1!==d.nodeType)||!++b||(y&&((l=(f=d[_]||(d[_]={}))[d.uniqueID]||(f[d.uniqueID]={}))[e]=[x,b]),d!==t)););return(b-=i)===r||b%r==0&&b/r>=0}}},PSEUDO:function(e,t){var n,i=r.pseudos[e]||r.setFilters[e.toLowerCase()]||ue.error("unsupported pseudo: "+e);return i[_]?i(t):i.length>1?(n=[e,e,"",t],r.setFilters.hasOwnProperty(e.toLowerCase())?ce(function(e,n){for(var r,o=i(e,t),a=o.length;a--;)e[r=M(e,o[a])]=!(n[r]=o[a])}):function(e){return i(e,0,n)}):i}},pseudos:{not:ce(function(e){var t=[],n=[],r=u(e.replace(U,"$1"));return r[_]?ce(function(e,t,n,i){for(var o,a=r(e,null,i,[]),u=e.length;u--;)(o=a[u])&&(e[u]=!(t[u]=o))}):function(e,i,o){return t[0]=e,r(t,null,o,n),t[0]=null,!n.pop()}}),has:ce(function(e){return function(t){return ue(e,t).length>0}}),contains:ce(function(e){return e=e.replace(te,ne),function(t){return(t.textContent||i(t)).indexOf(e)>-1}}),lang:ce(function(e){return V.test(e||"")||ue.error("unsupported lang: "+e),e=e.replace(te,ne).toLowerCase(),function(t){var n;do{if(n=v?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return(n=n.toLowerCase())===e||0===n.indexOf(e+"-")}while((t=t.parentNode)&&1===t.nodeType);return!1}}),target:function(t){var n=e.location&&e.location.hash;return n&&n.slice(1)===t.id},root:function(e){return e===h},focus:function(e){return e===p.activeElement&&(!p.hasFocus||p.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:ve(!1),disabled:ve(!0),checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,!0===e.selected},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!r.pseudos.empty(e)},header:function(e){return X.test(e.nodeName)},input:function(e){return K.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||"text"===t.toLowerCase())},first:me(function(){return[0]}),last:me(function(e,t){return[t-1]}),eq:me(function(e,t,n){return[n<0?n+t:n]}),even:me(function(e,t){for(var n=0;nt?t:n;--r>=0;)e.push(r);return e}),gt:me(function(e,t,n){for(var r=n<0?n+t:n;++r1?function(t,n,r){for(var i=e.length;i--;)if(!e[i](t,n,r))return!1;return!0}:e[0]}function xe(e,t,n,r,i){for(var o,a=[],u=0,s=e.length,c=null!=t;u-1&&(o[c]=!(a[c]=f))}}else g=xe(g===a?g.splice(h,g.length):g),i?i(null,a,g,s):N.apply(a,g)})}function Ce(e){for(var t,n,i,o=e.length,a=r.relative[e[0].type],u=a||r.relative[" "],s=a?1:0,l=_e(function(e){return e===t},u,!0),f=_e(function(e){return M(t,e)>-1},u,!0),d=[function(e,n,r){var i=!a&&(r||n!==c)||((t=n).nodeType?l(e,n,r):f(e,n,r));return t=null,i}];s1&&we(d),s>1&&be(e.slice(0,s-1).concat({value:" "===e[s-2].type?"*":""})).replace(U,"$1"),n,s0,i=e.length>0,o=function(o,a,u,s,l){var f,h,m,g=0,y="0",b=o&&[],_=[],w=c,T=o||i&&r.find.TAG("*",l),C=x+=null==w?1:Math.random()||.1,$=T.length;for(l&&(c=a===p||a||l);y!==$&&null!=(f=T[y]);y++){if(i&&f){for(h=0,a||f.ownerDocument===p||(d(f),u=!v);m=e[h++];)if(m(f,a||p,u)){s.push(f);break}l&&(x=C)}n&&((f=!m&&f)&&g--,o&&b.push(f))}if(g+=y,n&&y!==g){for(h=0;m=t[h++];)m(b,_,a,u);if(o){if(g>0)for(;y--;)b[y]||_[y]||(_[y]=E.call(s));_=xe(_)}N.apply(s,_),l&&!o&&_.length>0&&g+t.length>1&&ue.uniqueSort(s)}return l&&(x=C,c=w),b};return n?ce(o):o}(o,i))).selector=e}return u},s=ue.select=function(e,t,n,i){var o,s,c,l,f,d="function"==typeof e&&e,p=!i&&a(e=d.selector||e);if(n=n||[],1===p.length){if((s=p[0]=p[0].slice(0)).length>2&&"ID"===(c=s[0]).type&&9===t.nodeType&&v&&r.relative[s[1].type]){if(!(t=(r.find.ID(c.matches[0].replace(te,ne),t)||[])[0]))return n;d&&(t=t.parentNode),e=e.slice(s.shift().value.length)}for(o=Z.needsContext.test(e)?0:s.length;o--&&(c=s[o],!r.relative[l=c.type]);)if((f=r.find[l])&&(i=f(c.matches[0].replace(te,ne),ee.test(s[0].type)&&ge(t.parentNode)||t))){if(s.splice(o,1),!(e=i.length&&be(s)))return N.apply(n,i),n;break}}return(d||u(e,p))(i,t,!v,n,!t||ee.test(e)&&ge(t.parentNode)||t),n},n.sortStable=_.split("").sort(S).join("")===_,n.detectDuplicates=!!f,d(),n.sortDetached=le(function(e){return 1&e.compareDocumentPosition(p.createElement("fieldset"))}),le(function(e){return e.innerHTML="","#"===e.firstChild.getAttribute("href")})||fe("type|href|height|width",function(e,t,n){if(!n)return e.getAttribute(t,"type"===t.toLowerCase()?1:2)}),n.attributes&&le(function(e){return e.innerHTML="",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")})||fe("value",function(e,t,n){if(!n&&"input"===e.nodeName.toLowerCase())return e.defaultValue}),le(function(e){return null==e.getAttribute("disabled")})||fe(F,function(e,t,n){var r;if(!n)return!0===e[t]?t.toLowerCase():(r=e.getAttributeNode(t))&&r.specified?r.value:null}),ue}(n);T.find=A,T.expr=A.selectors,T.expr[":"]=T.expr.pseudos,T.uniqueSort=T.unique=A.uniqueSort,T.text=A.getText,T.isXMLDoc=A.isXML,T.contains=A.contains,T.escapeSelector=A.escape;var k=function(e,t,n){for(var r=[],i=void 0!==n;(e=e[t])&&9!==e.nodeType;)if(1===e.nodeType){if(i&&T(e).is(n))break;r.push(e)}return r},S=function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n},D=T.expr.match.needsContext;function O(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()}var E=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function j(e,t,n){return y(t)?T.grep(e,function(e,r){return!!t.call(e,r,e)!==n}):t.nodeType?T.grep(e,function(e){return e===t!==n}):"string"!=typeof t?T.grep(e,function(e){return f.call(t,e)>-1!==n}):T.filter(t,e,n)}T.filter=function(e,t,n){var r=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===r.nodeType?T.find.matchesSelector(r,e)?[r]:[]:T.find.matches(e,T.grep(t,function(e){return 1===e.nodeType}))},T.fn.extend({find:function(e){var t,n,r=this.length,i=this;if("string"!=typeof e)return this.pushStack(T(e).filter(function(){for(t=0;t1?T.uniqueSort(n):n},filter:function(e){return this.pushStack(j(this,e||[],!1))},not:function(e){return this.pushStack(j(this,e||[],!0))},is:function(e){return!!j(this,"string"==typeof e&&D.test(e)?T(e):e||[],!1).length}});var N,L=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/;(T.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n=n||N,"string"==typeof e){if(!(r="<"===e[0]&&">"===e[e.length-1]&&e.length>=3?[null,e,null]:L.exec(e))||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof T?t[0]:t,T.merge(this,T.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:a,!0)),E.test(r[1])&&T.isPlainObject(t))for(r in t)y(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return(i=a.getElementById(r[2]))&&(this[0]=i,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):y(e)?void 0!==n.ready?n.ready(e):e(T):T.makeArray(e,this)}).prototype=T.fn,N=T(a);var M=/^(?:parents|prev(?:Until|All))/,F={children:!0,contents:!0,next:!0,prev:!0};function I(e,t){for(;(e=e[t])&&1!==e.nodeType;);return e}T.fn.extend({has:function(e){var t=T(e,this),n=t.length;return this.filter(function(){for(var e=0;e-1:1===n.nodeType&&T.find.matchesSelector(n,e))){o.push(n);break}return this.pushStack(o.length>1?T.uniqueSort(o):o)},index:function(e){return e?"string"==typeof e?f.call(T(e),this[0]):f.call(this,e.jquery?e[0]:e):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(T.uniqueSort(T.merge(this.get(),T(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),T.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return k(e,"parentNode")},parentsUntil:function(e,t,n){return k(e,"parentNode",n)},next:function(e){return I(e,"nextSibling")},prev:function(e){return I(e,"previousSibling")},nextAll:function(e){return k(e,"nextSibling")},prevAll:function(e){return k(e,"previousSibling")},nextUntil:function(e,t,n){return k(e,"nextSibling",n)},prevUntil:function(e,t,n){return k(e,"previousSibling",n)},siblings:function(e){return S((e.parentNode||{}).firstChild,e)},children:function(e){return S(e.firstChild)},contents:function(e){return void 0!==e.contentDocument?e.contentDocument:(O(e,"template")&&(e=e.content||e),T.merge([],e.childNodes))}},function(e,t){T.fn[e]=function(n,r){var i=T.map(this,t,n);return"Until"!==e.slice(-5)&&(r=n),r&&"string"==typeof r&&(i=T.filter(r,i)),this.length>1&&(F[e]||T.uniqueSort(i),M.test(e)&&i.reverse()),this.pushStack(i)}});var R=/[^\x20\t\r\n\f]+/g;function P(e){return e}function H(e){throw e}function q(e,t,n,r){var i;try{e&&y(i=e.promise)?i.call(e).done(t).fail(n):e&&y(i=e.then)?i.call(e,t,n):t.apply(void 0,[e].slice(r))}catch(e){n.apply(void 0,[e])}}T.Callbacks=function(e){e="string"==typeof e?function(e){var t={};return T.each(e.match(R)||[],function(e,n){t[n]=!0}),t}(e):T.extend({},e);var t,n,r,i,o=[],a=[],u=-1,s=function(){for(i=i||e.once,r=t=!0;a.length;u=-1)for(n=a.shift();++u-1;)o.splice(n,1),n<=u&&u--}),this},has:function(e){return e?T.inArray(e,o)>-1:o.length>0},empty:function(){return o&&(o=[]),this},disable:function(){return i=a=[],o=n="",this},disabled:function(){return!o},lock:function(){return i=a=[],n||t||(o=n=""),this},locked:function(){return!!i},fireWith:function(e,n){return i||(n=[e,(n=n||[]).slice?n.slice():n],a.push(n),t||s()),this},fire:function(){return c.fireWith(this,arguments),this},fired:function(){return!!r}};return c},T.extend({Deferred:function(e){var t=[["notify","progress",T.Callbacks("memory"),T.Callbacks("memory"),2],["resolve","done",T.Callbacks("once memory"),T.Callbacks("once memory"),0,"resolved"],["reject","fail",T.Callbacks("once memory"),T.Callbacks("once memory"),1,"rejected"]],r="pending",i={state:function(){return r},always:function(){return o.done(arguments).fail(arguments),this},catch:function(e){return i.then(null,e)},pipe:function(){var e=arguments;return T.Deferred(function(n){T.each(t,function(t,r){var i=y(e[r[4]])&&e[r[4]];o[r[1]](function(){var e=i&&i.apply(this,arguments);e&&y(e.promise)?e.promise().progress(n.notify).done(n.resolve).fail(n.reject):n[r[0]+"With"](this,i?[e]:arguments)})}),e=null}).promise()},then:function(e,r,i){var o=0;function a(e,t,r,i){return function(){var u=this,s=arguments,c=function(){var n,c;if(!(e=o&&(r!==H&&(u=void 0,s=[n]),t.rejectWith(u,s))}};e?l():(T.Deferred.getStackHook&&(l.stackTrace=T.Deferred.getStackHook()),n.setTimeout(l))}}return T.Deferred(function(n){t[0][3].add(a(0,n,y(i)?i:P,n.notifyWith)),t[1][3].add(a(0,n,y(e)?e:P)),t[2][3].add(a(0,n,y(r)?r:H))}).promise()},promise:function(e){return null!=e?T.extend(e,i):i}},o={};return T.each(t,function(e,n){var a=n[2],u=n[5];i[n[1]]=a.add,u&&a.add(function(){r=u},t[3-e][2].disable,t[3-e][3].disable,t[0][2].lock,t[0][3].lock),a.add(n[3].fire),o[n[0]]=function(){return o[n[0]+"With"](this===o?void 0:this,arguments),this},o[n[0]+"With"]=a.fireWith}),i.promise(o),e&&e.call(o,o),o},when:function(e){var t=arguments.length,n=t,r=Array(n),i=s.call(arguments),o=T.Deferred(),a=function(e){return function(n){r[e]=this,i[e]=arguments.length>1?s.call(arguments):n,--t||o.resolveWith(r,i)}};if(t<=1&&(q(e,o.done(a(n)).resolve,o.reject,!t),"pending"===o.state()||y(i[n]&&i[n].then)))return o.then();for(;n--;)q(i[n],a(n),o.reject);return o.promise()}});var U=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;T.Deferred.exceptionHook=function(e,t){n.console&&n.console.warn&&e&&U.test(e.name)&&n.console.warn("jQuery.Deferred exception: "+e.message,e.stack,t)},T.readyException=function(e){n.setTimeout(function(){throw e})};var B=T.Deferred();function z(){a.removeEventListener("DOMContentLoaded",z),n.removeEventListener("load",z),T.ready()}T.fn.ready=function(e){return B.then(e).catch(function(e){T.readyException(e)}),this},T.extend({isReady:!1,readyWait:1,ready:function(e){(!0===e?--T.readyWait:T.isReady)||(T.isReady=!0,!0!==e&&--T.readyWait>0||B.resolveWith(a,[T]))}}),T.ready.then=B.then,"complete"===a.readyState||"loading"!==a.readyState&&!a.documentElement.doScroll?n.setTimeout(T.ready):(a.addEventListener("DOMContentLoaded",z),n.addEventListener("load",z));var W=function(e,t,n,r,i,o,a){var u=0,s=e.length,c=null==n;if("object"===x(n))for(u in i=!0,n)W(e,t,u,n[u],!0,o,a);else if(void 0!==r&&(i=!0,y(r)||(a=!0),c&&(a?(t.call(e,r),t=null):(c=t,t=function(e,t,n){return c.call(T(e),n)})),t))for(;u1,null,!0)},removeData:function(e){return this.each(function(){Q.remove(this,e)})}}),T.extend({queue:function(e,t,n){var r;if(e)return t=(t||"fx")+"queue",r=J.get(e,t),n&&(!r||Array.isArray(n)?r=J.access(e,t,T.makeArray(n)):r.push(n)),r||[]},dequeue:function(e,t){t=t||"fx";var n=T.queue(e,t),r=n.length,i=n.shift(),o=T._queueHooks(e,t);"inprogress"===i&&(i=n.shift(),r--),i&&("fx"===t&&n.unshift("inprogress"),delete o.stop,i.call(e,function(){T.dequeue(e,t)},o)),!r&&o&&o.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return J.get(e,n)||J.access(e,n,{empty:T.Callbacks("once memory").add(function(){J.remove(e,[t+"queue",n])})})}}),T.fn.extend({queue:function(e,t){var n=2;return"string"!=typeof e&&(t=e,e="fx",n--),arguments.length\x20\t\r\n\f]*)/i,ge=/^$|^module$|\/(?:java|ecma)script/i,ye={option:[1,""],thead:[1,"","
"],col:[2,"","
"],tr:[2,"","
"],td:[3,"","
"],_default:[0,"",""]};function be(e,t){var n;return n=void 0!==e.getElementsByTagName?e.getElementsByTagName(t||"*"):void 0!==e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&O(e,t)?T.merge([e],n):n}function _e(e,t){for(var n=0,r=e.length;n-1)i&&i.push(o);else if(c=ue(o),a=be(f.appendChild(o),"script"),c&&_e(a),n)for(l=0;o=a[l++];)ge.test(o.type||"")&&n.push(o);return f}we=a.createDocumentFragment().appendChild(a.createElement("div")),(xe=a.createElement("input")).setAttribute("type","radio"),xe.setAttribute("checked","checked"),xe.setAttribute("name","t"),we.appendChild(xe),g.checkClone=we.cloneNode(!0).cloneNode(!0).lastChild.checked,we.innerHTML="",g.noCloneChecked=!!we.cloneNode(!0).lastChild.defaultValue;var $e=/^key/,Ae=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,ke=/^([^.]*)(?:\.(.+)|)/;function Se(){return!0}function De(){return!1}function Oe(e,t){return e===function(){try{return a.activeElement}catch(e){}}()==("focus"===t)}function Ee(e,t,n,r,i,o){var a,u;if("object"==typeof t){for(u in"string"!=typeof n&&(r=r||n,n=void 0),t)Ee(e,u,n,r,t[u],o);return e}if(null==r&&null==i?(i=n,r=n=void 0):null==i&&("string"==typeof n?(i=r,r=void 0):(i=r,r=n,n=void 0)),!1===i)i=De;else if(!i)return e;return 1===o&&(a=i,(i=function(e){return T().off(e),a.apply(this,arguments)}).guid=a.guid||(a.guid=T.guid++)),e.each(function(){T.event.add(this,t,i,r,n)})}function je(e,t,n){n?(J.set(e,t,!1),T.event.add(e,t,{namespace:!1,handler:function(e){var r,i,o=J.get(this,t);if(1&e.isTrigger&&this[t]){if(o.length)(T.event.special[t]||{}).delegateType&&e.stopPropagation();else if(o=s.call(arguments),J.set(this,t,o),r=n(this,t),this[t](),o!==(i=J.get(this,t))||r?J.set(this,t,!1):i={},o!==i)return e.stopImmediatePropagation(),e.preventDefault(),i.value}else o.length&&(J.set(this,t,{value:T.event.trigger(T.extend(o[0],T.Event.prototype),o.slice(1),this)}),e.stopImmediatePropagation())}})):void 0===J.get(e,t)&&T.event.add(e,t,Se)}T.event={global:{},add:function(e,t,n,r,i){var o,a,u,s,c,l,f,d,p,h,v,m=J.get(e);if(m)for(n.handler&&(n=(o=n).handler,i=o.selector),i&&T.find.matchesSelector(ae,i),n.guid||(n.guid=T.guid++),(s=m.events)||(s=m.events={}),(a=m.handle)||(a=m.handle=function(t){return void 0!==T&&T.event.triggered!==t.type?T.event.dispatch.apply(e,arguments):void 0}),c=(t=(t||"").match(R)||[""]).length;c--;)p=v=(u=ke.exec(t[c])||[])[1],h=(u[2]||"").split(".").sort(),p&&(f=T.event.special[p]||{},p=(i?f.delegateType:f.bindType)||p,f=T.event.special[p]||{},l=T.extend({type:p,origType:v,data:r,handler:n,guid:n.guid,selector:i,needsContext:i&&T.expr.match.needsContext.test(i),namespace:h.join(".")},o),(d=s[p])||((d=s[p]=[]).delegateCount=0,f.setup&&!1!==f.setup.call(e,r,h,a)||e.addEventListener&&e.addEventListener(p,a)),f.add&&(f.add.call(e,l),l.handler.guid||(l.handler.guid=n.guid)),i?d.splice(d.delegateCount++,0,l):d.push(l),T.event.global[p]=!0)},remove:function(e,t,n,r,i){var o,a,u,s,c,l,f,d,p,h,v,m=J.hasData(e)&&J.get(e);if(m&&(s=m.events)){for(c=(t=(t||"").match(R)||[""]).length;c--;)if(p=v=(u=ke.exec(t[c])||[])[1],h=(u[2]||"").split(".").sort(),p){for(f=T.event.special[p]||{},d=s[p=(r?f.delegateType:f.bindType)||p]||[],u=u[2]&&new RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"),a=o=d.length;o--;)l=d[o],!i&&v!==l.origType||n&&n.guid!==l.guid||u&&!u.test(l.namespace)||r&&r!==l.selector&&("**"!==r||!l.selector)||(d.splice(o,1),l.selector&&d.delegateCount--,f.remove&&f.remove.call(e,l));a&&!d.length&&(f.teardown&&!1!==f.teardown.call(e,h,m.handle)||T.removeEvent(e,p,m.handle),delete s[p])}else for(p in s)T.event.remove(e,p+t[c],n,r,!0);T.isEmptyObject(s)&&J.remove(e,"handle events")}},dispatch:function(e){var t,n,r,i,o,a,u=T.event.fix(e),s=new Array(arguments.length),c=(J.get(this,"events")||{})[u.type]||[],l=T.event.special[u.type]||{};for(s[0]=u,t=1;t=1))for(;c!==this;c=c.parentNode||this)if(1===c.nodeType&&("click"!==e.type||!0!==c.disabled)){for(o=[],a={},n=0;n-1:T.find(i,this,null,[c]).length),a[i]&&o.push(r);o.length&&u.push({elem:c,handlers:o})}return c=this,s\x20\t\r\n\f]*)[^>]*)\/>/gi,Le=/\s*$/g;function Ie(e,t){return O(e,"table")&&O(11!==t.nodeType?t:t.firstChild,"tr")&&T(e).children("tbody")[0]||e}function Re(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function Pe(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function He(e,t){var n,r,i,o,a,u,s,c;if(1===t.nodeType){if(J.hasData(e)&&(o=J.access(e),a=J.set(t,o),c=o.events))for(i in delete a.handle,a.events={},c)for(n=0,r=c[i].length;n1&&"string"==typeof h&&!g.checkClone&&Me.test(h))return e.each(function(i){var o=e.eq(i);v&&(t[0]=h.call(this,i,o.html())),qe(o,t,n,r)});if(d&&(o=(i=Ce(t,e[0].ownerDocument,!1,e,r)).firstChild,1===i.childNodes.length&&(i=o),o||r)){for(u=(a=T.map(be(i,"script"),Re)).length;f")},clone:function(e,t,n){var r,i,o,a,u,s,c,l=e.cloneNode(!0),f=ue(e);if(!(g.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||T.isXMLDoc(e)))for(a=be(l),r=0,i=(o=be(e)).length;r0&&_e(a,!f&&be(e,"script")),l},cleanData:function(e){for(var t,n,r,i=T.event.special,o=0;void 0!==(n=e[o]);o++)if(K(n)){if(t=n[J.expando]){if(t.events)for(r in t.events)i[r]?T.event.remove(n,r):T.removeEvent(n,r,t.handle);n[J.expando]=void 0}n[Q.expando]&&(n[Q.expando]=void 0)}}}),T.fn.extend({detach:function(e){return Ue(this,e,!0)},remove:function(e){return Ue(this,e)},text:function(e){return W(this,function(e){return void 0===e?T.text(this):this.empty().each(function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=e)})},null,e,arguments.length)},append:function(){return qe(this,arguments,function(e){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||Ie(this,e).appendChild(e)})},prepend:function(){return qe(this,arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=Ie(this,e);t.insertBefore(e,t.firstChild)}})},before:function(){return qe(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return qe(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},empty:function(){for(var e,t=0;null!=(e=this[t]);t++)1===e.nodeType&&(T.cleanData(be(e,!1)),e.textContent="");return this},clone:function(e,t){return e=null!=e&&e,t=null==t?e:t,this.map(function(){return T.clone(this,e,t)})},html:function(e){return W(this,function(e){var t=this[0]||{},n=0,r=this.length;if(void 0===e&&1===t.nodeType)return t.innerHTML;if("string"==typeof e&&!Le.test(e)&&!ye[(me.exec(e)||["",""])[1].toLowerCase()]){e=T.htmlPrefilter(e);try{for(;n=0&&(s+=Math.max(0,Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-o-s-u-.5))||0),s}function it(e,t,n){var r=ze(e),i=(!g.boxSizingReliable()||n)&&"border-box"===T.css(e,"boxSizing",!1,r),o=i,a=Ye(e,t,r),u="offset"+t[0].toUpperCase()+t.slice(1);if(Be.test(a)){if(!n)return a;a="auto"}return(!g.boxSizingReliable()&&i||"auto"===a||!parseFloat(a)&&"inline"===T.css(e,"display",!1,r))&&e.getClientRects().length&&(i="border-box"===T.css(e,"boxSizing",!1,r),(o=u in e)&&(a=e[u])),(a=parseFloat(a)||0)+rt(e,t,n||(i?"border":"content"),o,r,a)+"px"}function ot(e,t,n,r,i){return new ot.prototype.init(e,t,n,r,i)}T.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=Ye(e,"opacity");return""===n?"1":n}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,gridArea:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnStart:!0,gridRow:!0,gridRowEnd:!0,gridRowStart:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{},style:function(e,t,n,r){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var i,o,a,u=G(t),s=Qe.test(t),c=e.style;if(s||(t=Xe(u)),a=T.cssHooks[t]||T.cssHooks[u],void 0===n)return a&&"get"in a&&void 0!==(i=a.get(e,!1,r))?i:c[t];"string"===(o=typeof n)&&(i=ie.exec(n))&&i[1]&&(n=fe(e,t,i),o="number"),null!=n&&n==n&&("number"!==o||s||(n+=i&&i[3]||(T.cssNumber[u]?"":"px")),g.clearCloneStyle||""!==n||0!==t.indexOf("background")||(c[t]="inherit"),a&&"set"in a&&void 0===(n=a.set(e,n,r))||(s?c.setProperty(t,n):c[t]=n))}},css:function(e,t,n,r){var i,o,a,u=G(t);return Qe.test(t)||(t=Xe(u)),(a=T.cssHooks[t]||T.cssHooks[u])&&"get"in a&&(i=a.get(e,!0,n)),void 0===i&&(i=Ye(e,t,r)),"normal"===i&&t in tt&&(i=tt[t]),""===n||n?(o=parseFloat(i),!0===n||isFinite(o)?o||0:i):i}}),T.each(["height","width"],function(e,t){T.cssHooks[t]={get:function(e,n,r){if(n)return!Je.test(T.css(e,"display"))||e.getClientRects().length&&e.getBoundingClientRect().width?it(e,t,r):le(e,et,function(){return it(e,t,r)})},set:function(e,n,r){var i,o=ze(e),a=!g.scrollboxSize()&&"absolute"===o.position,u=(a||r)&&"border-box"===T.css(e,"boxSizing",!1,o),s=r?rt(e,t,r,u,o):0;return u&&a&&(s-=Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-parseFloat(o[t])-rt(e,t,"border",!1,o)-.5)),s&&(i=ie.exec(n))&&"px"!==(i[3]||"px")&&(e.style[t]=n,n=T.css(e,t)),nt(0,n,s)}}}),T.cssHooks.marginLeft=Ve(g.reliableMarginLeft,function(e,t){if(t)return(parseFloat(Ye(e,"marginLeft"))||e.getBoundingClientRect().left-le(e,{marginLeft:0},function(){return e.getBoundingClientRect().left}))+"px"}),T.each({margin:"",padding:"",border:"Width"},function(e,t){T.cssHooks[e+t]={expand:function(n){for(var r=0,i={},o="string"==typeof n?n.split(" "):[n];r<4;r++)i[e+oe[r]+t]=o[r]||o[r-2]||o[0];return i}},"margin"!==e&&(T.cssHooks[e+t].set=nt)}),T.fn.extend({css:function(e,t){return W(this,function(e,t,n){var r,i,o={},a=0;if(Array.isArray(t)){for(r=ze(e),i=t.length;a1)}}),T.Tween=ot,ot.prototype={constructor:ot,init:function(e,t,n,r,i,o){this.elem=e,this.prop=n,this.easing=i||T.easing._default,this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=o||(T.cssNumber[n]?"":"px")},cur:function(){var e=ot.propHooks[this.prop];return e&&e.get?e.get(this):ot.propHooks._default.get(this)},run:function(e){var t,n=ot.propHooks[this.prop];return this.options.duration?this.pos=t=T.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):this.pos=t=e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):ot.propHooks._default.set(this),this}},ot.prototype.init.prototype=ot.prototype,ot.propHooks={_default:{get:function(e){var t;return 1!==e.elem.nodeType||null!=e.elem[e.prop]&&null==e.elem.style[e.prop]?e.elem[e.prop]:(t=T.css(e.elem,e.prop,""))&&"auto"!==t?t:0},set:function(e){T.fx.step[e.prop]?T.fx.step[e.prop](e):1!==e.elem.nodeType||!T.cssHooks[e.prop]&&null==e.elem.style[Xe(e.prop)]?e.elem[e.prop]=e.now:T.style(e.elem,e.prop,e.now+e.unit)}}},ot.propHooks.scrollTop=ot.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},T.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2},_default:"swing"},T.fx=ot.prototype.init,T.fx.step={};var at,ut,st=/^(?:toggle|show|hide)$/,ct=/queueHooks$/;function lt(){ut&&(!1===a.hidden&&n.requestAnimationFrame?n.requestAnimationFrame(lt):n.setTimeout(lt,T.fx.interval),T.fx.tick())}function ft(){return n.setTimeout(function(){at=void 0}),at=Date.now()}function dt(e,t){var n,r=0,i={height:e};for(t=t?1:0;r<4;r+=2-t)i["margin"+(n=oe[r])]=i["padding"+n]=e;return t&&(i.opacity=i.width=e),i}function pt(e,t,n){for(var r,i=(ht.tweeners[t]||[]).concat(ht.tweeners["*"]),o=0,a=i.length;o1)},removeAttr:function(e){return this.each(function(){T.removeAttr(this,e)})}}),T.extend({attr:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return void 0===e.getAttribute?T.prop(e,t,n):(1===o&&T.isXMLDoc(e)||(i=T.attrHooks[t.toLowerCase()]||(T.expr.match.bool.test(t)?vt:void 0)),void 0!==n?null===n?void T.removeAttr(e,t):i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:(e.setAttribute(t,n+""),n):i&&"get"in i&&null!==(r=i.get(e,t))?r:null==(r=T.find.attr(e,t))?void 0:r)},attrHooks:{type:{set:function(e,t){if(!g.radioValue&&"radio"===t&&O(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},removeAttr:function(e,t){var n,r=0,i=t&&t.match(R);if(i&&1===e.nodeType)for(;n=i[r++];)e.removeAttribute(n)}}),vt={set:function(e,t,n){return!1===t?T.removeAttr(e,n):e.setAttribute(n,n),n}},T.each(T.expr.match.bool.source.match(/\w+/g),function(e,t){var n=mt[t]||T.find.attr;mt[t]=function(e,t,r){var i,o,a=t.toLowerCase();return r||(o=mt[a],mt[a]=i,i=null!=n(e,t,r)?a:null,mt[a]=o),i}});var gt=/^(?:input|select|textarea|button)$/i,yt=/^(?:a|area)$/i;function bt(e){return(e.match(R)||[]).join(" ")}function _t(e){return e.getAttribute&&e.getAttribute("class")||""}function wt(e){return Array.isArray(e)?e:"string"==typeof e&&e.match(R)||[]}T.fn.extend({prop:function(e,t){return W(this,T.prop,e,t,arguments.length>1)},removeProp:function(e){return this.each(function(){delete this[T.propFix[e]||e]})}}),T.extend({prop:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return 1===o&&T.isXMLDoc(e)||(t=T.propFix[t]||t,i=T.propHooks[t]),void 0!==n?i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:e[t]=n:i&&"get"in i&&null!==(r=i.get(e,t))?r:e[t]},propHooks:{tabIndex:{get:function(e){var t=T.find.attr(e,"tabindex");return t?parseInt(t,10):gt.test(e.nodeName)||yt.test(e.nodeName)&&e.href?0:-1}}},propFix:{for:"htmlFor",class:"className"}}),g.optSelected||(T.propHooks.selected={get:function(e){var t=e.parentNode;return t&&t.parentNode&&t.parentNode.selectedIndex,null},set:function(e){var t=e.parentNode;t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex)}}),T.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){T.propFix[this.toLowerCase()]=this}),T.fn.extend({addClass:function(e){var t,n,r,i,o,a,u,s=0;if(y(e))return this.each(function(t){T(this).addClass(e.call(this,t,_t(this)))});if((t=wt(e)).length)for(;n=this[s++];)if(i=_t(n),r=1===n.nodeType&&" "+bt(i)+" "){for(a=0;o=t[a++];)r.indexOf(" "+o+" ")<0&&(r+=o+" ");i!==(u=bt(r))&&n.setAttribute("class",u)}return this},removeClass:function(e){var t,n,r,i,o,a,u,s=0;if(y(e))return this.each(function(t){T(this).removeClass(e.call(this,t,_t(this)))});if(!arguments.length)return this.attr("class","");if((t=wt(e)).length)for(;n=this[s++];)if(i=_t(n),r=1===n.nodeType&&" "+bt(i)+" "){for(a=0;o=t[a++];)for(;r.indexOf(" "+o+" ")>-1;)r=r.replace(" "+o+" "," ");i!==(u=bt(r))&&n.setAttribute("class",u)}return this},toggleClass:function(e,t){var n=typeof e,r="string"===n||Array.isArray(e);return"boolean"==typeof t&&r?t?this.addClass(e):this.removeClass(e):y(e)?this.each(function(n){T(this).toggleClass(e.call(this,n,_t(this),t),t)}):this.each(function(){var t,i,o,a;if(r)for(i=0,o=T(this),a=wt(e);t=a[i++];)o.hasClass(t)?o.removeClass(t):o.addClass(t);else void 0!==e&&"boolean"!==n||((t=_t(this))&&J.set(this,"__className__",t),this.setAttribute&&this.setAttribute("class",t||!1===e?"":J.get(this,"__className__")||""))})},hasClass:function(e){var t,n,r=0;for(t=" "+e+" ";n=this[r++];)if(1===n.nodeType&&(" "+bt(_t(n))+" ").indexOf(t)>-1)return!0;return!1}});var xt=/\r/g;T.fn.extend({val:function(e){var t,n,r,i=this[0];return arguments.length?(r=y(e),this.each(function(n){var i;1===this.nodeType&&(null==(i=r?e.call(this,n,T(this).val()):e)?i="":"number"==typeof i?i+="":Array.isArray(i)&&(i=T.map(i,function(e){return null==e?"":e+""})),(t=T.valHooks[this.type]||T.valHooks[this.nodeName.toLowerCase()])&&"set"in t&&void 0!==t.set(this,i,"value")||(this.value=i))})):i?(t=T.valHooks[i.type]||T.valHooks[i.nodeName.toLowerCase()])&&"get"in t&&void 0!==(n=t.get(i,"value"))?n:"string"==typeof(n=i.value)?n.replace(xt,""):null==n?"":n:void 0}}),T.extend({valHooks:{option:{get:function(e){var t=T.find.attr(e,"value");return null!=t?t:bt(T.text(e))}},select:{get:function(e){var t,n,r,i=e.options,o=e.selectedIndex,a="select-one"===e.type,u=a?null:[],s=a?o+1:i.length;for(r=o<0?s:a?o:0;r-1)&&(n=!0);return n||(e.selectedIndex=-1),o}}}}),T.each(["radio","checkbox"],function(){T.valHooks[this]={set:function(e,t){if(Array.isArray(t))return e.checked=T.inArray(T(e).val(),t)>-1}},g.checkOn||(T.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})}),g.focusin="onfocusin"in n;var Tt=/^(?:focusinfocus|focusoutblur)$/,Ct=function(e){e.stopPropagation()};T.extend(T.event,{trigger:function(e,t,r,i){var o,u,s,c,l,f,d,p,v=[r||a],m=h.call(e,"type")?e.type:e,g=h.call(e,"namespace")?e.namespace.split("."):[];if(u=p=s=r=r||a,3!==r.nodeType&&8!==r.nodeType&&!Tt.test(m+T.event.triggered)&&(m.indexOf(".")>-1&&(m=(g=m.split(".")).shift(),g.sort()),l=m.indexOf(":")<0&&"on"+m,(e=e[T.expando]?e:new T.Event(m,"object"==typeof e&&e)).isTrigger=i?2:3,e.namespace=g.join("."),e.rnamespace=e.namespace?new RegExp("(^|\\.)"+g.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,e.result=void 0,e.target||(e.target=r),t=null==t?[e]:T.makeArray(t,[e]),d=T.event.special[m]||{},i||!d.trigger||!1!==d.trigger.apply(r,t))){if(!i&&!d.noBubble&&!b(r)){for(c=d.delegateType||m,Tt.test(c+m)||(u=u.parentNode);u;u=u.parentNode)v.push(u),s=u;s===(r.ownerDocument||a)&&v.push(s.defaultView||s.parentWindow||n)}for(o=0;(u=v[o++])&&!e.isPropagationStopped();)p=u,e.type=o>1?c:d.bindType||m,(f=(J.get(u,"events")||{})[e.type]&&J.get(u,"handle"))&&f.apply(u,t),(f=l&&u[l])&&f.apply&&K(u)&&(e.result=f.apply(u,t),!1===e.result&&e.preventDefault());return e.type=m,i||e.isDefaultPrevented()||d._default&&!1!==d._default.apply(v.pop(),t)||!K(r)||l&&y(r[m])&&!b(r)&&((s=r[l])&&(r[l]=null),T.event.triggered=m,e.isPropagationStopped()&&p.addEventListener(m,Ct),r[m](),e.isPropagationStopped()&&p.removeEventListener(m,Ct),T.event.triggered=void 0,s&&(r[l]=s)),e.result}},simulate:function(e,t,n){var r=T.extend(new T.Event,n,{type:e,isSimulated:!0});T.event.trigger(r,null,t)}}),T.fn.extend({trigger:function(e,t){return this.each(function(){T.event.trigger(e,t,this)})},triggerHandler:function(e,t){var n=this[0];if(n)return T.event.trigger(e,t,n,!0)}}),g.focusin||T.each({focus:"focusin",blur:"focusout"},function(e,t){var n=function(e){T.event.simulate(t,e.target,T.event.fix(e))};T.event.special[t]={setup:function(){var r=this.ownerDocument||this,i=J.access(r,t);i||r.addEventListener(e,n,!0),J.access(r,t,(i||0)+1)},teardown:function(){var r=this.ownerDocument||this,i=J.access(r,t)-1;i?J.access(r,t,i):(r.removeEventListener(e,n,!0),J.remove(r,t))}}});var $t=n.location,At=Date.now(),kt=/\?/;T.parseXML=function(e){var t;if(!e||"string"!=typeof e)return null;try{t=(new n.DOMParser).parseFromString(e,"text/xml")}catch(e){t=void 0}return t&&!t.getElementsByTagName("parsererror").length||T.error("Invalid XML: "+e),t};var St=/\[\]$/,Dt=/\r?\n/g,Ot=/^(?:submit|button|image|reset|file)$/i,Et=/^(?:input|select|textarea|keygen)/i;function jt(e,t,n,r){var i;if(Array.isArray(t))T.each(t,function(t,i){n||St.test(e)?r(e,i):jt(e+"["+("object"==typeof i&&null!=i?t:"")+"]",i,n,r)});else if(n||"object"!==x(t))r(e,t);else for(i in t)jt(e+"["+i+"]",t[i],n,r)}T.param=function(e,t){var n,r=[],i=function(e,t){var n=y(t)?t():t;r[r.length]=encodeURIComponent(e)+"="+encodeURIComponent(null==n?"":n)};if(null==e)return"";if(Array.isArray(e)||e.jquery&&!T.isPlainObject(e))T.each(e,function(){i(this.name,this.value)});else for(n in e)jt(n,e[n],t,i);return r.join("&")},T.fn.extend({serialize:function(){return T.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=T.prop(this,"elements");return e?T.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!T(this).is(":disabled")&&Et.test(this.nodeName)&&!Ot.test(e)&&(this.checked||!ve.test(e))}).map(function(e,t){var n=T(this).val();return null==n?null:Array.isArray(n)?T.map(n,function(e){return{name:t.name,value:e.replace(Dt,"\r\n")}}):{name:t.name,value:n.replace(Dt,"\r\n")}}).get()}});var Nt=/%20/g,Lt=/#.*$/,Mt=/([?&])_=[^&]*/,Ft=/^(.*?):[ \t]*([^\r\n]*)$/gm,It=/^(?:GET|HEAD)$/,Rt=/^\/\//,Pt={},Ht={},qt="*/".concat("*"),Ut=a.createElement("a");function Bt(e){return function(t,n){"string"!=typeof t&&(n=t,t="*");var r,i=0,o=t.toLowerCase().match(R)||[];if(y(n))for(;r=o[i++];)"+"===r[0]?(r=r.slice(1)||"*",(e[r]=e[r]||[]).unshift(n)):(e[r]=e[r]||[]).push(n)}}function zt(e,t,n,r){var i={},o=e===Ht;function a(u){var s;return i[u]=!0,T.each(e[u]||[],function(e,u){var c=u(t,n,r);return"string"!=typeof c||o||i[c]?o?!(s=c):void 0:(t.dataTypes.unshift(c),a(c),!1)}),s}return a(t.dataTypes[0])||!i["*"]&&a("*")}function Wt(e,t){var n,r,i=T.ajaxSettings.flatOptions||{};for(n in t)void 0!==t[n]&&((i[n]?e:r||(r={}))[n]=t[n]);return r&&T.extend(!0,e,r),e}Ut.href=$t.href,T.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:$t.href,type:"GET",isLocal:/^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test($t.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":qt,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":JSON.parse,"text xml":T.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?Wt(Wt(e,T.ajaxSettings),t):Wt(T.ajaxSettings,e)},ajaxPrefilter:Bt(Pt),ajaxTransport:Bt(Ht),ajax:function(e,t){"object"==typeof e&&(t=e,e=void 0),t=t||{};var r,i,o,u,s,c,l,f,d,p,h=T.ajaxSetup({},t),v=h.context||h,m=h.context&&(v.nodeType||v.jquery)?T(v):T.event,g=T.Deferred(),y=T.Callbacks("once memory"),b=h.statusCode||{},_={},w={},x="canceled",C={readyState:0,getResponseHeader:function(e){var t;if(l){if(!u)for(u={};t=Ft.exec(o);)u[t[1].toLowerCase()+" "]=(u[t[1].toLowerCase()+" "]||[]).concat(t[2]);t=u[e.toLowerCase()+" "]}return null==t?null:t.join(", ")},getAllResponseHeaders:function(){return l?o:null},setRequestHeader:function(e,t){return null==l&&(e=w[e.toLowerCase()]=w[e.toLowerCase()]||e,_[e]=t),this},overrideMimeType:function(e){return null==l&&(h.mimeType=e),this},statusCode:function(e){var t;if(e)if(l)C.always(e[C.status]);else for(t in e)b[t]=[b[t],e[t]];return this},abort:function(e){var t=e||x;return r&&r.abort(t),$(0,t),this}};if(g.promise(C),h.url=((e||h.url||$t.href)+"").replace(Rt,$t.protocol+"//"),h.type=t.method||t.type||h.method||h.type,h.dataTypes=(h.dataType||"*").toLowerCase().match(R)||[""],null==h.crossDomain){c=a.createElement("a");try{c.href=h.url,c.href=c.href,h.crossDomain=Ut.protocol+"//"+Ut.host!=c.protocol+"//"+c.host}catch(e){h.crossDomain=!0}}if(h.data&&h.processData&&"string"!=typeof h.data&&(h.data=T.param(h.data,h.traditional)),zt(Pt,h,t,C),l)return C;for(d in(f=T.event&&h.global)&&0==T.active++&&T.event.trigger("ajaxStart"),h.type=h.type.toUpperCase(),h.hasContent=!It.test(h.type),i=h.url.replace(Lt,""),h.hasContent?h.data&&h.processData&&0===(h.contentType||"").indexOf("application/x-www-form-urlencoded")&&(h.data=h.data.replace(Nt,"+")):(p=h.url.slice(i.length),h.data&&(h.processData||"string"==typeof h.data)&&(i+=(kt.test(i)?"&":"?")+h.data,delete h.data),!1===h.cache&&(i=i.replace(Mt,"$1"),p=(kt.test(i)?"&":"?")+"_="+At+++p),h.url=i+p),h.ifModified&&(T.lastModified[i]&&C.setRequestHeader("If-Modified-Since",T.lastModified[i]),T.etag[i]&&C.setRequestHeader("If-None-Match",T.etag[i])),(h.data&&h.hasContent&&!1!==h.contentType||t.contentType)&&C.setRequestHeader("Content-Type",h.contentType),C.setRequestHeader("Accept",h.dataTypes[0]&&h.accepts[h.dataTypes[0]]?h.accepts[h.dataTypes[0]]+("*"!==h.dataTypes[0]?", "+qt+"; q=0.01":""):h.accepts["*"]),h.headers)C.setRequestHeader(d,h.headers[d]);if(h.beforeSend&&(!1===h.beforeSend.call(v,C,h)||l))return C.abort();if(x="abort",y.add(h.complete),C.done(h.success),C.fail(h.error),r=zt(Ht,h,t,C)){if(C.readyState=1,f&&m.trigger("ajaxSend",[C,h]),l)return C;h.async&&h.timeout>0&&(s=n.setTimeout(function(){C.abort("timeout")},h.timeout));try{l=!1,r.send(_,$)}catch(e){if(l)throw e;$(-1,e)}}else $(-1,"No Transport");function $(e,t,a,u){var c,d,p,_,w,x=t;l||(l=!0,s&&n.clearTimeout(s),r=void 0,o=u||"",C.readyState=e>0?4:0,c=e>=200&&e<300||304===e,a&&(_=function(e,t,n){for(var r,i,o,a,u=e.contents,s=e.dataTypes;"*"===s[0];)s.shift(),void 0===r&&(r=e.mimeType||t.getResponseHeader("Content-Type"));if(r)for(i in u)if(u[i]&&u[i].test(r)){s.unshift(i);break}if(s[0]in n)o=s[0];else{for(i in n){if(!s[0]||e.converters[i+" "+s[0]]){o=i;break}a||(a=i)}o=o||a}if(o)return o!==s[0]&&s.unshift(o),n[o]}(h,C,a)),_=function(e,t,n,r){var i,o,a,u,s,c={},l=e.dataTypes.slice();if(l[1])for(a in e.converters)c[a.toLowerCase()]=e.converters[a];for(o=l.shift();o;)if(e.responseFields[o]&&(n[e.responseFields[o]]=t),!s&&r&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),s=o,o=l.shift())if("*"===o)o=s;else if("*"!==s&&s!==o){if(!(a=c[s+" "+o]||c["* "+o]))for(i in c)if((u=i.split(" "))[1]===o&&(a=c[s+" "+u[0]]||c["* "+u[0]])){!0===a?a=c[i]:!0!==c[i]&&(o=u[0],l.unshift(u[1]));break}if(!0!==a)if(a&&e.throws)t=a(t);else try{t=a(t)}catch(e){return{state:"parsererror",error:a?e:"No conversion from "+s+" to "+o}}}return{state:"success",data:t}}(h,_,C,c),c?(h.ifModified&&((w=C.getResponseHeader("Last-Modified"))&&(T.lastModified[i]=w),(w=C.getResponseHeader("etag"))&&(T.etag[i]=w)),204===e||"HEAD"===h.type?x="nocontent":304===e?x="notmodified":(x=_.state,d=_.data,c=!(p=_.error))):(p=x,!e&&x||(x="error",e<0&&(e=0))),C.status=e,C.statusText=(t||x)+"",c?g.resolveWith(v,[d,x,C]):g.rejectWith(v,[C,x,p]),C.statusCode(b),b=void 0,f&&m.trigger(c?"ajaxSuccess":"ajaxError",[C,h,c?d:p]),y.fireWith(v,[C,x]),f&&(m.trigger("ajaxComplete",[C,h]),--T.active||T.event.trigger("ajaxStop")))}return C},getJSON:function(e,t,n){return T.get(e,t,n,"json")},getScript:function(e,t){return T.get(e,void 0,t,"script")}}),T.each(["get","post"],function(e,t){T[t]=function(e,n,r,i){return y(n)&&(i=i||r,r=n,n=void 0),T.ajax(T.extend({url:e,type:t,dataType:i,data:n,success:r},T.isPlainObject(e)&&e))}}),T._evalUrl=function(e,t){return T.ajax({url:e,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,converters:{"text script":function(){}},dataFilter:function(e){T.globalEval(e,t)}})},T.fn.extend({wrapAll:function(e){var t;return this[0]&&(y(e)&&(e=e.call(this[0])),t=T(e,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){for(var e=this;e.firstElementChild;)e=e.firstElementChild;return e}).append(this)),this},wrapInner:function(e){return y(e)?this.each(function(t){T(this).wrapInner(e.call(this,t))}):this.each(function(){var t=T(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=y(e);return this.each(function(n){T(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(e){return this.parent(e).not("body").each(function(){T(this).replaceWith(this.childNodes)}),this}}),T.expr.pseudos.hidden=function(e){return!T.expr.pseudos.visible(e)},T.expr.pseudos.visible=function(e){return!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)},T.ajaxSettings.xhr=function(){try{return new n.XMLHttpRequest}catch(e){}};var Yt={0:200,1223:204},Vt=T.ajaxSettings.xhr();g.cors=!!Vt&&"withCredentials"in Vt,g.ajax=Vt=!!Vt,T.ajaxTransport(function(e){var t,r;if(g.cors||Vt&&!e.crossDomain)return{send:function(i,o){var a,u=e.xhr();if(u.open(e.type,e.url,e.async,e.username,e.password),e.xhrFields)for(a in e.xhrFields)u[a]=e.xhrFields[a];for(a in e.mimeType&&u.overrideMimeType&&u.overrideMimeType(e.mimeType),e.crossDomain||i["X-Requested-With"]||(i["X-Requested-With"]="XMLHttpRequest"),i)u.setRequestHeader(a,i[a]);t=function(e){return function(){t&&(t=r=u.onload=u.onerror=u.onabort=u.ontimeout=u.onreadystatechange=null,"abort"===e?u.abort():"error"===e?"number"!=typeof u.status?o(0,"error"):o(u.status,u.statusText):o(Yt[u.status]||u.status,u.statusText,"text"!==(u.responseType||"text")||"string"!=typeof u.responseText?{binary:u.response}:{text:u.responseText},u.getAllResponseHeaders()))}},u.onload=t(),r=u.onerror=u.ontimeout=t("error"),void 0!==u.onabort?u.onabort=r:u.onreadystatechange=function(){4===u.readyState&&n.setTimeout(function(){t&&r()})},t=t("abort");try{u.send(e.hasContent&&e.data||null)}catch(e){if(t)throw e}},abort:function(){t&&t()}}}),T.ajaxPrefilter(function(e){e.crossDomain&&(e.contents.script=!1)}),T.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(e){return T.globalEval(e),e}}}),T.ajaxPrefilter("script",function(e){void 0===e.cache&&(e.cache=!1),e.crossDomain&&(e.type="GET")}),T.ajaxTransport("script",function(e){var t,n;if(e.crossDomain||e.scriptAttrs)return{send:function(r,i){t=T(" - @endpush \ No newline at end of file diff --git a/packages/Webkul/Shop/src/Resources/views/checkout/total/summary.blade.php b/packages/Webkul/Shop/src/Resources/views/checkout/total/summary.blade.php index 2e3b9beef..bb7fcb3e7 100755 --- a/packages/Webkul/Shop/src/Resources/views/checkout/total/summary.blade.php +++ b/packages/Webkul/Shop/src/Resources/views/checkout/total/summary.blade.php @@ -24,10 +24,27 @@ @endif + @if ($cart->discount_amount) +
+ + +
+ @endif +
- +
+
+
+
+ +
+ + +
+
+
\ No newline at end of file From 7f9409bd8e5d4920fb1e2350f273f49b2373dc10 Mon Sep 17 00:00:00 2001 From: Prashant Singh Date: Fri, 14 Jun 2019 12:10:03 +0530 Subject: [PATCH 357/678] Checkout and cart page now coupled with cart rules --- .../Resources/views/customers/edit.blade.php | 4 + packages/Webkul/Checkout/src/Cart.php | 28 ++++- .../Webkul/Discount/src/Helpers/Discount.php | 105 +++++++++++------- .../Http/Controllers/CartRuleController.php | 8 +- .../src/Http/Controllers/CartController.php | 16 ++- .../Http/Controllers/OnepageController.php | 32 +++++- .../views/checkout/onepage.blade.php | 14 +-- .../views/checkout/total/summary.blade.php | 22 ++-- 8 files changed, 158 insertions(+), 71 deletions(-) diff --git a/packages/Webkul/Admin/src/Resources/views/customers/edit.blade.php b/packages/Webkul/Admin/src/Resources/views/customers/edit.blade.php index a14dd01e0..5b3d3bad1 100755 --- a/packages/Webkul/Admin/src/Resources/views/customers/edit.blade.php +++ b/packages/Webkul/Admin/src/Resources/views/customers/edit.blade.php @@ -6,6 +6,8 @@ @section('content')
+ {!! view_render_event('bagisto.admin.customer.edit.before', ['customer' => $customer]) !!} +
+ + {!! view_render_event('bagisto.admin.customer.edit.after', ['customer' => $customer]) !!} @stop \ No newline at end of file diff --git a/packages/Webkul/Checkout/src/Cart.php b/packages/Webkul/Checkout/src/Cart.php index 4aa580c83..ee7a23625 100755 --- a/packages/Webkul/Checkout/src/Cart.php +++ b/packages/Webkul/Checkout/src/Cart.php @@ -814,7 +814,6 @@ class Cart { return false; $this->calculateItemsTax(); - $this->applyNonCoupon(); $cart->grand_total = $cart->base_grand_total = 0; $cart->sub_total = $cart->base_sub_total = 0; @@ -1301,6 +1300,33 @@ class Cart { return $result; } + /** + * Removes discount from the cart and calls collect totals + * + * @return void + */ + public function removeDiscount() + { + $cartItems = $this->getCart()->items; + + foreach($cartItems as $item) { + $item->update([ + 'coupon_code' => null, + 'discount_percent' => 0, + 'discount_amount' => 0, + 'base_discount_amount' => 0 + ]); + } + + $this->getCart()->update([ + 'coupon_code' => null, + 'discount_amount' => 0, + 'base_discount_amount' => 0 + ]); + + return true; + } + public function removeCoupon() { $result = $this->discount->removeCoupon(); diff --git a/packages/Webkul/Discount/src/Helpers/Discount.php b/packages/Webkul/Discount/src/Helpers/Discount.php index b526dc459..3fb200e42 100644 --- a/packages/Webkul/Discount/src/Helpers/Discount.php +++ b/packages/Webkul/Discount/src/Helpers/Discount.php @@ -114,6 +114,7 @@ class Discount if ($canBeApplied->count()) { $this->save(array_first($canBeApplied)['rule']); + $itemId = array_first($canBeApplied); foreach (\Cart::getCart()->items as $item) { @@ -148,9 +149,8 @@ class Discount ]); } - $rule; foreach ($couponAbleRules as $couponAbleRule) { - if ($couponAbleRule->coupons->code === $code) { + if ($couponAbleRule->coupons->code == $code) { $rule = $couponAbleRule; } } @@ -194,69 +194,93 @@ class Discount $alreadyAppliedRule = $alreadyAppliedRule->first()->cart_rule; // analyze impact - $report = $this->checkApplicability($alreadyAppliedRule); - $report['rule'] = $alreadyAppliedRule; + if ($alreadyAppliedRule->id != $rule->id) { + $report = $this->checkApplicability($alreadyAppliedRule); + $report['rule'] = $alreadyAppliedRule; - array_push($canBeApplied, $report); + array_push($canBeApplied, $report); - //min priority - $minPriority = collect($canBeApplied)->min('priority'); - //min priority rule - $canBeApplied = collect($canBeApplied)->where('priority', $minPriority); + //min priority + $minPriority = collect($canBeApplied)->min('priority'); + //min priority rule + $canBeApplied = collect($canBeApplied)->where('priority', $minPriority); - if (count($canBeApplied) > 1) { - $maxDiscount = collect($canBeApplied)->max('discount'); - - $canBeApplied = collect($canBeApplied)->where('discount', $maxDiscount); - - $leastId = 999999999999; if (count($canBeApplied) > 1) { - foreach($canBeApplied as $rule) { - if ($rule['rule']->id < $leastId) { - $leastId = $rule['rule']->id; - } - } + $maxDiscount = collect($canBeApplied)->max('discount'); - // fighting the edge case for couponable discount rule - foreach($canBeApplied as $rule) { - if ($rule['rule']->id == $leastId) { - if($rule['rule']->use_coupon) { - $useCouponable = true; + $canBeApplied = collect($canBeApplied)->where('discount', $maxDiscount); + + $leastId = 999999999999; + if (count($canBeApplied) > 1) { + foreach($canBeApplied as $rule) { + if ($rule['rule']->id < $leastId) { + $leastId = $rule['rule']->id; } } + + // fighting the edge case for couponable discount rule + foreach($canBeApplied as $rule) { + if ($rule['rule']->id == $leastId) { + if($rule['rule']->use_coupon) { + $useCouponable = true; + } + } + } + } else { + if (array_first($canBeApplied)['rule']->use_coupon) { + $useCouponable = true; + } } - } else { + } else if (count($canBeApplied)) { if (array_first($canBeApplied)['rule']->use_coupon) { $useCouponable = true; } } - } else if (count($canBeApplied)) { - if (array_first($canBeApplied)['rule']->use_coupon) { - $useCouponable = true; - } - } - if ($alreadyAppliedRule->end_other_rules) { - $useCouponable = false; + if ($alreadyAppliedRule->end_other_rules) { + $useCouponable = false; + } + } else { + $report = $this->checkApplicability($rule); + + array_push($canBeApplied, $report); } } } } - $canBeApplied = array(); if ($useCouponable) { $report = $this->checkApplicability($rule); $report['rule'] = $rule; $report['used_coupon'] = $useCouponable; + $itemId = array_first($canBeApplied); + + foreach (\Cart::getCart()->items as $item) { + if ($item->id == $itemId['item_id']) { + $item->update([ + 'discount_amount' => array_first($canBeApplied)['discount'], + 'base_discount_amount' => array_first($canBeApplied)['discount'] + ]); + + break; + } + } + + // saves the rule in cart rule cart $this->save($rule); return $report; } else { - return false; + return null; } } + /** + * This function checks whether the rule is getting applied on the current cart or noy + * + * @return mixed + */ public function checkApplicability($rule = null) { $cart = \Cart::getCart(); @@ -309,11 +333,7 @@ class Discount if ($action_type == config('pricerules.cart.validation.0')) { $amountDiscounted = $leastWorthItem['total'] * ($disc_amount / 100); } else if ($action_type == config('pricerules.cart.validation.1')) { - $amountDiscounted = $leastWorthItem['total'] - $disc_amount; - - if ($amountDiscounted < 0) { - $amountDiscounted = $leastWorthItem['total']; - } + $amountDiscounted = $disc_amount; } else if ($action_type == config('pricerules.cart.validation.2')) { $amountDiscounted = $disc_amount; } @@ -331,6 +351,11 @@ class Discount return $report; } + /** + * Save the rule in the cart rule cart + * + * @return boolean + */ public function save($rule) { $cart = \Cart::getCart(); diff --git a/packages/Webkul/Discount/src/Http/Controllers/CartRuleController.php b/packages/Webkul/Discount/src/Http/Controllers/CartRuleController.php index 872d6e51a..336369093 100644 --- a/packages/Webkul/Discount/src/Http/Controllers/CartRuleController.php +++ b/packages/Webkul/Discount/src/Http/Controllers/CartRuleController.php @@ -273,13 +273,11 @@ class CartRuleController extends Controller 'label' => 'array|nullable' ]); - $data = [ - 'usage_limit' => 0, - 'per_customer' => 0 - ]; + $data['usage_limit'] = 0; + $data['per_customer'] = 0; $data = request()->all(); - dd($data); + if ($data['starts_from'] == "" || $data['ends_till'] == "") { $data['starts_from'] = null; $data['ends_till'] = null; diff --git a/packages/Webkul/Shop/src/Http/Controllers/CartController.php b/packages/Webkul/Shop/src/Http/Controllers/CartController.php index 77ad39612..1d5da6825 100755 --- a/packages/Webkul/Shop/src/Http/Controllers/CartController.php +++ b/packages/Webkul/Shop/src/Http/Controllers/CartController.php @@ -82,7 +82,21 @@ class CartController extends Controller */ public function index() { - return view($this->_config['view'])->with('cart', Cart::getCart()); + $cart = Cart::getCart(); + + $appliedRule = $this->cartRuleCart->findWhere([ + 'cart_id' => $cart->id + ]); + + if ($appliedRule->count() == 0) { + Cart::removeDiscount(); + + Cart::collectTotals(); + } + + Cart::applyNonCoupon(); + + return view($this->_config['view'])->with('cart', $cart); } /** diff --git a/packages/Webkul/Shop/src/Http/Controllers/OnepageController.php b/packages/Webkul/Shop/src/Http/Controllers/OnepageController.php index 9f8d7c5f2..9cbedeb01 100755 --- a/packages/Webkul/Shop/src/Http/Controllers/OnepageController.php +++ b/packages/Webkul/Shop/src/Http/Controllers/OnepageController.php @@ -9,6 +9,7 @@ use Auth; use Webkul\Checkout\Facades\Cart; use Webkul\Shipping\Facades\Shipping; use Webkul\Payment\Facades\Payment; +use Webkul\Discount\Repositories\CartRuleCartRepository as CartRuleCart; use Webkul\Checkout\Http\Requests\CustomerAddressForm; use Webkul\Sales\Repositories\OrderRepository; @@ -27,6 +28,13 @@ class OnepageController extends Controller */ protected $orderRepository; + /** + * CartRuleCartRepository object + * + * @var array + */ + protected $cartRuleCart; + /** * Contains route related configuration * @@ -40,10 +48,12 @@ class OnepageController extends Controller * @param \Webkul\Attribute\Repositories\OrderRepository $orderRepository * @return void */ - public function __construct(OrderRepository $orderRepository) + public function __construct(OrderRepository $orderRepository, CartRuleCart $cartRuleCart) { $this->orderRepository = $orderRepository; + $this->cartRuleCart = $cartRuleCart; + $this->_config = request('_config'); } @@ -57,6 +67,20 @@ class OnepageController extends Controller if (Cart::hasError()) return redirect()->route('shop.checkout.cart.index'); + $cart = Cart::getCart(); + + $appliedRule = $this->cartRuleCart->findWhere([ + 'cart_id' => $cart->id + ]); + + if ($appliedRule->count() == 0) { + Cart::removeDiscount(); + + Cart::collectTotals(); + } + + Cart::applyNonCoupon(); + return view($this->_config['view'])->with('cart', Cart::getCart()); } @@ -90,7 +114,7 @@ class OnepageController extends Controller if (Cart::hasError() || !Cart::saveCustomerAddress($data) || ! $rates = Shipping::collectRates()) return response()->json(['redirect_url' => route('shop.checkout.cart.index')], 403); - // $rule = Cart::applyNonCoupon(); + Cart::applyNonCoupon(); Cart::collectTotals(); @@ -109,7 +133,7 @@ class OnepageController extends Controller if (Cart::hasError() || !$shippingMethod || !Cart::saveShippingMethod($shippingMethod)) return response()->json(['redirect_url' => route('shop.checkout.cart.index')], 403); - // $rule = Cart::applyNonCoupon(); + Cart::applyNonCoupon(); Cart::collectTotals(); @@ -130,6 +154,8 @@ class OnepageController extends Controller $cart = Cart::getCart(); + Cart::applyNonCoupon(); + Cart::collectTotals(); return response()->json([ 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 c96e18ec0..a16e3b747 100755 --- a/packages/Webkul/Shop/src/Resources/views/checkout/onepage.blade.php +++ b/packages/Webkul/Shop/src/Resources/views/checkout/onepage.blade.php @@ -348,9 +348,8 @@ data: function() { return { templateRender: null, - non_coupon: null, - coupon: null, - code: null + code: null, + coupon_used: false } }, @@ -375,17 +374,10 @@ methods: { onSubmit: function() { var this_this = this; + axios.post('{{ route('shop.checkout.check.coupons') }}', { code: this_this.code }).then(function(response) { - this_this.end_rule_present = response.data.end_other_rules; - this_this.discount_amount = response.data.formatted_discount; - this_this.rule_name = response.data.rule.name; - this_this.free_shipping = response.data.rule.free_shipping; - this_this.new_grand_total = response.data.formatted_new_grand_total; - this_this.non_coupon_able = false; - this_this.coupon_able = true; - this_this.discount_code = this_this.code; }).catch(function(error) { }); }, diff --git a/packages/Webkul/Shop/src/Resources/views/checkout/total/summary.blade.php b/packages/Webkul/Shop/src/Resources/views/checkout/total/summary.blade.php index bb7fcb3e7..ee471e47f 100755 --- a/packages/Webkul/Shop/src/Resources/views/checkout/total/summary.blade.php +++ b/packages/Webkul/Shop/src/Resources/views/checkout/total/summary.blade.php @@ -24,7 +24,7 @@ @endif - @if ($cart->discount_amount) + @if ($cart->discount_amount && $cart->discount_amount > 0)
@@ -36,15 +36,17 @@
-
-
-
-
- -
+ @if (! request()->is('checkout/cart')) +
+
+ +
+ +
- - + + +
-
+ @endif
\ No newline at end of file From c52238e45eee0e22206f3a4b4ad9679e20a55773 Mon Sep 17 00:00:00 2001 From: Prashant Singh Date: Fri, 14 Jun 2019 13:21:17 +0530 Subject: [PATCH 358/678] Cart rule frontend normalization --- packages/Webkul/Admin/src/Config/system.php | 18 ----- packages/Webkul/Checkout/src/Cart.php | 16 ++--- .../Webkul/Discount/src/Helpers/Discount.php | 67 +++++++++++++++++-- .../src/Http/Controllers/CartController.php | 16 +---- .../Http/Controllers/OnepageController.php | 14 +--- .../views/checkout/onepage.blade.php | 2 + .../views/checkout/total/summary.blade.php | 9 ++- 7 files changed, 82 insertions(+), 60 deletions(-) diff --git a/packages/Webkul/Admin/src/Config/system.php b/packages/Webkul/Admin/src/Config/system.php index cf4f86667..0e9c88925 100644 --- a/packages/Webkul/Admin/src/Config/system.php +++ b/packages/Webkul/Admin/src/Config/system.php @@ -79,24 +79,6 @@ return [ 'type' => 'boolean' ] ], - ], [ - 'key' => 'customer.settings.credit-max', - 'name' => 'admin::app.admin.system.credit-max', - 'sort' => 4, - 'fields' => [ - [ - 'name' => 'Use Credit Max', - 'title' => 'admin::app.admin.system.use-credit-max', - 'type' => 'boolean', - 'channel_based' => true - ], [ - 'name' => 'Credit Max Value', - 'title' => 'admin::app.admin.system.credit-max-value', - 'type' => 'text', - 'validation' => 'decimal', - 'channel_based' => true - ] - ], ], [ 'key' => 'general', 'name' => 'admin::app.admin.system.general', diff --git a/packages/Webkul/Checkout/src/Cart.php b/packages/Webkul/Checkout/src/Cart.php index ee7a23625..4f3a30ab0 100755 --- a/packages/Webkul/Checkout/src/Cart.php +++ b/packages/Webkul/Checkout/src/Cart.php @@ -1305,13 +1305,13 @@ class Cart { * * @return void */ - public function removeDiscount() + public function clearDiscount() { $cartItems = $this->getCart()->items; foreach($cartItems as $item) { $item->update([ - 'coupon_code' => null, + 'coupon_code' => NULL, 'discount_percent' => 0, 'discount_amount' => 0, 'base_discount_amount' => 0 @@ -1319,7 +1319,7 @@ class Cart { } $this->getCart()->update([ - 'coupon_code' => null, + 'coupon_code' => NULL, 'discount_amount' => 0, 'base_discount_amount' => 0 ]); @@ -1327,12 +1327,12 @@ class Cart { return true; } - public function removeCoupon() - { - $result = $this->discount->removeCoupon(); + // public function removeCoupon() + // { + // $result = $this->discount->removeCoupon(); - return $result; - } + // return $result; + // } public function leastWorthItem() { diff --git a/packages/Webkul/Discount/src/Helpers/Discount.php b/packages/Webkul/Discount/src/Helpers/Discount.php index 3fb200e42..e033433af 100644 --- a/packages/Webkul/Discount/src/Helpers/Discount.php +++ b/packages/Webkul/Discount/src/Helpers/Discount.php @@ -38,6 +38,23 @@ class Discount public function applyNonCouponAbleRule() { + $cart = \Cart::getCart(); + + $previousRule = $this->cartRuleCart->findWhere([ + 'cart_id' => $cart->id + ]); + + if ($previousRule->count()) { + $previousRule = $previousRule->first()->cart_rule; + + if ($previousRule->use_coupon) { + + return 'false'; + } + } else { + \Cart::clearDiscount(); + } + if (auth()->guard('customer')->check()) { $nonCouponAbleRules = $this->cartRule->findWhere([ 'use_coupon' => 0, @@ -104,6 +121,17 @@ class Discount if ($rule['rule']->id == $leastId) { $rule['used_coupon'] = false; + foreach (\Cart::getCart()->items as $item) { + if ($item->id == $itemId['item_id']) { + $item->update([ + 'discount_amount' => array_first($canBeApplied)['discount'], + 'base_discount_amount' => array_first($canBeApplied)['discount'] + ]); + + break; + } + } + $this->save($rule['rule']); return $rule; @@ -113,8 +141,6 @@ class Discount } if ($canBeApplied->count()) { - $this->save(array_first($canBeApplied)['rule']); - $itemId = array_first($canBeApplied); foreach (\Cart::getCart()->items as $item) { @@ -128,14 +154,18 @@ class Discount } } + $this->save(array_first($canBeApplied)['rule']); + return array_first($canBeApplied); } else { - return false; + return 'false'; } } public function applyCouponAbleRule($code) { + $cart = \Cart::getCart(); + if (auth()->guard('customer')->check()) { $couponAbleRules = $this->cartRule->findWhere([ 'use_coupon' => 1, @@ -256,13 +286,20 @@ class Discount $itemId = array_first($canBeApplied); - foreach (\Cart::getCart()->items as $item) { + foreach ($cart->items as $item) { if ($item->id == $itemId['item_id']) { $item->update([ 'discount_amount' => array_first($canBeApplied)['discount'], - 'base_discount_amount' => array_first($canBeApplied)['discount'] + 'base_discount_amount' => array_first($canBeApplied)['discount'], + 'coupon_code' => $rule->coupons->code ]); + $cart->update([ + 'coupon_code' => $rule->coupons->code + ]); + + \Cart::collectTotals(); + break; } } @@ -385,6 +422,26 @@ class Discount return false; } + /** + * Removes the cart rule from the cart + */ + public function removeRule() + { + $cart = Cart::getCart(); + + $appliedRule = $this->cartRuleCart->findWhere([ + 'cart_id' => $cart->id + ]); + + if ($appliedRule->count() == 0) { + Cart::clearDiscount(); + + Cart::collectTotals(); + } + + return true; + } + public function removeCoupon() { $cart = \Cart::getCart(); diff --git a/packages/Webkul/Shop/src/Http/Controllers/CartController.php b/packages/Webkul/Shop/src/Http/Controllers/CartController.php index 1d5da6825..77ad39612 100755 --- a/packages/Webkul/Shop/src/Http/Controllers/CartController.php +++ b/packages/Webkul/Shop/src/Http/Controllers/CartController.php @@ -82,21 +82,7 @@ class CartController extends Controller */ public function index() { - $cart = Cart::getCart(); - - $appliedRule = $this->cartRuleCart->findWhere([ - 'cart_id' => $cart->id - ]); - - if ($appliedRule->count() == 0) { - Cart::removeDiscount(); - - Cart::collectTotals(); - } - - Cart::applyNonCoupon(); - - return view($this->_config['view'])->with('cart', $cart); + return view($this->_config['view'])->with('cart', Cart::getCart()); } /** diff --git a/packages/Webkul/Shop/src/Http/Controllers/OnepageController.php b/packages/Webkul/Shop/src/Http/Controllers/OnepageController.php index 9cbedeb01..eaf2454d6 100755 --- a/packages/Webkul/Shop/src/Http/Controllers/OnepageController.php +++ b/packages/Webkul/Shop/src/Http/Controllers/OnepageController.php @@ -67,18 +67,6 @@ class OnepageController extends Controller if (Cart::hasError()) return redirect()->route('shop.checkout.cart.index'); - $cart = Cart::getCart(); - - $appliedRule = $this->cartRuleCart->findWhere([ - 'cart_id' => $cart->id - ]); - - if ($appliedRule->count() == 0) { - Cart::removeDiscount(); - - Cart::collectTotals(); - } - Cart::applyNonCoupon(); return view($this->_config['view'])->with('cart', Cart::getCart()); @@ -133,7 +121,7 @@ class OnepageController extends Controller if (Cart::hasError() || !$shippingMethod || !Cart::saveShippingMethod($shippingMethod)) return response()->json(['redirect_url' => route('shop.checkout.cart.index')], 403); - Cart::applyNonCoupon(); + Cart::applyNonCoupon(); Cart::collectTotals(); 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 a16e3b747..99ab1ac54 100755 --- a/packages/Webkul/Shop/src/Resources/views/checkout/onepage.blade.php +++ b/packages/Webkul/Shop/src/Resources/views/checkout/onepage.blade.php @@ -378,7 +378,9 @@ axios.post('{{ route('shop.checkout.check.coupons') }}', { code: this_this.code }).then(function(response) { + console.log(response.data); }).catch(function(error) { + console.log(error.data); }); }, } diff --git a/packages/Webkul/Shop/src/Resources/views/checkout/total/summary.blade.php b/packages/Webkul/Shop/src/Resources/views/checkout/total/summary.blade.php index ee471e47f..b0cdc4f81 100755 --- a/packages/Webkul/Shop/src/Resources/views/checkout/total/summary.blade.php +++ b/packages/Webkul/Shop/src/Resources/views/checkout/total/summary.blade.php @@ -36,7 +36,7 @@ - @if (! request()->is('checkout/cart')) + @if (! request()->is('checkout/cart') && ! $cart->coupon_code)
@@ -48,5 +48,12 @@
+ @else +
+
+ + +
+
@endif \ No newline at end of file From 0bdd03b331bef86d412ca70e8532c8776e6296f9 Mon Sep 17 00:00:00 2001 From: rahul shukla Date: Fri, 14 Jun 2019 14:22:22 +0530 Subject: [PATCH 359/678] ticket 201 error & admin css for back icon --- packages/Webkul/Admin/publishable/assets/css/admin.css | 2 +- packages/Webkul/Admin/publishable/assets/mix-manifest.json | 2 +- packages/Webkul/Admin/src/Resources/assets/sass/app.scss | 2 +- packages/Webkul/Product/src/Helpers/Price.php | 3 +++ 4 files changed, 6 insertions(+), 3 deletions(-) diff --git a/packages/Webkul/Admin/publishable/assets/css/admin.css b/packages/Webkul/Admin/publishable/assets/css/admin.css index c7abc5460..8c662c5b7 100755 --- a/packages/Webkul/Admin/publishable/assets/css/admin.css +++ b/packages/Webkul/Admin/publishable/assets/css/admin.css @@ -1 +1 @@ -@import url(https://fonts.googleapis.com/css?family=Montserrat:400,500);body{margin:0;color:#3a3a3a;font-family:Montserrat,sans-serif;font-size:14px;font-weight:500;position:static;min-height:100%;width:100%}::-webkit-scrollbar{width:12px}::-webkit-scrollbar-track{-webkit-box-shadow:inset 0 0 6px hsla(0,0%,100%,.3);border-radius:10px}::-webkit-scrollbar-thumb{border-radius:10px;-webkit-box-shadow:inset 0 0 6px rgba(0,0,0,.5)}.navbar-top{height:60px;background:#fff;font-size:0;-webkit-box-shadow:0 3px 6px 0 rgba(0,0,0,.05);box-shadow:0 3px 6px 0 rgba(0,0,0,.05);border-bottom:1px solid hsla(0,0%,64%,.2);position:fixed;left:0;right:0;z-index:5}.navbar-top .navbar-top-left{width:50%;height:60px;display:inline-block;vertical-align:middle}.navbar-top .navbar-top-left .brand-logo{padding:10px}.navbar-top .navbar-top-right{width:50%;height:60px;text-align:right;display:inline-block;vertical-align:middle}.navbar-top .navbar-top-right .profile-info{display:inline-block;vertical-align:middle;text-align:left;min-width:50px;padding:12px 0;margin:0 25px 0 30px;font-size:15px;cursor:pointer;position:relative}.navbar-top .navbar-top-right .profile-info .dropdown-list{top:63px}.navbar-top .navbar-top-right .profile-info .name{color:#000311;display:block;text-align:left}.navbar-top .navbar-top-right .profile-info .role{font-size:14px;color:#8e8e8e;display:block;text-align:left}.navbar-top .navbar-top-right .profile-info i.icon{margin-left:10px}.navbar-left{position:fixed;left:0;top:60px;width:90px;padding-top:20px;border-right:1px solid hsla(0,0%,64%,.2);height:auto;bottom:0;z-index:2}.navbar-left ul.menubar li.menu-item{padding:10px 5px;font-size:11px;text-align:center;text-transform:uppercase}.navbar-left ul.menubar li.menu-item a{color:#a2a2a2}.navbar-left ul.menubar li.menu-item.active a{color:#0041ff}.content-container{padding-left:90px;position:absolute;margin-top:60px;top:0;right:0;left:0;bottom:0;height:calc(100% - 60px);width:100%}.content-container .inner-section{height:100%}.content-container .aside-nav{width:280px;position:fixed;top:60px;bottom:0;border-right:1px solid hsla(0,0%,64%,.2);background:#f8f9fa;padding-top:10px;padding-bottom:10px;z-index:4}.content-container .aside-nav ul{overflow-y:auto;height:90%}.content-container .aside-nav a{padding:15px;display:block;color:#000311}.content-container .aside-nav .active a{background:#fff;border-top:1px solid hsla(0,0%,64%,.2);border-bottom:1px solid hsla(0,0%,64%,.2)}.content-container .aside-nav .active i{float:right}.content-container .content-wrapper{padding:25px;margin-left:305px}.content-container .content{margin-top:25px}.content-container .content.full-page{padding:25px}.content-container .content .page-header{display:inline-block;margin-bottom:20px;width:100%}.content-container .content .page-header .page-title{float:left}.content-container .content .page-header .page-title .back-link{float:left;margin-right:10px;width:24px;height:24px;cursor:pointer;margin-top:-2px}.content-container .content .page-header .page-title h1{margin-bottom:0;vertical-align:middle;display:inline-block;line-height:normal}.content-container .content .page-header .page-action{float:right}.content-container .content .page-header .page-action *{display:inline-block}.content-container .content .page-header .page-action a{margin-left:25px}.content-container .content .page-header .control-group{width:180px;display:inline-block;margin-bottom:0;margin-left:20px}.content-container .content .page-header .control{width:100%;margin:0}.content-container .content .page-content{width:100%;display:inline-block}.control-container{border:1px solid #c7c7c7;padding:10px;width:63%}.control-container .title-bar{display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;width:100%}.control-container .title-bar .icon{cursor:pointer}.control-container .title-bar .icon.cross-icon{height:24px;width:24px}.control-container .control-group{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;-ms-flex-line-pack:center;align-content:center;-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start;padding:10px;border:1px solid #c7c7c7;border-radius:2px;margin-right:15px;margin-bottom:0}.control-container .control-group::last-child{margin-right:0}.boolean-control-container{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:start;-ms-flex-pack:start;justify-content:flex-start;width:750px}.boolean-control-container .control-group{width:200px}.control-group label{width:70%}.control-group label .locale{float:right;color:#8e8e8e}.control-group .mce-tinymce{margin-top:10px;margin-bottom:5px}.dashboard .page-header{margin-bottom:0!important;padding-bottom:15px;border-bottom:1px solid hsla(0,0%,64%,.2)}.dashboard .page-content{margin-top:15px}.dashboard .card{height:445px;background:#fff;border:1px solid #e7e7e7;-webkit-box-shadow:0 5px 10px 2px rgba(0,0,0,.08);box-shadow:0 5px 10px 2px rgba(0,0,0,.08);border-radius:2px;padding:20px 0 0 20px}.dashboard .card .card-title{font-size:14px;color:#a2a2a2;letter-spacing:-.26px;text-transform:uppercase}.dashboard .card .card-info{width:100%;height:100%;display:inline-block}.dashboard .card .card-info.center{text-align:center}.dashboard .card .card-info ul li{border-bottom:1px solid hsla(0,0%,64%,.2);width:100%;display:inline-block;padding:10px 0;position:relative}.dashboard .card .card-info ul li .image{height:60px;width:60px;float:left;margin-right:15px}.dashboard .card .card-info ul li .image.product{background:#f2f2f2}.dashboard .card .card-info ul li .image img{width:100%}.dashboard .card .card-info ul li .description{margin-top:10px}.dashboard .card .card-info ul li .description .name{color:#0041ff}.dashboard .card .card-info ul li .description .info{color:#3a3a3a;margin-top:5px}.dashboard .card .card-info ul li .icon.angle-right-icon{position:absolute;right:30px;top:50%;margin-top:-8px}.dashboard .card .card-info ul li:last-child{border-bottom:0}.dashboard .card .card-info .no-result-found{margin-top:146px}.dashboard .card .card-info .no-result-found p{margin:0;color:#a2a2a2}.dashboard .dashboard-stats{display:grid;grid-template-columns:repeat(auto-fill,minmax(320px,1fr));grid-auto-rows:auto;grid-column-gap:30px;grid-row-gap:15px}.dashboard .dashboard-stats .dashboard-card{height:100px;background:#fff;border:1px solid #e7e7e7;-webkit-box-shadow:0 5px 10px 2px rgba(0,0,0,.08);box-shadow:0 5px 10px 2px rgba(0,0,0,.08);border-radius:5px;position:relative;padding:15px}.dashboard .dashboard-stats .dashboard-card .title{font-size:14px;color:#a2a2a2;text-transform:uppercase}.dashboard .dashboard-stats .dashboard-card .data{padding-top:13px;font-size:32px;color:#0041ff}.dashboard .dashboard-stats .dashboard-card .data .progress{font-size:14px;color:#8e8e8e;float:right;margin-top:9px}.dashboard .dashboard-stats .dashboard-card .data .progress .icon{vertical-align:middle}.dashboard .graph-stats{margin-top:30px;width:100%;display:inline-block}.dashboard .graph-stats .left-card-container{float:left;width:75%;padding-right:9px}.dashboard .graph-stats .right-card-container{float:left;width:25%;padding-left:21px}.dashboard .sale-stock{width:100%;display:inline-block;display:grid;grid-template-columns:repeat(auto-fill,minmax(435px,1fr));grid-auto-rows:auto;grid-column-gap:30px;grid-row-gap:15px;margin-top:30px}.sale-container .sale-section{font-size:16px}.sale-container .sale-section .secton-title{font-size:18px;color:#8e8e8e;padding:15px 0;border-bottom:1px solid hsla(0,0%,64%,.2)}.sale-container .sale-section .section-content{display:block;padding:20px 0}.sale-container .sale-section .section-content .row{display:block;padding:7px 0}.sale-container .sale-section .section-content .row .title{width:200px;color:#3a3a3a;letter-spacing:-.26px;display:inline-block}.sale-container .sale-section .section-content .row .value{color:#3a3a3a;letter-spacing:-.26px;display:inline-block}.sale-container .table .qty-row{display:block;margin-bottom:5px}.sale-container .table .qty-row:last-child{margin-bottom:0}.sale-container .table .radio{margin:0}.sale-container .sale-summary{margin-top:2%;height:130px;float:right}.sale-container .sale-summary tr td{padding:5px 8px}.sale-container .sale-summary tr.bold{font-weight:600;font-size:15px}.sale-container .sale-summary tr.border td{border-bottom:1px solid hsla(0,0%,64%,.2)}.stars{margin-top:5px}.stars .icon{width:16px;height:16px}.export-import{cursor:pointer}.export-import .export-icon,.export-import .import-icon{position:relative;top:10px}.export-import span{margin-left:2px}.configuration-image{position:relative;height:33px;width:33px;top:15px;border-radius:3px;margin-right:5px}.download{position:relative;height:24px!important;width:24px!important;top:12px;margin-right:10px}.aside-nav-toggle{height:48px;width:100%;padding-top:15px;border-top:1px solid hsla(0,0%,64%,.2)}.aside-nav-toggle .close-icon,.aside-nav-toggle .open-icon{position:absolute;cursor:pointer;left:45%}.aside-nav-toggle.open{display:none}.linked-product-search-result{-webkit-box-shadow:0 2px 4px 0 rgba(0,0,0,.16),0 0 9px 0 rgba(0,0,0,.16);box-shadow:0 2px 4px 0 rgba(0,0,0,.16),0 0 9px 0 rgba(0,0,0,.16);z-index:10;text-align:left;border-radius:3px;background-color:#fff;width:70%;max-height:200px;overflow-y:auto}.linked-product-search-result li{padding:10px;border-bottom:1px solid #e8e8e8;cursor:pointer}.rtl{direction:rtl}.rtl .navbar-top .navbar-top-right{text-align:left}.rtl .navbar-top .navbar-top-right .profile-info{margin:0 30px 0 25px}.rtl .navbar-top .navbar-top-right .profile-info i.icon{margin-left:0;margin-right:10px}.rtl .navbar-left{border-left:1px solid hsla(0,0%,64%,.2);border-right:none;left:calc(100% - 90px)}.rtl .content-container{padding-right:90px;padding-left:0}.rtl .content-container .content .page-header .page-title{float:right}.rtl .content-container .content .page-header .page-action{float:left}.rtl .content-container .content .page-header .page-action a{margin-left:0}.rtl .content-container .content .page-header .control-group{margin-right:20px;margin-left:0}.rtl .content-container .content .page-header .control-group.date:after{margin-top:6px;position:absolute;margin-right:-35px}.rtl .content-container .content .page-header .control-group.date:last-child{margin-left:0}.rtl .content-container .content-wrapper{padding:25px 305px 25px 25px;margin-left:0}.rtl .content-container .aside-nav .active i{float:left;-webkit-transform:rotate(180deg);transform:rotate(180deg)}.rtl .dashboard .dashboard-stats .dashboard-card .data span{float:left}.rtl .dashboard .card{padding:20px 20px 0 0}.rtl .dashboard .card .card-info ul li .image{float:right;margin-right:0;margin-left:15px}.rtl .dashboard .card .card-info ul li .icon.angle-right-icon{left:30px;right:auto;-webkit-transform:rotate(180deg);transform:rotate(180deg)}.rtl .dashboard .graph-stats .left-card-container{float:right;padding-right:0}.rtl .dashboard .graph-stats .right-card-container{float:right;padding-left:0;padding-right:30px}.rtl .sale-container .sale-summary{float:left}.rtl .grid-container .filter-row-one .search-filter{border:2px solid #c7c7c7;border-radius:2px}.rtl .grid-container .filter-row-one .search-filter .control{border:none;padding-right:10px}.rtl .grid-container .filter-row-one .search-filter .icon-wrapper{border:none;padding-top:2px;padding-right:5px;border-right:2px solid #c7c7c7;border-radius:0}.rtl .grid-container .filter-row-two .filter-tag .icon.cross-icon,.rtl .grid-container .filter-row-two .filter-tag .wrapper{margin-right:10px;margin-left:0}.rtl .grid-container .filter-row-one .dropdown-filters{right:unset;left:25px}.rtl .grid-container .filter-wrapper .filter-row-one .dropdown-filters .more-filters .dropdown-toggle .dropdown-header span{padding-right:5px}.rtl .grid-container .table tbody td.action a:first-child{margin-left:10px;margin-right:0}.rtl .table table{text-align:right}.rtl .table table .massaction-remove{margin-right:5px!important;margin-left:10px}.rtl .table table .btn.btn-primary{margin-right:10px!important}.rtl .dropdown-list.bottom-right{left:0;right:auto}.rtl .dropdown-list .dropdown-container{text-align:right}.rtl .accordian .accordian-header .icon{float:left}.rtl .tree-container .tree-item{padding-right:30px}.rtl .tree-container .tree-item .expand-icon,.rtl .tree-container .tree-item .folder-icon{margin-left:10px;margin-right:0}.rtl .tree-container>.tree-item{padding-right:0}.rtl .radio .radio-view{margin-left:5px}.rtl .image-wrapper .image-item{margin-right:0;margin-left:20px}.rtl .image-wrapper .image-item .remove-image{margin-right:0}.rtl .control-group label.required:before{content:"*";color:#fc6868;font-weight:700}.rtl .control-group label.required:after{content:none}.rtl .control-group label .locale{float:left}.rtl .control-group.date:after{margin-top:15px;position:absolute;margin-right:-35px}.rtl .pagination .page-item .icon{-webkit-transform:rotate(180deg);transform:rotate(180deg)}.pagination{margin-top:30px} \ No newline at end of file +@import url(https://fonts.googleapis.com/css?family=Montserrat:400,500);body{margin:0;color:#3a3a3a;font-family:Montserrat,sans-serif;font-size:14px;font-weight:500;position:static;min-height:100%;width:100%}::-webkit-scrollbar{width:12px}::-webkit-scrollbar-track{-webkit-box-shadow:inset 0 0 6px hsla(0,0%,100%,.3);border-radius:10px}::-webkit-scrollbar-thumb{border-radius:10px;-webkit-box-shadow:inset 0 0 6px rgba(0,0,0,.5)}.navbar-top{height:60px;background:#fff;font-size:0;-webkit-box-shadow:0 3px 6px 0 rgba(0,0,0,.05);box-shadow:0 3px 6px 0 rgba(0,0,0,.05);border-bottom:1px solid hsla(0,0%,64%,.2);position:fixed;left:0;right:0;z-index:5}.navbar-top .navbar-top-left{width:50%;height:60px;display:inline-block;vertical-align:middle}.navbar-top .navbar-top-left .brand-logo{padding:10px}.navbar-top .navbar-top-right{width:50%;height:60px;text-align:right;display:inline-block;vertical-align:middle}.navbar-top .navbar-top-right .profile-info{display:inline-block;vertical-align:middle;text-align:left;min-width:50px;padding:12px 0;margin:0 25px 0 30px;font-size:15px;cursor:pointer;position:relative}.navbar-top .navbar-top-right .profile-info .dropdown-list{top:63px}.navbar-top .navbar-top-right .profile-info .name{color:#000311;display:block;text-align:left}.navbar-top .navbar-top-right .profile-info .role{font-size:14px;color:#8e8e8e;display:block;text-align:left}.navbar-top .navbar-top-right .profile-info i.icon{margin-left:10px}.navbar-left{position:fixed;left:0;top:60px;width:90px;padding-top:20px;border-right:1px solid hsla(0,0%,64%,.2);height:auto;bottom:0;z-index:2}.navbar-left ul.menubar li.menu-item{padding:10px 5px;font-size:11px;text-align:center;text-transform:uppercase}.navbar-left ul.menubar li.menu-item a{color:#a2a2a2}.navbar-left ul.menubar li.menu-item.active a{color:#0041ff}.content-container{padding-left:90px;position:absolute;margin-top:60px;top:0;right:0;left:0;bottom:0;height:calc(100% - 60px);width:100%}.content-container .inner-section{height:100%}.content-container .aside-nav{width:280px;position:fixed;top:60px;bottom:0;border-right:1px solid hsla(0,0%,64%,.2);background:#f8f9fa;padding-top:10px;padding-bottom:10px;z-index:4}.content-container .aside-nav ul{overflow-y:auto;height:90%}.content-container .aside-nav a{padding:15px;display:block;color:#000311}.content-container .aside-nav .active a{background:#fff;border-top:1px solid hsla(0,0%,64%,.2);border-bottom:1px solid hsla(0,0%,64%,.2)}.content-container .aside-nav .active i{float:right}.content-container .content-wrapper{padding:25px;margin-left:305px}.content-container .content{margin-top:25px}.content-container .content.full-page{padding:25px}.content-container .content .page-header{display:inline-block;margin-bottom:20px;width:100%}.content-container .content .page-header .page-title{float:left}.content-container .content .page-header .page-title .back-link{float:left;margin-right:10px;width:24px;height:24px;cursor:pointer;margin-top:5px}.content-container .content .page-header .page-title h1{margin-bottom:0;vertical-align:middle;display:inline-block;line-height:normal}.content-container .content .page-header .page-action{float:right}.content-container .content .page-header .page-action *{display:inline-block}.content-container .content .page-header .page-action a{margin-left:25px}.content-container .content .page-header .control-group{width:180px;display:inline-block;margin-bottom:0;margin-left:20px}.content-container .content .page-header .control{width:100%;margin:0}.content-container .content .page-content{width:100%;display:inline-block}.control-container{border:1px solid #c7c7c7;padding:10px;width:63%}.control-container .title-bar{display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;width:100%}.control-container .title-bar .icon{cursor:pointer}.control-container .title-bar .icon.cross-icon{height:24px;width:24px}.control-container .control-group{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;-ms-flex-line-pack:center;align-content:center;-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start;padding:10px;border:1px solid #c7c7c7;border-radius:2px;margin-right:15px;margin-bottom:0}.control-container .control-group::last-child{margin-right:0}.boolean-control-container{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:start;-ms-flex-pack:start;justify-content:flex-start;width:750px}.boolean-control-container .control-group{width:200px}.control-group label{width:70%}.control-group label .locale{float:right;color:#8e8e8e}.control-group .mce-tinymce{margin-top:10px;margin-bottom:5px}.dashboard .page-header{margin-bottom:0!important;padding-bottom:15px;border-bottom:1px solid hsla(0,0%,64%,.2)}.dashboard .page-content{margin-top:15px}.dashboard .card{height:445px;background:#fff;border:1px solid #e7e7e7;-webkit-box-shadow:0 5px 10px 2px rgba(0,0,0,.08);box-shadow:0 5px 10px 2px rgba(0,0,0,.08);border-radius:2px;padding:20px 0 0 20px}.dashboard .card .card-title{font-size:14px;color:#a2a2a2;letter-spacing:-.26px;text-transform:uppercase}.dashboard .card .card-info{width:100%;height:100%;display:inline-block}.dashboard .card .card-info.center{text-align:center}.dashboard .card .card-info ul li{border-bottom:1px solid hsla(0,0%,64%,.2);width:100%;display:inline-block;padding:10px 0;position:relative}.dashboard .card .card-info ul li .image{height:60px;width:60px;float:left;margin-right:15px}.dashboard .card .card-info ul li .image.product{background:#f2f2f2}.dashboard .card .card-info ul li .image img{width:100%}.dashboard .card .card-info ul li .description{margin-top:10px}.dashboard .card .card-info ul li .description .name{color:#0041ff}.dashboard .card .card-info ul li .description .info{color:#3a3a3a;margin-top:5px}.dashboard .card .card-info ul li .icon.angle-right-icon{position:absolute;right:30px;top:50%;margin-top:-8px}.dashboard .card .card-info ul li:last-child{border-bottom:0}.dashboard .card .card-info .no-result-found{margin-top:146px}.dashboard .card .card-info .no-result-found p{margin:0;color:#a2a2a2}.dashboard .dashboard-stats{display:grid;grid-template-columns:repeat(auto-fill,minmax(320px,1fr));grid-auto-rows:auto;grid-column-gap:30px;grid-row-gap:15px}.dashboard .dashboard-stats .dashboard-card{height:100px;background:#fff;border:1px solid #e7e7e7;-webkit-box-shadow:0 5px 10px 2px rgba(0,0,0,.08);box-shadow:0 5px 10px 2px rgba(0,0,0,.08);border-radius:5px;position:relative;padding:15px}.dashboard .dashboard-stats .dashboard-card .title{font-size:14px;color:#a2a2a2;text-transform:uppercase}.dashboard .dashboard-stats .dashboard-card .data{padding-top:13px;font-size:32px;color:#0041ff}.dashboard .dashboard-stats .dashboard-card .data .progress{font-size:14px;color:#8e8e8e;float:right;margin-top:9px}.dashboard .dashboard-stats .dashboard-card .data .progress .icon{vertical-align:middle}.dashboard .graph-stats{margin-top:30px;width:100%;display:inline-block}.dashboard .graph-stats .left-card-container{float:left;width:75%;padding-right:9px}.dashboard .graph-stats .right-card-container{float:left;width:25%;padding-left:21px}.dashboard .sale-stock{width:100%;display:inline-block;display:grid;grid-template-columns:repeat(auto-fill,minmax(435px,1fr));grid-auto-rows:auto;grid-column-gap:30px;grid-row-gap:15px;margin-top:30px}.sale-container .sale-section{font-size:16px}.sale-container .sale-section .secton-title{font-size:18px;color:#8e8e8e;padding:15px 0;border-bottom:1px solid hsla(0,0%,64%,.2)}.sale-container .sale-section .section-content{display:block;padding:20px 0}.sale-container .sale-section .section-content .row{display:block;padding:7px 0}.sale-container .sale-section .section-content .row .title{width:200px;color:#3a3a3a;letter-spacing:-.26px;display:inline-block}.sale-container .sale-section .section-content .row .value{color:#3a3a3a;letter-spacing:-.26px;display:inline-block}.sale-container .table .qty-row{display:block;margin-bottom:5px}.sale-container .table .qty-row:last-child{margin-bottom:0}.sale-container .table .radio{margin:0}.sale-container .sale-summary{margin-top:2%;height:130px;float:right}.sale-container .sale-summary tr td{padding:5px 8px}.sale-container .sale-summary tr.bold{font-weight:600;font-size:15px}.sale-container .sale-summary tr.border td{border-bottom:1px solid hsla(0,0%,64%,.2)}.stars{margin-top:5px}.stars .icon{width:16px;height:16px}.export-import{cursor:pointer}.export-import .export-icon,.export-import .import-icon{position:relative;top:10px}.export-import span{margin-left:2px}.configuration-image{position:relative;height:33px;width:33px;top:15px;border-radius:3px;margin-right:5px}.download{position:relative;height:24px!important;width:24px!important;top:12px;margin-right:10px}.aside-nav-toggle{height:48px;width:100%;padding-top:15px;border-top:1px solid hsla(0,0%,64%,.2)}.aside-nav-toggle .close-icon,.aside-nav-toggle .open-icon{position:absolute;cursor:pointer;left:45%}.aside-nav-toggle.open{display:none}.linked-product-search-result{-webkit-box-shadow:0 2px 4px 0 rgba(0,0,0,.16),0 0 9px 0 rgba(0,0,0,.16);box-shadow:0 2px 4px 0 rgba(0,0,0,.16),0 0 9px 0 rgba(0,0,0,.16);z-index:10;text-align:left;border-radius:3px;background-color:#fff;width:70%;max-height:200px;overflow-y:auto}.linked-product-search-result li{padding:10px;border-bottom:1px solid #e8e8e8;cursor:pointer}.rtl{direction:rtl}.rtl .navbar-top .navbar-top-right{text-align:left}.rtl .navbar-top .navbar-top-right .profile-info{margin:0 30px 0 25px}.rtl .navbar-top .navbar-top-right .profile-info i.icon{margin-left:0;margin-right:10px}.rtl .navbar-left{border-left:1px solid hsla(0,0%,64%,.2);border-right:none;left:calc(100% - 90px)}.rtl .content-container{padding-right:90px;padding-left:0}.rtl .content-container .content .page-header .page-title{float:right}.rtl .content-container .content .page-header .page-action{float:left}.rtl .content-container .content .page-header .page-action a{margin-left:0}.rtl .content-container .content .page-header .control-group{margin-right:20px;margin-left:0}.rtl .content-container .content .page-header .control-group.date:after{margin-top:6px;position:absolute;margin-right:-35px}.rtl .content-container .content .page-header .control-group.date:last-child{margin-left:0}.rtl .content-container .content-wrapper{padding:25px 305px 25px 25px;margin-left:0}.rtl .content-container .aside-nav .active i{float:left;-webkit-transform:rotate(180deg);transform:rotate(180deg)}.rtl .dashboard .dashboard-stats .dashboard-card .data span{float:left}.rtl .dashboard .card{padding:20px 20px 0 0}.rtl .dashboard .card .card-info ul li .image{float:right;margin-right:0;margin-left:15px}.rtl .dashboard .card .card-info ul li .icon.angle-right-icon{left:30px;right:auto;-webkit-transform:rotate(180deg);transform:rotate(180deg)}.rtl .dashboard .graph-stats .left-card-container{float:right;padding-right:0}.rtl .dashboard .graph-stats .right-card-container{float:right;padding-left:0;padding-right:30px}.rtl .sale-container .sale-summary{float:left}.rtl .grid-container .filter-row-one .search-filter{border:2px solid #c7c7c7;border-radius:2px}.rtl .grid-container .filter-row-one .search-filter .control{border:none;padding-right:10px}.rtl .grid-container .filter-row-one .search-filter .icon-wrapper{border:none;padding-top:2px;padding-right:5px;border-right:2px solid #c7c7c7;border-radius:0}.rtl .grid-container .filter-row-two .filter-tag .icon.cross-icon,.rtl .grid-container .filter-row-two .filter-tag .wrapper{margin-right:10px;margin-left:0}.rtl .grid-container .filter-row-one .dropdown-filters{right:unset;left:25px}.rtl .grid-container .filter-wrapper .filter-row-one .dropdown-filters .more-filters .dropdown-toggle .dropdown-header span{padding-right:5px}.rtl .grid-container .table tbody td.action a:first-child{margin-left:10px;margin-right:0}.rtl .table table{text-align:right}.rtl .table table .massaction-remove{margin-right:5px!important;margin-left:10px}.rtl .table table .btn.btn-primary{margin-right:10px!important}.rtl .dropdown-list.bottom-right{left:0;right:auto}.rtl .dropdown-list .dropdown-container{text-align:right}.rtl .accordian .accordian-header .icon{float:left}.rtl .tree-container .tree-item{padding-right:30px}.rtl .tree-container .tree-item .expand-icon,.rtl .tree-container .tree-item .folder-icon{margin-left:10px;margin-right:0}.rtl .tree-container>.tree-item{padding-right:0}.rtl .radio .radio-view{margin-left:5px}.rtl .image-wrapper .image-item{margin-right:0;margin-left:20px}.rtl .image-wrapper .image-item .remove-image{margin-right:0}.rtl .control-group label.required:before{content:"*";color:#fc6868;font-weight:700}.rtl .control-group label.required:after{content:none}.rtl .control-group label .locale{float:left}.rtl .control-group.date:after{margin-top:15px;position:absolute;margin-right:-35px}.rtl .pagination .page-item .icon{-webkit-transform:rotate(180deg);transform:rotate(180deg)}.pagination{margin-top:30px} \ No newline at end of file diff --git a/packages/Webkul/Admin/publishable/assets/mix-manifest.json b/packages/Webkul/Admin/publishable/assets/mix-manifest.json index 558987f5a..87a1c6755 100755 --- a/packages/Webkul/Admin/publishable/assets/mix-manifest.json +++ b/packages/Webkul/Admin/publishable/assets/mix-manifest.json @@ -1,4 +1,4 @@ { "/js/admin.js": "/js/admin.js?id=301713f31cb0ba5260b5", - "/css/admin.css": "/css/admin.css?id=79d1d08f945a3e35e1c7" + "/css/admin.css": "/css/admin.css?id=226f12bd8a9461ca69f8" } diff --git a/packages/Webkul/Admin/src/Resources/assets/sass/app.scss b/packages/Webkul/Admin/src/Resources/assets/sass/app.scss index 292f65ed6..7c372823c 100755 --- a/packages/Webkul/Admin/src/Resources/assets/sass/app.scss +++ b/packages/Webkul/Admin/src/Resources/assets/sass/app.scss @@ -218,7 +218,7 @@ body { width: 24px; height: 24px; cursor: pointer; - margin-top: -2px; + margin-top: 5px; } h1 { diff --git a/packages/Webkul/Product/src/Helpers/Price.php b/packages/Webkul/Product/src/Helpers/Price.php index f7b25cd9c..da28d0193 100755 --- a/packages/Webkul/Product/src/Helpers/Price.php +++ b/packages/Webkul/Product/src/Helpers/Price.php @@ -87,6 +87,9 @@ class Price extends AbstractProduct $finalPrice[] = $price->final_price; } + if (empty($finalPrice)) + return $price[$product->id] = 0; + return $price[$product->id] = min($finalPrice); } From 5b81968baeb1d039fcc7b63334e370597150cc83 Mon Sep 17 00:00:00 2001 From: jitendra Date: Fri, 14 Jun 2019 14:59:29 +0530 Subject: [PATCH 360/678] Fixed checkout issue --- .../views/checkout/onepage.blade.php | 212 ++++-------------- 1 file changed, 41 insertions(+), 171 deletions(-) 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 435920b9a..196349745 100755 --- a/packages/Webkul/Shop/src/Resources/views/checkout/onepage.blade.php +++ b/packages/Webkul/Shop/src/Resources/views/checkout/onepage.blade.php @@ -9,66 +9,6 @@ @endsection @push('scripts') - - @endpush \ No newline at end of file From 3f814d9253e01aa511d57929f493917d6d296592 Mon Sep 17 00:00:00 2001 From: jitendra Date: Fri, 14 Jun 2019 15:13:20 +0530 Subject: [PATCH 361/678] Fixed checkout issue --- .../views/checkout/onepage.blade.php | 23 +++++++----- .../views/checkout/total/summary.blade.php | 36 ++++++++++--------- 2 files changed, 34 insertions(+), 25 deletions(-) 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 196349745..a2d7294fb 100755 --- a/packages/Webkul/Shop/src/Resources/views/checkout/onepage.blade.php +++ b/packages/Webkul/Shop/src/Resources/views/checkout/onepage.blade.php @@ -83,17 +83,17 @@
- +
From 1e865986c4712255d49005aee1be0a85e95691e3 Mon Sep 17 00:00:00 2001 From: Prashant Singh Date: Fri, 14 Jun 2019 19:24:15 +0530 Subject: [PATCH 364/678] improved conditions check in applying cart rules --- packages/Webkul/Admin/src/Http/routes.php | 2 +- .../Admin/src/Resources/lang/en/app.php | 2 +- packages/Webkul/Checkout/src/Cart.php | 10 ++++---- .../Webkul/Discount/src/Helpers/Discount.php | 12 ++++++++++ packages/Webkul/Shop/src/Http/routes.php | 2 -- .../views/checkout/onepage.blade.php | 24 ++++++++++++++++++- .../views/checkout/total/summary.blade.php | 2 +- 7 files changed, 43 insertions(+), 11 deletions(-) diff --git a/packages/Webkul/Admin/src/Http/routes.php b/packages/Webkul/Admin/src/Http/routes.php index c9de0b06d..13428def2 100755 --- a/packages/Webkul/Admin/src/Http/routes.php +++ b/packages/Webkul/Admin/src/Http/routes.php @@ -649,7 +649,7 @@ Route::group(['middleware' => ['web']], function () { // Route::post('fetch/options', 'Webkul\Discount\Http\Controllers\CatalogRuleController@fetchAttributeOptions')->name('admin.catalog-rule.options'); - Route::get('/cart-rule', 'Webkul\Discount\Http\Controllers\CartRuleController@index')->defaults('_config', [ + Route::get('/cart-rules', 'Webkul\Discount\Http\Controllers\CartRuleController@index')->defaults('_config', [ 'view' => 'admin::promotions.cart-rule.index' ])->name('admin.cart-rule.index'); diff --git a/packages/Webkul/Admin/src/Resources/lang/en/app.php b/packages/Webkul/Admin/src/Resources/lang/en/app.php index f1f99b62f..182256147 100755 --- a/packages/Webkul/Admin/src/Resources/lang/en/app.php +++ b/packages/Webkul/Admin/src/Resources/lang/en/app.php @@ -799,7 +799,7 @@ return [ 'promotion' => [ 'catalog-rule' => 'Catalog Rules', - 'cart-rule' => 'Cart Rule', + 'cart-rule' => 'Cart Rules', 'add-catalog-rule' => 'Add Catalog Rule', 'add-cart-rule' => 'Add Cart Rule', 'edit-cart-rule' => 'Edit Cart Rule', diff --git a/packages/Webkul/Checkout/src/Cart.php b/packages/Webkul/Checkout/src/Cart.php index bd147d87f..6bdbbffad 100755 --- a/packages/Webkul/Checkout/src/Cart.php +++ b/packages/Webkul/Checkout/src/Cart.php @@ -1277,12 +1277,12 @@ class Cart { return true; } - // public function removeCoupon() - // { - // $result = $this->discount->removeCoupon(); + public function removeCoupon() + { + $result = $this->discount->removeCoupon(); - // return $result; - // } + return $result; + } public function leastWorthItem() { diff --git a/packages/Webkul/Discount/src/Helpers/Discount.php b/packages/Webkul/Discount/src/Helpers/Discount.php index e033433af..95296b841 100644 --- a/packages/Webkul/Discount/src/Helpers/Discount.php +++ b/packages/Webkul/Discount/src/Helpers/Discount.php @@ -369,10 +369,22 @@ class Discount if ($cart->items_qty >= $disc_threshold && $realQty >= $disc_quantity) { if ($action_type == config('pricerules.cart.validation.0')) { $amountDiscounted = $leastWorthItem['total'] * ($disc_amount / 100); + + if ($amountDiscounted > $leastWorthItem['total']) { + $amountDiscounted = $leastWorthItem['total']; + } } else if ($action_type == config('pricerules.cart.validation.1')) { $amountDiscounted = $disc_amount; + + if ($amountDiscounted > $leastWorthItem['total']) { + $amountDiscounted = $leastWorthItem['total']; + } } else if ($action_type == config('pricerules.cart.validation.2')) { $amountDiscounted = $disc_amount; + + if ($amountDiscounted > $leastWorthItem['total']) { + $amountDiscounted = $leastWorthItem['total']; + } } } diff --git a/packages/Webkul/Shop/src/Http/routes.php b/packages/Webkul/Shop/src/Http/routes.php index ac485a2c9..ac044d289 100755 --- a/packages/Webkul/Shop/src/Http/routes.php +++ b/packages/Webkul/Shop/src/Http/routes.php @@ -41,8 +41,6 @@ Route::group(['middleware' => ['web', 'locale', 'theme', 'currency']], function Route::post('checkout/check/coupons', 'Webkul\Shop\Http\Controllers\CartController@applyCoupon')->name('shop.checkout.check.coupons'); - Route::post('checkout/fetch/noncoupon', 'Webkul\Shop\Http\Controllers\CartController@getNonCouponAbleRule')->name('shop.checkout.fetch.non-coupon'); - Route::post('checkout/remove/coupon', 'Webkul\Shop\Http\Controllers\CartController@removeCoupon')->name('shop.checkout.remove.coupon'); //Cart Items Add 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 d9b240710..5fcde8616 100755 --- a/packages/Webkul/Shop/src/Resources/views/checkout/onepage.blade.php +++ b/packages/Webkul/Shop/src/Resources/views/checkout/onepage.blade.php @@ -388,6 +388,17 @@ console.log(error.data); }); }, + + removeCoupon: function () { + var this_this = this; + + axios.post('{{ route('shop.checkout.remove.coupon') }}') + .then(function(response) { + console.log(response.data); + }).catch(function(error) { + console.log(error.data); + }); + } } }) @@ -507,7 +518,7 @@ }, methods: { - onSubmit: function() { + onSubmit: function () { var this_this = this; axios.post('{{ route('shop.checkout.check.coupons') }}', { @@ -517,6 +528,17 @@ }).catch(function(error) { console.log(error.data); }); + }, + + removeCoupon: function () { + var this_this = this; + + axios.post('{{ route('shop.checkout.remove.coupon') }}') + .then(function(response) { + console.log(response.data); + }).catch(function(error) { + console.log(error.data); + }); } } }); diff --git a/packages/Webkul/Shop/src/Resources/views/checkout/total/summary.blade.php b/packages/Webkul/Shop/src/Resources/views/checkout/total/summary.blade.php index 1ffa9f9c4..91bc1ea4c 100755 --- a/packages/Webkul/Shop/src/Resources/views/checkout/total/summary.blade.php +++ b/packages/Webkul/Shop/src/Resources/views/checkout/total/summary.blade.php @@ -53,7 +53,7 @@
- +
@endif From bec9ebe7fbf3d7970dcf550122811ff5ee0794d1 Mon Sep 17 00:00:00 2001 From: Prashant Singh Date: Fri, 14 Jun 2019 19:52:58 +0530 Subject: [PATCH 365/678] coupon section fix in review-order component --- .../Discount/src/Config/rule-conditions.php | 2 +- .../Webkul/Discount/src/Helpers/Discount.php | 39 ++++++++++--------- .../views/checkout/onepage.blade.php | 14 +++++-- .../views/checkout/total/summary.blade.php | 8 ++-- 4 files changed, 37 insertions(+), 26 deletions(-) diff --git a/packages/Webkul/Discount/src/Config/rule-conditions.php b/packages/Webkul/Discount/src/Config/rule-conditions.php index 7719a72ab..974bc5e3b 100644 --- a/packages/Webkul/Discount/src/Config/rule-conditions.php +++ b/packages/Webkul/Discount/src/Config/rule-conditions.php @@ -75,7 +75,7 @@ return [ 0 => 'percent_of_product', 1 => 'fixed_amount', 2 => 'buy_a_get_b', - 3 => 'fixed_amount_cart' + // 3 => 'fixed_amount_cart' ], 'conditions' => [ diff --git a/packages/Webkul/Discount/src/Helpers/Discount.php b/packages/Webkul/Discount/src/Helpers/Discount.php index 95296b841..0c35342a2 100644 --- a/packages/Webkul/Discount/src/Helpers/Discount.php +++ b/packages/Webkul/Discount/src/Helpers/Discount.php @@ -435,25 +435,10 @@ class Discount } /** - * Removes the cart rule from the cart + * Removes the couponable rule from the current cart and cart rule cart + * + * @return boolean */ - public function removeRule() - { - $cart = Cart::getCart(); - - $appliedRule = $this->cartRuleCart->findWhere([ - 'cart_id' => $cart->id - ]); - - if ($appliedRule->count() == 0) { - Cart::clearDiscount(); - - Cart::collectTotals(); - } - - return true; - } - public function removeCoupon() { $cart = \Cart::getCart(); @@ -464,6 +449,24 @@ class Discount if ($existingRule->count()) { if ($existingRule->first()->delete()) { + + foreach ($cart->items as $item) { + if ($item->discount_amount > 0) { + $item->update([ + 'discount_amount' => 0, + 'base_discount_amount' => 0, + 'discount_percent' => 0, + 'coupon_code' => NULL + ]); + } + } + + $cart->update([ + 'coupon_code' => NULL, + 'discount_amount' => 0, + 'base_discount_amount' => 0 + ]); + return true; } else { return false; 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 5fcde8616..1bbd17ad1 100755 --- a/packages/Webkul/Shop/src/Resources/views/checkout/onepage.blade.php +++ b/packages/Webkul/Shop/src/Resources/views/checkout/onepage.blade.php @@ -496,7 +496,9 @@ code: '', - hide_discount: 1 + hide_discount: 1, + + coupon_used: false } }, @@ -507,6 +509,11 @@ for (var i in reviewHtml.staticRenderFns) { reviewTemplateRenderFns.push(reviewHtml.staticRenderFns[i]); } + + @if ($cart->coupon_code != null) + this.code = '{{ $cart->coupon_code }}'; + this.coupon_used = true; + @endif }, render: function(h) { @@ -524,7 +531,8 @@ axios.post('{{ route('shop.checkout.check.coupons') }}', { code: this_this.code }).then(function(response) { - console.log(response.data); + this_this.coupon_used = true; + this_this.code = ''; }).catch(function(error) { console.log(error.data); }); @@ -535,7 +543,7 @@ axios.post('{{ route('shop.checkout.remove.coupon') }}') .then(function(response) { - console.log(response.data); + this_this.coupon_used = false; }).catch(function(error) { console.log(error.data); }); diff --git a/packages/Webkul/Shop/src/Resources/views/checkout/total/summary.blade.php b/packages/Webkul/Shop/src/Resources/views/checkout/total/summary.blade.php index 91bc1ea4c..a3404acc9 100755 --- a/packages/Webkul/Shop/src/Resources/views/checkout/total/summary.blade.php +++ b/packages/Webkul/Shop/src/Resources/views/checkout/total/summary.blade.php @@ -37,9 +37,9 @@
- @if (! request()->is('checkout/cart') && ! $cart->coupon_code) + @if (! request()->is('checkout/cart'))
-
+
@@ -49,8 +49,8 @@
- @else -
+ +
From bb097be5576035ce17de29c141332793d05ce00e Mon Sep 17 00:00:00 2001 From: Prashant Singh Date: Fri, 14 Jun 2019 19:58:25 +0530 Subject: [PATCH 366/678] Added error message provision in the same when coupon application fails --- packages/Webkul/Shop/src/Resources/lang/en/app.php | 3 ++- .../Shop/src/Resources/views/checkout/onepage.blade.php | 8 +++++--- .../src/Resources/views/checkout/total/summary.blade.php | 2 ++ 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/packages/Webkul/Shop/src/Resources/lang/en/app.php b/packages/Webkul/Shop/src/Resources/lang/en/app.php index f27568335..2834e22c7 100755 --- a/packages/Webkul/Shop/src/Resources/lang/en/app.php +++ b/packages/Webkul/Shop/src/Resources/lang/en/app.php @@ -456,7 +456,8 @@ return [ 'new-grand-total' => 'New Grand Total', 'coupon' => 'Coupon', 'coupon-applied' => 'Coupon Applied', - 'remove-coupon' => 'Remove Coupon' + 'remove-coupon' => 'Remove Coupon', + 'cannot-apply-coupon' => 'Cannot Apply Coupon' ], 'success' => [ 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 1bbd17ad1..8d1e37478 100755 --- a/packages/Webkul/Shop/src/Resources/views/checkout/onepage.blade.php +++ b/packages/Webkul/Shop/src/Resources/views/checkout/onepage.blade.php @@ -498,7 +498,9 @@ hide_discount: 1, - coupon_used: false + coupon_used: false, + + error_message = '' } }, @@ -532,9 +534,8 @@ code: this_this.code }).then(function(response) { this_this.coupon_used = true; - this_this.code = ''; }).catch(function(error) { - console.log(error.data); + this_this.error_message = '{{ __('shop::app.onepage.total.cannot-apply-coupon') }}' }); }, @@ -544,6 +545,7 @@ axios.post('{{ route('shop.checkout.remove.coupon') }}') .then(function(response) { this_this.coupon_used = false; + this_this.code = ''; }).catch(function(error) { console.log(error.data); }); diff --git a/packages/Webkul/Shop/src/Resources/views/checkout/total/summary.blade.php b/packages/Webkul/Shop/src/Resources/views/checkout/total/summary.blade.php index a3404acc9..8bee0fe2e 100755 --- a/packages/Webkul/Shop/src/Resources/views/checkout/total/summary.blade.php +++ b/packages/Webkul/Shop/src/Resources/views/checkout/total/summary.blade.php @@ -45,6 +45,8 @@
+ @{{ error_message }} +
From 0188644fcedc6ef5af358f1985b279b515147054 Mon Sep 17 00:00:00 2001 From: Prashant Singh Date: Fri, 14 Jun 2019 20:04:32 +0530 Subject: [PATCH 367/678] Prepared standard responses when applying couponable rules --- packages/Webkul/Discount/src/Helpers/Discount.php | 12 +++++++++++- .../Shop/src/Http/Controllers/CartController.php | 13 +++++++++++++ 2 files changed, 24 insertions(+), 1 deletion(-) diff --git a/packages/Webkul/Discount/src/Helpers/Discount.php b/packages/Webkul/Discount/src/Helpers/Discount.php index 0c35342a2..a1d8b0b05 100644 --- a/packages/Webkul/Discount/src/Helpers/Discount.php +++ b/packages/Webkul/Discount/src/Helpers/Discount.php @@ -36,6 +36,11 @@ class Discount $this->cartRuleCart = $cartRuleCart; } + /** + * Applies the non couponable rule on the current cart + * + * @return mixed + */ public function applyNonCouponAbleRule() { $cart = \Cart::getCart(); @@ -162,6 +167,11 @@ class Discount } } + /** + * Applies the couponable rule on the current cart + * + * @return mixed + */ public function applyCouponAbleRule($code) { $cart = \Cart::getCart(); @@ -314,7 +324,7 @@ class Discount } /** - * This function checks whether the rule is getting applied on the current cart or noy + * This function checks whether the rule is getting applied on the current cart or not * * @return mixed */ diff --git a/packages/Webkul/Shop/src/Http/Controllers/CartController.php b/packages/Webkul/Shop/src/Http/Controllers/CartController.php index e163b30c2..f3ec0a27c 100755 --- a/packages/Webkul/Shop/src/Http/Controllers/CartController.php +++ b/packages/Webkul/Shop/src/Http/Controllers/CartController.php @@ -266,6 +266,19 @@ class CartController extends Controller $result = Cart::applyCoupon($code); + if ($result != null) { + return response()->json([ + 'success' => true, + 'message' => trans('shop::app.onepage.total.coupon-applied'), + 'result' => $result + ]); + } else { + return response()->json([ + 'success' => false, + 'message' => trans('shop::app.onepage.total.cannot-apply-coupon'), + 'result' => null + ]); + } return $result; } From c36950c609a830f061f5c0482cb415cf6244d7fc Mon Sep 17 00:00:00 2001 From: Prashant Singh Date: Fri, 14 Jun 2019 20:26:54 +0530 Subject: [PATCH 368/678] applied translation string in apply coupon responses --- .../Webkul/Shop/src/Http/Controllers/CartController.php | 5 +++-- .../Shop/src/Resources/views/checkout/onepage.blade.php | 8 +++++--- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/packages/Webkul/Shop/src/Http/Controllers/CartController.php b/packages/Webkul/Shop/src/Http/Controllers/CartController.php index f3ec0a27c..274e1939c 100755 --- a/packages/Webkul/Shop/src/Http/Controllers/CartController.php +++ b/packages/Webkul/Shop/src/Http/Controllers/CartController.php @@ -269,16 +269,17 @@ class CartController extends Controller if ($result != null) { return response()->json([ 'success' => true, - 'message' => trans('shop::app.onepage.total.coupon-applied'), + 'message' => trans('shop::app.checkout.onepage.total.coupon-applied'), 'result' => $result ]); } else { return response()->json([ 'success' => false, - 'message' => trans('shop::app.onepage.total.cannot-apply-coupon'), + 'message' => trans('shop::app.checkout.onepage.total.cannot-apply-coupon'), 'result' => null ]); } + return $result; } 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 8d1e37478..f59622a04 100755 --- a/packages/Webkul/Shop/src/Resources/views/checkout/onepage.blade.php +++ b/packages/Webkul/Shop/src/Resources/views/checkout/onepage.blade.php @@ -500,7 +500,7 @@ coupon_used: false, - error_message = '' + error_message: '' } }, @@ -534,8 +534,9 @@ code: this_this.code }).then(function(response) { this_this.coupon_used = true; + this_this.code = ''; }).catch(function(error) { - this_this.error_message = '{{ __('shop::app.onepage.total.cannot-apply-coupon') }}' + console.log(error.data); }); }, @@ -545,9 +546,10 @@ axios.post('{{ route('shop.checkout.remove.coupon') }}') .then(function(response) { this_this.coupon_used = false; - this_this.code = ''; }).catch(function(error) { console.log(error.data); + + this_this.error_message = '{{ __('shop::app.checkout.onepage.total.cannot-apply-coupon') }}' }); } } From 076f197de7fbe0e9d869a68a49bcd39a1cdd8663 Mon Sep 17 00:00:00 2001 From: rahul shukla Date: Fri, 14 Jun 2019 21:04:22 +0530 Subject: [PATCH 369/678] buy now issue --- .../src/Resources/views/products/view.blade.php | 13 ------------- .../products/view/configurable-options.blade.php | 3 +-- 2 files changed, 1 insertion(+), 15 deletions(-) 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 16f53e156..b2382da2e 100755 --- a/packages/Webkul/Shop/src/Resources/views/products/view.blade.php +++ b/packages/Webkul/Shop/src/Resources/views/products/view.blade.php @@ -205,19 +205,6 @@ } document.getElementById("quantity").value = quantity; - var buyNowLink = $('.btn.buynow').attr('data-href'); - var splitted = buyNowLink.split("/"); - lastItem = splitted[splitted.length - 2]; - - splitted.pop(); - splitted.pop(); - - var joined = splitted.join('/'); - - var newBuyNowUrl = joined + '/' + lastItem + '/' + quantity; - - $('.btn.buynow').attr('data-href', newBuyNowUrl); - event.preventDefault(); } 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 536f6a006..a1d91cb2f 100755 --- 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 @@ -148,14 +148,13 @@ if (this.selectedProductId != '' && buyNowLink) { var splitted = buyNowLink.split("/"); - splitted.pop(); splitted.pop(); lastItem = this.selectedProductId; var joined = splitted.join('/'); - var newBuyNowUrl = joined + '/' + lastItem + '/' + quantity; + var newBuyNowUrl = joined + '/' + lastItem; $('.btn.buynow').attr('data-href', newBuyNowUrl); } From 3a8b923f5c2d5c65a36aa45e5a63a79dfe1e8046 Mon Sep 17 00:00:00 2001 From: Prashant Singh Date: Fri, 14 Jun 2019 23:48:08 +0530 Subject: [PATCH 370/678] Discount rule --- .../Webkul/Discount/src/Helpers/Discount.php | 4 +-- .../views/checkout/onepage.blade.php | 10 +++++-- .../views/checkout/total/summary.blade.php | 26 ++++++++++++------- 3 files changed, 27 insertions(+), 13 deletions(-) diff --git a/packages/Webkul/Discount/src/Helpers/Discount.php b/packages/Webkul/Discount/src/Helpers/Discount.php index a1d8b0b05..cee384b68 100644 --- a/packages/Webkul/Discount/src/Helpers/Discount.php +++ b/packages/Webkul/Discount/src/Helpers/Discount.php @@ -403,8 +403,8 @@ class Discount $report['discount'] = $amountDiscounted; $report['action'] = $action_type; $report['formatted_discount'] = core()->formatPrice($amountDiscounted, $cart->cart_currency_code); - $report['new_grand_total'] = $cart->grand_total - $amountDiscounted; - $report['formatted_new_grand_total'] = core()->formatPrice($cart->grand_total - $amountDiscounted, $cart->cart_currency_code); + $report['grand_total'] = $cart->grand_total - $amountDiscounted; + $report['formatted_grand_total'] = core()->formatPrice($cart->grand_total - $amountDiscounted, $cart->cart_currency_code); $report['priority'] = $rule->priority; return $report; 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 f59622a04..071dbf16b 100755 --- a/packages/Webkul/Shop/src/Resources/views/checkout/onepage.blade.php +++ b/packages/Webkul/Shop/src/Resources/views/checkout/onepage.blade.php @@ -72,7 +72,7 @@
- +
@endif - @if ($cart->discount_amount && $cart->discount_amount > 0) -
- - -
- @endif -
+
discount_amount && $cart->discount_amount > 0) style="display: block;" @else style="display: none;" @endif> + + +
+ + +
- +
@@ -55,7 +63,7 @@
- +
@endif From 8d68be8e0746d29f89fa89d368adde5775f9e804 Mon Sep 17 00:00:00 2001 From: Prashant Singh Date: Sat, 15 Jun 2019 12:27:54 +0530 Subject: [PATCH 371/678] Rule condition discount calculation now working properly --- packages/Webkul/Checkout/src/Cart.php | 3 +- ...19_05_13_024326_create_cart_rule_table.php | 4 +-- .../Webkul/Discount/src/Helpers/Discount.php | 28 +++++++++++++------ 3 files changed, 24 insertions(+), 11 deletions(-) diff --git a/packages/Webkul/Checkout/src/Cart.php b/packages/Webkul/Checkout/src/Cart.php index 6bdbbffad..fc42a4823 100755 --- a/packages/Webkul/Checkout/src/Cart.php +++ b/packages/Webkul/Checkout/src/Cart.php @@ -1297,7 +1297,8 @@ class Cart { 'id' => $item->id, 'total' => $item->total, 'base_total' => $leastValue, - 'quantity' => $item->quantity + 'quantity' => $item->quantity, + 'price' => $item->price ]; } } diff --git a/packages/Webkul/Discount/src/Database/Migrations/2019_05_13_024326_create_cart_rule_table.php b/packages/Webkul/Discount/src/Database/Migrations/2019_05_13_024326_create_cart_rule_table.php index 03f6273ec..41859725a 100644 --- a/packages/Webkul/Discount/src/Database/Migrations/2019_05_13_024326_create_cart_rule_table.php +++ b/packages/Webkul/Discount/src/Database/Migrations/2019_05_13_024326_create_cart_rule_table.php @@ -39,8 +39,8 @@ class CreateCartRuleTable extends Migration $table->integer('sort_order')->unsigned()->default(0); $table->string('action_type')->nullable(); $table->decimal('disc_amount', 12, 4)->default(0); - $table->decimal('disc_quantity', 12, 4)->default(0); - $table->string('disc_threshold')->default(0); + $table->decimal('disc_quantity', 12, 4)->default(1); + $table->string('disc_threshold')->default(1); $table->integer('coupon_type')->default(1); $table->boolean('auto_generation')->default(0); $table->boolean('apply_to_shipping')->default(0); diff --git a/packages/Webkul/Discount/src/Helpers/Discount.php b/packages/Webkul/Discount/src/Helpers/Discount.php index cee384b68..f4938a557 100644 --- a/packages/Webkul/Discount/src/Helpers/Discount.php +++ b/packages/Webkul/Discount/src/Helpers/Discount.php @@ -376,24 +376,36 @@ class Discount $leastWorthItem = \Cart::leastWorthItem(); $realQty = $leastWorthItem['quantity']; - if ($cart->items_qty >= $disc_threshold && $realQty >= $disc_quantity) { + if ($cart->items_qty >= $disc_threshold) { if ($action_type == config('pricerules.cart.validation.0')) { - $amountDiscounted = $leastWorthItem['total'] * ($disc_amount / 100); + $amountDiscounted = $leastWorthItem['price'] * ($disc_amount / 100); - if ($amountDiscounted > $leastWorthItem['total']) { - $amountDiscounted = $leastWorthItem['total']; + if ($realQty > $disc_quantity) { + $amountDiscounted = $amountDiscounted * $disc_quantity; + } + + if ($amountDiscounted > $leastWorthItem['price']) { + $amountDiscounted = $leastWorthItem['price']; } } else if ($action_type == config('pricerules.cart.validation.1')) { $amountDiscounted = $disc_amount; - if ($amountDiscounted > $leastWorthItem['total']) { - $amountDiscounted = $leastWorthItem['total']; + if ($realQty > $disc_quantity) { + $amountDiscounted = $amountDiscounted * $disc_quantity; + } + + if ($amountDiscounted > $leastWorthItem['price']) { + $amountDiscounted = $leastWorthItem['price']; } } else if ($action_type == config('pricerules.cart.validation.2')) { $amountDiscounted = $disc_amount; - if ($amountDiscounted > $leastWorthItem['total']) { - $amountDiscounted = $leastWorthItem['total']; + if ($realQty > $disc_quantity) { + $amountDiscounted = $amountDiscounted * $disc_quantity; + } + + if ($amountDiscounted > $leastWorthItem['price']) { + $amountDiscounted = $leastWorthItem['price']; } } } From eaa755bbeae8115f255a4575bbe4d151b482f82b Mon Sep 17 00:00:00 2001 From: Prashant Singh Date: Sat, 15 Jun 2019 13:13:07 +0530 Subject: [PATCH 372/678] Fixed discount on frontend --- packages/Webkul/Discount/src/Helpers/Discount.php | 5 ++++- .../Webkul/Shop/src/Http/Controllers/CartController.php | 8 ++++++-- .../Shop/src/Resources/views/checkout/onepage.blade.php | 8 +++++++- 3 files changed, 17 insertions(+), 4 deletions(-) diff --git a/packages/Webkul/Discount/src/Helpers/Discount.php b/packages/Webkul/Discount/src/Helpers/Discount.php index f4938a557..f48e14796 100644 --- a/packages/Webkul/Discount/src/Helpers/Discount.php +++ b/packages/Webkul/Discount/src/Helpers/Discount.php @@ -310,6 +310,8 @@ class Discount \Cart::collectTotals(); + $report['grand_total'] = core()->currency(\Cart::getCart()->grand_total); + break; } } @@ -471,7 +473,6 @@ class Discount if ($existingRule->count()) { if ($existingRule->first()->delete()) { - foreach ($cart->items as $item) { if ($item->discount_amount > 0) { $item->update([ @@ -489,6 +490,8 @@ class Discount 'base_discount_amount' => 0 ]); + \Cart::collectTotals(); + return true; } else { return false; diff --git a/packages/Webkul/Shop/src/Http/Controllers/CartController.php b/packages/Webkul/Shop/src/Http/Controllers/CartController.php index 274e1939c..48ffb82bf 100755 --- a/packages/Webkul/Shop/src/Http/Controllers/CartController.php +++ b/packages/Webkul/Shop/src/Http/Controllers/CartController.php @@ -305,12 +305,16 @@ class CartController extends Controller if ($result) { return response()->json([ 'success' => true, - 'message' => trans('admin::app.promotion.status.coupon-removed') + 'message' => trans('admin::app.promotion.status.coupon-removed'), + 'data' => [ + 'grand_total' => core()->currency(Cart::getCart()->grand_total) + ] ]); } else { return response()->json([ 'success' => false, - 'message' => trans('admin::app.promotion.status.coupon-remove-failed') + 'message' => trans('admin::app.promotion.status.coupon-remove-failed'), + 'data' => null ]); } } 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 071dbf16b..607d84292 100755 --- a/packages/Webkul/Shop/src/Resources/views/checkout/onepage.blade.php +++ b/packages/Webkul/Shop/src/Resources/views/checkout/onepage.blade.php @@ -538,7 +538,7 @@ document.getElementById("discount-detail").style.display = "block"; document.getElementById("discount-detail-discount-amount").innerHTML = response.data.result.formatted_discount; - document.getElementById("discount-detail-discount-amount").innerHTML = response.data.result.formatted_discount; + document.getElementById("grand-total-amount-detail").innerHTML = response.data.result.grand_total; }).catch(function(error) { console.log(error.data); }); @@ -550,8 +550,14 @@ axios.post('{{ route('shop.checkout.remove.coupon') }}') .then(function(response) { this_this.coupon_used = false; + this_this.code = ''; + + console.log(response.data.data.grand_total); + document.getElementById("discount-detail").style.display = "none"; + + document.getElementById("grand-total-amount-detail").innerHTML = response.data.data.grand_total; }).catch(function(error) { console.log(error.data); From 0927786cee25a0ffd46c8268bc4e3041d2200885 Mon Sep 17 00:00:00 2001 From: Prashant Singh Date: Sat, 15 Jun 2019 14:56:24 +0530 Subject: [PATCH 373/678] Fixed issue with order summary rendering on cart page --- .../promotions/cart-rule/create.blade.php | 4 +- .../Http/Controllers/CartRuleController.php | 69 ++++++++++++++----- .../views/checkout/total/summary.blade.php | 2 +- 3 files changed, 53 insertions(+), 22 deletions(-) diff --git a/packages/Webkul/Admin/src/Resources/views/promotions/cart-rule/create.blade.php b/packages/Webkul/Admin/src/Resources/views/promotions/cart-rule/create.blade.php index 64c897335..0f2d6d222 100644 --- a/packages/Webkul/Admin/src/Resources/views/promotions/cart-rule/create.blade.php +++ b/packages/Webkul/Admin/src/Resources/views/promotions/cart-rule/create.blade.php @@ -74,7 +74,7 @@
- {{--
+
@{{ errors.first('customer_groups') }} -
--}} +
diff --git a/packages/Webkul/Discount/src/Http/Controllers/CartRuleController.php b/packages/Webkul/Discount/src/Http/Controllers/CartRuleController.php index 807875db1..93f1271bf 100644 --- a/packages/Webkul/Discount/src/Http/Controllers/CartRuleController.php +++ b/packages/Webkul/Discount/src/Http/Controllers/CartRuleController.php @@ -83,12 +83,10 @@ class CartRuleController extends Controller */ public function store() { - $data = request()->all(); - $validated = $this->validate($data, [ 'name' => 'required|string', 'description' => 'string', - // 'customer_groups' => 'required|array', + 'customer_groups' => 'required|array', 'channels' => 'required|array', 'status' => 'required|boolean', 'use_coupon' => 'boolean|required', @@ -105,32 +103,45 @@ class CartRuleController extends Controller 'label' => 'array|nullable' ]); - $data = [ - 'usage_limit' => 0, - 'per_customer' => 0 - ]; + $data = request()->all(); + // unset token + unset($data['_token']); + + // set usage limit + $data['usage_limit'] = 0; + + // set per customer usage limit + $data['per_customer'] = 0; + + // check starts from and ends till if ($data['starts_from'] == "" || $data['ends_till'] == "") { $data['starts_from'] = null; $data['ends_till'] = null; } - unset($data['_token']); + // customer groups + $customer_groups = $data['customer_groups']; - $channels = $data['channels']; + // unset customer groups + unset($data['customer_groups']); - unset($data['channels']); - - // $customer_groups = $data['customer_groups']; - // unset($data['customer_groups']); + // unset criteria unset($data['criteria']); + // channels + $channels = $data['channels']; + + // unset channels + unset($data['channels']); + + // make labels $labels = $data['label']; + // unset labels unset($data['label']); - unset($data['cart_attributes']); - unset($data['attributes']); + // prepare json object from actions if (isset($data['disc_amount']) && $data['action_type'] == config('pricerules.cart.validations.2')) { $data['actions'] = [ 'action_type' => $data['action_type'], @@ -147,22 +158,37 @@ class CartRuleController extends Controller ]; } + // prepare json object from conditions $data['actions'] = json_encode($data['actions']); + // check if all if (! isset($data['all_conditions']) || $data['all_conditions'] == "[]") { $data['conditions'] = null; } else { $data['conditions'] = json_encode($data['all_conditions']); } + // unset cart_attributes from conditions + unset($data['cart_attributes']); + + // unset attributes from conditions + unset($data['attributes']); + + // unset all_conditions from conditions unset($data['all_conditions']); + // prepare coupons if coupons are used if ($data['use_coupon']) { // if (isset($data['auto_generation']) && $data['auto_generation']) { + // auto generation is off for now $data['auto_generation'] = 0; + // save the coupon used in coupon section $coupons['code'] = $data['code']; + // set coupon usage per customer same as per_customer limit which is disabled for now + $coupons['usage_per_customer'] = $data['per_customer']; //0 is for unlimited usage + // unset coupon code from coupon section unset($data['code']); // } else { // $data['auto_generation'] = 1; @@ -181,15 +207,21 @@ class CartRuleController extends Controller // $coupons['limit'] = 0; } + // per coupon usage limit // if(isset($data['usage_limit'])) { // $coupons['limit'] = $data['usage_limit']; // } + // create a cart rule $ruleCreated = $this->cartRule->create($data); - // $ruleGroupCreated = $this->cartRule->CustomerGroupSync($customer_groups, $ruleCreated); + // create customer groups for cart rule + $ruleGroupCreated = $this->cartRule->CustomerGroupSync($customer_groups, $ruleCreated); + + // create customer groups for channels $ruleChannelCreated = $this->cartRule->ChannelSync($channels, $ruleCreated); + // prepare labels if (isset($labels['global'])) { foreach (core()->getAllChannels() as $channel) { $label1['channel_id'] = $channel->id; @@ -209,14 +241,13 @@ class CartRuleController extends Controller $ruleLabelCreated = $this->cartRuleLabel->create($label2); } + // create coupon if present if (isset($coupons)) { $coupons['cart_rule_id'] = $ruleCreated->id; - $coupons['usage_per_customer'] = $data['per_customer']; //0 is for unlimited usage - $couponCreated = $this->cartRuleCoupon->create($coupons); } - if ($ruleCreated && $ruleChannelCreated) { + if ($ruleCreated && $ruleChannelCreated && $ruleGroupCreated) { if (isset($couponCreated) && $couponCreated) { session()->flash('success', trans('admin::app.promotion.status.success-coupon')); } diff --git a/packages/Webkul/Shop/src/Resources/views/checkout/total/summary.blade.php b/packages/Webkul/Shop/src/Resources/views/checkout/total/summary.blade.php index 151dad9aa..ca2ebabfd 100755 --- a/packages/Webkul/Shop/src/Resources/views/checkout/total/summary.blade.php +++ b/packages/Webkul/Shop/src/Resources/views/checkout/total/summary.blade.php @@ -44,7 +44,7 @@
-
+
is('checkout/cart')) v-if="hide_discount" @endif> @if (! request()->is('checkout/cart'))
From 7ac715e93d7478afdebfe5b52a4c1f452238278e Mon Sep 17 00:00:00 2001 From: Jitendra Singh <39991107+jitendra-webkul@users.noreply.github.com> Date: Sat, 15 Jun 2019 15:09:59 +0530 Subject: [PATCH 374/678] Revert "Fixed issue with order summary rendering on cart page" --- .../promotions/cart-rule/create.blade.php | 4 +- .../Http/Controllers/CartRuleController.php | 67 +++++-------------- .../views/checkout/total/summary.blade.php | 2 +- 3 files changed, 21 insertions(+), 52 deletions(-) diff --git a/packages/Webkul/Admin/src/Resources/views/promotions/cart-rule/create.blade.php b/packages/Webkul/Admin/src/Resources/views/promotions/cart-rule/create.blade.php index 0f2d6d222..64c897335 100644 --- a/packages/Webkul/Admin/src/Resources/views/promotions/cart-rule/create.blade.php +++ b/packages/Webkul/Admin/src/Resources/views/promotions/cart-rule/create.blade.php @@ -74,7 +74,7 @@
-
+ {{--
@{{ errors.first('customer_groups') }} -
+
--}}
diff --git a/packages/Webkul/Discount/src/Http/Controllers/CartRuleController.php b/packages/Webkul/Discount/src/Http/Controllers/CartRuleController.php index 93f1271bf..807875db1 100644 --- a/packages/Webkul/Discount/src/Http/Controllers/CartRuleController.php +++ b/packages/Webkul/Discount/src/Http/Controllers/CartRuleController.php @@ -83,10 +83,12 @@ class CartRuleController extends Controller */ public function store() { + $data = request()->all(); + $validated = $this->validate($data, [ 'name' => 'required|string', 'description' => 'string', - 'customer_groups' => 'required|array', + // 'customer_groups' => 'required|array', 'channels' => 'required|array', 'status' => 'required|boolean', 'use_coupon' => 'boolean|required', @@ -103,45 +105,32 @@ class CartRuleController extends Controller 'label' => 'array|nullable' ]); - $data = request()->all(); + $data = [ + 'usage_limit' => 0, + 'per_customer' => 0 + ]; - // unset token - unset($data['_token']); - - // set usage limit - $data['usage_limit'] = 0; - - // set per customer usage limit - $data['per_customer'] = 0; - - // check starts from and ends till if ($data['starts_from'] == "" || $data['ends_till'] == "") { $data['starts_from'] = null; $data['ends_till'] = null; } - // customer groups - $customer_groups = $data['customer_groups']; + unset($data['_token']); - // unset customer groups - unset($data['customer_groups']); - - // unset criteria - unset($data['criteria']); - - // channels $channels = $data['channels']; - // unset channels unset($data['channels']); - // make labels + // $customer_groups = $data['customer_groups']; + // unset($data['customer_groups']); + unset($data['criteria']); + $labels = $data['label']; - // unset labels unset($data['label']); + unset($data['cart_attributes']); + unset($data['attributes']); - // prepare json object from actions if (isset($data['disc_amount']) && $data['action_type'] == config('pricerules.cart.validations.2')) { $data['actions'] = [ 'action_type' => $data['action_type'], @@ -158,37 +147,22 @@ class CartRuleController extends Controller ]; } - // prepare json object from conditions $data['actions'] = json_encode($data['actions']); - // check if all if (! isset($data['all_conditions']) || $data['all_conditions'] == "[]") { $data['conditions'] = null; } else { $data['conditions'] = json_encode($data['all_conditions']); } - // unset cart_attributes from conditions - unset($data['cart_attributes']); - - // unset attributes from conditions - unset($data['attributes']); - - // unset all_conditions from conditions unset($data['all_conditions']); - // prepare coupons if coupons are used if ($data['use_coupon']) { // if (isset($data['auto_generation']) && $data['auto_generation']) { - // auto generation is off for now $data['auto_generation'] = 0; - // save the coupon used in coupon section $coupons['code'] = $data['code']; - // set coupon usage per customer same as per_customer limit which is disabled for now - $coupons['usage_per_customer'] = $data['per_customer']; //0 is for unlimited usage - // unset coupon code from coupon section unset($data['code']); // } else { // $data['auto_generation'] = 1; @@ -207,21 +181,15 @@ class CartRuleController extends Controller // $coupons['limit'] = 0; } - // per coupon usage limit // if(isset($data['usage_limit'])) { // $coupons['limit'] = $data['usage_limit']; // } - // create a cart rule $ruleCreated = $this->cartRule->create($data); - // create customer groups for cart rule - $ruleGroupCreated = $this->cartRule->CustomerGroupSync($customer_groups, $ruleCreated); - - // create customer groups for channels + // $ruleGroupCreated = $this->cartRule->CustomerGroupSync($customer_groups, $ruleCreated); $ruleChannelCreated = $this->cartRule->ChannelSync($channels, $ruleCreated); - // prepare labels if (isset($labels['global'])) { foreach (core()->getAllChannels() as $channel) { $label1['channel_id'] = $channel->id; @@ -241,13 +209,14 @@ class CartRuleController extends Controller $ruleLabelCreated = $this->cartRuleLabel->create($label2); } - // create coupon if present if (isset($coupons)) { $coupons['cart_rule_id'] = $ruleCreated->id; + $coupons['usage_per_customer'] = $data['per_customer']; //0 is for unlimited usage + $couponCreated = $this->cartRuleCoupon->create($coupons); } - if ($ruleCreated && $ruleChannelCreated && $ruleGroupCreated) { + if ($ruleCreated && $ruleChannelCreated) { if (isset($couponCreated) && $couponCreated) { session()->flash('success', trans('admin::app.promotion.status.success-coupon')); } diff --git a/packages/Webkul/Shop/src/Resources/views/checkout/total/summary.blade.php b/packages/Webkul/Shop/src/Resources/views/checkout/total/summary.blade.php index ca2ebabfd..151dad9aa 100755 --- a/packages/Webkul/Shop/src/Resources/views/checkout/total/summary.blade.php +++ b/packages/Webkul/Shop/src/Resources/views/checkout/total/summary.blade.php @@ -44,7 +44,7 @@
-
is('checkout/cart')) v-if="hide_discount" @endif> +
@if (! request()->is('checkout/cart'))
From 668f92185bb0868bd5d1cbe61e30534af40d4fea Mon Sep 17 00:00:00 2001 From: Jitendra Singh <39991107+jitendra-webkul@users.noreply.github.com> Date: Sat, 15 Jun 2019 15:10:04 +0530 Subject: [PATCH 375/678] Revert "Development" --- packages/Webkul/Checkout/src/Cart.php | 3 +- ...19_05_13_024326_create_cart_rule_table.php | 4 +-- .../Webkul/Discount/src/Helpers/Discount.php | 33 +++++-------------- .../src/Http/Controllers/CartController.php | 8 ++--- .../views/checkout/onepage.blade.php | 8 +---- 5 files changed, 15 insertions(+), 41 deletions(-) diff --git a/packages/Webkul/Checkout/src/Cart.php b/packages/Webkul/Checkout/src/Cart.php index fc42a4823..6bdbbffad 100755 --- a/packages/Webkul/Checkout/src/Cart.php +++ b/packages/Webkul/Checkout/src/Cart.php @@ -1297,8 +1297,7 @@ class Cart { 'id' => $item->id, 'total' => $item->total, 'base_total' => $leastValue, - 'quantity' => $item->quantity, - 'price' => $item->price + 'quantity' => $item->quantity ]; } } diff --git a/packages/Webkul/Discount/src/Database/Migrations/2019_05_13_024326_create_cart_rule_table.php b/packages/Webkul/Discount/src/Database/Migrations/2019_05_13_024326_create_cart_rule_table.php index 41859725a..03f6273ec 100644 --- a/packages/Webkul/Discount/src/Database/Migrations/2019_05_13_024326_create_cart_rule_table.php +++ b/packages/Webkul/Discount/src/Database/Migrations/2019_05_13_024326_create_cart_rule_table.php @@ -39,8 +39,8 @@ class CreateCartRuleTable extends Migration $table->integer('sort_order')->unsigned()->default(0); $table->string('action_type')->nullable(); $table->decimal('disc_amount', 12, 4)->default(0); - $table->decimal('disc_quantity', 12, 4)->default(1); - $table->string('disc_threshold')->default(1); + $table->decimal('disc_quantity', 12, 4)->default(0); + $table->string('disc_threshold')->default(0); $table->integer('coupon_type')->default(1); $table->boolean('auto_generation')->default(0); $table->boolean('apply_to_shipping')->default(0); diff --git a/packages/Webkul/Discount/src/Helpers/Discount.php b/packages/Webkul/Discount/src/Helpers/Discount.php index f48e14796..cee384b68 100644 --- a/packages/Webkul/Discount/src/Helpers/Discount.php +++ b/packages/Webkul/Discount/src/Helpers/Discount.php @@ -310,8 +310,6 @@ class Discount \Cart::collectTotals(); - $report['grand_total'] = core()->currency(\Cart::getCart()->grand_total); - break; } } @@ -378,36 +376,24 @@ class Discount $leastWorthItem = \Cart::leastWorthItem(); $realQty = $leastWorthItem['quantity']; - if ($cart->items_qty >= $disc_threshold) { + if ($cart->items_qty >= $disc_threshold && $realQty >= $disc_quantity) { if ($action_type == config('pricerules.cart.validation.0')) { - $amountDiscounted = $leastWorthItem['price'] * ($disc_amount / 100); + $amountDiscounted = $leastWorthItem['total'] * ($disc_amount / 100); - if ($realQty > $disc_quantity) { - $amountDiscounted = $amountDiscounted * $disc_quantity; - } - - if ($amountDiscounted > $leastWorthItem['price']) { - $amountDiscounted = $leastWorthItem['price']; + if ($amountDiscounted > $leastWorthItem['total']) { + $amountDiscounted = $leastWorthItem['total']; } } else if ($action_type == config('pricerules.cart.validation.1')) { $amountDiscounted = $disc_amount; - if ($realQty > $disc_quantity) { - $amountDiscounted = $amountDiscounted * $disc_quantity; - } - - if ($amountDiscounted > $leastWorthItem['price']) { - $amountDiscounted = $leastWorthItem['price']; + if ($amountDiscounted > $leastWorthItem['total']) { + $amountDiscounted = $leastWorthItem['total']; } } else if ($action_type == config('pricerules.cart.validation.2')) { $amountDiscounted = $disc_amount; - if ($realQty > $disc_quantity) { - $amountDiscounted = $amountDiscounted * $disc_quantity; - } - - if ($amountDiscounted > $leastWorthItem['price']) { - $amountDiscounted = $leastWorthItem['price']; + if ($amountDiscounted > $leastWorthItem['total']) { + $amountDiscounted = $leastWorthItem['total']; } } } @@ -473,6 +459,7 @@ class Discount if ($existingRule->count()) { if ($existingRule->first()->delete()) { + foreach ($cart->items as $item) { if ($item->discount_amount > 0) { $item->update([ @@ -490,8 +477,6 @@ class Discount 'base_discount_amount' => 0 ]); - \Cart::collectTotals(); - return true; } else { return false; diff --git a/packages/Webkul/Shop/src/Http/Controllers/CartController.php b/packages/Webkul/Shop/src/Http/Controllers/CartController.php index 48ffb82bf..274e1939c 100755 --- a/packages/Webkul/Shop/src/Http/Controllers/CartController.php +++ b/packages/Webkul/Shop/src/Http/Controllers/CartController.php @@ -305,16 +305,12 @@ class CartController extends Controller if ($result) { return response()->json([ 'success' => true, - 'message' => trans('admin::app.promotion.status.coupon-removed'), - 'data' => [ - 'grand_total' => core()->currency(Cart::getCart()->grand_total) - ] + 'message' => trans('admin::app.promotion.status.coupon-removed') ]); } else { return response()->json([ 'success' => false, - 'message' => trans('admin::app.promotion.status.coupon-remove-failed'), - 'data' => null + 'message' => trans('admin::app.promotion.status.coupon-remove-failed') ]); } } 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 607d84292..071dbf16b 100755 --- a/packages/Webkul/Shop/src/Resources/views/checkout/onepage.blade.php +++ b/packages/Webkul/Shop/src/Resources/views/checkout/onepage.blade.php @@ -538,7 +538,7 @@ document.getElementById("discount-detail").style.display = "block"; document.getElementById("discount-detail-discount-amount").innerHTML = response.data.result.formatted_discount; - document.getElementById("grand-total-amount-detail").innerHTML = response.data.result.grand_total; + document.getElementById("discount-detail-discount-amount").innerHTML = response.data.result.formatted_discount; }).catch(function(error) { console.log(error.data); }); @@ -550,14 +550,8 @@ axios.post('{{ route('shop.checkout.remove.coupon') }}') .then(function(response) { this_this.coupon_used = false; - this_this.code = ''; - - console.log(response.data.data.grand_total); - document.getElementById("discount-detail").style.display = "none"; - - document.getElementById("grand-total-amount-detail").innerHTML = response.data.data.grand_total; }).catch(function(error) { console.log(error.data); From fb5687c451437d45333cabe6440ed48879943ad6 Mon Sep 17 00:00:00 2001 From: Jitendra Singh <39991107+jitendra-webkul@users.noreply.github.com> Date: Sat, 15 Jun 2019 15:10:10 +0530 Subject: [PATCH 376/678] Revert "buy now issue" --- .../src/Resources/views/products/view.blade.php | 13 +++++++++++++ .../products/view/configurable-options.blade.php | 3 ++- 2 files changed, 15 insertions(+), 1 deletion(-) 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 b2382da2e..16f53e156 100755 --- a/packages/Webkul/Shop/src/Resources/views/products/view.blade.php +++ b/packages/Webkul/Shop/src/Resources/views/products/view.blade.php @@ -205,6 +205,19 @@ } document.getElementById("quantity").value = quantity; + var buyNowLink = $('.btn.buynow').attr('data-href'); + var splitted = buyNowLink.split("/"); + lastItem = splitted[splitted.length - 2]; + + splitted.pop(); + splitted.pop(); + + var joined = splitted.join('/'); + + var newBuyNowUrl = joined + '/' + lastItem + '/' + quantity; + + $('.btn.buynow').attr('data-href', newBuyNowUrl); + event.preventDefault(); } 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 a1d91cb2f..536f6a006 100755 --- 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 @@ -148,13 +148,14 @@ if (this.selectedProductId != '' && buyNowLink) { var splitted = buyNowLink.split("/"); + splitted.pop(); splitted.pop(); lastItem = this.selectedProductId; var joined = splitted.join('/'); - var newBuyNowUrl = joined + '/' + lastItem; + var newBuyNowUrl = joined + '/' + lastItem + '/' + quantity; $('.btn.buynow').attr('data-href', newBuyNowUrl); } From 426cbe0ae5a7cf2edac31867cf49968252309c14 Mon Sep 17 00:00:00 2001 From: Jitendra Singh <39991107+jitendra-webkul@users.noreply.github.com> Date: Sat, 15 Jun 2019 15:10:11 +0530 Subject: [PATCH 377/678] Revert "Added Guest default customer group with id 0" --- .../src/Database/Seeders/CustomerGroupTableSeeder.php | 8 ++++---- .../2018_07_24_082635_create_customer_groups_table.php | 0 .../2018_07_24_082930_create_customers_table.php | 0 .../2018_07_24_083025_create_customer_addresses_table.php | 0 .../2018_09_11_064045_customer_password_resets.php | 0 .../2018_10_03_025230_create_wishlist_table.php | 0 ...7_165758_add_is_verified_column_in_customers_table.php | 0 ..._26_110500_change_gender_column_in_customers_table.php | 0 ...9_03_28_103658_add_notes_column_in_customers_table.php | 0 ...9_06_04_114009_add_phone_column_in_customers_table.php | 0 .../Customer/src/Providers/CustomerServiceProvider.php | 2 +- 11 files changed, 5 insertions(+), 5 deletions(-) rename packages/Webkul/Customer/src/Database/{Migrations => migrations}/2018_07_24_082635_create_customer_groups_table.php (100%) rename packages/Webkul/Customer/src/Database/{Migrations => migrations}/2018_07_24_082930_create_customers_table.php (100%) rename packages/Webkul/Customer/src/Database/{Migrations => migrations}/2018_07_24_083025_create_customer_addresses_table.php (100%) rename packages/Webkul/Customer/src/Database/{Migrations => migrations}/2018_09_11_064045_customer_password_resets.php (100%) rename packages/Webkul/Customer/src/Database/{Migrations => migrations}/2018_10_03_025230_create_wishlist_table.php (100%) rename packages/Webkul/Customer/src/Database/{Migrations => migrations}/2018_11_17_165758_add_is_verified_column_in_customers_table.php (100%) rename packages/Webkul/Customer/src/Database/{Migrations => migrations}/2018_11_26_110500_change_gender_column_in_customers_table.php (100%) rename packages/Webkul/Customer/src/Database/{Migrations => migrations}/2019_03_28_103658_add_notes_column_in_customers_table.php (100%) rename packages/Webkul/Customer/src/Database/{Migrations => migrations}/2019_06_04_114009_add_phone_column_in_customers_table.php (100%) diff --git a/packages/Webkul/Customer/src/Database/Seeders/CustomerGroupTableSeeder.php b/packages/Webkul/Customer/src/Database/Seeders/CustomerGroupTableSeeder.php index bbb66e3e8..6a83e7b4d 100755 --- a/packages/Webkul/Customer/src/Database/Seeders/CustomerGroupTableSeeder.php +++ b/packages/Webkul/Customer/src/Database/Seeders/CustomerGroupTableSeeder.php @@ -12,10 +12,6 @@ class CustomerGroupTableSeeder extends Seeder DB::table('customer_groups')->delete(); DB::table('customer_groups')->insert([ - 'id' => 0, - 'name' => 'Guest', - 'is_user_defined' => 0, - ], [ 'id' => 1, 'name' => 'General', 'is_user_defined' => 0, @@ -23,6 +19,10 @@ class CustomerGroupTableSeeder extends Seeder 'id' => 2, 'name' => 'Wholesale', 'is_user_defined' => 0, + ], [ + 'id' => 3, + 'name' => 'Not Logged In', + 'is_user_defined' => 0, ]); } } \ No newline at end of file diff --git a/packages/Webkul/Customer/src/Database/Migrations/2018_07_24_082635_create_customer_groups_table.php b/packages/Webkul/Customer/src/Database/migrations/2018_07_24_082635_create_customer_groups_table.php similarity index 100% rename from packages/Webkul/Customer/src/Database/Migrations/2018_07_24_082635_create_customer_groups_table.php rename to packages/Webkul/Customer/src/Database/migrations/2018_07_24_082635_create_customer_groups_table.php diff --git a/packages/Webkul/Customer/src/Database/Migrations/2018_07_24_082930_create_customers_table.php b/packages/Webkul/Customer/src/Database/migrations/2018_07_24_082930_create_customers_table.php similarity index 100% rename from packages/Webkul/Customer/src/Database/Migrations/2018_07_24_082930_create_customers_table.php rename to packages/Webkul/Customer/src/Database/migrations/2018_07_24_082930_create_customers_table.php diff --git a/packages/Webkul/Customer/src/Database/Migrations/2018_07_24_083025_create_customer_addresses_table.php b/packages/Webkul/Customer/src/Database/migrations/2018_07_24_083025_create_customer_addresses_table.php similarity index 100% rename from packages/Webkul/Customer/src/Database/Migrations/2018_07_24_083025_create_customer_addresses_table.php rename to packages/Webkul/Customer/src/Database/migrations/2018_07_24_083025_create_customer_addresses_table.php diff --git a/packages/Webkul/Customer/src/Database/Migrations/2018_09_11_064045_customer_password_resets.php b/packages/Webkul/Customer/src/Database/migrations/2018_09_11_064045_customer_password_resets.php similarity index 100% rename from packages/Webkul/Customer/src/Database/Migrations/2018_09_11_064045_customer_password_resets.php rename to packages/Webkul/Customer/src/Database/migrations/2018_09_11_064045_customer_password_resets.php diff --git a/packages/Webkul/Customer/src/Database/Migrations/2018_10_03_025230_create_wishlist_table.php b/packages/Webkul/Customer/src/Database/migrations/2018_10_03_025230_create_wishlist_table.php similarity index 100% rename from packages/Webkul/Customer/src/Database/Migrations/2018_10_03_025230_create_wishlist_table.php rename to packages/Webkul/Customer/src/Database/migrations/2018_10_03_025230_create_wishlist_table.php diff --git a/packages/Webkul/Customer/src/Database/Migrations/2018_11_17_165758_add_is_verified_column_in_customers_table.php b/packages/Webkul/Customer/src/Database/migrations/2018_11_17_165758_add_is_verified_column_in_customers_table.php similarity index 100% rename from packages/Webkul/Customer/src/Database/Migrations/2018_11_17_165758_add_is_verified_column_in_customers_table.php rename to packages/Webkul/Customer/src/Database/migrations/2018_11_17_165758_add_is_verified_column_in_customers_table.php diff --git a/packages/Webkul/Customer/src/Database/Migrations/2018_11_26_110500_change_gender_column_in_customers_table.php b/packages/Webkul/Customer/src/Database/migrations/2018_11_26_110500_change_gender_column_in_customers_table.php similarity index 100% rename from packages/Webkul/Customer/src/Database/Migrations/2018_11_26_110500_change_gender_column_in_customers_table.php rename to packages/Webkul/Customer/src/Database/migrations/2018_11_26_110500_change_gender_column_in_customers_table.php diff --git a/packages/Webkul/Customer/src/Database/Migrations/2019_03_28_103658_add_notes_column_in_customers_table.php b/packages/Webkul/Customer/src/Database/migrations/2019_03_28_103658_add_notes_column_in_customers_table.php similarity index 100% rename from packages/Webkul/Customer/src/Database/Migrations/2019_03_28_103658_add_notes_column_in_customers_table.php rename to packages/Webkul/Customer/src/Database/migrations/2019_03_28_103658_add_notes_column_in_customers_table.php diff --git a/packages/Webkul/Customer/src/Database/Migrations/2019_06_04_114009_add_phone_column_in_customers_table.php b/packages/Webkul/Customer/src/Database/migrations/2019_06_04_114009_add_phone_column_in_customers_table.php similarity index 100% rename from packages/Webkul/Customer/src/Database/Migrations/2019_06_04_114009_add_phone_column_in_customers_table.php rename to packages/Webkul/Customer/src/Database/migrations/2019_06_04_114009_add_phone_column_in_customers_table.php diff --git a/packages/Webkul/Customer/src/Providers/CustomerServiceProvider.php b/packages/Webkul/Customer/src/Providers/CustomerServiceProvider.php index 7311c808c..8ef088d13 100755 --- a/packages/Webkul/Customer/src/Providers/CustomerServiceProvider.php +++ b/packages/Webkul/Customer/src/Providers/CustomerServiceProvider.php @@ -14,6 +14,6 @@ class CustomerServiceProvider extends ServiceProvider $this->loadTranslationsFrom(__DIR__ . '/../Resources/lang', 'customer'); - $this->loadMigrationsFrom(__DIR__ . '/../Database/Migrations'); + $this->loadMigrationsFrom(__DIR__ . '/../Database/migrations'); } } From ff64d23319be3fa8e2857ddb4c0db9e387825a4b Mon Sep 17 00:00:00 2001 From: jitendra Date: Sat, 15 Jun 2019 16:34:56 +0530 Subject: [PATCH 378/678] Guest removed from customer pages --- .../src/Http/Controllers/Customer/CustomerController.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/Webkul/Admin/src/Http/Controllers/Customer/CustomerController.php b/packages/Webkul/Admin/src/Http/Controllers/Customer/CustomerController.php index c2b700582..6f0e2dfa9 100755 --- a/packages/Webkul/Admin/src/Http/Controllers/Customer/CustomerController.php +++ b/packages/Webkul/Admin/src/Http/Controllers/Customer/CustomerController.php @@ -83,7 +83,7 @@ class CustomerController extends Controller */ public function create() { - $customerGroup = $this->customerGroup->all(); + $customerGroup = $this->customerGroup->findWhere([['id', '<>', 0]]); $channelName = $this->channel->all(); @@ -131,7 +131,7 @@ class CustomerController extends Controller { $customer = $this->customer->findOrFail($id); - $customerGroup = $this->customerGroup->all(); + $customerGroup = $this->customerGroup->findWhere([['id', '<>', 0]]); $channelName = $this->channel->all(); From e3946a79ddc9ff24f618acac610c0d67680689f5 Mon Sep 17 00:00:00 2001 From: jitendra Date: Sat, 15 Jun 2019 16:46:55 +0530 Subject: [PATCH 379/678] Reset changes --- .../Webkul/Customer/src/Http/Controllers/AccountController.php | 1 - 1 file changed, 1 deletion(-) diff --git a/packages/Webkul/Customer/src/Http/Controllers/AccountController.php b/packages/Webkul/Customer/src/Http/Controllers/AccountController.php index 446660570..1fb69057a 100755 --- a/packages/Webkul/Customer/src/Http/Controllers/AccountController.php +++ b/packages/Webkul/Customer/src/Http/Controllers/AccountController.php @@ -17,7 +17,6 @@ use Auth; * @author Prashant Singh * @copyright 2018 Webkul Software Pvt Ltd (http://www.webkul.com) */ - class AccountController extends Controller { /** From d4d9c3e5eeb3c55490ddea5a931ccb966e722b56 Mon Sep 17 00:00:00 2001 From: Jitendra Singh <39991107+jitendra-webkul@users.noreply.github.com> Date: Sat, 15 Jun 2019 16:48:29 +0530 Subject: [PATCH 380/678] Revert "Revert "Added Guest default customer group with id 0"" --- .../2018_07_24_082635_create_customer_groups_table.php | 0 .../2018_07_24_082930_create_customers_table.php | 0 .../2018_07_24_083025_create_customer_addresses_table.php | 0 .../2018_09_11_064045_customer_password_resets.php | 0 .../2018_10_03_025230_create_wishlist_table.php | 0 ...7_165758_add_is_verified_column_in_customers_table.php | 0 ..._26_110500_change_gender_column_in_customers_table.php | 0 ...9_03_28_103658_add_notes_column_in_customers_table.php | 0 ...9_06_04_114009_add_phone_column_in_customers_table.php | 0 .../src/Database/Seeders/CustomerGroupTableSeeder.php | 8 ++++---- .../Customer/src/Providers/CustomerServiceProvider.php | 2 +- 11 files changed, 5 insertions(+), 5 deletions(-) rename packages/Webkul/Customer/src/Database/{migrations => Migrations}/2018_07_24_082635_create_customer_groups_table.php (100%) rename packages/Webkul/Customer/src/Database/{migrations => Migrations}/2018_07_24_082930_create_customers_table.php (100%) rename packages/Webkul/Customer/src/Database/{migrations => Migrations}/2018_07_24_083025_create_customer_addresses_table.php (100%) rename packages/Webkul/Customer/src/Database/{migrations => Migrations}/2018_09_11_064045_customer_password_resets.php (100%) rename packages/Webkul/Customer/src/Database/{migrations => Migrations}/2018_10_03_025230_create_wishlist_table.php (100%) rename packages/Webkul/Customer/src/Database/{migrations => Migrations}/2018_11_17_165758_add_is_verified_column_in_customers_table.php (100%) rename packages/Webkul/Customer/src/Database/{migrations => Migrations}/2018_11_26_110500_change_gender_column_in_customers_table.php (100%) rename packages/Webkul/Customer/src/Database/{migrations => Migrations}/2019_03_28_103658_add_notes_column_in_customers_table.php (100%) rename packages/Webkul/Customer/src/Database/{migrations => Migrations}/2019_06_04_114009_add_phone_column_in_customers_table.php (100%) diff --git a/packages/Webkul/Customer/src/Database/migrations/2018_07_24_082635_create_customer_groups_table.php b/packages/Webkul/Customer/src/Database/Migrations/2018_07_24_082635_create_customer_groups_table.php similarity index 100% rename from packages/Webkul/Customer/src/Database/migrations/2018_07_24_082635_create_customer_groups_table.php rename to packages/Webkul/Customer/src/Database/Migrations/2018_07_24_082635_create_customer_groups_table.php diff --git a/packages/Webkul/Customer/src/Database/migrations/2018_07_24_082930_create_customers_table.php b/packages/Webkul/Customer/src/Database/Migrations/2018_07_24_082930_create_customers_table.php similarity index 100% rename from packages/Webkul/Customer/src/Database/migrations/2018_07_24_082930_create_customers_table.php rename to packages/Webkul/Customer/src/Database/Migrations/2018_07_24_082930_create_customers_table.php diff --git a/packages/Webkul/Customer/src/Database/migrations/2018_07_24_083025_create_customer_addresses_table.php b/packages/Webkul/Customer/src/Database/Migrations/2018_07_24_083025_create_customer_addresses_table.php similarity index 100% rename from packages/Webkul/Customer/src/Database/migrations/2018_07_24_083025_create_customer_addresses_table.php rename to packages/Webkul/Customer/src/Database/Migrations/2018_07_24_083025_create_customer_addresses_table.php diff --git a/packages/Webkul/Customer/src/Database/migrations/2018_09_11_064045_customer_password_resets.php b/packages/Webkul/Customer/src/Database/Migrations/2018_09_11_064045_customer_password_resets.php similarity index 100% rename from packages/Webkul/Customer/src/Database/migrations/2018_09_11_064045_customer_password_resets.php rename to packages/Webkul/Customer/src/Database/Migrations/2018_09_11_064045_customer_password_resets.php diff --git a/packages/Webkul/Customer/src/Database/migrations/2018_10_03_025230_create_wishlist_table.php b/packages/Webkul/Customer/src/Database/Migrations/2018_10_03_025230_create_wishlist_table.php similarity index 100% rename from packages/Webkul/Customer/src/Database/migrations/2018_10_03_025230_create_wishlist_table.php rename to packages/Webkul/Customer/src/Database/Migrations/2018_10_03_025230_create_wishlist_table.php diff --git a/packages/Webkul/Customer/src/Database/migrations/2018_11_17_165758_add_is_verified_column_in_customers_table.php b/packages/Webkul/Customer/src/Database/Migrations/2018_11_17_165758_add_is_verified_column_in_customers_table.php similarity index 100% rename from packages/Webkul/Customer/src/Database/migrations/2018_11_17_165758_add_is_verified_column_in_customers_table.php rename to packages/Webkul/Customer/src/Database/Migrations/2018_11_17_165758_add_is_verified_column_in_customers_table.php diff --git a/packages/Webkul/Customer/src/Database/migrations/2018_11_26_110500_change_gender_column_in_customers_table.php b/packages/Webkul/Customer/src/Database/Migrations/2018_11_26_110500_change_gender_column_in_customers_table.php similarity index 100% rename from packages/Webkul/Customer/src/Database/migrations/2018_11_26_110500_change_gender_column_in_customers_table.php rename to packages/Webkul/Customer/src/Database/Migrations/2018_11_26_110500_change_gender_column_in_customers_table.php diff --git a/packages/Webkul/Customer/src/Database/migrations/2019_03_28_103658_add_notes_column_in_customers_table.php b/packages/Webkul/Customer/src/Database/Migrations/2019_03_28_103658_add_notes_column_in_customers_table.php similarity index 100% rename from packages/Webkul/Customer/src/Database/migrations/2019_03_28_103658_add_notes_column_in_customers_table.php rename to packages/Webkul/Customer/src/Database/Migrations/2019_03_28_103658_add_notes_column_in_customers_table.php diff --git a/packages/Webkul/Customer/src/Database/migrations/2019_06_04_114009_add_phone_column_in_customers_table.php b/packages/Webkul/Customer/src/Database/Migrations/2019_06_04_114009_add_phone_column_in_customers_table.php similarity index 100% rename from packages/Webkul/Customer/src/Database/migrations/2019_06_04_114009_add_phone_column_in_customers_table.php rename to packages/Webkul/Customer/src/Database/Migrations/2019_06_04_114009_add_phone_column_in_customers_table.php diff --git a/packages/Webkul/Customer/src/Database/Seeders/CustomerGroupTableSeeder.php b/packages/Webkul/Customer/src/Database/Seeders/CustomerGroupTableSeeder.php index 6a83e7b4d..bbb66e3e8 100755 --- a/packages/Webkul/Customer/src/Database/Seeders/CustomerGroupTableSeeder.php +++ b/packages/Webkul/Customer/src/Database/Seeders/CustomerGroupTableSeeder.php @@ -12,6 +12,10 @@ class CustomerGroupTableSeeder extends Seeder DB::table('customer_groups')->delete(); DB::table('customer_groups')->insert([ + 'id' => 0, + 'name' => 'Guest', + 'is_user_defined' => 0, + ], [ 'id' => 1, 'name' => 'General', 'is_user_defined' => 0, @@ -19,10 +23,6 @@ class CustomerGroupTableSeeder extends Seeder 'id' => 2, 'name' => 'Wholesale', 'is_user_defined' => 0, - ], [ - 'id' => 3, - 'name' => 'Not Logged In', - 'is_user_defined' => 0, ]); } } \ No newline at end of file diff --git a/packages/Webkul/Customer/src/Providers/CustomerServiceProvider.php b/packages/Webkul/Customer/src/Providers/CustomerServiceProvider.php index 8ef088d13..7311c808c 100755 --- a/packages/Webkul/Customer/src/Providers/CustomerServiceProvider.php +++ b/packages/Webkul/Customer/src/Providers/CustomerServiceProvider.php @@ -14,6 +14,6 @@ class CustomerServiceProvider extends ServiceProvider $this->loadTranslationsFrom(__DIR__ . '/../Resources/lang', 'customer'); - $this->loadMigrationsFrom(__DIR__ . '/../Database/migrations'); + $this->loadMigrationsFrom(__DIR__ . '/../Database/Migrations'); } } From 545cd7386e939088731e0320ed6ff1d95a8c7c52 Mon Sep 17 00:00:00 2001 From: Jitendra Singh <39991107+jitendra-webkul@users.noreply.github.com> Date: Sat, 15 Jun 2019 16:49:02 +0530 Subject: [PATCH 381/678] Revert "Revert "Fixed issue with order summary rendering on cart page"" --- .../promotions/cart-rule/create.blade.php | 4 +- .../Http/Controllers/CartRuleController.php | 69 ++++++++++++++----- .../views/checkout/total/summary.blade.php | 2 +- 3 files changed, 53 insertions(+), 22 deletions(-) diff --git a/packages/Webkul/Admin/src/Resources/views/promotions/cart-rule/create.blade.php b/packages/Webkul/Admin/src/Resources/views/promotions/cart-rule/create.blade.php index 64c897335..0f2d6d222 100644 --- a/packages/Webkul/Admin/src/Resources/views/promotions/cart-rule/create.blade.php +++ b/packages/Webkul/Admin/src/Resources/views/promotions/cart-rule/create.blade.php @@ -74,7 +74,7 @@
- {{--
+
@{{ errors.first('customer_groups') }} -
--}} +
diff --git a/packages/Webkul/Discount/src/Http/Controllers/CartRuleController.php b/packages/Webkul/Discount/src/Http/Controllers/CartRuleController.php index 807875db1..93f1271bf 100644 --- a/packages/Webkul/Discount/src/Http/Controllers/CartRuleController.php +++ b/packages/Webkul/Discount/src/Http/Controllers/CartRuleController.php @@ -83,12 +83,10 @@ class CartRuleController extends Controller */ public function store() { - $data = request()->all(); - $validated = $this->validate($data, [ 'name' => 'required|string', 'description' => 'string', - // 'customer_groups' => 'required|array', + 'customer_groups' => 'required|array', 'channels' => 'required|array', 'status' => 'required|boolean', 'use_coupon' => 'boolean|required', @@ -105,32 +103,45 @@ class CartRuleController extends Controller 'label' => 'array|nullable' ]); - $data = [ - 'usage_limit' => 0, - 'per_customer' => 0 - ]; + $data = request()->all(); + // unset token + unset($data['_token']); + + // set usage limit + $data['usage_limit'] = 0; + + // set per customer usage limit + $data['per_customer'] = 0; + + // check starts from and ends till if ($data['starts_from'] == "" || $data['ends_till'] == "") { $data['starts_from'] = null; $data['ends_till'] = null; } - unset($data['_token']); + // customer groups + $customer_groups = $data['customer_groups']; - $channels = $data['channels']; + // unset customer groups + unset($data['customer_groups']); - unset($data['channels']); - - // $customer_groups = $data['customer_groups']; - // unset($data['customer_groups']); + // unset criteria unset($data['criteria']); + // channels + $channels = $data['channels']; + + // unset channels + unset($data['channels']); + + // make labels $labels = $data['label']; + // unset labels unset($data['label']); - unset($data['cart_attributes']); - unset($data['attributes']); + // prepare json object from actions if (isset($data['disc_amount']) && $data['action_type'] == config('pricerules.cart.validations.2')) { $data['actions'] = [ 'action_type' => $data['action_type'], @@ -147,22 +158,37 @@ class CartRuleController extends Controller ]; } + // prepare json object from conditions $data['actions'] = json_encode($data['actions']); + // check if all if (! isset($data['all_conditions']) || $data['all_conditions'] == "[]") { $data['conditions'] = null; } else { $data['conditions'] = json_encode($data['all_conditions']); } + // unset cart_attributes from conditions + unset($data['cart_attributes']); + + // unset attributes from conditions + unset($data['attributes']); + + // unset all_conditions from conditions unset($data['all_conditions']); + // prepare coupons if coupons are used if ($data['use_coupon']) { // if (isset($data['auto_generation']) && $data['auto_generation']) { + // auto generation is off for now $data['auto_generation'] = 0; + // save the coupon used in coupon section $coupons['code'] = $data['code']; + // set coupon usage per customer same as per_customer limit which is disabled for now + $coupons['usage_per_customer'] = $data['per_customer']; //0 is for unlimited usage + // unset coupon code from coupon section unset($data['code']); // } else { // $data['auto_generation'] = 1; @@ -181,15 +207,21 @@ class CartRuleController extends Controller // $coupons['limit'] = 0; } + // per coupon usage limit // if(isset($data['usage_limit'])) { // $coupons['limit'] = $data['usage_limit']; // } + // create a cart rule $ruleCreated = $this->cartRule->create($data); - // $ruleGroupCreated = $this->cartRule->CustomerGroupSync($customer_groups, $ruleCreated); + // create customer groups for cart rule + $ruleGroupCreated = $this->cartRule->CustomerGroupSync($customer_groups, $ruleCreated); + + // create customer groups for channels $ruleChannelCreated = $this->cartRule->ChannelSync($channels, $ruleCreated); + // prepare labels if (isset($labels['global'])) { foreach (core()->getAllChannels() as $channel) { $label1['channel_id'] = $channel->id; @@ -209,14 +241,13 @@ class CartRuleController extends Controller $ruleLabelCreated = $this->cartRuleLabel->create($label2); } + // create coupon if present if (isset($coupons)) { $coupons['cart_rule_id'] = $ruleCreated->id; - $coupons['usage_per_customer'] = $data['per_customer']; //0 is for unlimited usage - $couponCreated = $this->cartRuleCoupon->create($coupons); } - if ($ruleCreated && $ruleChannelCreated) { + if ($ruleCreated && $ruleChannelCreated && $ruleGroupCreated) { if (isset($couponCreated) && $couponCreated) { session()->flash('success', trans('admin::app.promotion.status.success-coupon')); } diff --git a/packages/Webkul/Shop/src/Resources/views/checkout/total/summary.blade.php b/packages/Webkul/Shop/src/Resources/views/checkout/total/summary.blade.php index 151dad9aa..ca2ebabfd 100755 --- a/packages/Webkul/Shop/src/Resources/views/checkout/total/summary.blade.php +++ b/packages/Webkul/Shop/src/Resources/views/checkout/total/summary.blade.php @@ -44,7 +44,7 @@
-
+
is('checkout/cart')) v-if="hide_discount" @endif> @if (! request()->is('checkout/cart'))
From 1f5d8a8f28e218d9973fd7bbe3fc52cd81dffd68 Mon Sep 17 00:00:00 2001 From: Jitendra Singh <39991107+jitendra-webkul@users.noreply.github.com> Date: Sat, 15 Jun 2019 16:50:37 +0530 Subject: [PATCH 382/678] Revert "Revert "Development"" --- packages/Webkul/Checkout/src/Cart.php | 3 +- ...19_05_13_024326_create_cart_rule_table.php | 4 +-- .../Webkul/Discount/src/Helpers/Discount.php | 33 ++++++++++++++----- .../src/Http/Controllers/CartController.php | 8 +++-- .../views/checkout/onepage.blade.php | 8 ++++- 5 files changed, 41 insertions(+), 15 deletions(-) diff --git a/packages/Webkul/Checkout/src/Cart.php b/packages/Webkul/Checkout/src/Cart.php index 6bdbbffad..fc42a4823 100755 --- a/packages/Webkul/Checkout/src/Cart.php +++ b/packages/Webkul/Checkout/src/Cart.php @@ -1297,7 +1297,8 @@ class Cart { 'id' => $item->id, 'total' => $item->total, 'base_total' => $leastValue, - 'quantity' => $item->quantity + 'quantity' => $item->quantity, + 'price' => $item->price ]; } } diff --git a/packages/Webkul/Discount/src/Database/Migrations/2019_05_13_024326_create_cart_rule_table.php b/packages/Webkul/Discount/src/Database/Migrations/2019_05_13_024326_create_cart_rule_table.php index 03f6273ec..41859725a 100644 --- a/packages/Webkul/Discount/src/Database/Migrations/2019_05_13_024326_create_cart_rule_table.php +++ b/packages/Webkul/Discount/src/Database/Migrations/2019_05_13_024326_create_cart_rule_table.php @@ -39,8 +39,8 @@ class CreateCartRuleTable extends Migration $table->integer('sort_order')->unsigned()->default(0); $table->string('action_type')->nullable(); $table->decimal('disc_amount', 12, 4)->default(0); - $table->decimal('disc_quantity', 12, 4)->default(0); - $table->string('disc_threshold')->default(0); + $table->decimal('disc_quantity', 12, 4)->default(1); + $table->string('disc_threshold')->default(1); $table->integer('coupon_type')->default(1); $table->boolean('auto_generation')->default(0); $table->boolean('apply_to_shipping')->default(0); diff --git a/packages/Webkul/Discount/src/Helpers/Discount.php b/packages/Webkul/Discount/src/Helpers/Discount.php index cee384b68..f48e14796 100644 --- a/packages/Webkul/Discount/src/Helpers/Discount.php +++ b/packages/Webkul/Discount/src/Helpers/Discount.php @@ -310,6 +310,8 @@ class Discount \Cart::collectTotals(); + $report['grand_total'] = core()->currency(\Cart::getCart()->grand_total); + break; } } @@ -376,24 +378,36 @@ class Discount $leastWorthItem = \Cart::leastWorthItem(); $realQty = $leastWorthItem['quantity']; - if ($cart->items_qty >= $disc_threshold && $realQty >= $disc_quantity) { + if ($cart->items_qty >= $disc_threshold) { if ($action_type == config('pricerules.cart.validation.0')) { - $amountDiscounted = $leastWorthItem['total'] * ($disc_amount / 100); + $amountDiscounted = $leastWorthItem['price'] * ($disc_amount / 100); - if ($amountDiscounted > $leastWorthItem['total']) { - $amountDiscounted = $leastWorthItem['total']; + if ($realQty > $disc_quantity) { + $amountDiscounted = $amountDiscounted * $disc_quantity; + } + + if ($amountDiscounted > $leastWorthItem['price']) { + $amountDiscounted = $leastWorthItem['price']; } } else if ($action_type == config('pricerules.cart.validation.1')) { $amountDiscounted = $disc_amount; - if ($amountDiscounted > $leastWorthItem['total']) { - $amountDiscounted = $leastWorthItem['total']; + if ($realQty > $disc_quantity) { + $amountDiscounted = $amountDiscounted * $disc_quantity; + } + + if ($amountDiscounted > $leastWorthItem['price']) { + $amountDiscounted = $leastWorthItem['price']; } } else if ($action_type == config('pricerules.cart.validation.2')) { $amountDiscounted = $disc_amount; - if ($amountDiscounted > $leastWorthItem['total']) { - $amountDiscounted = $leastWorthItem['total']; + if ($realQty > $disc_quantity) { + $amountDiscounted = $amountDiscounted * $disc_quantity; + } + + if ($amountDiscounted > $leastWorthItem['price']) { + $amountDiscounted = $leastWorthItem['price']; } } } @@ -459,7 +473,6 @@ class Discount if ($existingRule->count()) { if ($existingRule->first()->delete()) { - foreach ($cart->items as $item) { if ($item->discount_amount > 0) { $item->update([ @@ -477,6 +490,8 @@ class Discount 'base_discount_amount' => 0 ]); + \Cart::collectTotals(); + return true; } else { return false; diff --git a/packages/Webkul/Shop/src/Http/Controllers/CartController.php b/packages/Webkul/Shop/src/Http/Controllers/CartController.php index 274e1939c..48ffb82bf 100755 --- a/packages/Webkul/Shop/src/Http/Controllers/CartController.php +++ b/packages/Webkul/Shop/src/Http/Controllers/CartController.php @@ -305,12 +305,16 @@ class CartController extends Controller if ($result) { return response()->json([ 'success' => true, - 'message' => trans('admin::app.promotion.status.coupon-removed') + 'message' => trans('admin::app.promotion.status.coupon-removed'), + 'data' => [ + 'grand_total' => core()->currency(Cart::getCart()->grand_total) + ] ]); } else { return response()->json([ 'success' => false, - 'message' => trans('admin::app.promotion.status.coupon-remove-failed') + 'message' => trans('admin::app.promotion.status.coupon-remove-failed'), + 'data' => null ]); } } 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 071dbf16b..607d84292 100755 --- a/packages/Webkul/Shop/src/Resources/views/checkout/onepage.blade.php +++ b/packages/Webkul/Shop/src/Resources/views/checkout/onepage.blade.php @@ -538,7 +538,7 @@ document.getElementById("discount-detail").style.display = "block"; document.getElementById("discount-detail-discount-amount").innerHTML = response.data.result.formatted_discount; - document.getElementById("discount-detail-discount-amount").innerHTML = response.data.result.formatted_discount; + document.getElementById("grand-total-amount-detail").innerHTML = response.data.result.grand_total; }).catch(function(error) { console.log(error.data); }); @@ -550,8 +550,14 @@ axios.post('{{ route('shop.checkout.remove.coupon') }}') .then(function(response) { this_this.coupon_used = false; + this_this.code = ''; + + console.log(response.data.data.grand_total); + document.getElementById("discount-detail").style.display = "none"; + + document.getElementById("grand-total-amount-detail").innerHTML = response.data.data.grand_total; }).catch(function(error) { console.log(error.data); From 9ae4f8a80112d6015c3cf556cc9141a7f96bfbc3 Mon Sep 17 00:00:00 2001 From: Prashant Singh Date: Sat, 15 Jun 2019 18:47:53 +0530 Subject: [PATCH 383/678] Fixed issues with cart rule customer groups --- .../views/promotions/cart-rule/edit.blade.php | 6 +- .../Http/Controllers/CartRuleController.php | 77 +++++++++++++++---- .../views/checkout/onepage.blade.php | 25 ------ .../views/checkout/total/summary.blade.php | 1 - 4 files changed, 63 insertions(+), 46 deletions(-) diff --git a/packages/Webkul/Admin/src/Resources/views/promotions/cart-rule/edit.blade.php b/packages/Webkul/Admin/src/Resources/views/promotions/cart-rule/edit.blade.php index 95f4b4de1..ce21944ca 100644 --- a/packages/Webkul/Admin/src/Resources/views/promotions/cart-rule/edit.blade.php +++ b/packages/Webkul/Admin/src/Resources/views/promotions/cart-rule/edit.blade.php @@ -76,7 +76,7 @@
- {{--
+
- @{{ errors.first('customer_groups') }} -
--}} + @{{ errors.first('customer_groups[]') }} +
diff --git a/packages/Webkul/Discount/src/Http/Controllers/CartRuleController.php b/packages/Webkul/Discount/src/Http/Controllers/CartRuleController.php index 93f1271bf..6853cd9d2 100644 --- a/packages/Webkul/Discount/src/Http/Controllers/CartRuleController.php +++ b/packages/Webkul/Discount/src/Http/Controllers/CartRuleController.php @@ -83,7 +83,7 @@ class CartRuleController extends Controller */ public function store() { - $validated = $this->validate($data, [ + $validated = $this->validate(request(), [ 'name' => 'required|string', 'description' => 'string', 'customer_groups' => 'required|array', @@ -114,9 +114,13 @@ class CartRuleController extends Controller // set per customer usage limit $data['per_customer'] = 0; - // check starts from and ends till - if ($data['starts_from'] == "" || $data['ends_till'] == "") { + // check if starts_from is null + if ($data['starts_from'] == "") { $data['starts_from'] = null; + } + + // check if end_till is null + if ($data['ends_till'] == "") { $data['ends_till'] = null; } @@ -282,12 +286,10 @@ class CartRuleController extends Controller */ public function update($id) { - $types = config('price_rules.cart.validations'); - $this->validate(request(), [ 'name' => 'required|string', 'description' => 'string', - // 'customer_groups' => 'required|array', + 'customer_groups' => 'required|array', 'channels' => 'required|array', 'status' => 'required|boolean', 'use_coupon' => 'boolean|required', @@ -304,35 +306,58 @@ class CartRuleController extends Controller 'label' => 'array|nullable' ]); - $data['usage_limit'] = 0; - $data['per_customer'] = 0; - + // collecting request in $data $data = request()->all(); - if ($data['starts_from'] == "" || $data['ends_till'] == "") { + // unset request token from $data + unset($data['_token']); + + // condition validation rules from config + $types = config('price_rules.cart.validations'); + + // set rule uasge limit + $data['usage_limit'] = 0; + + // set rule usage per customer + $data['per_customer'] = 0; + + // check if starts_from is null + if ($data['starts_from'] == "") { $data['starts_from'] = null; + } + + // check if end_till is null + if ($data['ends_till'] == "") { $data['ends_till'] = null; } - unset($data['_token']); - + // set channels $channels = $data['channels']; + // unset the channels from $data unset($data['channels']); - // $customer_groups = $data['customer_groups']; - // unset($data['customer_groups']); - // unset($data['criteria']); + // set customer_groups + $customer_groups = $data['customer_groups']; + // unset customer groups + unset($data['customer_groups']); + + // unset criteria from conditions + unset($data['criteria']); + + // set labels and unset them from $data if (isset($data['label'])) { $labels = $data['label']; unset($data['label']); } + // unset cart_attributes and attributes from $data unset($data['cart_attributes']); unset($data['attributes']); + // prepare actions from data for json action if (isset($data['disc_amount']) && $data['action_type'] == config('pricerules.cart.validations.2')) { $data['actions'] = [ 'action_type' => $data['action_type'], @@ -349,16 +374,20 @@ class CartRuleController extends Controller ]; } + // encode php array to json for actions $data['actions'] = json_encode($data['actions']); + // prepare conditions from data for json conditions if (! isset($data['all_conditions']) || $data['all_conditions'] == "[]") { $data['conditions'] = null; } else { $data['conditions'] = json_encode($data['all_conditions']); } + // unset all_conditions from conditions unset($data['all_conditions']); + // set coupons from $data if ($data['use_coupon']) { // if (isset($data['auto_generation']) && $data['auto_generation']) { $data['auto_generation'] = 0; @@ -386,13 +415,19 @@ class CartRuleController extends Controller // $coupons['limit'] = $data['usage_limit']; // } + // update cart rule $ruleUpdated = $this->cartRule->update($data, $id); - // $ruleGroupUpdated = $this->cartRule->CustomerGroupSync($customer_groups, $ruleUpdated); + // update customer groups for cart rule + $ruleGroupUpdated = $this->cartRule->CustomerGroupSync($customer_groups, $ruleUpdated); + + // update customer groups for cart rule $ruleChannelUpdated = $this->cartRule->ChannelSync($channels, $ruleUpdated); + // update labels $labelsUpdated = $this->cartRule->LabelSync($labels, $ruleUpdated); + // check coupons set conditions if (isset($coupons)) { $coupons['cart_rule_id'] = $ruleUpdated->id; // $coupons['usage_per_customer'] = $data['per_customer']; //0 is for unlimited usage @@ -400,7 +435,7 @@ class CartRuleController extends Controller $couponUpdated = $ruleUpdated->coupons->update($coupons); } - if ($ruleUpdated && $ruleChannelUpdated) { + if ($ruleUpdated && $ruleGroupUpdated && $ruleChannelUpdated) { if (isset($couponUpdated) && $couponUpdated) { session()->flash('info', trans('admin::app.promotion.status.success-coupon')); } @@ -415,6 +450,9 @@ class CartRuleController extends Controller return redirect()->route($this->_config['redirect']); } + /** + * Delete + */ public function destroy($id) { $cartRule = $this->cartRule->findOrFail($id); @@ -430,6 +468,11 @@ class CartRuleController extends Controller } } + /** + * Get Countries and states list from core helpers + * + * @return Array + */ public function getStatesAndCountries() { $countries = core()->countries()->toArray(); 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 607d84292..02e593fbc 100755 --- a/packages/Webkul/Shop/src/Resources/views/checkout/onepage.blade.php +++ b/packages/Webkul/Shop/src/Resources/views/checkout/onepage.blade.php @@ -374,31 +374,6 @@ this.templateRender() : '') ]); - }, - - methods: { - onSubmit: function() { - var this_this = this; - - axios.post('{{ route('shop.checkout.check.coupons') }}', { - code: this_this.code - }).then(function(response) { - console.log(response.data); - }).catch(function(error) { - console.log(error.data); - }); - }, - - removeCoupon: function () { - var this_this = this; - - axios.post('{{ route('shop.checkout.remove.coupon') }}') - .then(function(response) { - console.log(response.data); - }).catch(function(error) { - console.log(error.data); - }); - } } }) diff --git a/packages/Webkul/Shop/src/Resources/views/checkout/total/summary.blade.php b/packages/Webkul/Shop/src/Resources/views/checkout/total/summary.blade.php index ca2ebabfd..f5229a87b 100755 --- a/packages/Webkul/Shop/src/Resources/views/checkout/total/summary.blade.php +++ b/packages/Webkul/Shop/src/Resources/views/checkout/total/summary.blade.php @@ -24,7 +24,6 @@
@endif -
discount_amount && $cart->discount_amount > 0) style="display: block;" @else style="display: none;" @endif>
\ No newline at end of file diff --git a/packages/Webkul/Shop/src/Resources/views/checkout/total/summary.blade.php b/packages/Webkul/Shop/src/Resources/views/checkout/total/summary.blade.php index ca2ebabfd..4db1a1d51 100755 --- a/packages/Webkul/Shop/src/Resources/views/checkout/total/summary.blade.php +++ b/packages/Webkul/Shop/src/Resources/views/checkout/total/summary.blade.php @@ -44,28 +44,35 @@
-
is('checkout/cart')) v-if="hide_discount" @endif> +
is('checkout/cart')) v-if="parseInt(discount)" @endif> @if (! request()->is('checkout/cart')) -
-
-
-
- -
+ @if (! $cart->coupon_code) +
+
+ +
+ +
- @{{ error_message }} + @{{ error_message }} - - + + +
-
+ @else +
+
+ -
-
- - + +
-
+ @endif @endif
\ No newline at end of file From b93bc11c659038e4a08ac4fa130002bf79e31a74 Mon Sep 17 00:00:00 2001 From: jitendra Date: Sat, 15 Jun 2019 22:28:21 +0530 Subject: [PATCH 387/678] Fixed js error in checkout page --- .../Shop/src/Resources/views/checkout/onepage.blade.php | 4 +++- .../Shop/src/Resources/views/checkout/total/summary.blade.php | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) 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 0a5f67920..4c025487a 100755 --- a/packages/Webkul/Shop/src/Resources/views/checkout/onepage.blade.php +++ b/packages/Webkul/Shop/src/Resources/views/checkout/onepage.blade.php @@ -480,6 +480,8 @@ return { templateRender: null, + coupon_code: null, + error_message: '' } }, @@ -506,7 +508,7 @@ onSubmit: function() { var this_this = this; - axios.post('{{ route('shop.checkout.check.coupons') }}', {code: this_this.code}) + axios.post('{{ route('shop.checkout.check.coupons') }}', {code: this_this.coupon_code}) .then(function(response) { this_this.$emit('onApplyCoupon') }) diff --git a/packages/Webkul/Shop/src/Resources/views/checkout/total/summary.blade.php b/packages/Webkul/Shop/src/Resources/views/checkout/total/summary.blade.php index 4db1a1d51..01de2b767 100755 --- a/packages/Webkul/Shop/src/Resources/views/checkout/total/summary.blade.php +++ b/packages/Webkul/Shop/src/Resources/views/checkout/total/summary.blade.php @@ -51,7 +51,7 @@
- +
@{{ error_message }} From 15abe379e0425bd80454e1dc1f84267800b04dd3 Mon Sep 17 00:00:00 2001 From: Prashant Singh Date: Sun, 16 Jun 2019 17:26:06 +0530 Subject: [PATCH 388/678] Changed frontend attributes and syntax fixes in checkout --- .../promotions/cart-rule/create.blade.php | 3 +- .../views/promotions/cart-rule/edit.blade.php | 28 +++- .../Webkul/Discount/src/Helpers/Discount.php | 3 + .../Http/Controllers/CartRuleController.php | 6 +- .../Http/Controllers/OnepageController.php | 20 +-- .../views/checkout/onepage.blade.php | 144 +++++++++--------- .../views/checkout/onepage/review.blade.php | 3 +- .../views/checkout/total/summary.blade.php | 13 +- .../assets/js/components/accordian.vue | 2 +- 9 files changed, 128 insertions(+), 94 deletions(-) diff --git a/packages/Webkul/Admin/src/Resources/views/promotions/cart-rule/create.blade.php b/packages/Webkul/Admin/src/Resources/views/promotions/cart-rule/create.blade.php index 0f2d6d222..e9721e456 100644 --- a/packages/Webkul/Admin/src/Resources/views/promotions/cart-rule/create.blade.php +++ b/packages/Webkul/Admin/src/Resources/views/promotions/cart-rule/create.blade.php @@ -476,7 +476,6 @@ this.conditions_list.push(this.cart_object); this.cart_object = { - criteria: null, attribute: null, condition: null, value: [] @@ -526,7 +525,7 @@ onSubmit: function (e) { if (this.conditions_list.length != 0) { - this.conditions_list.test_mode = this.match_criteria; + this.conditions_list.push({'criteria': this.match_criteria}); } this.all_conditions = JSON.stringify(this.conditions_list); diff --git a/packages/Webkul/Admin/src/Resources/views/promotions/cart-rule/edit.blade.php b/packages/Webkul/Admin/src/Resources/views/promotions/cart-rule/edit.blade.php index ce21944ca..66d974f05 100644 --- a/packages/Webkul/Admin/src/Resources/views/promotions/cart-rule/edit.blade.php +++ b/packages/Webkul/Admin/src/Resources/views/promotions/cart-rule/edit.blade.php @@ -567,12 +567,32 @@ }, onSubmit: function (e) { + if (this.conditions_list.length != 0) { - // if (this.conditions_list.length != 0) { - // this.conditions_list.push(this.match_criteria); - // } + indexes = []; - console.log(JSON.stringify(this.conditions_list)); + for (i in this.conditions_list) { + if (this.conditions_list[i].hasOwnProperty('criteria') && ! this.conditions_list[i].hasOwnProperty('attribute')) { + indexes.push(i); + } + } + + if (indexes.length > 1) { + for (i in indexes) { + console.log(indexes[i]); + if (this.conditions_list.length ) + this.conditions_list.splice(indexes[i], 1); + } + } else { + + } + + return false; + + this.conditions_list.push({'criteria': this.match_criteria}); + } + + return false; this.all_conditions = JSON.stringify(this.conditions_list); diff --git a/packages/Webkul/Discount/src/Helpers/Discount.php b/packages/Webkul/Discount/src/Helpers/Discount.php index f48e14796..3d7b7ab39 100644 --- a/packages/Webkul/Discount/src/Helpers/Discount.php +++ b/packages/Webkul/Discount/src/Helpers/Discount.php @@ -502,6 +502,8 @@ class Discount } protected function testIfAllConditionAreTrue($conditions, $cart) { + array_pop($conditions); + $shipping_address = $cart->getShippingAddressAttribute() ?? ''; $shipping_method = $cart->shipping_method ?? ''; @@ -524,6 +526,7 @@ class Discount $test_conditions = config('pricerules.cart.conditions'); $result = 1; + foreach ($conditions as $condition) { $actual_value = ${$condition->attribute}; $test_value = $condition->value; diff --git a/packages/Webkul/Discount/src/Http/Controllers/CartRuleController.php b/packages/Webkul/Discount/src/Http/Controllers/CartRuleController.php index 6853cd9d2..d23bf0715 100644 --- a/packages/Webkul/Discount/src/Http/Controllers/CartRuleController.php +++ b/packages/Webkul/Discount/src/Http/Controllers/CartRuleController.php @@ -79,7 +79,7 @@ class CartRuleController extends Controller } /** - * @return Redirect + * @return redirect */ public function store() { @@ -451,7 +451,9 @@ class CartRuleController extends Controller } /** - * Delete + * Deletes the cart rule + * + * @return JSON */ public function destroy($id) { diff --git a/packages/Webkul/Shop/src/Http/Controllers/OnepageController.php b/packages/Webkul/Shop/src/Http/Controllers/OnepageController.php index eaf2454d6..587bd800b 100755 --- a/packages/Webkul/Shop/src/Http/Controllers/OnepageController.php +++ b/packages/Webkul/Shop/src/Http/Controllers/OnepageController.php @@ -99,13 +99,13 @@ class OnepageController extends Controller $data['billing']['address1'] = implode(PHP_EOL, array_filter($data['billing']['address1'])); $data['shipping']['address1'] = implode(PHP_EOL, array_filter($data['shipping']['address1'])); - if (Cart::hasError() || !Cart::saveCustomerAddress($data) || ! $rates = Shipping::collectRates()) - return response()->json(['redirect_url' => route('shop.checkout.cart.index')], 403); - Cart::applyNonCoupon(); Cart::collectTotals(); + if (Cart::hasError() || !Cart::saveCustomerAddress($data) || ! $rates = Shipping::collectRates()) + return response()->json(['redirect_url' => route('shop.checkout.cart.index')], 403); + return response()->json($rates); } @@ -118,13 +118,13 @@ class OnepageController extends Controller { $shippingMethod = request()->get('shipping_method'); - if (Cart::hasError() || !$shippingMethod || !Cart::saveShippingMethod($shippingMethod)) - return response()->json(['redirect_url' => route('shop.checkout.cart.index')], 403); - Cart::applyNonCoupon(); Cart::collectTotals(); + if (Cart::hasError() || !$shippingMethod || !Cart::saveShippingMethod($shippingMethod)) + return response()->json(['redirect_url' => route('shop.checkout.cart.index')], 403); + return response()->json(Payment::getSupportedPaymentMethods()); } @@ -137,15 +137,15 @@ class OnepageController extends Controller { $payment = request()->get('payment'); + Cart::applyNonCoupon(); + + Cart::collectTotals(); + if (Cart::hasError() || !$payment || !Cart::savePaymentMethod($payment)) return response()->json(['redirect_url' => route('shop.checkout.cart.index')], 403); $cart = Cart::getCart(); - Cart::applyNonCoupon(); - - Cart::collectTotals(); - return response()->json([ 'jump_to_section' => 'review', 'html' => view('shop::checkout.onepage.review', compact('cart', 'rule'))->render() 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 02e593fbc..93613d39c 100755 --- a/packages/Webkul/Shop/src/Resources/views/checkout/onepage.blade.php +++ b/packages/Webkul/Shop/src/Resources/views/checkout/onepage.blade.php @@ -71,8 +71,12 @@
-
- +
+ +
+ +
+
- +
@@ -341,42 +345,6 @@ } }) - var summaryTemplateRenderFns = []; - - Vue.component('summary-section', { - inject: ['$validator'], - - data: function() { - return { - templateRender: null, - - code: null, - - coupon_used: false, - - hide_discount: 0 - } - }, - - staticRenderFns: summaryTemplateRenderFns, - - mounted: function() { - this.templateRender = summaryHtml.render; - - for (var i in summaryHtml.staticRenderFns) { - summaryTemplateRenderFns.push(summaryHtml.staticRenderFns[i]); - } - }, - - render: function(h) { - return h('div', [ - (this.templateRender ? - this.templateRender() : - '') - ]); - } - }) - var shippingTemplateRenderFns = []; Vue.component('shipping-section', { @@ -460,40 +428,78 @@ eventBus.$emit('after-payment-method-selected'); } } - }) + }); var reviewTemplateRenderFns = []; Vue.component('review-section', { - data: function() { + props: ['active'], + + data: function () { return { templateRender: null, - code: '', - - hide_discount: 1, - - coupon_used: false, - - error_message: '' + hide_discount: null, } }, staticRenderFns: reviewTemplateRenderFns, - mounted: function() { + mounted: function () { + this.hide_discount = this.active; + this.templateRender = reviewHtml.render; + for (var i in reviewHtml.staticRenderFns) { reviewTemplateRenderFns.push(reviewHtml.staticRenderFns[i]); } - - @if ($cart->coupon_code != null) - this.code = '{{ $cart->coupon_code }}'; - this.coupon_used = true; - @endif }, render: function(h) { + return h('div', [ + (this.templateRender ? + this.templateRender() : + '') + ] + ); + } + }); + + var summaryTemplateRenderFns = []; + + Vue.component('summary-section', { + inject: ['$validator'], + props: ['active'], + + data: function () { + return { + templateRender: null, + + code: null, + + coupon_used: false, + + hide_discount: null, + + error_message: '', + + call_count: 0, + } + }, + + staticRenderFns: summaryTemplateRenderFns, + + mounted: function () { + this.hide_discount = this.active; + + this.templateRender = summaryHtml.render; + + for (var i in summaryHtml.staticRenderFns) { + summaryTemplateRenderFns.push(summaryHtml.staticRenderFns[i]); + } + }, + + render: function (h) { return h('div', [ (this.templateRender ? this.templateRender() : @@ -510,12 +516,8 @@ }).then(function(response) { this_this.coupon_used = true; - document.getElementById("discount-detail").style.display = "block"; - document.getElementById("discount-detail-discount-amount").innerHTML = response.data.result.formatted_discount; - - document.getElementById("grand-total-amount-detail").innerHTML = response.data.result.grand_total; + this_this.getOrderSummary(); }).catch(function(error) { - console.log(error.data); }); }, @@ -527,20 +529,24 @@ this_this.coupon_used = false; this_this.code = ''; + }).catch(function(error) {}); + }, - console.log(response.data.data.grand_total); + getOrderSummary () { + var this_this = this; - document.getElementById("discount-detail").style.display = "none"; + this.$http.get("{{ route('shop.checkout.summary') }}") + .then(function(response) { + this_this.resetSummary = false; - document.getElementById("grand-total-amount-detail").innerHTML = response.data.data.grand_total; - }).catch(function(error) { - console.log(error.data); - - this_this.error_message = '{{ __('shop::app.checkout.onepage.total.cannot-apply-coupon') }}' - }); - } + summaryHtml = Vue.compile(response.data.html) + setTimeout(function() { + this_this.resetSummary = true; + }, 0); + }).catch(function (error) {}) + }, } - }); + }) @endpush \ No newline at end of file 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 5341e42e4..d200f8a9c 100755 --- a/packages/Webkul/Shop/src/Resources/views/checkout/onepage/review.blade.php +++ b/packages/Webkul/Shop/src/Resources/views/checkout/onepage/review.blade.php @@ -155,7 +155,8 @@
- @include('shop::checkout.total.summary', ['cart' => $cart]) + {{-- @include('shop::checkout.total.summary', ['cart' => $cart]) --}} +
\ No newline at end of file diff --git a/packages/Webkul/Shop/src/Resources/views/checkout/total/summary.blade.php b/packages/Webkul/Shop/src/Resources/views/checkout/total/summary.blade.php index f5229a87b..678798244 100755 --- a/packages/Webkul/Shop/src/Resources/views/checkout/total/summary.blade.php +++ b/packages/Webkul/Shop/src/Resources/views/checkout/total/summary.blade.php @@ -1,4 +1,4 @@ -
+

{{ __('shop::app.checkout.total.order-summary') }}

@@ -35,7 +35,6 @@
-