diff --git a/.env.example b/.env.example
index 39dc29756..2150f9b2c 100644
--- a/.env.example
+++ b/.env.example
@@ -1,6 +1,6 @@
APP_NAME=Laravel
APP_ENV=local
-APP_VERSION=0.1.5
+APP_VERSION=0.1.6
APP_KEY=
APP_DEBUG=true
APP_URL=http://localhost
diff --git a/README.md b/README.md
index e4d48a9b8..30a18d51b 100755
--- a/README.md
+++ b/README.md
@@ -27,6 +27,8 @@ a progressive Javascript framework.
**Bagisto is viable attempt to cut down your time, cost and workforce for building online stores or migrating from physical stores
to the ever demanding online world. Your business whether small or huge it suits all and very simple to set it up.**
+**Read our documentation: [Bagisto Docs](https://devdocs.bagisto.com/)**
+
**We are also having a forum for any type of your concern, feature request discussions. Please visit: [Bagisto Forums](https://forums.bagisto.com/)**
# Visit our live [Demo](https://demo.bagisto.com)
@@ -45,6 +47,7 @@ It packs in lots of demanding features that allows your business to scale in no
* Orders Management System.
* Customer Cart, Wishlist, Product Reviews.
* Simple and Configurable Products.
+* Price rules (Discount) inbuilt.
* Check out [click here](https://bagisto.com/features/).
**For Developers**:
@@ -137,6 +140,11 @@ Although, mailer environment variables are also required to be set up as **Bagis
##### On server:
+Warning: Before going full on production mode we recommend you to install developer dependencies.
+In order to do that, run the command below:
+
+> composer install --no-dev
+
~~~
Open the specified entry point in your hosts file in browser or make entry in hosts file if not done.
~~~
diff --git a/composer.json b/composer.json
index ef7ac4994..ada2d1e1c 100755
--- a/composer.json
+++ b/composer.json
@@ -57,7 +57,10 @@
"bagisto/laravel-shipping": "v0.1.0",
"bagisto/laravel-payment": "v0.1.0",
"bagisto/laravel-sales": "v0.1.0",
- "bagisto/laravel-tax": "v0.1.0"
+ "bagisto/laravel-tax": "v0.1.0",
+ "bagisto/laravel-api": "v0.1.0",
+ "bagisto/laravel-paypal": "v0.1.0",
+ "bagisto/laravel-discount": "v0.1.0"
},
"autoload": {
"classmap": [
@@ -85,7 +88,8 @@
"Webkul\\Sales\\": "packages/Webkul/Sales/src",
"Webkul\\Tax\\": "packages/Webkul/Tax/src",
"Webkul\\API\\": "packages/Webkul/API",
- "Webkul\\CustomerDocument\\": "packages/Webkul/CustomerDocument/src"
+ "Webkul\\CustomerDocument\\": "packages/Webkul/CustomerDocument/src",
+ "Webkul\\Discount\\": "packages/Webkul/Discount/src"
}
},
"autoload-dev": {
diff --git a/config/app.php b/config/app.php
index 7820f103c..b142d15f6 100755
--- a/config/app.php
+++ b/config/app.php
@@ -138,7 +138,7 @@ return [
/*
Application Version
*/
- 'version' => env('APP_VERSION', '0.1.5'),
+ 'version' => env('APP_VERSION', '0.1.6'),
/**
* Blacklisting attributes while debugging
@@ -246,6 +246,7 @@ return [
Webkul\Tax\Providers\TaxServiceProvider::class,
Webkul\API\Providers\APIServiceProvider::class,
Webkul\CustomerDocument\Providers\CustomerDocumentServiceProvider::class,
+ Webkul\Discount\Providers\DiscountServiceProvider::class
],
/*
diff --git a/config/concord.php b/config/concord.php
index 3585e74c6..96665e96c 100755
--- a/config/concord.php
+++ b/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/config/paymentmethods.php b/config/paymentmethods.php
index 2ac30fc74..6dd355233 100755
--- a/config/paymentmethods.php
+++ b/config/paymentmethods.php
@@ -1,6 +1,4 @@
\ No newline at end of file
+];
\ No newline at end of file
diff --git a/config/pricerules.php b/config/pricerules.php
new file mode 100644
index 000000000..25058db0c
--- /dev/null
+++ b/config/pricerules.php
@@ -0,0 +1,5 @@
+
\ No newline at end of file
+];
\ No newline at end of file
diff --git a/config/session.php b/config/session.php
index fe35b5732..f94a17900 100755
--- a/config/session.php
+++ b/config/session.php
@@ -29,7 +29,7 @@ return [
|
*/
- 'lifetime' => env('SESSION_LIFETIME', 10),
+ 'lifetime' => env('SESSION_LIFETIME', 30),
'expire_on_close' => true,
diff --git a/database/migrations/2019_03_28_105855_create_discounts_table.php b/database/migrations/2019_03_28_105855_create_discounts_table.php
deleted file mode 100644
index 32a994e04..000000000
--- a/database/migrations/2019_03_28_105855_create_discounts_table.php
+++ /dev/null
@@ -1,31 +0,0 @@
-increments('id');
- $table->timestamps();
- });
- }
-
- /**
- * Reverse the migrations.
- *
- * @return void
- */
- public function down()
- {
- Schema::dropIfExists('discounts');
- }
-}
diff --git a/database/migrations/2019_03_28_105910_create_discount_rules_table.php b/database/migrations/2019_03_28_105910_create_discount_rules_table.php
deleted file mode 100644
index bd8d8e890..000000000
--- a/database/migrations/2019_03_28_105910_create_discount_rules_table.php
+++ /dev/null
@@ -1,31 +0,0 @@
-increments('id');
- $table->timestamps();
- });
- }
-
- /**
- * Reverse the migrations.
- *
- * @return void
- */
- public function down()
- {
- Schema::dropIfExists('discount_rules');
- }
-}
diff --git a/database/migrations/2019_03_28_120827_create_discount_channels_table.php b/database/migrations/2019_03_28_120827_create_discount_channels_table.php
deleted file mode 100644
index b294609d2..000000000
--- a/database/migrations/2019_03_28_120827_create_discount_channels_table.php
+++ /dev/null
@@ -1,31 +0,0 @@
-increments('id');
- $table->timestamps();
- });
- }
-
- /**
- * Reverse the migrations.
- *
- * @return void
- */
- public function down()
- {
- Schema::dropIfExists('discount_channels');
- }
-}
diff --git a/database/migrations/2019_03_28_120843_create_discount_customer_groups_table.php b/database/migrations/2019_03_28_120843_create_discount_customer_groups_table.php
deleted file mode 100644
index 422475398..000000000
--- a/database/migrations/2019_03_28_120843_create_discount_customer_groups_table.php
+++ /dev/null
@@ -1,31 +0,0 @@
-increments('id');
- $table->timestamps();
- });
- }
-
- /**
- * Reverse the migrations.
- *
- * @return void
- */
- public function down()
- {
- Schema::dropIfExists('discount_customer_group');
- }
-}
diff --git a/packages/Webkul/Admin/composer.json b/packages/Webkul/Admin/composer.json
index 67a87fa43..dd550b7b6 100755
--- a/packages/Webkul/Admin/composer.json
+++ b/packages/Webkul/Admin/composer.json
@@ -26,4 +26,4 @@
}
},
"minimum-stability": "dev"
-}
+}
\ No newline at end of file
diff --git a/packages/Webkul/Admin/src/Config/menu.php b/packages/Webkul/Admin/src/Config/menu.php
index 47e0a11ea..b97d0dbe2 100755
--- a/packages/Webkul/Admin/src/Config/menu.php
+++ b/packages/Webkul/Admin/src/Config/menu.php
@@ -176,5 +176,24 @@ return [
'route' => 'admin.tax-rates.index',
'sort' => 2,
'icon-class' => '',
+ ], [
+ 'key' => 'promotion',
+ 'name' => 'admin::app.layouts.promotion',
+ 'route' => 'admin.cart-rule.index',
+ 'sort' => 7,
+ 'icon-class' => 'promotion-icon',
+ ], [
+ 'key' => 'promotion.cart-rule',
+ 'name' => 'admin::app.promotion.cart-rule',
+ 'route' => 'admin.cart-rule.index',
+ 'sort' => 1,
+ 'icon-class' => '',
]
+ // , [
+ // 'key' => 'promotion.catalog-rule',
+ // 'name' => 'admin::app.promotion.catalog-rule',
+ // 'route' => 'admin.catalog-rule.index',
+ // 'sort' => 1,
+ // 'icon-class' => '',
+ // ]
];
\ No newline at end of file
diff --git a/packages/Webkul/Admin/src/DataGrids/CartRuleDataGrid.php b/packages/Webkul/Admin/src/DataGrids/CartRuleDataGrid.php
new file mode 100644
index 000000000..ef51932bf
--- /dev/null
+++ b/packages/Webkul/Admin/src/DataGrids/CartRuleDataGrid.php
@@ -0,0 +1,139 @@
+ @prashant-webkul
+ * @copyright 2018 Webkul Software Pvt Ltd (http://www.webkul.com)
+ */
+class CartRuleDataGrid extends DataGrid
+{
+ protected $index = 'id'; //the column that needs to be treated as index column
+
+ protected $sortOrder = 'desc'; //asc or desc
+
+ public function prepareQueryBuilder()
+ {
+ $queryBuilder = DB::table('cart_rules')
+ ->select('id')
+ ->addSelect('id', 'name', 'starts_from', 'ends_till', 'priority', 'usage_limit', 'per_customer', 'status', 'end_other_rules', 'is_guest', 'action_type');
+
+ $this->setQueryBuilder($queryBuilder);
+ }
+
+ public function addColumns()
+ {
+ $this->addColumn([
+ 'index' => 'id',
+ 'label' => trans('admin::app.datagrid.id'),
+ 'type' => 'number',
+ 'searchable' => false,
+ 'sortable' => true,
+ 'filterable' => true
+ ]);
+
+ $this->addColumn([
+ 'index' => 'name',
+ 'label' => trans('admin::app.datagrid.name'),
+ 'type' => 'string',
+ 'searchable' => false,
+ 'sortable' => true,
+ 'filterable' => true
+ ]);
+
+ $this->addColumn([
+ 'index' => 'priority',
+ 'label' => trans('admin::app.datagrid.priority'),
+ 'type' => 'number',
+ 'searchable' => false,
+ 'sortable' => true,
+ 'filterable' => true,
+ ]);
+
+ $this->addColumn([
+ 'index' => 'status',
+ 'label' => trans('admin::app.datagrid.status'),
+ 'type' => 'boolean',
+ 'searchable' => false,
+ 'sortable' => true,
+ 'filterable' => true,
+ 'wrapper' => function($value) {
+ if ($value->status == 1)
+ return 'True';
+ else
+ 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';
+ }
+ ]);
+
+ $this->addColumn([
+ 'index' => 'end_other_rules',
+ 'label' => 'End Other Rules',
+ 'type' => 'boolean',
+ 'searchable' => false,
+ 'sortable' => true,
+ 'filterable' => true,
+ 'wrapper' => function($value) {
+ if ($value->end_other_rules == 1)
+ return 'True';
+ else
+ return 'False';
+ }
+ ]);
+
+ $this->addColumn([
+ 'index' => 'action_type',
+ 'label' => 'Action Type',
+ 'type' => 'string',
+ 'searchable' => false,
+ 'sortable' => true,
+ 'filterable' => true
+ ]);
+ }
+
+ public function prepareActions()
+ {
+ $this->addAction([
+ 'type' => 'Edit',
+ 'method' => 'GET', //use post only for redirects only
+ 'route' => 'admin.cart-rule.edit',
+ 'icon' => 'icon pencil-lg-icon'
+ ]);
+
+ $this->addAction([
+ 'type' => 'Delete',
+ 'method' => 'POST', //use post only for requests other than redirects
+ 'route' => 'admin.cart-rule.delete',
+ 'icon' => 'icon trash-icon'
+ ]);
+ }
+
+ public function prepareMassActions()
+ {
+ // $this->addMassAction([
+ // 'type' => 'delete',
+ // 'action' => route('admin.catalog.attributes.massdelete'),
+ // 'label' => 'Delete',
+ // 'method' => 'DELETE'
+ // ]);
+ }
+}
diff --git a/packages/Webkul/Admin/src/DataGrids/CatalogRuleDataGrid.php b/packages/Webkul/Admin/src/DataGrids/CatalogRuleDataGrid.php
new file mode 100644
index 000000000..ce668b22a
--- /dev/null
+++ b/packages/Webkul/Admin/src/DataGrids/CatalogRuleDataGrid.php
@@ -0,0 +1,149 @@
+ @prashant-webkul
+ * @copyright 2018 Webkul Software Pvt Ltd (http://www.webkul.com)
+ */
+class CatalogRuleDataGrid extends DataGrid
+{
+ protected $index = 'id'; //the column that needs to be treated as index column
+
+ protected $sortOrder = 'desc'; //asc or desc
+
+ public function prepareQueryBuilder()
+ {
+ $queryBuilder = DB::table('catalog_rules')
+ ->select('id')
+ ->addSelect('id', 'name', 'starts_from', 'ends_till', 'priority', 'status', 'end_other_rules', 'action_type');
+
+ $this->setQueryBuilder($queryBuilder);
+ }
+
+ public function addColumns()
+ {
+ $this->addColumn([
+ 'index' => 'id',
+ 'label' => trans('admin::app.datagrid.id'),
+ 'type' => 'number',
+ 'searchable' => false,
+ 'sortable' => true,
+ 'filterable' => true
+ ]);
+
+ $this->addColumn([
+ 'index' => 'name',
+ 'label' => trans('admin::app.datagrid.name'),
+ 'type' => 'string',
+ 'searchable' => false,
+ 'sortable' => true,
+ 'filterable' => true
+ ]);
+
+ $this->addColumn([
+ 'index' => 'starts_from',
+ 'label' => trans('admin::app.datagrid.starts-from'),
+ 'type' => 'date',
+ 'searchable' => false,
+ 'sortable' => true,
+ 'filterable' => true
+ ]);
+
+ $this->addColumn([
+ 'index' => 'ends_till',
+ 'label' => trans('admin::app.datagrid.ends-till'),
+ 'type' => 'date',
+ 'searchable' => false,
+ 'sortable' => true,
+ 'filterable' => true
+ ]);
+
+ $this->addColumn([
+ 'index' => 'priority',
+ 'label' => trans('admin::app.datagrid.priority'),
+ 'type' => 'number',
+ 'searchable' => false,
+ 'sortable' => true,
+ 'filterable' => true
+ ]);
+
+ $this->addColumn([
+ 'index' => 'status',
+ 'label' => trans('admin::app.datagrid.status'),
+ 'type' => 'boolean',
+ 'searchable' => false,
+ 'sortable' => true,
+ 'filterable' => true,
+ 'wrapper' => function ($value) {
+ if ($value->status == 1)
+ return 'True';
+ else
+ return 'False';
+ }
+ ]);
+
+ $this->addColumn([
+ 'index' => 'end_other_rules',
+ 'label' => 'End Other Rules',
+ 'type' => 'boolean',
+ 'searchable' => false,
+ 'sortable' => true,
+ 'filterable' => true,
+ 'wrapper' => function ($value) {
+ if ($value->end_other_rules == 1)
+ return 'True';
+ else
+ return 'False';
+ }
+ ]);
+
+ $this->addColumn([
+ 'index' => 'action_type',
+ 'label' => 'Action Type',
+ 'type' => 'string',
+ 'searchable' => false,
+ 'sortable' => true,
+ 'filterable' => true,
+ 'wrapper' => function ($value) {
+ foreach(config('pricerules.catalog.actions') as $key => $action) {
+ if ($value->action_type == $key) {
+ return trans($action);
+ }
+ }
+ }
+ ]);
+ }
+
+ public function prepareActions()
+ {
+ $this->addAction([
+ 'type' => 'Edit',
+ 'method' => 'GET', //use post only for redirects only
+ 'route' => 'admin.catalog-rule.edit',
+ 'icon' => 'icon pencil-lg-icon'
+ ]);
+
+ $this->addAction([
+ 'type' => 'Delete',
+ 'method' => 'POST', //use post only for requests other than redirects
+ 'route' => 'admin.catalog-rule.delete',
+ 'icon' => 'icon trash-icon'
+ ]);
+ }
+
+ public function prepareMassActions()
+ {
+ // $this->addMassAction([
+ // 'type' => 'delete',
+ // 'action' => route('admin.catalog.attributes.massdelete'),
+ // 'label' => 'Delete',
+ // 'method' => 'DELETE'
+ // ]);
+ }
+}
diff --git a/packages/Webkul/Admin/src/DataGrids/CouponsDataGrid.php b/packages/Webkul/Admin/src/DataGrids/CouponsDataGrid.php
new file mode 100644
index 000000000..464e1090a
--- /dev/null
+++ b/packages/Webkul/Admin/src/DataGrids/CouponsDataGrid.php
@@ -0,0 +1,96 @@
+ @prashant-webkul
+ * @copyright 2018 Webkul Software Pvt Ltd (http://www.webkul.com)
+ */
+class CartRuleCouponsDataGrid extends DataGrid
+{
+ protected $index = 'id'; //the column that needs to be treated as index column
+
+ protected $sortOrder = 'desc'; //asc or desc
+
+ public function prepareQueryBuilder()
+ {
+ $queryBuilder = DB::table('cart_rules')
+ ->select('id')
+ ->addSelect('id', 'code', 'limit', 'usage_per_customer', 'usage_throttle');
+
+ $this->setQueryBuilder($queryBuilder);
+ }
+
+ public function addColumns()
+ {
+ $this->addColumn([
+ 'index' => 'id',
+ 'label' => trans('admin::app.datagrid.id'),
+ 'type' => 'number',
+ 'searchable' => false,
+ 'sortable' => true,
+ 'filterable' => true
+ ]);
+
+ $this->addColumn([
+ 'index' => 'code',
+ 'label' => trans('admin::app.datagrid.code'),
+ 'type' => 'string',
+ 'searchable' => false,
+ 'sortable' => true,
+ 'filterable' => true
+ ]);
+
+ $this->addColumn([
+ 'index' => 'limit',
+ 'label' => trans('admin::app.datagrid.limit'),
+ 'type' => 'string',
+ 'searchable' => false,
+ 'sortable' => true,
+ 'filterable' => true
+ ]);
+
+ $this->addColumn([
+ 'index' => 'limit',
+ 'label' => trans('admin::app.datagrid.limit'),
+ 'type' => 'string',
+ 'searchable' => false,
+ 'sortable' => true,
+ 'filterable' => true
+ ]);
+
+ $this->addColumn([
+ 'index' => 'usage_per_customer',
+ 'label' => trans('admin::app.datagrid.usage-per-customer'),
+ 'type' => 'boolean',
+ 'searchable' => false,
+ 'sortable' => true,
+ 'filterable' => true,
+ 'wrapper' => function($value) {
+ if ($value->end_other_rules == 1)
+ return 'true';
+ else
+ return 'false';
+ }
+ ]);
+ }
+
+ public function prepareActions()
+ {
+ }
+
+ public function prepareMassActions()
+ {
+ // $this->addMassAction([
+ // 'type' => 'delete',
+ // 'action' => route('admin.catalog.attributes.massdelete'),
+ // 'label' => 'Delete',
+ // 'method' => 'DELETE'
+ // ]);
+ }
+}
diff --git a/packages/Webkul/Admin/src/DataGrids/CustomerDataGrid.php b/packages/Webkul/Admin/src/DataGrids/CustomerDataGrid.php
index 4d8407eab..732e8f64a 100755
--- a/packages/Webkul/Admin/src/DataGrids/CustomerDataGrid.php
+++ b/packages/Webkul/Admin/src/DataGrids/CustomerDataGrid.php
@@ -76,14 +76,24 @@ class CustomerDataGrid extends DataGrid
'type' => 'Edit',
'method' => 'GET', // use GET request only for redirect purposes
'route' => 'admin.customer.edit',
- 'icon' => 'icon pencil-lg-icon'
+ 'icon' => 'icon pencil-lg-icon',
+ 'title' => trans('admin::app.customers.customers.edit-help-title')
]);
$this->addAction([
'type' => 'Delete',
'method' => 'POST', // use GET request only for redirect purposes
'route' => 'admin.customer.delete',
- 'icon' => 'icon trash-icon'
+ 'icon' => 'icon trash-icon',
+ 'title' => trans('admin::app.customers.customers.delete-help-title')
+ ]);
+
+ $this->addAction([
+ 'type' => 'Add Note',
+ 'method' => 'GET',
+ 'route' => 'admin.customer.note.create',
+ 'icon' => 'icon note-icon',
+ 'title' => trans('admin::app.customers.note.help-title')
]);
}
}
\ No newline at end of file
diff --git a/packages/Webkul/Admin/src/Http/Controllers/ConfigurationController.php b/packages/Webkul/Admin/src/Http/Controllers/ConfigurationController.php
index 9e1ec21b8..eefc14ad0 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,20 @@ 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);
+ }
+
+ return [];
}
/**
@@ -160,4 +145,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
diff --git a/packages/Webkul/Admin/src/Http/Controllers/Customer/CustomerController.php b/packages/Webkul/Admin/src/Http/Controllers/Customer/CustomerController.php
index 4cdc204cf..476256f76 100755
--- a/packages/Webkul/Admin/src/Http/Controllers/Customer/CustomerController.php
+++ b/packages/Webkul/Admin/src/Http/Controllers/Customer/CustomerController.php
@@ -186,4 +186,42 @@ class CustomerController extends Controller
return response()->json(['message' => false], 400);
}
+
+ /**
+ * To load the note taking screen for the customers
+ *
+ * @return View
+ */
+ public function createNote($id)
+ {
+ $customer = $this->customer->find($id);
+
+ return view($this->_config['view'])->with('customer', $customer);
+ }
+
+ /**
+ * To store the response of the note in storage
+ *
+ * @return Redirect
+ */
+ public function storeNote()
+ {
+ $this->validate(request(), [
+ 'notes' => 'required|string'
+ ]);
+
+ $customer = $this->customer->find(request()->input('_customer'));
+
+ $noteTaken = $customer->update([
+ 'notes' => request()->input('notes')
+ ]);
+
+ if ($noteTaken) {
+ session()->flash('success', 'Note taken');
+ } else {
+ session()->flash('error', 'Note cannot be taken');
+ }
+
+ return redirect()->route($this->_config['redirect']);
+ }
}
\ No newline at end of file
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
diff --git a/packages/Webkul/Admin/src/Http/routes.php b/packages/Webkul/Admin/src/Http/routes.php
index 68a2b2704..92b39b4ff 100755
--- a/packages/Webkul/Admin/src/Http/routes.php
+++ b/packages/Webkul/Admin/src/Http/routes.php
@@ -60,6 +60,14 @@ Route::group(['middleware' => ['web']], function () {
'view' => 'admin::customers.edit'
])->name('admin.customer.edit');
+ Route::get('customers/note/{id}', 'Webkul\Admin\Http\Controllers\Customer\CustomerController@createNote')->defaults('_config',[
+ 'view' => 'admin::customers.note'
+ ])->name('admin.customer.note.create');
+
+ Route::put('customers/note/{id}', 'Webkul\Admin\Http\Controllers\Customer\CustomerController@storeNote')->defaults('_config',[
+ 'redirect' => 'admin.customer.index'
+ ])->name('admin.customer.note.store');
+
Route::put('customers/edit/{id}', 'Webkul\Admin\Http\Controllers\Customer\CustomerController@update')->defaults('_config', [
'redirect' => 'admin.customer.index'
])->name('admin.customer.update');
@@ -186,7 +194,6 @@ Route::group(['middleware' => ['web']], function () {
])->name('admin.sales.shipments.view');
});
-
// Catalog Routes
Route::prefix('catalog')->group(function () {
Route::get('/sync', 'Webkul\Product\Http\Controllers\ProductController@sync');
@@ -609,6 +616,57 @@ Route::group(['middleware' => ['web']], function () {
//DataGrid Export
Route::post('admin/export', 'Webkul\Admin\Http\Controllers\ExportController@export')->name('admin.datagrid.export');
+ Route::prefix('promotion')->group(function () {
+ // Route::get('/catalog-rule', 'Webkul\Discount\Http\Controllers\CatalogRuleController@index')->defaults('_config', [
+ // 'view' => 'admin::promotions.catalog-rule.index'
+ // ])->name('admin.catalog-rule.index');
+
+ // Route::get('/catalog-rule/create', 'Webkul\Discount\Http\Controllers\CatalogRuleController@create')->defaults('_config', [
+ // 'view' => 'admin::promotions.catalog-rule.create'
+ // ])->name('admin.catalog-rule.create');
+
+ // Route::post('/catalog-rule/create', 'Webkul\Discount\Http\Controllers\CatalogRuleController@store')->defaults('_config', [
+ // 'redirect' => 'admin.catalog-rule.index'
+ // ])->name('admin.catalog-rule.store');
+
+ // Route::get('/catalog-rule/edit/{id}', 'Webkul\Discount\Http\Controllers\CatalogRuleController@edit')->defaults('_config', [
+ // 'view' => 'admin::promotions.catalog-rule.edit'
+ // ])->name('admin.catalog-rule.edit');
+
+ // Route::post('/catalog-rule/edit/{id}', 'Webkul\Discount\Http\Controllers\CatalogRuleController@update')->defaults('_config', [
+ // 'redirect' => 'admin.catalog-rule.index'
+ // ])->name('admin.catalog-rule.update');
+
+ // Route::get('/catalog-rule/apply', 'Webkul\Discount\Http\Controllers\CatalogRuleController@applyRules')->defaults('_config', [
+ // 'view' => 'admin::promotions.catalog-rule.index'
+ // ])->name('admin.catalog-rule.apply');
+
+ // Route::post('/catalog-rule/delete/{id}', 'Webkul\Discount\Http\Controllers\CatalogRuleController@destroy')->name('admin.catalog-rule.delete');
+
+ // 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', [
+ 'view' => 'admin::promotions.cart-rule.index'
+ ])->name('admin.cart-rule.index');
+
+ Route::get('/cart-rule/create', 'Webkul\Discount\Http\Controllers\CartRuleController@create')->defaults('_config', [
+ 'view' => 'admin::promotions.cart-rule.create'
+ ])->name('admin.cart-rule.create');
+
+ Route::post('/cart-rule/store', 'Webkul\Discount\Http\Controllers\CartRuleController@store')->defaults('_config', [
+ 'redirect' => 'admin.cart-rule.index'
+ ])->name('admin.cart-rule.store');
+
+ Route::get('/cart-rule/edit/{id}', 'Webkul\Discount\Http\Controllers\CartRuleController@edit')->defaults('_config', [
+ 'view' => 'admin::promotions.cart-rule.edit'
+ ])->name('admin.cart-rule.edit');
+
+ Route::post('/cart-rule/update/{id}', 'Webkul\Discount\Http\Controllers\CartRuleController@update')->defaults('_config', [
+ 'redirect' => 'admin.cart-rule.index'
+ ])->name('admin.cart-rule.update');
+
+ Route::post('/cart-rule/delete/{id}', 'Webkul\Discount\Http\Controllers\CartRuleController@destroy')->name('admin.cart-rule.delete');
+ });
});
});
-});
+});
\ No newline at end of file
diff --git a/packages/Webkul/Admin/src/Resources/assets/sass/app.scss b/packages/Webkul/Admin/src/Resources/assets/sass/app.scss
index f43b33d92..292f65ed6 100755
--- a/packages/Webkul/Admin/src/Resources/assets/sass/app.scss
+++ b/packages/Webkul/Admin/src/Resources/assets/sass/app.scss
@@ -173,23 +173,6 @@ body {
height: 90%;
}
- // .close-nav-aside {
- // width: 100%;
- // padding: 20px;
- // text-align: center;
- // border: 1px solid $border-color;
-
- // .icon {
- // height: 24px;
- // width: 24px;
- // }
- // }
-
- // .close-nav-aside:hover {
- // background: white;
- // cursor: pointer;
- // }
-
a {
padding: 15px;
display: block;
@@ -235,7 +218,7 @@ body {
width: 24px;
height: 24px;
cursor: pointer;
- margin-top: 5px;
+ margin-top: -2px;
}
h1 {
@@ -278,6 +261,54 @@ body {
}
}
+.control-container {
+ border: 1px solid #c7c7c7;
+ padding: 10px;
+ width: 63%;
+
+ .title-bar {
+ display: inline-flex;
+ justify-content: space-between;
+ width: 100%;
+
+ .icon {
+ cursor: pointer;
+ }
+
+ .icon.cross-icon {
+ height: 24px;
+ width: 24px;
+ }
+ }
+
+ .control-group {
+ display: flex;
+ flex-direction: row;
+ align-content: center;
+ justify-content: flex-start;
+ padding: 10px;
+ border: 1px solid #c7c7c7;
+ border-radius: 2px;
+ margin-right: 15px;
+ margin-bottom: 0px;
+ }
+
+ .control-group::last-child {
+ margin-right: 0px;
+ }
+}
+
+.boolean-control-container {
+ display: flex;
+ flex-direction: row;
+ justify-content: flex-start;
+ width: 750px;
+
+ .control-group {
+ width: 200px;
+ }
+}
+
.control-group {
label {
width: 70%;
diff --git a/packages/Webkul/Admin/src/Resources/lang/en/app.php b/packages/Webkul/Admin/src/Resources/lang/en/app.php
index c5c9a4dc8..2547ebb9d 100755
--- a/packages/Webkul/Admin/src/Resources/lang/en/app.php
+++ b/packages/Webkul/Admin/src/Resources/lang/en/app.php
@@ -39,7 +39,9 @@ return [
'sliders' => 'Sliders',
'taxes' => 'Taxes',
'tax-categories' => 'Tax Categories',
- 'tax-rates' => 'Tax Rates'
+ 'tax-rates' => 'Tax Rates',
+ 'promotion' => 'Promotions',
+ 'discount' => 'Discount'
],
'acl' => [
@@ -151,7 +153,12 @@ return [
'role' => 'Role',
'sub-total' => 'Sub Total',
'no-of-products' => 'Number of Products',
- 'attribute-family' => 'Attribute Family'
+ 'attribute-family' => 'Attribute Family',
+ 'starts-from' => 'Starts From',
+ 'ends-till' => 'Ends Till',
+ 'per-cust' => 'Per Customer',
+ 'usage-throttle' => 'Usage Times',
+ 'for-guest' => 'For Guest'
],
'account' => [
@@ -732,6 +739,14 @@ return [
'is_user_defined' => 'User Defined',
'yes' => 'Yes'
],
+
+ 'note' => [
+ 'title' => 'Add Note',
+ 'save-note' => 'Save Note',
+ 'enter-note' => 'Enter Note',
+ 'help-title' => 'Add Note On This Customer'
+ ],
+
'customers' => [
'add-title' => 'Add Customer',
'edit-title' => 'Edit Customer',
@@ -752,7 +767,10 @@ return [
'female' => 'Female',
'phone' => 'Phone',
'group-default' => 'Cannot delete the default group.',
+ 'edit-help-title' => 'Edit Customer',
+ 'delete-help-title' => 'Delete Customer'
],
+
'reviews' => [
'title' => 'Reviews',
'edit-title' => 'Edit Review',
@@ -777,6 +795,85 @@ return [
]
],
+ 'promotion' => [
+ 'catalog-rule' => 'Catalog Rules',
+ 'cart-rule' => 'Cart Rule',
+ 'add-catalog-rule' => 'Add Catalog Rule',
+ 'add-cart-rule' => 'Add Cart Rule',
+ 'edit-cart-rule' => 'Edit Cart Rule',
+ 'edit-catalog-rule' => 'Edit Catalog Rule',
+ 'create-catalog-rule' => 'Create Catalog Rule',
+ 'create-cart-rule' => 'Create Cart Rule',
+ 'save-btn-title' => 'Create',
+ 'edit-btn-title' => 'Edit',
+ 'select-attr' => 'Select Attribute',
+ 'select-attr-fam' => 'Select Attribute Family',
+ 'select-cart-attr' => 'Select Cart Attribute',
+ 'general-info' => [
+ 'name' => 'Rule Name',
+ 'description' => 'Description',
+ 'starts-from' => 'Start',
+ 'ends-till' => 'End',
+ 'channels' => 'Channels',
+ 'cust-groups' => 'Customer Groups',
+ 'priority' => 'Priority',
+ 'add-condition' => 'Add Conditions',
+ 'disc_amt' => 'Discount Amount',
+ 'disc_percent' => 'Discount Percentage',
+ 'is-coupon' => 'Use Coupon',
+ 'is-coupon-yes' => 'Yes',
+ 'is-coupon-no' => 'No',
+ 'uses-per-cust' => 'Uses per customer',
+ 'all' => 'All',
+ 'any' => 'Any',
+ 'end-other-rules' => 'End other rules',
+ 'status' => 'Is Active',
+ 'all-conditions-true' => 'Assuming all conditions are true',
+ 'assuming' => 'Assuming',
+ 'any' => 'Any',
+ 'all' => 'All',
+ 'conditions' => 'Conditions',
+ 'are' => 'are',
+ 'true' => 'true',
+ 'false' => 'false',
+ 'limit' => 'Usage Limit',
+ 'specific-coupon' => 'Specific Coupon(Check) / Auto Generated(Unheck)',
+ 'free-shipping' => 'Free Shipping',
+ 'is-guest' => 'For Guests',
+ 'disc_qty' => 'Max. Quantity Allowed To Be Discounted',
+ ],
+
+ 'status' => [
+ 'success' => 'Success! rule created',
+ 'success-coupon' => 'Success! rule created along with coupon',
+ 'failed' => 'Error! failed to create rule',
+ 'update-success' => 'Success! rule updated',
+ 'update-coupon-success' => 'Success! rule updated along with coupon',
+ 'update-failed' => 'Error! cannot update',
+ 'delete-success' => 'Sucess! rule deleted',
+ 'delete-failed' => 'Error! cannot delete',
+ 'coupon-applied' => 'Coupon used',
+ 'coupon-failed' => 'Coupon failed to apply',
+ 'no-coupon' => '* Coupon not applicable',
+ 'coupon-removed' => 'Coupon removed successfully',
+ 'coupon-remove-failed' => 'Coupon removal failed'
+ ],
+
+ 'catalog' => [
+ 'name' => 'Name',
+ 'description' => 'Description',
+ 'apply-percent' => 'Apply as percentage',
+ 'apply-fixed' => 'Apply as fixed amount',
+ 'adjust-to-percent' => 'Adjust to percentage',
+ 'adjust-to-value' => 'Adjust to discount value',
+ 'condition-missing' => 'Please check conditons, some values might be missing'
+ ],
+ 'cart' => [
+ 'buy-atleast' => 'Buy Atleast (N)',
+ 'apply-to-shipping' => 'Apply to shipping'
+ ]
+ ],
+
'error' => [
'go-to-home' => 'GO TO HOME',
'in-maitainace' => 'In Maintenance',
diff --git a/packages/Webkul/Admin/src/Resources/lang/pt_BR/app.php b/packages/Webkul/Admin/src/Resources/lang/pt_BR/app.php
index 2a179adf5..0fc128215 100755
--- a/packages/Webkul/Admin/src/Resources/lang/pt_BR/app.php
+++ b/packages/Webkul/Admin/src/Resources/lang/pt_BR/app.php
@@ -677,6 +677,14 @@ return [
'is_user_defined' => 'Usuário Definido',
'yes' => 'Sim'
],
+
+ 'note' => [
+ 'title' => 'Add Note',
+ 'save-note' => 'Save Note',
+ 'enter-note' => 'Enter Note',
+ 'help-title' => 'Add Note On This Customer'
+ ],
+
'customers' => [
'add-title' => 'Add Cliente',
'edit-title' => 'Editar Cliente',
diff --git a/packages/Webkul/Admin/src/Resources/views/catalog/categories/test.blade.php b/packages/Webkul/Admin/src/Resources/views/catalog/categories/test.blade.php
deleted file mode 100644
index 40c3316c7..000000000
--- a/packages/Webkul/Admin/src/Resources/views/catalog/categories/test.blade.php
+++ /dev/null
@@ -1,24 +0,0 @@
-@extends('admin::layouts.content')
-
-@section('page_title')
- {{ __('admin::app.customers.customers.title') }}
-@stop
-
-@section('content')
-
-
-
-
-
Test the grid here
-
-
-@endsection
\ No newline at end of file
diff --git a/packages/Webkul/Admin/src/Resources/views/catalog/products/accordians/product-links.blade.php b/packages/Webkul/Admin/src/Resources/views/catalog/products/accordians/product-links.blade.php
index 29561df73..8ea8b3f3f 100755
--- a/packages/Webkul/Admin/src/Resources/views/catalog/products/accordians/product-links.blade.php
+++ b/packages/Webkul/Admin/src/Resources/views/catalog/products/accordians/product-links.blade.php
@@ -22,7 +22,7 @@
{{ __('admin::app.catalog.products.related-products') }}
-
+
diff --git a/packages/Webkul/Admin/src/Resources/views/catalog/products/index.blade.php b/packages/Webkul/Admin/src/Resources/views/catalog/products/index.blade.php
index 68b38f13c..495cb0196 100755
--- a/packages/Webkul/Admin/src/Resources/views/catalog/products/index.blade.php
+++ b/packages/Webkul/Admin/src/Resources/views/catalog/products/index.blade.php
@@ -21,9 +21,6 @@
{!! view_render_event('bagisto.admin.catalog.products.list.before') !!}
- {{-- @inject('product','Webkul\Admin\DataGrids\ProductDataGrid')
- {!! $product->render() !!} --}}
-
@inject('products', 'Webkul\Admin\DataGrids\ProductDataGrid')
{!! $products->render() !!}
diff --git a/packages/Webkul/Admin/src/Resources/views/customers/index.blade.php b/packages/Webkul/Admin/src/Resources/views/customers/index.blade.php
index 86714f9d5..675790a7a 100755
--- a/packages/Webkul/Admin/src/Resources/views/customers/index.blade.php
+++ b/packages/Webkul/Admin/src/Resources/views/customers/index.blade.php
@@ -27,7 +27,7 @@
@inject('customerGrid','Webkul\Admin\DataGrids\CustomerDataGrid')
-
+
{!! $customerGrid->render() !!}
diff --git a/packages/Webkul/Admin/src/Resources/views/customers/note.blade.php b/packages/Webkul/Admin/src/Resources/views/customers/note.blade.php
new file mode 100644
index 000000000..efe07fbb7
--- /dev/null
+++ b/packages/Webkul/Admin/src/Resources/views/customers/note.blade.php
@@ -0,0 +1,45 @@
+@extends('admin::layouts.content')
+
+@section('page_title')
+ {{ __('admin::app.customers.note.title') }}
+@stop
+
+@section('content')
+
+@stop
\ No newline at end of file
diff --git a/packages/Webkul/Admin/src/Resources/views/layouts/master.blade.php b/packages/Webkul/Admin/src/Resources/views/layouts/master.blade.php
index 4ec5052f2..a64de8787 100755
--- a/packages/Webkul/Admin/src/Resources/views/layouts/master.blade.php
+++ b/packages/Webkul/Admin/src/Resources/views/layouts/master.blade.php
@@ -62,7 +62,7 @@
@elseif ($error = session('error'))
window.flashMessages = [{'type': 'alert-error', 'message': "{{ $error }}" }];
@elseif ($info = session('info'))
- window.flashMessages = [{'type': 'alert-error', 'message': "{{ $info }}" }];
+ window.flashMessages = [{'type': 'alert-info', 'message': "{{ $info }}" }];
@endif
window.serverErrors = [];
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
new file mode 100644
index 000000000..8270f4aca
--- /dev/null
+++ b/packages/Webkul/Admin/src/Resources/views/promotions/cart-rule/create.blade.php
@@ -0,0 +1,539 @@
+@extends('admin::layouts.content')
+
+@section('page_title')
+ {{ __('admin::app.promotion.add-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/edit.blade.php b/packages/Webkul/Admin/src/Resources/views/promotions/cart-rule/edit.blade.php
new file mode 100644
index 000000000..65f3f7292
--- /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 5850f8d52..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
*
@@ -866,7 +886,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 +910,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);
@@ -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..7157a2a03
--- /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['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 && $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['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/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
*
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 afbff7de4..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');
}
@@ -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();
@@ -248,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
-
+
{{ __('shop::app.checkout.total.grand-total') }}
{{ core()->currency($cart->base_grand_total) }}
+
+
\ 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/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();
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 ba5d14a84..4a782f3b3 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)
+ 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