diff --git a/composer.json b/composer.json index 7d8d5294b..48d0cd2dd 100644 --- a/composer.json +++ b/composer.json @@ -16,6 +16,7 @@ "laravel/framework": "5.6.*", "laravel/tinker": "^1.0", "nwidart/laravel-modules": "^3.2", + "prettus/l5-repository": "^2.6", "propaganistas/laravel-intl": "^2.0" }, "require-dev": { @@ -34,7 +35,6 @@ "webkul/laravel-attribute": "self.version", "webkul/laravel-customer": "self.version", "webkul/laravel-category": "self.version", - "webkul/laravel-channel": "self.version", "webkul/laravel-product": "self.version", "webkul/laravel-shop": "self.version", "webkul/laravel-theme": "self.version" @@ -54,7 +54,6 @@ "Webkul\\Shop\\": "packages/Webkul/Shop/src", "Webkul\\Core\\": "packages/Webkul/Core/src", "Webkul\\Customer\\": "packages/Webkul/Customer/src", - "Webkul\\Channel\\": "packages/Webkul/Channel/src", "Webkul\\Inventory\\": "packages/Webkul/Inventory/src", "Webkul\\Product\\": "packages/Webkul/Product/src", "Webkul\\Theme\\": "packages/Webkul/Theme/src" diff --git a/composer.lock b/composer.lock index 43a06425e..cb287d95e 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "8acd4eec85be1351459a67cfd14d039b", + "content-hash": "ee788a0a8a86526cd58b0b4853a45c06", "packages": [ { "name": "commerceguys/intl", @@ -1394,6 +1394,109 @@ ], "time": "2018-07-02T15:55:56+00:00" }, + { + "name": "prettus/l5-repository", + "version": "2.6.32", + "source": { + "type": "git", + "url": "https://github.com/andersao/l5-repository.git", + "reference": "f6ebfffee80a38e1d2dcf479e70b1a9ead397c24" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/andersao/l5-repository/zipball/f6ebfffee80a38e1d2dcf479e70b1a9ead397c24", + "reference": "f6ebfffee80a38e1d2dcf479e70b1a9ead397c24", + "shasum": "" + }, + "require": { + "illuminate/config": "~5.0", + "illuminate/console": "~5.0", + "illuminate/database": "~5.0", + "illuminate/filesystem": "~5.0", + "illuminate/http": "~5.0", + "illuminate/pagination": "~5.0", + "illuminate/support": "~5.0", + "prettus/laravel-validation": "1.1.*" + }, + "suggest": { + "league/fractal": "Required to use the Fractal Presenter (0.12.*).", + "prettus/laravel-validation": "Required to provide easy validation with the repository (1.1.*)", + "robclancy/presenter": "Required to use the Presenter Model (1.3.*)" + }, + "type": "library", + "extra": { + "laravel": { + "providers": [ + "Prettus\\Repository\\Providers\\RepositoryServiceProvider" + ] + } + }, + "autoload": { + "psr-4": { + "Prettus\\Repository\\": "src/Prettus/Repository/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Anderson Andrade", + "email": "contato@andersonandra.de", + "role": "Developer" + } + ], + "description": "Laravel 5 - Repositories to the database layer", + "keywords": [ + "cache", + "eloquent", + "laravel", + "model", + "repository" + ], + "time": "2018-01-27T15:53:20+00:00" + }, + { + "name": "prettus/laravel-validation", + "version": "1.1.5", + "source": { + "type": "git", + "url": "https://github.com/andersao/laravel-validator.git", + "reference": "d9eb401fb3518a890b117e83bd25a4109fcdb704" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/andersao/laravel-validator/zipball/d9eb401fb3518a890b117e83bd25a4109fcdb704", + "reference": "d9eb401fb3518a890b117e83bd25a4109fcdb704", + "shasum": "" + }, + "require": { + "illuminate/support": "~5.4", + "illuminate/validation": "~5.4", + "php": ">=5.4.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Prettus\\Validator\\": "src/Prettus/Validator/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "authors": [ + { + "name": "Anderson Andrade", + "email": "contato@andersonandra.de" + } + ], + "description": "Laravel Validation Service", + "keywords": [ + "laravel", + "service", + "validation" + ], + "time": "2017-08-28T23:28:32+00:00" + }, { "name": "propaganistas/laravel-intl", "version": "2.0.3", diff --git a/config/app.php b/config/app.php index ac0cb2b2b..d34452c5f 100644 --- a/config/app.php +++ b/config/app.php @@ -172,6 +172,7 @@ return [ //Laravel Intervention Intervention\Image\ImageServiceProvider::class, + Prettus\Repository\Providers\RepositoryServiceProvider::class, //Webkul packages Webkul\User\Providers\UserServiceProvider::class, @@ -182,7 +183,6 @@ return [ Webkul\Core\Providers\CoreServiceProvider::class, Webkul\Shop\Providers\ShopServiceProvider::class, Webkul\Customer\Providers\CustomerServiceProvider::class, - Webkul\Channel\Providers\ChannelServiceProvider::class, Webkul\Inventory\Providers\InventoryServiceProvider::class, Webkul\Product\Providers\ProductServiceProvider::class, Webkul\Shop\Providers\ShopServiceProvider::class, @@ -237,6 +237,7 @@ return [ 'Validator' => Illuminate\Support\Facades\Validator::class, 'View' => Illuminate\Support\Facades\View::class, 'Datagrid' => Webkul\Ui\DataGrid\Facades\DataGrid::class, + 'ProductGrid' => Webkul\Ui\DataGrid\Facades\ProductGrid::class, 'Image' => Intervention\Image\Facades\Image::class ], diff --git a/packages/Webkul/Admin/.gitignore b/packages/Webkul/Admin/.gitignore index 49e0fc6b4..6376db975 100644 --- a/packages/Webkul/Admin/.gitignore +++ b/packages/Webkul/Admin/.gitignore @@ -1,2 +1,3 @@ /node_modules -/package-lock.json \ No newline at end of file +/package-lock.json +npm-debug.log \ No newline at end of file diff --git a/packages/Webkul/Admin/src/DataGrids/AttributeDataGrid.php b/packages/Webkul/Admin/src/DataGrids/AttributeDataGrid.php new file mode 100644 index 000000000..640e10ebd --- /dev/null +++ b/packages/Webkul/Admin/src/DataGrids/AttributeDataGrid.php @@ -0,0 +1,191 @@ + @prashant-webkul + * @copyright 2018 Webkul Software Pvt Ltd (http://www.webkul.com) + */ + +class AttributeDataGrid +{ + /** + * The Data Grid implementation. + * + * @var AttributeDataGrid + * for countries + */ + + public function createAttributeDataGrid() + { + + return DataGrid::make([ + 'name' => 'Attributes', + 'table' => 'attributes', + 'select' => 'id', + 'perpage' => 10, + 'aliased' => false, //use this with false as default and true in case of joins + + 'massoperations' =>[ + [ + 'route' => route('admin.datagrid.delete'), + 'method' => 'DELETE', + 'label' => 'Delete', + 'type' => 'button', + ], + ], + + 'actions' => [ + [ + 'type' => 'Edit', + 'route' => route('admin.datagrid.delete'), + 'confirm_text' => 'Do you really want to do this?', + 'icon' => 'icon pencil-lg-icon', + ], [ + 'type' => 'Delete', + 'route' => route('admin.datagrid.delete'), + 'confirm_text' => 'Do you really want to do this?', + 'icon' => 'icon trash-icon', + ], + ], + + 'join' => [ + // [ + // 'join' => 'leftjoin', + // 'table' => 'roles as r', + // 'primaryKey' => 'u.role_id', + // 'condition' => '=', + // 'secondaryKey' => 'r.id', + // ] + ], + + //use aliasing on secodary columns if join is performed + + 'columns' => [ + + [ + 'name' => 'id', + 'alias' => 'attributeId', + 'type' => 'number', + 'label' => 'ID', + 'sortable' => true, + ], + [ + 'name' => 'code', + 'alias' => 'attributeCode', + 'type' => 'string', + 'label' => 'Code', + 'sortable' => true, + ], + [ + 'name' => 'admin_name', + 'alias' => 'attributeAdminName', + 'type' => 'string', + 'label' => 'AdminName', + 'sortable' => true, + ], + [ + 'name' => 'type', + 'alias' => 'attributeType', + 'type' => 'string', + 'label' => 'Type', + 'sortable' => true, + ], + [ + 'name' => 'is_required', + 'alias' => 'attributeIsRequired', + 'type' => 'string', + 'label' => 'Required', + 'sortable' => true, + ], + [ + 'name' => 'is_unique', + 'alias' => 'attributeIsUnique', + 'type' => 'string', + 'label' => 'Unique', + 'sortable' => true, + ], + [ + 'name' => 'value_per_locale', + 'alias' => 'attributeValuePerLocale', + 'type' => 'string', + 'label' => 'ValuePerLocale', + 'sortable' => true, + ], + [ + 'name' => 'value_per_channel', + 'alias' => 'attributeValuePerChannel', + 'type' => 'string', + 'label' => 'ValuePerChannel', + 'sortable' => true, + ], + + ], + + 'filterable' => [ + // [ + // 'column' => 'id', + // 'alias' => 'attribute_family_id', + // 'type' => 'number', + // 'label' => 'ID', + // ], + // [ + // 'column' => 'code', + // 'alias' => 'attribute_family_code', + // 'type' => 'string', + // 'label' => 'Code', + // ], + // [ + // 'column' => 'name', + // 'alias' => 'attribute_family_name', + // 'type' => 'string', + // 'label' => 'Name', + // ], + ], + + //don't use aliasing in case of searchables + + 'searchable' => [ + // [ + // 'column' => 'name', + // 'type' => 'string', + // 'label' => 'Name', + // ], + // [ + // 'column' => 'code', + // 'type' => 'string', + // 'label' => 'Code', + // ], + ], + + //list of viable operators that will be used + 'operators' => [ + 'eq' => "=", + 'lt' => "<", + 'gt' => ">", + 'lte' => "<=", + 'gte' => ">=", + 'neqs' => "<>", + 'neqn' => "!=", + 'like' => "like", + 'nlike' => "not like", + ], + // 'css' => [] + + ]); + + } + + public function render() + { + + return $this->createAttributeDataGrid()->render(); + + } +} \ No newline at end of file diff --git a/packages/Webkul/Admin/src/DataGrids/AttributeFamilyDataGrid.php b/packages/Webkul/Admin/src/DataGrids/AttributeFamilyDataGrid.php new file mode 100644 index 000000000..9a5dc85c4 --- /dev/null +++ b/packages/Webkul/Admin/src/DataGrids/AttributeFamilyDataGrid.php @@ -0,0 +1,155 @@ + @prashant-webkul + * @copyright 2018 Webkul Software Pvt Ltd (http://www.webkul.com) + */ + +class AttributeFamilyDataGrid +{ + /** + * The Data Grid implementation. + * + * @var CountryComposer + * for countries + */ + + public function createAttributeFamilyDataGrid() + { + + return DataGrid::make([ + 'name' => 'Attribute Family', + 'table' => 'attribute_families', + 'select' => 'id', + 'perpage' => 10, + 'aliased' => false, //use this with false as default and true in case of joins + + 'massoperations' =>[ + [ + 'route' => route('admin.datagrid.delete'), + 'method' => 'DELETE', + 'label' => 'Delete', + 'type' => 'button', + ], + ], + + 'actions' => [ + [ + 'type' => 'Edit', + 'route' => route('admin.datagrid.delete'), + 'confirm_text' => 'Do you really want to do this?', + 'icon' => 'icon pencil-lg-icon', + ], [ + 'type' => 'Delete', + 'route' => route('admin.datagrid.delete'), + 'confirm_text' => 'Do you really want to do this?', + 'icon' => 'icon trash-icon', + ], + ], + + 'join' => [ + // [ + // 'join' => 'leftjoin', + // 'table' => 'roles as r', + // 'primaryKey' => 'u.role_id', + // 'condition' => '=', + // 'secondaryKey' => 'r.id', + // ] + ], + + //use aliasing on secodary columns if join is performed + + 'columns' => [ + + [ + 'name' => 'id', + 'alias' => 'attributeFamilyId', + 'type' => 'number', + 'label' => 'ID', + 'sortable' => true, + ], + [ + 'name' => 'code', + 'alias' => 'attributeFamilyCode', + 'type' => 'string', + 'label' => 'Code', + 'sortable' => true, + ], + [ + 'name' => 'name', + 'alias' => 'attributeFamilyName', + 'type' => 'string', + 'label' => 'Code', + 'sortable' => true, + ], + ], + + 'filterable' => [ + [ + 'column' => 'id', + 'alias' => 'attributeFamilyId', + 'type' => 'number', + 'label' => 'ID', + ], + [ + 'column' => 'code', + 'alias' => 'attributeFamilyCode', + 'type' => 'string', + 'label' => 'Code', + ], + [ + 'column' => 'name', + 'alias' => 'attributeFamilyName', + 'type' => 'string', + 'label' => 'Name', + ], + ], + + //don't use aliasing in case of searchables + + 'searchable' => [ + [ + 'column' => 'name', + 'type' => 'string', + 'label' => 'Name', + ], + [ + 'column' => 'code', + 'type' => 'string', + 'label' => 'Code', + ], + ], + + //list of viable operators that will be used + 'operators' => [ + 'eq' => "=", + 'lt' => "<", + 'gt' => ">", + 'lte' => "<=", + 'gte' => ">=", + 'neqs' => "<>", + 'neqn' => "!=", + 'like' => "like", + 'nlike' => "not like", + ], + // 'css' => [] + + ]); + + } + + public function render() + { + + return $this->createAttributeFamilyDataGrid()->render(); + + } +} \ No newline at end of file diff --git a/packages/Webkul/Admin/src/DataGrids/CategoryDataGrid.php b/packages/Webkul/Admin/src/DataGrids/CategoryDataGrid.php new file mode 100644 index 000000000..5f85e2f2d --- /dev/null +++ b/packages/Webkul/Admin/src/DataGrids/CategoryDataGrid.php @@ -0,0 +1,172 @@ + @prashant-webkul + * @copyright 2018 Webkul Software Pvt Ltd (http://www.webkul.com) + */ + +class CategoryDataGrid +{ + /** + * The Data Grid implementation. + * + * @var AttributeDataGrid + * for countries + */ + + public function createCategoryDataGrid() + { + + return DataGrid::make([ + 'name' => 'Categories', + 'table' => 'categories as cat', + 'select' => 'cat.id', + 'perpage' => 10, + 'aliased' => true, //use this with false as default and true in case of joins + + 'massoperations' =>[ + [ + 'route' => route('admin.datagrid.delete'), + 'method' => 'DELETE', + 'label' => 'Delete', + 'type' => 'button', + ], + ], + + 'actions' => [ + [ + 'type' => 'Edit', + 'route' => route('admin.datagrid.delete'), + 'confirm_text' => 'Do you really want to do this?', + 'icon' => 'icon pencil-lg-icon', + ], [ + 'type' => 'Delete', + 'route' => route('admin.datagrid.delete'), + 'confirm_text' => 'Do you really want to do this?', + 'icon' => 'icon trash-icon', + ], + ], + + 'join' => [ + [ + 'join' => 'leftjoin', + 'table' => 'category_translations as ct', + 'primaryKey' => 'cat.id', + 'condition' => '=', + 'secondaryKey' => 'ct.category_id', + ], [ + 'join' => 'leftjoin', + 'table' => 'category_translations as cta', + 'primaryKey' => 'cat.parent_id', + 'condition' => '=', + 'secondaryKey' => 'cta.category_id', + ], + + ], + + //use aliasing on secodary columns if join is performed + + 'columns' => [ + [ + 'name' => 'cat.id', + 'alias' => 'catID', + 'type' => 'number', + 'label' => 'Category ID', + 'sortable' => true, + ], [ + 'name' => 'ct.name', + 'alias' => 'catName', + 'type' => 'string', + 'label' => 'Category Name', + 'sortable' => false, + ], [ + 'name' => 'cat.position', + 'alias' => 'catPosition', + 'type' => 'string', + 'label' => 'Category Position', + 'sortable' => false, + ], [ + 'name' => 'cta.name', + 'alias' => 'parentName', + 'type' => 'string', + 'label' => 'Parent Name', + 'sortable' => true, + ], [ + 'name' => 'cat.status', + 'alias' => 'catStatus', + 'type' => 'string', + 'label' => 'Visible in Menu', + 'sortable' => true, + ], + + ], + + 'filterable' => [ + // [ + // 'column' => 'id', + // 'alias' => 'attribute_family_id', + // 'type' => 'number', + // 'label' => 'ID', + // ], + // [ + // 'column' => 'code', + // 'alias' => 'attribute_family_code', + // 'type' => 'string', + // 'label' => 'Code', + // ], + // [ + // 'column' => 'name', + // 'alias' => 'attribute_family_name', + // 'type' => 'string', + // 'label' => 'Name', + // ], + ], + + //don't use aliasing in case of searchables + + 'searchable' => [ + // [ + // 'column' => 'name', + // 'type' => 'string', + // 'label' => 'Name', + // ], + // [ + // 'column' => 'code', + // 'type' => 'string', + // 'label' => 'Code', + // ], + ], + + //list of viable operators that will be used + 'operators' => [ + 'eq' => "=", + 'lt' => "<", + 'gt' => ">", + 'lte' => "<=", + 'gte' => ">=", + 'neqs' => "<>", + 'neqn' => "!=", + 'like' => "like", + 'nlike' => "not like", + ], + // 'css' => [] + + ]); + + } + + public function render() + { + + return $this->createCategoryDataGrid()->render(); + + } +} \ No newline at end of file diff --git a/packages/Webkul/Admin/src/Http/ViewComposers/DataGrids/ChannelsComposer.php b/packages/Webkul/Admin/src/DataGrids/ChannelDataGrid.php similarity index 87% rename from packages/Webkul/Admin/src/Http/ViewComposers/DataGrids/ChannelsComposer.php rename to packages/Webkul/Admin/src/DataGrids/ChannelDataGrid.php index 9a213fa8a..582ddc9e0 100644 --- a/packages/Webkul/Admin/src/Http/ViewComposers/DataGrids/ChannelsComposer.php +++ b/packages/Webkul/Admin/src/DataGrids/ChannelDataGrid.php @@ -1,13 +1,19 @@ @prashant-webkul + * @copyright 2018 Webkul Software Pvt Ltd (http://www.webkul.com) + */ + +class ChannelDataGrid { /** * The Data Grid implementation. @@ -16,17 +22,10 @@ class ChannelsComposer * for countries */ - - /** - * Bind data to the view. - * - * @param View $view - * @return void - */ - public function compose(View $view) + public function createChannelsDataGrid() { - $datagrid = DataGrid::make([ + return DataGrid::make([ 'name' => 'Channels', 'table' => 'channels', 'select' => 'id', @@ -99,19 +98,19 @@ class ChannelsComposer 'filterable' => [ [ 'column' => 'id', - 'alias' => 'channel_id', + 'alias' => 'channelId', 'type' => 'number', 'label' => 'Channel ID', ], [ 'column' => 'code', - 'alias' => 'channel_code', + 'alias' => 'channelCode', 'type' => 'string', 'label' => 'Channel Code', ], [ 'column' => 'name', - 'alias' => 'channel_name', + 'alias' => 'channelName', 'type' => 'string', 'label' => 'Channel Name', ], @@ -148,7 +147,10 @@ class ChannelsComposer ]); - $view->with('datagrid', $datagrid); - // $view->with('count', $this->users->count()); + } + + public function render() + { + return $this->createChannelsDataGrid()->render(); } } \ No newline at end of file diff --git a/packages/Webkul/Admin/src/Http/ViewComposers/DataGrids/CountryComposer.php b/packages/Webkul/Admin/src/DataGrids/CountryDataGrid.php similarity index 83% rename from packages/Webkul/Admin/src/Http/ViewComposers/DataGrids/CountryComposer.php rename to packages/Webkul/Admin/src/DataGrids/CountryDataGrid.php index 7d4c1ae36..a5c0ddec3 100644 --- a/packages/Webkul/Admin/src/Http/ViewComposers/DataGrids/CountryComposer.php +++ b/packages/Webkul/Admin/src/DataGrids/CountryDataGrid.php @@ -1,13 +1,19 @@ @prashant-webkul + * @copyright 2018 Webkul Software Pvt Ltd (http://www.webkul.com) + */ + +class CountryDataGrid { /** * The Data Grid implementation. @@ -16,17 +22,10 @@ class CountryComposer * for countries */ - - /** - * Bind data to the view. - * - * @param View $view - * @return void - */ - public function compose(View $view) + public function createCountryDataGrid() { - $datagrid = DataGrid::make([ + return DataGrid::make([ 'name' => 'Countries', 'table' => 'countries', 'select' => 'id', @@ -72,28 +71,28 @@ class CountryComposer [ 'name' => 'id', - 'alias' => 'country_id', + 'alias' => 'countryId', 'type' => 'number', 'label' => 'ID', 'sortable' => true, ], [ 'name' => 'code', - 'alias' => 'country_code', + 'alias' => 'countryCode', 'type' => 'string', 'label' => 'Code', 'sortable' => true, ], [ 'name' => 'name', - 'alias' => 'country_name', + 'alias' => 'countryName', 'type' => 'string', 'label' => 'Name', 'sortable' => true, ], [ 'name' => 'status', - 'alias' => 'country_status', + 'alias' => 'countryStatus', 'type' => 'number', 'label' => 'Code', 'sortable' => true, @@ -106,25 +105,25 @@ class CountryComposer 'filterable' => [ [ 'column' => 'id', - 'alias' => 'country_id', + 'alias' => 'countryId', 'type' => 'number', 'label' => 'ID', ], [ 'column' => 'code', - 'alias' => 'country_code', + 'alias' => 'countryCode', 'type' => 'string', 'label' => 'Code', ], [ 'column' => 'name', - 'alias' => 'country_name', + 'alias' => 'countryName', 'type' => 'string', 'label' => 'Name', ], [ 'column' => 'status', - 'alias' => 'country_status', + 'alias' => 'countryStatus', 'type' => 'number', 'label' => 'Code', ], @@ -161,7 +160,12 @@ class CountryComposer ]); - $view->with('datagrid', $datagrid); - // $view->with('count', $this->users->count()); + } + + public function render() + { + + return $this->createCountryDataGrid()->render(); + } } \ No newline at end of file diff --git a/packages/Webkul/Admin/src/Http/ViewComposers/DataGrids/CurrenciesComposer.php b/packages/Webkul/Admin/src/DataGrids/CurrencyDataGrid.php similarity index 83% rename from packages/Webkul/Admin/src/Http/ViewComposers/DataGrids/CurrenciesComposer.php rename to packages/Webkul/Admin/src/DataGrids/CurrencyDataGrid.php index b489aa97d..e672a7fe0 100644 --- a/packages/Webkul/Admin/src/Http/ViewComposers/DataGrids/CurrenciesComposer.php +++ b/packages/Webkul/Admin/src/DataGrids/CurrencyDataGrid.php @@ -1,32 +1,30 @@ @prashant-webkul + * @copyright 2018 Webkul Software Pvt Ltd (http://www.webkul.com) + */ -class CurrenciesComposer +class CurrencyDataGrid { /** * The Data Grid implementation. * - * @var CountryComposer + * @var CurrenciesDataGrid * for countries */ - - /** - * Bind data to the view. - * - * @param View $view - * @return void - */ - public function compose(View $view) + public function createCurrencyDataGrid() { - $datagrid = DataGrid::make([ + return DataGrid::make([ 'name' => 'Currencies', 'table' => 'currencies', 'select' => 'id', @@ -72,21 +70,21 @@ class CurrenciesComposer [ 'name' => 'id', - 'alias' => 'currency_id', + 'alias' => 'currencyId', 'type' => 'number', 'label' => 'ID', 'sortable' => true, ], [ 'name' => 'code', - 'alias' => 'currency_code', + 'alias' => 'currencyCode', 'type' => 'string', 'label' => 'Code', 'sortable' => true, ], [ 'name' => 'name', - 'alias' => 'currency_name', + 'alias' => 'currencyName', 'type' => 'string', 'label' => 'Name', 'sortable' => true, @@ -99,19 +97,19 @@ class CurrenciesComposer 'filterable' => [ [ 'column' => 'id', - 'alias' => 'currency_id', + 'alias' => 'currencyId', 'type' => 'number', 'label' => 'ID', ], [ 'column' => 'code', - 'alias' => 'currency_code', + 'alias' => 'currencyCode', 'type' => 'string', 'label' => 'Code', ], [ 'column' => 'name', - 'alias' => 'currency_name', + 'alias' => 'currencyName', 'type' => 'string', 'label' => 'Name', ], @@ -148,7 +146,10 @@ class CurrenciesComposer ]); - $view->with('datagrid', $datagrid); - // $view->with('count', $this->users->count()); + } + + public function render() + { + return $this->createCurrencyDataGrid()->render(); } } \ No newline at end of file diff --git a/packages/Webkul/Admin/src/Http/ViewComposers/DataGrids/ExchangeRatesComposer.php b/packages/Webkul/Admin/src/DataGrids/ExchangeRatesDataGrid.php similarity index 82% rename from packages/Webkul/Admin/src/Http/ViewComposers/DataGrids/ExchangeRatesComposer.php rename to packages/Webkul/Admin/src/DataGrids/ExchangeRatesDataGrid.php index c207f3881..af954a73a 100644 --- a/packages/Webkul/Admin/src/Http/ViewComposers/DataGrids/ExchangeRatesComposer.php +++ b/packages/Webkul/Admin/src/DataGrids/ExchangeRatesDataGrid.php @@ -1,32 +1,31 @@ @prashant-webkul + * @copyright 2018 Webkul Software Pvt Ltd (http://www.webkul.com) + */ -class ExchangeRatesComposer +class ExchangeRatesDataGrid { /** * The Data Grid implementation. * - * @var CountryComposer - * for countries + * @var ExchangeRatesDataGrid + * for Exchange Rates */ - /** - * Bind data to the view. - * - * @param View $view - * @return void - */ - public function compose(View $view) + public function createExchangeRatesDataGrid() { - $datagrid = DataGrid::make([ + return DataGrid::make([ 'name' => 'Exchange Rates', 'table' => 'currency_exchange_rates', 'select' => 'id', @@ -72,28 +71,28 @@ class ExchangeRatesComposer [ 'name' => 'id', - 'alias' => 'exch_id', + 'alias' => 'exchID', 'type' => 'number', 'label' => 'Rate ID', 'sortable' => true, ], [ 'name' => 'source_currency', - 'alias' => 'exch_source_currency', + 'alias' => 'exchSourceCurrency', 'type' => 'string', 'label' => 'Source Currency', 'sortable' => true, ], [ 'name' => 'target_currency', - 'alias' => 'exch_target_currency', + 'alias' => 'exchTargetCurrency', 'type' => 'string', 'label' => 'Target Currency', 'sortable' => true, ], [ 'name' => 'ratio', - 'alias' => 'exch_ratio', + 'alias' => 'exchRatio', 'type' => 'string', 'label' => 'Exchange Ratio', ], @@ -105,20 +104,20 @@ class ExchangeRatesComposer 'filterable' => [ [ 'column' => 'id', - 'alias' => 'exch_id', + 'alias' => 'exchId', 'type' => 'number', 'label' => 'Rate ID', ], [ 'column' => 'source_currency', - 'alias' => 'exch_source_currency', + 'alias' => 'exchSourceCurrency', 'type' => 'string', 'label' => 'Source Currency', 'sortable' => true, ], [ 'column' => 'target_currency', - 'alias' => 'exch_target_currency', + 'alias' => 'exchTargetCurrency', 'type' => 'string', 'label' => 'Target Currency', 'sortable' => true, @@ -156,7 +155,10 @@ class ExchangeRatesComposer ]); - $view->with('datagrid', $datagrid); - // $view->with('count', $this->users->count()); + } + + public function render() + { + return $this->createExchangeRatesDataGrid()->render(); } } \ No newline at end of file diff --git a/packages/Webkul/Admin/src/Http/ViewComposers/DataGrids/InventorySourcesComposer.php b/packages/Webkul/Admin/src/DataGrids/InventorySourcesDataGrid.php similarity index 81% rename from packages/Webkul/Admin/src/Http/ViewComposers/DataGrids/InventorySourcesComposer.php rename to packages/Webkul/Admin/src/DataGrids/InventorySourcesDataGrid.php index b6b2c4083..5bad6e70a 100644 --- a/packages/Webkul/Admin/src/Http/ViewComposers/DataGrids/InventorySourcesComposer.php +++ b/packages/Webkul/Admin/src/DataGrids/InventorySourcesDataGrid.php @@ -1,32 +1,29 @@ @prashant-webkul + * @copyright 2018 Webkul Software Pvt Ltd (http://www.webkul.com) + */ -class InventorySourcesComposer +class InventorySourcesDataGrid { /** * The Data Grid implementation. * - * @var CountryComposer - * for countries + * @var InventorySourcesDataGrid + * for Inventory Sources */ - - /** - * Bind data to the view. - * - * @param View $view - * @return void - */ - public function compose(View $view) + public function createInventorySourcesDataGrid() { - - $datagrid = DataGrid::make([ + return DataGrid::make([ 'name' => 'Inventory Sources', 'table' => 'inventory_sources', 'select' => 'id', @@ -72,35 +69,35 @@ class InventorySourcesComposer [ 'name' => 'id', - 'alias' => 'inventory_id', + 'alias' => 'inventoryID', 'type' => 'number', 'label' => 'ID', 'sortable' => true, ], [ 'name' => 'code', - 'alias' => 'inventory_code', + 'alias' => 'inventoryCode', 'type' => 'string', 'label' => 'Code', 'sortable' => true, ], [ 'name' => 'name', - 'alias' => 'inventory_name', + 'alias' => 'inventoryName', 'type' => 'string', 'label' => 'Name', 'sortable' => true, ], [ 'name' => 'priority', - 'alias' => 'inventory_priority', + 'alias' => 'inventoryPriority', 'type' => 'string', 'label' => 'Priority', 'sortable' => true, ], [ 'name' => 'status', - 'alias' => 'inventory_status', + 'alias' => 'inventoryStatus', 'type' => 'string', 'label' => 'Status', 'sortable' => true, @@ -113,19 +110,19 @@ class InventorySourcesComposer 'filterable' => [ [ 'column' => 'id', - 'alias' => 'inventory_id', + 'alias' => 'inventoryId', 'type' => 'number', 'label' => 'ID', ], [ 'column' => 'code', - 'alias' => 'inventory_code', + 'alias' => 'inventoryCode', 'type' => 'string', 'label' => 'Code', ], [ 'column' => 'name', - 'alias' => 'inventory_name', + 'alias' => 'inventoryName', 'type' => 'string', 'label' => 'Name', ], @@ -161,7 +158,10 @@ class InventorySourcesComposer // 'css' => [] ]); + } - $view->with('datagrid', $datagrid); + public function render() + { + return $this->createInventorySourcesDataGrid()->render(); } } \ No newline at end of file diff --git a/packages/Webkul/Admin/src/Http/ViewComposers/DataGrids/LocalesComposer.php b/packages/Webkul/Admin/src/DataGrids/LocalesDataGrid.php similarity index 83% rename from packages/Webkul/Admin/src/Http/ViewComposers/DataGrids/LocalesComposer.php rename to packages/Webkul/Admin/src/DataGrids/LocalesDataGrid.php index 8de71b5c9..1f53304e4 100644 --- a/packages/Webkul/Admin/src/Http/ViewComposers/DataGrids/LocalesComposer.php +++ b/packages/Webkul/Admin/src/DataGrids/LocalesDataGrid.php @@ -1,32 +1,30 @@ @prashant-webkul + * @copyright 2018 Webkul Software Pvt Ltd (http://www.webkul.com) + */ -class LocalesComposer +class LocalesDataGrid { /** * The Data Grid implementation. * - * @var CountryComposer + * @var CountryDataGrid * for countries */ - - /** - * Bind data to the view. - * - * @param View $view - * @return void - */ - public function compose(View $view) + public function createCountryDataGrid() { - $datagrid = DataGrid::make([ + return DataGrid::make([ 'name' => 'Locales', 'table' => 'locales', 'select' => 'id', @@ -72,21 +70,21 @@ class LocalesComposer [ 'name' => 'id', - 'alias' => 'locale_id', + 'alias' => 'localeId', 'type' => 'number', 'label' => 'ID', 'sortable' => true, ], [ 'name' => 'code', - 'alias' => 'locale_code', + 'alias' => 'localeCode', 'type' => 'string', 'label' => 'Code', 'sortable' => true, ], [ 'name' => 'name', - 'alias' => 'locale_name', + 'alias' => 'localeName', 'type' => 'string', 'label' => 'Name', 'sortable' => true, @@ -99,19 +97,19 @@ class LocalesComposer 'filterable' => [ [ 'column' => 'id', - 'alias' => 'locale_id', + 'alias' => 'localeId', 'type' => 'number', 'label' => 'ID', ], [ 'column' => 'code', - 'alias' => 'locale_code', + 'alias' => 'localeCode', 'type' => 'string', 'label' => 'Code', ], [ 'column' => 'name', - 'alias' => 'locale_name', + 'alias' => 'localeName', 'type' => 'string', 'label' => 'Name', ], @@ -148,7 +146,10 @@ class LocalesComposer ]); - $view->with('datagrid', $datagrid); - // $view->with('count', $this->users->count()); + } + + public function render() + { + return $this->createCountryDataGrid()->render(); } } \ No newline at end of file diff --git a/packages/Webkul/Admin/src/DataGrids/ProductDataGrid.php b/packages/Webkul/Admin/src/DataGrids/ProductDataGrid.php new file mode 100644 index 000000000..63287c074 --- /dev/null +++ b/packages/Webkul/Admin/src/DataGrids/ProductDataGrid.php @@ -0,0 +1,215 @@ + @prashant-webkul + * @copyright 2018 Webkul Software Pvt Ltd (http://www.webkul.com) + */ + +class ProductDataGrid +{ + /** + * The Data Grid implementation. + * @var ProductDataGrid + * for Products + */ + + public function createProductDataGrid() + { + + return ProductGrid::make([ + 'name' => 'Products', + 'table' => 'products as prods', + 'select' => 'prods.id', + 'perpage' => 10, + 'aliased' => true, //use this with false as default and true in case of joins + + 'massoperations' =>[ + // [ + // 'route' => route('admin.datagrid.delete'), + // 'method' => 'DELETE', + // 'label' => 'Delete', + // 'type' => 'button', + // ], + ], + + 'actions' => [ + [ + 'type' => 'Edit', + 'route' => route('admin.datagrid.delete'), + 'confirm_text' => 'Do you really want to do this?', + 'icon' => 'icon pencil-lg-icon', + ], [ + 'type' => 'Delete', + 'route' => route('admin.datagrid.delete'), + 'confirm_text' => 'Do you really want to do this?', + 'icon' => 'icon trash-icon', + ], + ], + + 'attributeColumns' => [ + 'name', 'price' + ], + + 'join' => [ + + //for getting name of attrib family. + [ + 'join' => 'leftjoin', + 'table' => 'attribute_families as attfam', + 'primaryKey' => 'prods.attribute_family_id', + 'condition' => '=', + 'secondaryKey' => 'attfam.id', + ], + + //for getting the attribute values. + [ + 'join' => 'leftjoin', + 'table' => 'product_attribute_values as pav', + 'primaryKey' => 'prods.id', + 'condition' => '=', + 'secondaryKey' => 'pav.product_id', + 'withAttributes' => true + ], + + //for getting the inventory quantity of a product + [ + 'join' => 'leftjoin', + 'table' => 'product_inventories as pi', + 'primaryKey' => 'prods.id', + 'condition' => '=', + 'secondaryKey' => 'pi.product_id', + ], + + ], + + //use aliasing on secodary columns if join is performed + + 'columns' => [ + //name, alias, type, label, sortable + [ + 'name' => 'prods.id', + 'alias' => 'productID', + 'type' => 'number', + 'label' => 'ID', + 'sortable' => true, + ], + [ + 'name' => 'prods.sku', + 'alias' => 'productCode', + 'type' => 'string', + 'label' => 'SKU', + 'sortable' => true, + ], + [ + 'name' => 'attfam.name', + 'alias' => 'FamilyName', + 'type' => 'string', + 'label' => 'Family Name', + 'sortable' => true, + ], + [ + 'name' => 'pi.qty', + 'alias' => 'ProductQuantity', + 'type' => 'string', + 'label' => 'Product Quatity', + 'sortable' => false, + ], + // [ + // 'name' => 'pav.attribute_id', + // 'alias' => 'AttributeID', + // 'type' => 'string', + // 'label' => 'Attribute ID', + // 'sortable' => false, + + // ], + ], + + 'filterable' => [ + //column, type, and label + [ + 'name' => 'prods.id', + 'alias' => 'productID', + 'type' => 'number', + 'label' => 'ID', + ], + [ + 'name' => 'prods.sku', + 'alias' => 'productCode', + 'type' => 'string', + 'label' => 'SKU', + ], + [ + 'name' => 'attfam.name', + 'alias' => 'FamilyName', + 'type' => 'string', + 'label' => 'Family Name', + ], + [ + 'name' => 'pi.qty', + 'alias' => 'ProductQuantity', + 'type' => 'string', + 'label' => 'Product Quatity', + ], + ], + + //don't use aliasing in case of searchables + + 'searchable' => [ + //column, type and label + [ + 'column' => 'prods.id', + 'type' => 'number', + 'label' => 'ID', + ], + [ + 'column' => 'prods.sku', + 'type' => 'string', + 'label' => 'SKU', + ], + [ + 'column' => 'attfam.name', + 'type' => 'string', + 'label' => 'Family Name', + ], + [ + 'column' => 'pi.qty', + 'type' => 'string', + 'label' => 'Product Quatity', + ], + ], + + //list of viable operators that will be used + 'operators' => [ + 'eq' => "=", + 'lt' => "<", + 'gt' => ">", + 'lte' => "<=", + 'gte' => ">=", + 'neqs' => "<>", + 'neqn' => "!=", + 'like' => "like", + 'nlike' => "not like", + ], + // 'css' => [] + + ]); + + } + + public function render() + { + return $this->createProductDataGrid()->render(); + // return $this->getProducts(); + + } + +} \ No newline at end of file diff --git a/packages/Webkul/Admin/src/Http/ViewComposers/DataGrids/RolesComposer.php b/packages/Webkul/Admin/src/DataGrids/RolesDataGrid.php similarity index 83% rename from packages/Webkul/Admin/src/Http/ViewComposers/DataGrids/RolesComposer.php rename to packages/Webkul/Admin/src/DataGrids/RolesDataGrid.php index 82b31fcc9..ab8d08b8b 100644 --- a/packages/Webkul/Admin/src/Http/ViewComposers/DataGrids/RolesComposer.php +++ b/packages/Webkul/Admin/src/DataGrids/RolesDataGrid.php @@ -1,32 +1,31 @@ @prashant-webkul + * @copyright 2018 Webkul Software Pvt Ltd (http://www.webkul.com) + */ -class RolesComposer +class RolesDataGrid { /** * The Data Grid implementation. * - * @var CountryComposer - * for countries + * @var RolesDataGrid + * for Roles */ - /** - * Bind data to the view. - * - * @param View $view - * @return void - */ - public function compose(View $view) + public function createRolesDataGrid() { - $datagrid = DataGrid::make([ + return DataGrid::make([ 'name' => 'Roles', 'table' => 'roles', 'select' => 'id', @@ -72,21 +71,21 @@ class RolesComposer [ 'name' => 'id', - 'alias' => 'r_id', + 'alias' => 'roleId', 'type' => 'number', 'label' => 'ID', 'sortable' => true, ], [ 'name' => 'name', - 'alias' => 'r_name', + 'alias' => 'roleName', 'type' => 'string', 'label' => 'Name', 'sortable' => true, ], [ 'name' => 'permission_type', - 'alias' => 'r_permission_type', + 'alias' => 'rolePermissionType', 'type' => 'string', 'label' => 'Permission Type', 'sortable' => true, @@ -99,19 +98,19 @@ class RolesComposer 'filterable' => [ [ 'column' => 'id', - 'alias' => 'r_id', + 'alias' => 'roleId', 'type' => 'number', 'label' => 'ID', ], [ 'column' => 'name', - 'alias' => 'r_name', + 'alias' => 'roleName', 'type' => 'string', 'label' => 'Name', ], [ 'column' => 'permission_type', - 'alias' => 'r_permission_type', + 'alias' => 'rolePermissionType', 'type' => 'string', 'label' => 'Permission Type', ], @@ -148,7 +147,10 @@ class RolesComposer ]); - $view->with('datagrid', $datagrid); - // $view->with('count', $this->users->count()); + } + + public function render() + { + return $this->createRolesDataGrid()->render(); } } \ No newline at end of file diff --git a/packages/Webkul/Admin/src/Http/ViewComposers/DataGrids/SliderComposer.php b/packages/Webkul/Admin/src/DataGrids/SliderDataGrid.php similarity index 86% rename from packages/Webkul/Admin/src/Http/ViewComposers/DataGrids/SliderComposer.php rename to packages/Webkul/Admin/src/DataGrids/SliderDataGrid.php index 480437e8d..aac865c69 100644 --- a/packages/Webkul/Admin/src/Http/ViewComposers/DataGrids/SliderComposer.php +++ b/packages/Webkul/Admin/src/DataGrids/SliderDataGrid.php @@ -1,32 +1,30 @@ @prashant-webkul + * @copyright 2018 Webkul Software Pvt Ltd (http://www.webkul.com) + */ -class SliderComposer +class SliderDataGrid { /** * The Data Grid implementation. * - * @var CountryComposer - * for countries + * @var SliderDataGrid + * for Sliders */ - - /** - * Bind data to the view. - * - * @param View $view - * @return void - */ - public function compose(View $view) + public function createSliderDataGrid() { - $datagrid = DataGrid::make([ + return DataGrid::make([ 'name' => 'Sliders', 'table' => 'sliders as s', 'select' => 's.id', @@ -72,27 +70,27 @@ class SliderComposer [ 'name' => 's.id', - 'alias' => 'slider_id', + 'alias' => 'sliderId', 'type' => 'number', 'label' => 'ID', 'sortable' => true, ], [ 'name' => 's.title', - 'alias' => 'slider_title', + 'alias' => 'sliderTitle', 'type' => 'string', 'label' => 'title', ], [ 'name' => 's.channel_id', - 'alias' => 'channel_id', + 'alias' => 'channelId', 'type' => 'string', 'label' => 'Channel ID', 'sortable' => true, ], [ 'name' => 'c.name', - 'alias' => 'channel_name', + 'alias' => 'channelName', 'type' => 'string', 'label' => 'Channel Name', 'sortable' => true, @@ -153,7 +151,10 @@ class SliderComposer ]); - $view->with('datagrid', $datagrid); - // $view->with('count', $this->users->count()); + } + + public function render() + { + return $this->createSliderDataGrid()->render(); } } \ No newline at end of file diff --git a/packages/Webkul/Admin/src/Http/ViewComposers/DataGrids/UserComposer.php b/packages/Webkul/Admin/src/DataGrids/UserDataGrid.php similarity index 90% rename from packages/Webkul/Admin/src/Http/ViewComposers/DataGrids/UserComposer.php rename to packages/Webkul/Admin/src/DataGrids/UserDataGrid.php index e64f8f4d5..2f195a248 100644 --- a/packages/Webkul/Admin/src/Http/ViewComposers/DataGrids/UserComposer.php +++ b/packages/Webkul/Admin/src/DataGrids/UserDataGrid.php @@ -1,33 +1,30 @@ @prashant-webkul + * @copyright 2018 Webkul Software Pvt Ltd (http://www.webkul.com) + */ -class UserComposer +class UserDataGrid { /** * The Data Grid implementation. * - * @var UserComposer - * for admin + * @var UserDataGrid + * for admin users */ - protected $users; - - /** - * Bind data to the view. - * - * @param View $view - * @return void - */ - public function compose(View $view) + public function createUserDataGrid() { - $datagrid = DataGrid::make([ + return DataGrid::make([ 'name' => 'Admins', 'table' => 'admins as u', 'select' => 'u.id', @@ -59,7 +56,8 @@ class UserComposer 'route' => route('admin.datagrid.delete'), 'confirm_text' => 'Do you really want to do this?', 'icon' => 'icon pencil-lg-icon', - ], [ + ], + [ 'type' => 'Delete', 'route' => route('admin.datagrid.delete'), 'confirm_text' => 'Do you really want to do this?', @@ -148,14 +146,16 @@ class UserComposer 'alias' => 'Name', 'type' => 'string', 'label' => 'Name' - ], [ + ], + [ 'column' => 'u.id', 'alias' => 'ID', 'type' => 'number', 'label' => 'Admin ID' - ], [ + ], + [ 'column' => 'r.id', - 'alias' => 'Role_ID', + 'alias' => 'xc', 'type' => 'number', 'label' => 'Role ID' ] @@ -166,7 +166,8 @@ class UserComposer 'column' => 'u.email', 'type' => 'string', 'label' => 'E-Mail' - ], [ + ], + [ 'column' => 'u.name', 'type' => 'string', 'label' => 'Name' @@ -187,7 +188,11 @@ class UserComposer ]); - $view->with('datagrid', $datagrid); - // $view->with('count', $this->users->count()); + } + + public function render() { + + return $this->createUserDataGrid()->render(); + } } \ 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 879f9e4a9..ffa52dcad 100644 --- a/packages/Webkul/Admin/src/Http/routes.php +++ b/packages/Webkul/Admin/src/Http/routes.php @@ -271,23 +271,23 @@ Route::group(['middleware' => ['web']], function () { // Channel Routes - Route::get('/channels', 'Webkul\Channel\Http\Controllers\ChannelController@index')->defaults('_config', [ + Route::get('/channels', 'Webkul\Core\Http\Controllers\ChannelController@index')->defaults('_config', [ 'view' => 'admin::settings.channels.index' ])->name('admin.channels.index'); - Route::get('/channels/create', 'Webkul\Channel\Http\Controllers\ChannelController@create')->defaults('_config', [ + Route::get('/channels/create', 'Webkul\Core\Http\Controllers\ChannelController@create')->defaults('_config', [ 'view' => 'admin::settings.channels.create' ])->name('admin.channels.create'); - Route::post('/channels/create', 'Webkul\Channel\Http\Controllers\ChannelController@store')->defaults('_config', [ + Route::post('/channels/create', 'Webkul\Core\Http\Controllers\ChannelController@store')->defaults('_config', [ 'redirect' => 'admin.channels.index' ])->name('admin.channels.store'); - Route::get('/channels/edit/{id}', 'Webkul\Channel\Http\Controllers\ChannelController@edit')->defaults('_config', [ + Route::get('/channels/edit/{id}', 'Webkul\Core\Http\Controllers\ChannelController@edit')->defaults('_config', [ 'view' => 'admin::settings.channels.edit' ])->name('admin.channels.edit'); - Route::put('/channels/edit/{id}', 'Webkul\Channel\Http\Controllers\ChannelController@update')->defaults('_config', [ + Route::put('/channels/edit/{id}', 'Webkul\Core\Http\Controllers\ChannelController@update')->defaults('_config', [ 'redirect' => 'admin.channels.index' ])->name('admin.channels.update'); diff --git a/packages/Webkul/Admin/src/Providers/AdminServiceProvider.php b/packages/Webkul/Admin/src/Providers/AdminServiceProvider.php index 66e18b19c..5e94fd48d 100644 --- a/packages/Webkul/Admin/src/Providers/AdminServiceProvider.php +++ b/packages/Webkul/Admin/src/Providers/AdminServiceProvider.php @@ -6,7 +6,6 @@ use Illuminate\Support\ServiceProvider; use Illuminate\Support\Facades\Event; use Illuminate\Support\Facades\Blade; use Webkul\Admin\Providers\EventServiceProvider; -use Webkul\Admin\Providers\ComposerServiceProvider; class AdminServiceProvider extends ServiceProvider { @@ -30,7 +29,6 @@ class AdminServiceProvider extends ServiceProvider $this->composeView(); $this->app->register(EventServiceProvider::class); - $this->app->register(ComposerServiceProvider::class); } /** diff --git a/packages/Webkul/Admin/src/Providers/ComposerServiceProvider.php b/packages/Webkul/Admin/src/Providers/ComposerServiceProvider.php deleted file mode 100644 index ce77d7de8..000000000 --- a/packages/Webkul/Admin/src/Providers/ComposerServiceProvider.php +++ /dev/null @@ -1,58 +0,0 @@ -add('inventories', 'Inventories', 'admin::catalog.products.accordians.inventories', 1); diff --git a/packages/Webkul/Admin/src/Resources/views/catalog/attributes/index.blade.php b/packages/Webkul/Admin/src/Resources/views/catalog/attributes/index.blade.php index d6305062d..f8befdc33 100644 --- a/packages/Webkul/Admin/src/Resources/views/catalog/attributes/index.blade.php +++ b/packages/Webkul/Admin/src/Resources/views/catalog/attributes/index.blade.php @@ -15,7 +15,8 @@
- + @inject('attributes','Webkul\Admin\DataGrids\AttributeDataGrid') + {!! $attributes->render() !!}
@stop \ No newline at end of file diff --git a/packages/Webkul/Admin/src/Resources/views/catalog/categories/index.blade.php b/packages/Webkul/Admin/src/Resources/views/catalog/categories/index.blade.php index 54347e88e..c55e51270 100644 --- a/packages/Webkul/Admin/src/Resources/views/catalog/categories/index.blade.php +++ b/packages/Webkul/Admin/src/Resources/views/catalog/categories/index.blade.php @@ -15,7 +15,8 @@
- + @inject('categories','Webkul\Admin\DataGrids\CategoryDataGrid') + {!! $categories->render() !!}
@stop \ No newline at end of file diff --git a/packages/Webkul/Admin/src/Resources/views/catalog/families/index.blade.php b/packages/Webkul/Admin/src/Resources/views/catalog/families/index.blade.php index e9a0ec81e..504bf291b 100644 --- a/packages/Webkul/Admin/src/Resources/views/catalog/families/index.blade.php +++ b/packages/Webkul/Admin/src/Resources/views/catalog/families/index.blade.php @@ -15,7 +15,8 @@
- + @inject('attributefamily','Webkul\Admin\DataGrids\AttributeFamilyDataGrid') + {!! $attributefamily->render() !!}
@stop \ No newline at end of file diff --git a/packages/Webkul/Admin/src/Resources/views/catalog/products/accordians/variations.blade.php b/packages/Webkul/Admin/src/Resources/views/catalog/products/accordians/variations.blade.php index 4f2054f55..6f3ac7689 100644 --- a/packages/Webkul/Admin/src/Resources/views/catalog/products/accordians/variations.blade.php +++ b/packages/Webkul/Admin/src/Resources/views/catalog/products/accordians/variations.blade.php @@ -1,4 +1,5 @@ @if ($product->type == 'configurable') + @section('css') @parent \ No newline at end of file diff --git a/packages/Webkul/Shop/src/Resources/assets/js/components/imageSlider.vue b/packages/Webkul/Shop/src/Resources/assets/js/components/imageSlider.vue deleted file mode 100644 index 50ba3ef47..000000000 --- a/packages/Webkul/Shop/src/Resources/assets/js/components/imageSlider.vue +++ /dev/null @@ -1,97 +0,0 @@ - - \ No newline at end of file diff --git a/packages/Webkul/Shop/src/Resources/assets/sass/_variables.scss b/packages/Webkul/Shop/src/Resources/assets/sass/_variables.scss index 6659ef51f..cbea7f1fd 100644 --- a/packages/Webkul/Shop/src/Resources/assets/sass/_variables.scss +++ b/packages/Webkul/Shop/src/Resources/assets/sass/_variables.scss @@ -1,6 +1,7 @@ //shop variables $font-name: "Montserrat", sans-serif; $background-color: #f2f2f2; +$footer-back: #f2f2f2; $list-heading-color: rgba(165, 165, 165, 1); $list-color: #242424; $subscribe-btn-color: black; @@ -13,6 +14,16 @@ $offer-color: #ff6472; $sign-up-text-color: #5e5e5e; $login-text: #3a3a3a; $background-color: #ffffff; +$color-black : black; $forgot-password-color: #0031f0; $profile-content-color: #5e5e5e; +$horizontal-rule-color: #E8E8E8; //customer variables ends here + +//product +$real-price:#A5A5A5; +$product-font-color: #242424; +$product-price-color: #FF6472; +$dark-blue-shade: #0031F0; +$bar-color: #D8D8D8; +$gray-shade: #5E5E5E; \ No newline at end of file diff --git a/packages/Webkul/Shop/src/Resources/assets/sass/app.scss b/packages/Webkul/Shop/src/Resources/assets/sass/app.scss index 7f6226f50..e64447c18 100644 --- a/packages/Webkul/Shop/src/Resources/assets/sass/app.scss +++ b/packages/Webkul/Shop/src/Resources/assets/sass/app.scss @@ -7,11 +7,14 @@ body { margin: 0; padding: 0; - font-family: "Montserrat", sans-serif; font-weight: 500; font-size: 14px; } +* { + font-family: "Montserrat", sans-serif; +} + .header { margin-top: 16px; margin-bottom: 21px; @@ -58,7 +61,7 @@ body { font-size: 14px; } - .q-c { + .search-icon-wrapper { box-sizing: border-box; height: 38px; width: 38px; @@ -98,12 +101,14 @@ body { height: 24px; width: 24px; } + .account { cursor: pointer; padding-top: 3px; padding-right: 5px; margin-left: 8px; } + .icon.arrow-down-icon { cursor: pointer; margin-top: 10px; @@ -111,10 +116,10 @@ body { } } - ul.product-dropdown-container { + ul.cart-dropdown { float: right; - li.product-dropdown { + li.cart-summary { display: flex; flex-direction: row; margin-left: 14px; @@ -128,11 +133,13 @@ body { .cart { padding-top: 3px; padding-right: 5px; + .cart-count { color: #0031f0; padding-right: 3px; } } + .icon.arrow-down-icon { margin-top: 10px; } @@ -142,6 +149,7 @@ body { .right-responsive { display: none; + ul.right-wrapper { display: flex; flex-direction: row; @@ -170,31 +178,6 @@ body { font-size: 16px; display: block; - // .menu-bar { - // display: flex; - // flex-direction: row; - // justify-content: flex-start; - // align-items: center; - // height: 48px; - // width: 80%; - // margin-left: auto; - // margin-right: auto; - - // li { - // display: flex; - // flex-direction: row; - // align-items: center; - // justify-content: center; - // // background-color: blue; - // height: 100%; - // margin: 2.5%; - // } - // li:last-child { - // margin-left: auto; - // color: $offer-color; - // } - // } - ul.nav { display: block; font-size:16px; @@ -221,7 +204,7 @@ body { position: relative; } - .nav{ + .nav { vertical-align: top; display: inline-block; } @@ -234,6 +217,7 @@ body { .nav > li { float: left; margin-right: 1px; + } .nav > li > a { @@ -287,7 +271,7 @@ body { .nav > li li:hover > ul { left: 100%; margin-left: 1px; - top: -1px; + top: -2px; } .nav > li:hover > a:first-child:nth-last-child(2):before { @@ -301,45 +285,157 @@ body { .nav li li:hover > a:first-child:nth-last-child(2):before { right: 10px; } + } } -.slider-block { +section.slider-block { display: block; - width: 80%; - margin-left: auto; - margin-right: auto; margin-bottom: 5%; - .slider-content { - ul.slider-images { - li img { - width: 100%; - height: 500px; - object-fit: fill; - } - .slider-control { - display: inline-block; - vertical-align: middle; - position: absolute; - right: 10%; - margin-top: -60px; - margin-right: 10px; + div.slider-content { + width: 80%; + height: 500px; + margin-left: auto; + margin-right: auto; - .dark-left-icon { - background-color: white; - height: 48px; - width: 48px; - max-height: 100%; - max-width: 100%; + + ul.slider-images { + + li{ + //both rules are equivalent to display none + position: absolute; + visibility: hidden; + } + + li.show { + display:block; + visibility: visible; + width: 80%; + animation-name: example; + animation-duration: 4s; + } + + @keyframes example { + 0% {opacity: 0.1;} + 100% {opacity: 1;} + } + + li img { + height: 500px; + width:100%; + } + } + div.slider-control { + display: block; + position: absolute; + user-select: none; + bottom: 2%; + right: 11%; + + + .dark-left-icon { + background-color: $background-color; + height: 48px; + width: 48px; + max-height: 100%; + max-width: 100%; + } + + .light-right-icon { + background-color: $color-black; + height: 48px; + width: 48px; + max-height: 100%; + max-width: 100%; + } + } + } +} + +.layered-filter-wrapper { + width: 25%; + float: left; + margin-right: 20px; + min-height: 1px; + + .filter-title { + border-bottom: 1px solid #E8E8E8; + font-size: 16px; + color: #242424; + padding: 10px 0; + } + + .filter-attributes { + .filter-attributes-item { + border-bottom: 1px solid #E8E8E8; + padding-bottom: 10px; + + .filter-attributes-title { + padding: 10px 40px 0 10px; + font-size: 16px; + color: #5E5E5E; + cursor: pointer; + position: relative; + + .remove-filter-link { + font-weight: 400; + color: #0031F0; + margin-right: 10px; } - .light-right-icon { - background-color: black; - height: 48px; - width: 48px; - max-height: 100%; - max-width: 100%; + .icon { + background-image: url('../images/arrow-down.svg') !important; + width: 10px; + height: 10px; + position: absolute; + right: 15px; + top: 14px; + } + } + + .filter-attributes-content { + padding: 10px; + display: none; + + ol.items { + padding: 0; + margin: 0; + list-style: none none; + + li.item { + padding: 8px 0; + font-size: 16px; + color: #5E5E5E; + + .checkbox { + margin: 0; + + .checkbox-view { + height: 16px; + width: 16px; + background-image: url("../images/checkbox.svg"); + } + + input:checked + .checkbox-view { + background-image: url("../images/checkbox-checked.svg"); + } + } + } + } + + .price-range-wrapper { + margin-top: 21px; + } + } + + &.active { + .filter-attributes-content { + display: block; + } + + .filter-attributes-title .icon { + background-image: url('../images//arrow-up.svg') !important; } } } @@ -350,44 +446,94 @@ body { margin-left: 10%; margin-right: 10%; - .product-card { - display: flex; - flex-flow: column; - justify-content: center; + .content-container { + display: inline-block; + width: 100%; + } - .product-image img { - // order: -1; - align-self: center; - width: 100%; - margin-bottom: 14px; - } - .product-name { - font-size: 16px; - margin-bottom: 14px; - width: 100%; - } - .product-price { - font-size: 16px; - margin-bottom: 14px; - width: 100%; - } - .product-ratings { - width: 100%; - margin-bottom: 14px; - } - .cart-fav-seg { - display: inline-flex; - width: 100%; - align-items: center; + .product-grid { + display: grid; + grid-gap: 30px; - .addtocart { - border-radius: 0px; - margin-right: 10px; - text-transform: uppercase; + &.max-2-col { + grid-template-columns: repeat(2, minmax(250px, 1fr)); + } + + &.max-3-col { + grid-template-columns: repeat(3, minmax(250px, 1fr)); + } + + &.max-4-col { + grid-template-columns: repeat(4, minmax(250px, 1fr)); + } + + .product-card { + display: flex; + flex-flow: column; + justify-content: center; + + .product-image img { + align-self: center; + width: 100%; + margin-bottom: 14px; + } + + .product-name { + font-size: 16px; + margin-bottom: 14px; + width: 100%; + } + + .product-price { + font-size: 16px; + margin-bottom: 14px; + width: 100%; + font-weight: 600; + + .price-label { + font-size: 14px; + font-weight: 400; + } + + .regular-price { + font-size: 16px; + color: #A5A5A5; + text-decoration: line-through; + margin-right: 10px; + } + + .special-price { + font-size: 16px; + color: #FF6472; + } + } + + .product-ratings { + width: 100%; + margin-bottom: 14px; + } + + .cart-fav-seg { + display: inline-flex; + width: 100%; + align-items: center; + + .addtocart { + border-radius: 0px; + margin-right: 10px; + text-transform: uppercase; + } } } } + .bottom-toolbar { + display: block; + margin-top: 40px; + margin-bottom: 40px; + text-align: center; + } + section.featured-products { display: block; margin-bottom: 5%; @@ -403,11 +549,6 @@ body { color: lightgray; } } - .featured-grid { - display: grid; - grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); - grid-gap: 10px; - } } section.news-update { @@ -435,7 +576,6 @@ body { .block2 { display: block; box-sizing: border-box; - display: grid; grid-template-rows: repeat(2, minmax(50%, 1fr)); grid-row-gap: 20px; @@ -463,7 +603,7 @@ body { } .footer { - background-color: $background-color; + background-color: $footer-back; padding-left: 10%; padding-right: 10%; @@ -557,6 +697,7 @@ body { letter-spacing: -0.29px; text-align: center; } + .login-form { margin-left: auto; margin-right: auto; @@ -581,6 +722,7 @@ body { .control-group { margin-bottom: 15px !important; + .control { width: 100% !important; } @@ -622,7 +764,7 @@ body { align-content: center; justify-content: flex-start; border: 1px solid #e8e8e8; - background: #ffffff; + background: $background-color; width: 25%; height: 100%; text-transform: capitalize; @@ -641,14 +783,17 @@ body { border-bottom: 1px solid $border-color; text-align: center; } + li:first-child { border-top: none; } + li:last-child { border-bottom: none; } + li.active { - color: #0031f0; + color: $forgot-password-color; } } @@ -701,6 +846,7 @@ body { } } } + //edit form .edit-form-content { margin-left: 5.5%; @@ -715,877 +861,630 @@ body { } .edit-form { - // margin-left: auto; - // margin-right: auto; display: flex; background: $background-color; border: 1px solid $border-color; flex-direction: column; - // max-width: 530px; - // min-width: 380px; min-height: 345px; padding: 25px; - - .control-group { - input, - select { - font-family: "Montserrat", sans-serif; - width: 100%; - } - } } } //edit form ends } //account ends here + + + //customers page css ends here -@media all and (max-width: 480px) { - .header { - // border: 1px solid black; - margin-top: 16px; - margin-bottom: 21px; +// product pages css starts here - .header-top { - margin-bottom: 16px; - display: flex; - max-width: 92%; - width: 100%; - margin-left: auto; - margin-right: auto; - // border: 1px solid indigo; - align-items: center; - justify-content: space-between; +section.product-detail, section.product-review { + font-size: 16px; + color: $product-font-color; - div.left-content { + div.category-breadcrumbs { + display: inline; + } + + div.layouter { + display:flex; + flex-flow: row; + margin-top: 21px; + + .mixed-group { + + .single-image { + padding: 2px; + + img { + height: 280px; + width: 280px; + } + } + + .details { + + .product-name { + margin-top: 20px; + font-size: 24px; + margin-bottom: 20px; + } + + .price { + margin-bottom: 14px; + + .main-price { + font-size: 24px; + color: $product-price-color; + } + + .real-price { + color: $real-price; + text-decoration-line: line-through; + } + } + } + } + + .rating-reviews { + margin-top: 30px; + + .title-inline { + display: inline-flex; + align-items: center; + justify-content: space-between; + margin-bottom: 20px; + width: 100%; + + button { + float: right; + border-radius: 0px !important; + } + } + + .overall { display: flex; flex-direction: row; - justify-content: flex-start; align-items: center; + justify-content: space-between; + height: 150px; - ul.logo-container { - margin-right: 12px; + .left-side { + margin-bottom: 20px; - li { - display: flex; + .number{ + font-size: 34px; } } - ul.search-container { - li.search-group { + .right-side { + display: block; + + .rater { display: inline-flex; - justify-content: center; align-items: center; - .search-field { - height: 38px; - border: 2px solid $border-color; - border-radius: 3px; - border-right: none; - border-top-right-radius: 0px; - border-bottom-right-radius: 0px; + .star { + width: 50px; + height: 20px; + padding: 1px; + margin-right: 8px; } - input.search-field::-moz-placeholder { - font-family: "montserrat", sans-serif; - padding-left: 10px; - } - input.search-field::-webkit-input-placeholder { - font-family: "montserrat", sans-serif; - padding-left: 10px; - } + .line-bar { + height: 4px; + width: 158px; + margin-right: 12px; + background: $bar-color; - .q-c { - box-sizing: border-box; - height: 38px; - width: 38px; - border: 2px solid $border-color; - border-top-right-radius: 3px; - border-bottom-right-radius: 3px; - - .search-icon { - margin-top: 4px; - margin-left: 4px; - height: 24px; - width: 24px; + .line-value { + height: 4px; + width: 100px; + background-color: $dark-blue-shade; } } } } + } - div.right-content { + .reviews { + margin-top: 34px; + margin-bottom: 90px; + + .review { + margin-bottom: 25px; + + .title { + margin-bottom: 5px; + } + + .stars { + margin-bottom: 15px; + } + .message { + margin-bottom: 10px; + } + } + .view-all { + margin-top:15px; + color: $logo-color; + margin-bottom:15px; + } + } + } + + div.product-image-group { + display:flex; + flex-direction: row; + justify-content: flex-start; + margin-right: 2.5%; + + .side-group { display: flex; - flex-direction: row; - justify-content: flex-end; - align-items: center; - - ul.account-dropdown-container { - float: right; - border-right: 2px solid $border-color; - - li.account-dropdown { - display: flex; - flex-direction: row; - - .icon-account { - margin: 0; - height: 24px; - width: 24px; - } - .account { - padding-top: 3px; - } - } - } - - ul.product-dropdown-container { - float: right; - - li.product-dropdown { - display: flex; - flex-direction: row; - - .icon-cart { - margin: 0; - height: 24px; - width: 24px; - } - .cart { - padding-top: 3px; - } - } - } + flex-direction: column; + margin-right: 4px; } - .right-responsive { - display: none; - ul.right-wrapper { - display: flex; - flex-direction: row; - justify-content: flex-end; - align-items: center; - - li:not(:last-child) { - margin-right: 7px; - - span.icon { - margin: 0; - height: 24px; - width: 24px; - } - } - } - } - } - - .header-bottom { - height: 48px; - margin-left: auto; - margin-right: auto; - border-top: 1px solid lightgrey; - border-bottom: 1px solid lightgrey; - display: block; - - .menu-bar { - display: flex; - flex-direction: row; - justify-content: flex-start; - align-items: center; - height: 48px; - width: 80%; - margin-left: auto; - margin-right: auto; - - li { - display: flex; - flex-direction: row; - align-items: center; - justify-content: center; - // background-color: blue; - height: 100%; - margin: 2.5%; - } - li:last-child { - margin-left: auto; - color: $offer-color; - } - } - } - } - .slider-block { - display: block; - width: 100%; - margin-bottom: 5%; - - .slider-content { - ul.slider-images { - li img { - width: 100%; - object-fit: fill; - } - } - } - } - .main-container-wrapper { - margin-left: 4%; - margin-right: 4%; - - .product-card { - display: flex; - flex-flow: column; - justify-content: center; - - .product-image img { - // order: -1; - align-self: center; - width: 100%; - margin-bottom: 14px; - } - .product-name { - font-size: 16px; - margin-bottom: 14px; - width: 100%; - } - .product-price { - font-size: 16px; - margin-bottom: 14px; - width: 100%; - } - .product-ratings { - width: 100%; - margin-bottom: 14px; - } - .cart-fav-seg { - display: inline-flex; - width: 100%; - align-items: center; - - .addtocart { - border-radius: 0px; - margin-right: 10px; - text-transform: uppercase; - } - } - } - - section.featured-products { - display: block; - margin-bottom: 5%; - - .featured-heading { - width: 100%; - text-align: center; - text-transform: uppercase; - font-size: 18px; - margin-bottom: 20px; - - .featured-separator { - color: lightgray; - } - } - .featured-grid { - display: grid; - grid-template-columns: 48% 48%; - grid-gap: 10px; - } - } - - section.news-update { - display: block; - box-sizing: border-box; - width: 100%; - margin-bottom: 5%; - - .news-update-grid { - display: grid; - grid-template-columns: 100%; - grid-template-rows: auto; - grid-gap: 20px; - - .block1 { - display: block; - box-sizing: border-box; - - img { - display: flex; - height: 100%; - width: 100%; - } - } - - .block2 { - display: block; - box-sizing: border-box; - - display: grid; - grid-template-rows: repeat(2, minmax(50%, 1fr)); - grid-row-gap: 20px; - - .sub-block1 { - display: block; - box-sizing: border-box; - - img { - width: 100%; - } - } - - .sub-block2 { - display: block; - box-sizing: border-box; - - img { - width: 100%; - } - } - } - } - } - } - .footer { - background-color: $background-color; - padding-left: 10%; - padding-right: 10%; - - .footer-content { - .footer-list-container { - display: grid; - padding-top: 40px; - padding-bottom: 40px; - padding-left: 10px; - padding-right: 10px; - grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); - grid-auto-rows: auto; - grid-row-gap: 1vh; - - .list-container { - .list-heading { - font-size: 16px; - letter-spacing: -0.26px; - text-transform: uppercase; - color: $list-heading-color; - } - - .list-group { - padding-top: 25px; - - li { - margin-bottom: 12px; - color: $list-color; - list-style-type: none; - text-transform: uppercase; - - span.icon-wrapper { - display: inline-block; - vertical-align: middle; - margin-right: 5px; - height: 24px; - width: 24px; - - span.icon { - height: 24px; - width: 24px; - } - } - } - } - - .form-container { - padding-top: 10px; - - .control-group { - margin: 0; - - .subscribe-field { - width: 100%; - } - - .subscribe-field::-webkit-input-placeholder { - font-family: "montserrat", sans-serif; - } - - .subscribe-field::-moz-placeholder { - font-family: "montserrat", sans-serif; - } - - .btn-primary { - background-color: $subscribe-btn-color; - border-radius: 0px; - text-align: center; - } - } - } - } - } - } - } -} - -@media all and (min-width: 481px) and (max-width: 920px) { - .header { - // border: 1px solid black; - margin-top: 16px; - margin-bottom: 21px; - - .header-top { - margin-bottom: 16px; - display: flex; - max-width: 92%; - width: 100%; - margin-left: auto; - margin-right: auto; - // border: 1px solid indigo; - align-items: center; - justify-content: space-between; - - div.left-content { - display: flex; - flex-direction: row; - justify-content: flex-start; - align-items: center; - - ul.logo-container { - margin-right: 12px; - - li { - display: flex; - } - } - - ul.search-container { - li.search-group { - display: inline-flex; - justify-content: center; - align-items: center; - - .search-field { - height: 38px; - border: 2px solid $border-color; - border-radius: 3px; - border-right: none; - border-top-right-radius: 0px; - border-bottom-right-radius: 0px; - } - - input.search-field::-moz-placeholder { - font-family: "montserrat", sans-serif; - padding-left: 10px; - } - input.search-field::-webkit-input-placeholder { - font-family: "montserrat", sans-serif; - padding-left: 10px; - } - - .q-c { - box-sizing: border-box; - height: 38px; - width: 38px; - border: 2px solid $border-color; - border-top-right-radius: 3px; - border-bottom-right-radius: 3px; - - .search-icon { - margin-top: 4px; - margin-left: 4px; - height: 24px; - width: 24px; - } - } - } - } - } - - div.right-content { - display: flex; - flex-direction: row; - justify-content: flex-end; - align-items: center; - - ul.account-dropdown-container { - float: right; - border-right: 2px solid $border-color; - - li.account-dropdown { - display: flex; - flex-direction: row; - - .icon-account { - margin: 0; - height: 24px; - width: 24px; - } - .account { - padding-top: 3px; - } - } - } - - ul.product-dropdown-container { - float: right; - - li.product-dropdown { - display: flex; - flex-direction: row; - - .icon-cart { - margin: 0; - height: 24px; - width: 24px; - } - .cart { - padding-top: 3px; - } - } - } - } - - .right-responsive { - display: none; - ul.right-wrapper { - display: flex; - flex-direction: row; - justify-content: flex-end; - align-items: center; - - li:not(:last-child) { - margin-right: 7px; - - span.icon { - margin: 0; - height: 24px; - width: 24px; - } - } - } - } - } - - .header-bottom { - height: 48px; - margin-left: auto; - margin-right: auto; - border-top: 1px solid lightgrey; - border-bottom: 1px solid lightgrey; - display: block; - - .menu-bar { - display: flex; - flex-direction: row; - justify-content: flex-start; - align-items: center; - height: 48px; - width: 80%; - margin-left: auto; - margin-right: auto; - - li { - display: flex; - flex-direction: row; - align-items: center; - justify-content: center; - // background-color: blue; - height: 100%; - margin: 2.5%; - } - li:last-child { - margin-left: auto; - color: $offer-color; - } - } - } - } - .slider-block { - display: block; - width: 92%; - margin-left: auto; - margin-right: auto; - margin-bottom: 5%; - - .slider-content { - ul.slider-images { - li img { - width: 100%; - object-fit: fill; - } - } - } - } - .main-container-wrapper { - margin-left: 4%; - margin-right: 4%; - - .product-card { - display: flex; - flex-flow: column; - justify-content: center; - - .product-image img { - // order: -1; - align-self: center; - width: 100%; - margin-bottom: 14px; - } - .product-name { - font-size: 16px; - margin-bottom: 14px; - width: 100%; - } - .product-price { - font-size: 16px; - margin-bottom: 14px; - width: 100%; - } - .product-ratings { - width: 100%; - margin-bottom: 14px; - } - .cart-fav-seg { - display: inline-flex; - width: 100%; - align-items: center; - - .addtocart { - border-radius: 0px; - margin-right: 10px; - text-transform: uppercase; - } - } - } - - section.featured-products { - display: block; - margin-bottom: 5%; - - .featured-heading { - width: 100%; - text-align: center; - text-transform: uppercase; - font-size: 18px; - margin-bottom: 20px; - - .featured-separator { - color: lightgray; - } - } - .featured-grid { - display: grid; - // grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); - grid-template-columns: 49% 49%; - grid-gap: 10px; - } - } - - section.news-update { - display: block; - box-sizing: border-box; - width: 100%; - margin-bottom: 5%; - - .news-update-grid { - display: grid; - grid-template-columns: 100%; - grid-template-rows: auto; - grid-gap: 20px; - - .block1 { - display: block; - box-sizing: border-box; - - img { - display: flex; - height: 100%; - width: 100%; - } - } - - .block2 { - display: block; - box-sizing: border-box; - - display: grid; - grid-template-rows: repeat(2, minmax(50%, 1fr)); - grid-row-gap: 20px; - - .sub-block1 { - display: block; - box-sizing: border-box; - - img { - width: 100%; - } - } - - .sub-block2 { - display: block; - box-sizing: border-box; - - img { - width: 100%; - } - } - } - } - } - } - .footer { - background-color: $background-color; - padding-left: 4%; - padding-right: 4%; - - .footer-content { - .footer-list-container { - display: grid; - padding-top: 40px; - padding-bottom: 40px; - padding-left: 10px; - padding-right: 10px; - grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); - grid-auto-rows: auto; - grid-row-gap: 1vh; - - .list-container { - .list-heading { - font-size: 16px; - letter-spacing: -0.26px; - text-transform: uppercase; - color: $list-heading-color; - } - - .list-group { - padding-top: 25px; - - li { - margin-bottom: 12px; - color: $list-color; - list-style-type: none; - text-transform: uppercase; - - span.icon-wrapper { - display: inline-block; - vertical-align: middle; - margin-right: 5px; - height: 24px; - width: 24px; - - span.icon { - height: 24px; - width: 24px; - } - } - } - } - - .form-container { - padding-top: 10px; - - .control-group { - margin: 0; - - .subscribe-field { - width: 100%; - } - - .subscribe-field::-webkit-input-placeholder { - font-family: "montserrat", sans-serif; - } - - .subscribe-field::-moz-placeholder { - font-family: "montserrat", sans-serif; - } - - .btn-primary { - background-color: $subscribe-btn-color; - border-radius: 0px; - text-align: center; - } - } - } - } - } - } - } -} - - -.layered-filter-wrapper { - width: 20%; - - .filter-title { - border-bottom: 1px solid #E8E8E8; - font-size: 16px; - color: #242424; - padding: 10px 0; - } - - .filter-attributes { - .filter-attributes-item { - border-bottom: 1px solid #E8E8E8; - padding-bottom: 10px; - - .filter-attributes-title { - padding: 10px 40px 0 10px; - font-size: 16px; - color: #5E5E5E; - cursor: pointer; + .product-hero-image { + display: block; position: relative; - .icon { - background-image: url('../images/arrow-down.svg') !important; - width: 10px; - height: 10px; + .wishlist { position: absolute; - right: 15px; - top: 14px; + top: 10px; + right: 12px; + } + + .share { + position: absolute; + top: 10px; + right: 45px; + } + } + } + + .details { + + .product-heading { + font-size: 24px; + color: $product-font-color; + margin-bottom: 14px; + } + + .rating { + color: $product-font-color; + margin-bottom: 14px; + } + + .price { + margin-bottom: 14px; + + .main-price { + font-size: 24px; + color: $product-price-color; } } - .filter-attributes-content { - padding: 10px; - display: none; + .stock-status { + margin-bottom: 14px; + } - ol.items { - padding: 0; - margin: 0; - list-style: none none; + .description { + margin-bottom: 14px; + } - li.item { - padding: 8px 0; - font-size: 16px; - color: #5E5E5E; + hr{ + border-top: 1px solid $horizontal-rule-color; + margin-bottom: 17px; + } - .checkbox { - margin: 0; - - .checkbox-view { - height: 16px; - width: 16px; - background-image: url("../images/checkbox.svg"); - } + .attributes { + display: block; + width: 100%; - input:checked + .checkbox-view { - background-image: url("../images/checkbox-checked.svg"); + .attribute { + height: 39px; + margin-bottom: 20px; + + .title { + float: left; + height: 100%; + min-width: 130px; + padding-top: 9px; + } + + .values { + display: inline-flex; + + .colors { + margin-right:5px; + } + .colors:last-child { + margin-right: 0; + } + + .red { + height: 37px; + width: 37px; + background: red; + border: 1px solid $border-color; + border-radius: 2px; + } + + .blue { + height: 37px; + width: 37px; + background: blue; + border: 1px solid $border-color; + border-radius: 2px; + } + + .green { + height: 37px; + width: 37px; + background: green; + border: 1px solid $border-color; + border-radius: 2px; + } + + .size { + margin-right:5px; + line-height: 38px; + height: 37px; + width: 60px; + border: 1px solid $border-color; + border-radius: 2px; + text-align: center; + vertical-align: middle; + } + .size:last-child { + margin-right: 0; + } + + .quantity { + .values { + .control { + height: 37px !important; + width: 30px !important; + } } } } } - - .price-range-wrapper { - margin-top: 21px; - } } - &.active { - .filter-attributes-content { - display: block; + .full-description { + font-size: 16px; + } + + .full-specification{ + + } + + .rating-reviews { + margin-top: 30px; + + .title{ + margin-bottom: 15px; } - .filter-attributes-title .icon { - background-image: url('../images//arrow-up.svg') !important; + .overall { + + .number{ + font-size: 34px; + } + + button { + float: right; + border-radius: 0px !important; + } + + margin-bottom: 5px; + } + + .reviews { + margin-top: 34px; + margin-bottom: 80px; + + .review { + margin-bottom: 25px; + + .stars { + margin-bottom: 15px; + } + .message { + margin-bottom: 10px; + } + } + .view-all { + margin-top:15px; + color: $logo-color; + margin-bottom:15px; + } } } } + } -} \ No newline at end of file + // .related-products-wrapper { + // margin-bottom: 80px; + + // .title{ + // margin-bottom: 22px; + // text-align: center; + // } + + // .horizontal-rule { + // height: 1px; + // background: $horizontal-rule-color; + // width: 148px; + // margin-bottom: 24px; + // margin-left:auto; + // margin-right:auto; + // } + + // .related-products { + // display: grid; + // grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); + // grid-gap: 10px; + // } + + // } +} + +/* cart pages and elements css begins here */ + +section.cart { + color: $product-font-color; + font-size: 16px; + margin-bottom: 80px; + + .title { + font-size: 24px; + } + + .cart-content { + margin-top: 21px; + padding: 1px; + display: flex; + flex-direction: row; + + .left-side { + width: 68.6%; + margin-right: 2.4%; + + .item { + padding: 1.1%; + margin-bottom: 20px; + display: flex; + flex-direction: row; + + .item-image { + height: 160px; + width: 160px; + } + + .item-details { + display: flex; + flex-direction: column; + + .item-title { + font-size: 18px; + margin-bottom: 10px; + } + + .price { + margin-bottom: 10px; + + .main-price { + font-size: 18px; + margin-right: 4px; + } + + .real-price { + margin-right: 4px; + text-decoration-line: line-through; + } + + .discount { + color: $product-price-color; + } + } + + .summary { + margin-bottom: 17px; + } + + .misc { + display: inline-flex; + align-items: center; + justify-content: flex-start; + + div.qty-text { + color: $gray-shade; + margin-right: 10px; + } + + div.box { + height: 38px; + width: 60px; + text-align: center; + line-height: 38px; + border: 1px solid $border-color; + border-radius: 3px; + margin-right: 30px; + } + + .remove { + color: $dark-blue-shade; + margin-right: 30px; + } + + .towishlist { + color : $dark-blue-shade; + } + + } + } + } + + .misc-controls { + float: right; + + span { + margin-right: 15px; + } + + button { + border-radius: 0px; + } + } + } + + .right-side { + width: 29%; + display: block; + + .price-section { + width: 100%; + padding: 10px 10px 18px 18px; + margin-bottom: 20px; + + .title { + font-size: 16px; + font-weight: bold; + padding-bottom: 8px; + margin-bottom: 10px; + } + + .all-item-details { + margin-bottom: 17px; + + .item-details { + margin-bottom: 10px; + + .name { + } + + .price { + float: right; + } + } + } + .horizontal-rule { + width: 100%; + height: 1px; + vertical-align: middle; + background: #e8e8e8; + } + + .total-details { + margin-top: 10px; + + .amount { + float: right; + } + } + } + + .coupon-section { + padding: 10px 10px 18px 18px; + + .title { + font-size: 16px; + font-weight: bold; + margin-bottom: 10px; + } + + .control-group { + margin-bottom: 12px !important; + + input.coupon-input::-moz-placeholder { + font-family: "montserrat", sans-serif; + font-size: 16px; + color: $product-font-color; + } + + input.coupon-input::-webkit-input-placeholder { + font-family: "montserrat", sans-serif; + font-size: 16px; + color: $product-font-color; + } + + } + + button { + margin-bottom: 10px; + background-color: $color-black; + border-radius: 0px; + } + + .coupon-details { + + .coupon { + margin-bottom: 8px; + + .discount { + float: right; + } + } + } + + .horizontal-rule { + width: 100%; + height: 1px; + vertical-align: middle; + background: #e8e8e8; + margin-bottom: 9px; + } + + .after-coupon-amount { + + .name { + font-weight: bold; + } + + .amount { + float: right; + font-weight: bold; + } + + } + + } + + } + } + +} + +.related-products-wrapper { + margin-bottom: 80px; + + .title{ + margin-bottom: 22px; + font-size: 18px; + color: $product-font-color; + text-align: center; + } + + .horizontal-rule { + height: 1px; + background: $horizontal-rule-color; + width: 148px; + margin-bottom: 24px; + margin-left:auto; + margin-right:auto; + } + + .related-products { + display: grid; + grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); + grid-gap: 10px; + } + +} diff --git a/packages/Webkul/Shop/src/Resources/lang/en/app.php b/packages/Webkul/Shop/src/Resources/lang/en/app.php index 46d65e730..3ad47913a 100644 --- a/packages/Webkul/Shop/src/Resources/lang/en/app.php +++ b/packages/Webkul/Shop/src/Resources/lang/en/app.php @@ -33,6 +33,8 @@ return [ ], 'products' => [ - 'layered-nav-title' => 'Shop By' + 'layered-nav-title' => 'Shop By', + 'price-label' => 'As low as', + 'remove-filter-link-title' => 'Clear All' ] ]; \ No newline at end of file diff --git a/packages/Webkul/Shop/src/Resources/views/customers/account/profile/edit/index.blade.php b/packages/Webkul/Shop/src/Resources/views/customers/account/profile/edit.blade.php similarity index 93% rename from packages/Webkul/Shop/src/Resources/views/customers/account/profile/edit/index.blade.php rename to packages/Webkul/Shop/src/Resources/views/customers/account/profile/edit.blade.php index be95d9b56..1bcb3ee50 100644 --- a/packages/Webkul/Shop/src/Resources/views/customers/account/profile/edit/index.blade.php +++ b/packages/Webkul/Shop/src/Resources/views/customers/account/profile/edit.blade.php @@ -2,24 +2,34 @@ @section('content-wrapper')
+ @include('shop::customers.account.partials.sidemenu') +
+
Edit Profile
+
+
+ {{ csrf_field() }} +
{{-- @{{ errors.first('first_name') }} --}}
+
{{-- @{{ errors.first('last_name') }} --}}
+
{{-- @{{ errors.first('email') }} --}}
+
{{-- @{{ errors.first('gender') }} --}}
+
{{-- @{{ errors.first('first_name') }} --}}
+
{{-- @{{ errors.first('phone') }} --}}
+
+
- + +
+ +
+
+
+
@endsection diff --git a/packages/Webkul/Shop/src/Resources/views/customers/account/profile/home/index.blade.php b/packages/Webkul/Shop/src/Resources/views/customers/account/profile/index.blade.php similarity index 97% rename from packages/Webkul/Shop/src/Resources/views/customers/account/profile/home/index.blade.php rename to packages/Webkul/Shop/src/Resources/views/customers/account/profile/index.blade.php index 38977a08b..028d488da 100644 --- a/packages/Webkul/Shop/src/Resources/views/customers/account/profile/home/index.blade.php +++ b/packages/Webkul/Shop/src/Resources/views/customers/account/profile/index.blade.php @@ -1,44 +1,58 @@ @extends('shop::layouts.master') @section('content-wrapper') +
+ @include('shop::customers.account.partials.sidemenu') +
+
Profile Edit
+
+ + + + + +
First Name {{ $customer['first_name'] }}
Last Name {{ $customer['last_name'] }}
Gender Name {{ $customer['gender'] }}
Date of Birth {{ $customer['date_of_birth'] }}
Email Address {{ $customer['email'] }}
Mobile {{ $customer['phone'] }}
+
+
+
@endsection diff --git a/packages/Webkul/Shop/src/Resources/views/customers/session/index.blade.php b/packages/Webkul/Shop/src/Resources/views/customers/session/index.blade.php index dba4c3d76..888a8f13a 100644 --- a/packages/Webkul/Shop/src/Resources/views/customers/session/index.blade.php +++ b/packages/Webkul/Shop/src/Resources/views/customers/session/index.blade.php @@ -1,5 +1,4 @@ @extends('shop::layouts.master') - @section('content-wrapper')
diff --git a/packages/Webkul/Shop/src/Resources/views/customers/signup/index.blade.php b/packages/Webkul/Shop/src/Resources/views/customers/signup/index.blade.php index 43f212328..5b9f5a043 100644 --- a/packages/Webkul/Shop/src/Resources/views/customers/signup/index.blade.php +++ b/packages/Webkul/Shop/src/Resources/views/customers/signup/index.blade.php @@ -36,13 +36,13 @@
- + @{{ errors.first('password') }}
- + @{{ errors.first('confirm_password') }}
diff --git a/packages/Webkul/Shop/src/Resources/views/grids/featured/featuredproductgrid.blade.php b/packages/Webkul/Shop/src/Resources/views/home/featured-products.blade.php similarity index 98% rename from packages/Webkul/Shop/src/Resources/views/grids/featured/featuredproductgrid.blade.php rename to packages/Webkul/Shop/src/Resources/views/home/featured-products.blade.php index e53439f9e..31ea188d9 100644 --- a/packages/Webkul/Shop/src/Resources/views/grids/featured/featuredproductgrid.blade.php +++ b/packages/Webkul/Shop/src/Resources/views/home/featured-products.blade.php @@ -4,7 +4,7 @@ _____
-