merge with master
This commit is contained in:
commit
984ff18267
|
|
@ -0,0 +1,69 @@
|
|||
# CHANGELOG for v0.1.x
|
||||
|
||||
#### This changelog consists the bug & security fixes and new features being included in the releases listed below.
|
||||
|
||||
## **v0.1.1(13th of November, 2018)** - *Release*
|
||||
|
||||
#94 - [fixed] Sign-in page shows signup text(@prashant-webkul)
|
||||
|
||||
#95 - [fixed] Buy Now Button does not work(@prashant-webkul)
|
||||
|
||||
#96 - [fixed] Search button does not work(@prashant-webkul)
|
||||
|
||||
**PR #118** - *List of the features and fixes covered:*
|
||||
|
||||
* [fixed] Email templates logo issue fixed(@jitendra-webkul)
|
||||
* [fixed] Front search issue fixed due to hardcoded attribute code in search criteria(@jitendra-webkul)
|
||||
* [changed] Versioning of core packages
|
||||
* [fixed] Buynow validation fixes(@jitendra-webkul)
|
||||
* [feature] New action type added in datagrid
|
||||
* [feature] Loader added in storefront product page
|
||||
* [fixed] Tax rates and categories form fixes(@jitendra-webkul)
|
||||
* [feature] Country state selector added where country and states were there originally in release v0.1.0
|
||||
* [feature] Multiple addresses for customers with CRUD
|
||||
* [feature] Customer can now make any of his/her existing address a default address
|
||||
* [fixed] Customer address 2 form field validation required changed to optional(@jitendra-webkul)
|
||||
* [fixed] Tax rates validation fixes for zip ranges(@prashant-webkul)
|
||||
* [feature] Print invoice feature added.
|
||||
* [changed] Core packages composer file parameter name changed from namespace webkul to bagisto
|
||||
* [feature] Payment package added in core packages
|
||||
* [feature] Sales module added in admin with orders, invoices and shipments with datagrid
|
||||
* [feature] Functionality to indicate the new and featured product in the product's add and edit form
|
||||
* [feature] Cart actions more faster in storefront
|
||||
* [changed] Responsive styles refined and extended for checkout pages on storefront
|
||||
* [fixed] Various UI/UX fixes in store front styles and layouts(@prashant-webkul & @jitendra-webkul)
|
||||
|
||||
|
||||
## **v0.1.0(30th of October 2018)** - *First release*
|
||||
|
||||
**PR #117** - *List of the features and fixes covered:*
|
||||
|
||||
* [feature] Add and modify product with simple and configurable types
|
||||
* [feature] Add and modify attributes and attribute families for creating products.
|
||||
* [feature] Datagrid for all the major core resources added as index for listing core resources like product, attributes.
|
||||
* [feature] Add and modify channels for creating multiple storefront.
|
||||
* [feature] Add and modify categories to be displayed on storefront.
|
||||
* [feature] Add and modify customers.
|
||||
* [feature] Add and modify customer groups.
|
||||
* [feature] Add and modify customer reviews for moderation by admin.
|
||||
* [feature] Add and modify currently logged in admin user details.
|
||||
* [feature] Add and modify locales for multiple languages support system wide.
|
||||
* [feature] Add and modify currencies to be used in channels
|
||||
* [feature] Add and modify currency exchange rate for the stores accepting multiple currencies or using multiple channels.
|
||||
* [feature] Add and modify inventory sources with priority to hold products quantities in real time.
|
||||
* [feature] Add and modify channels.
|
||||
* [feature] Add and modify user from admins access with customer roles.
|
||||
* [feature] Add and modify customer roles for users.
|
||||
* [feature] Add and modify slider for storefront as a CMS capability.
|
||||
* [feature] Add and modify tax categories and tax rates.
|
||||
* [feature] Shopping cart in storefront
|
||||
* [feature] Wishlist for customer
|
||||
* [feature] Single address for customer
|
||||
* [feature] Customer can see his reviews in his account section when logged in.
|
||||
* [feature] Customer profile edit feature account section when logged in.
|
||||
* [feature] Customer can view his orders in account section when logged in.
|
||||
* [feature] Customer order notifications via mails.
|
||||
* [feature] Multiple locales and currencies on storefront.
|
||||
* [feature] Locale translations are stored as a separate file in shop and admin packages.
|
||||
* [feature] Single page checkout system for checkout.
|
||||
* [feature] Custom themes and assets provisioning included as a integrated package called "theme" in packages.
|
||||
|
|
@ -44,12 +44,12 @@ class AttributeDataGrid
|
|||
[
|
||||
'type' => 'Edit',
|
||||
'route' => route('admin.datagrid.delete'),
|
||||
'confirm_text' => 'Do you really want to do this?',
|
||||
'confirm_text' => 'Do you really want to edit this record?',
|
||||
'icon' => 'icon pencil-lg-icon',
|
||||
], [
|
||||
'type' => 'Delete',
|
||||
'route' => route('admin.datagrid.delete'),
|
||||
'confirm_text' => 'Do you really want to do this?',
|
||||
'confirm_text' => 'Do you really want to delete this record?',
|
||||
'icon' => 'icon trash-icon',
|
||||
],
|
||||
],
|
||||
|
|
@ -65,73 +65,66 @@ class AttributeDataGrid
|
|||
'type' => 'number',
|
||||
'label' => 'ID',
|
||||
'sortable' => true,
|
||||
],
|
||||
[
|
||||
], [
|
||||
'name' => 'code',
|
||||
'alias' => 'attributeCode',
|
||||
'type' => 'string',
|
||||
'label' => 'Code',
|
||||
'sortable' => true,
|
||||
],
|
||||
[
|
||||
], [
|
||||
'name' => 'admin_name',
|
||||
'alias' => 'attributeAdminName',
|
||||
'type' => 'string',
|
||||
'label' => 'Name',
|
||||
'sortable' => true,
|
||||
],
|
||||
[
|
||||
], [
|
||||
'name' => 'type',
|
||||
'alias' => 'attributeType',
|
||||
'type' => 'string',
|
||||
'label' => 'Type',
|
||||
'sortable' => false,
|
||||
],
|
||||
[
|
||||
'sortable' => true,
|
||||
], [
|
||||
'name' => 'is_required',
|
||||
'alias' => 'attributeIsRequired',
|
||||
'type' => 'string',
|
||||
'label' => 'Required',
|
||||
'sortable' => false,
|
||||
'sortable' => true,
|
||||
'wrapper' => function ($value) {
|
||||
if($value == 0)
|
||||
return "False";
|
||||
else
|
||||
return "True";
|
||||
},
|
||||
],
|
||||
[
|
||||
], [
|
||||
'name' => 'is_unique',
|
||||
'alias' => 'attributeIsUnique',
|
||||
'type' => 'string',
|
||||
'label' => 'Unique',
|
||||
'sortable' => false,
|
||||
'sortable' => true,
|
||||
'wrapper' => function ($value) {
|
||||
if($value == 0)
|
||||
return "False";
|
||||
else
|
||||
return "True";
|
||||
},
|
||||
],
|
||||
[
|
||||
], [
|
||||
'name' => 'value_per_locale',
|
||||
'alias' => 'attributeValuePerLocale',
|
||||
'type' => 'string',
|
||||
'label' => 'ValuePerLocale',
|
||||
'sortable' => false,
|
||||
'sortable' => true,
|
||||
'wrapper' => function ($value) {
|
||||
if($value == 0)
|
||||
return "False";
|
||||
else
|
||||
return "True";
|
||||
},
|
||||
],
|
||||
[
|
||||
], [
|
||||
'name' => 'value_per_channel',
|
||||
'alias' => 'attributeValuePerChannel',
|
||||
'type' => 'string',
|
||||
'label' => 'ValuePerChannel',
|
||||
'sortable' => false,
|
||||
'sortable' => true,
|
||||
'wrapper' => function ($value) {
|
||||
if($value == 0)
|
||||
return "False";
|
||||
|
|
|
|||
|
|
@ -45,12 +45,12 @@ class AttributeFamilyDataGrid
|
|||
[
|
||||
'type' => 'Edit',
|
||||
'route' => route('admin.datagrid.delete'),
|
||||
'confirm_text' => 'Do you really want to do this?',
|
||||
'confirm_text' => 'Do you really want to edit this record?',
|
||||
'icon' => 'icon pencil-lg-icon',
|
||||
], [
|
||||
'type' => 'Delete',
|
||||
'route' => route('admin.datagrid.delete'),
|
||||
'confirm_text' => 'Do you really want to do this?',
|
||||
'confirm_text' => 'Do you really want to delete this record?',
|
||||
'icon' => 'icon trash-icon',
|
||||
],
|
||||
],
|
||||
|
|
@ -68,22 +68,19 @@ class AttributeFamilyDataGrid
|
|||
//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',
|
||||
|
|
@ -98,14 +95,12 @@ class AttributeFamilyDataGrid
|
|||
'alias' => 'attributeFamilyId',
|
||||
'type' => 'number',
|
||||
'label' => 'ID',
|
||||
],
|
||||
[
|
||||
], [
|
||||
'column' => 'code',
|
||||
'alias' => 'attributeFamilyCode',
|
||||
'type' => 'string',
|
||||
'label' => 'Code',
|
||||
],
|
||||
[
|
||||
], [
|
||||
'column' => 'name',
|
||||
'alias' => 'attributeFamilyName',
|
||||
'type' => 'string',
|
||||
|
|
@ -120,8 +115,7 @@ class AttributeFamilyDataGrid
|
|||
'column' => 'name',
|
||||
'type' => 'string',
|
||||
'label' => 'Name',
|
||||
],
|
||||
[
|
||||
], [
|
||||
'column' => 'code',
|
||||
'type' => 'string',
|
||||
'label' => 'Code',
|
||||
|
|
|
|||
|
|
@ -45,12 +45,12 @@ class CategoryDataGrid
|
|||
[
|
||||
'type' => 'Edit',
|
||||
'route' => route('admin.datagrid.delete'),
|
||||
'confirm_text' => 'Do you really want to do this?',
|
||||
'confirm_text' => 'Do you really want to edit this record?',
|
||||
'icon' => 'icon pencil-lg-icon',
|
||||
], [
|
||||
'type' => 'Delete',
|
||||
'route' => route('admin.datagrid.delete'),
|
||||
'confirm_text' => 'Do you really want to do this?',
|
||||
'confirm_text' => 'Do you really want to delete this record?',
|
||||
'icon' => 'icon trash-icon',
|
||||
],
|
||||
],
|
||||
|
|
@ -70,33 +70,25 @@ class CategoryDataGrid
|
|||
'columns' => [
|
||||
[
|
||||
'name' => 'cat.id',
|
||||
'alias' => 'cat_id',
|
||||
'alias' => 'catid',
|
||||
'type' => 'number',
|
||||
'label' => 'Category ID',
|
||||
'label' => 'ID',
|
||||
'sortable' => true,
|
||||
], [
|
||||
'name' => 'ct.name',
|
||||
'alias' => 'cat_name',
|
||||
'alias' => 'catname',
|
||||
'type' => 'string',
|
||||
'label' => 'Category Name',
|
||||
'sortable' => false,
|
||||
'label' => 'Name',
|
||||
'sortable' => true,
|
||||
], [
|
||||
'name' => 'cat.position',
|
||||
'alias' => 'cat_position',
|
||||
'alias' => 'catposition',
|
||||
'type' => 'string',
|
||||
'label' => 'Category Position',
|
||||
'sortable' => false,
|
||||
],
|
||||
// [
|
||||
// 'name' => 'cta.name',
|
||||
// 'alias' => 'parent_name',
|
||||
// 'type' => 'string',
|
||||
// 'label' => 'Parent Name',
|
||||
// 'sortable' => true,
|
||||
// ],
|
||||
[
|
||||
'label' => 'Position',
|
||||
'sortable' => true,
|
||||
], [
|
||||
'name' => 'cat.status',
|
||||
'alias' => 'cat_status',
|
||||
'alias' => 'catstatus',
|
||||
'type' => 'string',
|
||||
'label' => 'Visible in Menu',
|
||||
'sortable' => true,
|
||||
|
|
@ -106,13 +98,12 @@ class CategoryDataGrid
|
|||
else
|
||||
return "True";
|
||||
},
|
||||
],
|
||||
[
|
||||
], [
|
||||
'name' => 'ct.locale',
|
||||
'alias' => 'cat_locale',
|
||||
'alias' => 'catlocale',
|
||||
'type' => 'string',
|
||||
'label' => 'Locale',
|
||||
'sortable' => false,
|
||||
'sortable' => true,
|
||||
'filter' => [
|
||||
'function' => 'orWhere',
|
||||
'condition' => ['ct.locale', app()->getLocale()]
|
||||
|
|
@ -123,24 +114,17 @@ class CategoryDataGrid
|
|||
'filterable' => [
|
||||
[
|
||||
'column' => 'cat.id',
|
||||
'alias' => 'cat_id',
|
||||
'alias' => 'catid',
|
||||
'type' => 'number',
|
||||
'label' => 'Category ID',
|
||||
'label' => 'ID',
|
||||
], [
|
||||
'column' => 'ct.name',
|
||||
'alias' => 'cat_name',
|
||||
'alias' => 'catname',
|
||||
'type' => 'string',
|
||||
'label' => 'Category Name',
|
||||
],
|
||||
// [
|
||||
// 'column' => 'cta.name',
|
||||
// 'alias' => 'parentName',
|
||||
// 'type' => 'string',
|
||||
// 'label' => 'Parent Name',
|
||||
// ],
|
||||
[
|
||||
'label' => 'Name',
|
||||
], [
|
||||
'column' => 'cat.status',
|
||||
'alias' => 'cat_status',
|
||||
'alias' => 'catstatus',
|
||||
'type' => 'string',
|
||||
'label' => 'Visible in Menu',
|
||||
],
|
||||
|
|
@ -152,11 +136,11 @@ class CategoryDataGrid
|
|||
[
|
||||
'column' => 'cat.id',
|
||||
'type' => 'number',
|
||||
'label' => 'Category ID',
|
||||
'label' => 'ID',
|
||||
], [
|
||||
'column' => 'ct.name',
|
||||
'type' => 'string',
|
||||
'label' => 'Category Name',
|
||||
'label' => 'Name',
|
||||
], [
|
||||
'column' => 'cat.status',
|
||||
'type' => 'string',
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@ class ChannelDataGrid
|
|||
[
|
||||
'type' => 'Edit',
|
||||
'route' => route('admin.datagrid.delete'),
|
||||
'confirm_text' => 'Do you really edit this record?',
|
||||
'confirm_text' => 'Do you really want to edit this record?',
|
||||
'icon' => 'icon pencil-lg-icon',
|
||||
], [
|
||||
'type' => 'Delete',
|
||||
|
|
@ -68,51 +68,50 @@ class ChannelDataGrid
|
|||
//use aliasing on secodary columns if join is performed
|
||||
|
||||
'columns' => [
|
||||
|
||||
[
|
||||
'name' => 'id',
|
||||
'alias' => 'channelID',
|
||||
'type' => 'number',
|
||||
'label' => 'Channel ID',
|
||||
'label' => 'ID',
|
||||
'sortable' => true,
|
||||
],
|
||||
[
|
||||
], [
|
||||
'name' => 'code',
|
||||
'alias' => 'channelCode',
|
||||
'type' => 'string',
|
||||
'label' => 'Channel Code',
|
||||
'label' => 'Code',
|
||||
'sortable' => true,
|
||||
],
|
||||
[
|
||||
], [
|
||||
'name' => 'name',
|
||||
'alias' => 'channelName',
|
||||
'type' => 'string',
|
||||
'label' => 'Channel Name',
|
||||
'label' => 'Name',
|
||||
'sortable' => true,
|
||||
], [
|
||||
'name' => 'hostname',
|
||||
'alias' => 'channelHostName',
|
||||
'type' => 'string',
|
||||
'label' => 'Host Name',
|
||||
'sortable' => true,
|
||||
],
|
||||
|
||||
],
|
||||
|
||||
//don't use aliasing in case of filters
|
||||
|
||||
'filterable' => [
|
||||
[
|
||||
'column' => 'id',
|
||||
'alias' => 'channelID',
|
||||
'type' => 'number',
|
||||
'label' => 'Channel ID',
|
||||
],
|
||||
[
|
||||
'label' => 'ID',
|
||||
], [
|
||||
'column' => 'code',
|
||||
'alias' => 'channelCode',
|
||||
'type' => 'string',
|
||||
'label' => 'Channel Code',
|
||||
],
|
||||
[
|
||||
'label' => 'Code',
|
||||
], [
|
||||
'column' => 'name',
|
||||
'alias' => 'channelName',
|
||||
'type' => 'string',
|
||||
'label' => 'Channel Name',
|
||||
'label' => 'Name',
|
||||
],
|
||||
],
|
||||
|
||||
|
|
@ -122,12 +121,19 @@ class ChannelDataGrid
|
|||
[
|
||||
'column' => 'name',
|
||||
'type' => 'string',
|
||||
'label' => 'Channel Name',
|
||||
],
|
||||
[
|
||||
'label' => 'Name',
|
||||
], [
|
||||
'column' => 'code',
|
||||
'type' => 'string',
|
||||
'label' => 'Channel Code',
|
||||
'label' => 'Code',
|
||||
], [
|
||||
'column' => 'hostname',
|
||||
'type' => 'string',
|
||||
'label' => 'Host Name',
|
||||
], [
|
||||
'column' => 'name',
|
||||
'type' => 'string',
|
||||
'label' => 'Name',
|
||||
],
|
||||
],
|
||||
|
||||
|
|
|
|||
|
|
@ -45,12 +45,12 @@ class CountryDataGrid
|
|||
[
|
||||
'type' => 'Edit',
|
||||
'route' => route('admin.datagrid.delete'),
|
||||
'confirm_text' => 'Do you really want to do this?',
|
||||
'confirm_text' => 'Do you really want to edit this record?',
|
||||
'icon' => 'icon pencil-lg-icon',
|
||||
], [
|
||||
'type' => 'Delete',
|
||||
'route' => route('admin.datagrid.delete'),
|
||||
'confirm_text' => 'Do you really want to do this?',
|
||||
'confirm_text' => 'Do you really want to delete this record?',
|
||||
'icon' => 'icon trash-icon',
|
||||
],
|
||||
],
|
||||
|
|
@ -68,29 +68,25 @@ class CountryDataGrid
|
|||
//use aliasing on secodary columns if join is performed
|
||||
|
||||
'columns' => [
|
||||
|
||||
[
|
||||
'name' => 'id',
|
||||
'alias' => 'countryId',
|
||||
'type' => 'number',
|
||||
'label' => 'ID',
|
||||
'sortable' => true,
|
||||
],
|
||||
[
|
||||
], [
|
||||
'name' => 'code',
|
||||
'alias' => 'countryCode',
|
||||
'type' => 'string',
|
||||
'label' => 'Code',
|
||||
'sortable' => true,
|
||||
],
|
||||
[
|
||||
], [
|
||||
'name' => 'name',
|
||||
'alias' => 'countryName',
|
||||
'type' => 'string',
|
||||
'label' => 'Name',
|
||||
'sortable' => true,
|
||||
],
|
||||
[
|
||||
], [
|
||||
'name' => 'status',
|
||||
'alias' => 'countryStatus',
|
||||
'type' => 'number',
|
||||
|
|
@ -101,27 +97,23 @@ class CountryDataGrid
|
|||
],
|
||||
|
||||
//don't use aliasing in case of filters
|
||||
|
||||
'filterable' => [
|
||||
[
|
||||
'column' => 'id',
|
||||
'alias' => 'countryId',
|
||||
'type' => 'number',
|
||||
'label' => 'ID',
|
||||
],
|
||||
[
|
||||
], [
|
||||
'column' => 'code',
|
||||
'alias' => 'countryCode',
|
||||
'type' => 'string',
|
||||
'label' => 'Code',
|
||||
],
|
||||
[
|
||||
], [
|
||||
'column' => 'name',
|
||||
'alias' => 'countryName',
|
||||
'type' => 'string',
|
||||
'label' => 'Name',
|
||||
],
|
||||
[
|
||||
], [
|
||||
'column' => 'status',
|
||||
'alias' => 'countryStatus',
|
||||
'type' => 'number',
|
||||
|
|
@ -136,12 +128,19 @@ class CountryDataGrid
|
|||
'column' => 'name',
|
||||
'type' => 'string',
|
||||
'label' => 'Name',
|
||||
],
|
||||
[
|
||||
], [
|
||||
'column' => 'code',
|
||||
'type' => 'string',
|
||||
'label' => 'Code',
|
||||
],
|
||||
], [
|
||||
'column' => 'name',
|
||||
'type' => 'string',
|
||||
'label' => 'Name',
|
||||
], [
|
||||
'column' => 'status',
|
||||
'type' => 'number',
|
||||
'label' => 'Code',
|
||||
]
|
||||
],
|
||||
|
||||
//list of viable operators that will be used
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@ class CurrencyDataGrid
|
|||
[
|
||||
'type' => 'Edit',
|
||||
'route' => route('admin.datagrid.delete'),
|
||||
'confirm_text' => 'Do you really edit this record?',
|
||||
'confirm_text' => 'Do you really want to edit this record?',
|
||||
'icon' => 'icon pencil-lg-icon',
|
||||
], [
|
||||
'type' => 'Delete',
|
||||
|
|
@ -74,15 +74,13 @@ class CurrencyDataGrid
|
|||
'type' => 'number',
|
||||
'label' => 'ID',
|
||||
'sortable' => true,
|
||||
],
|
||||
[
|
||||
], [
|
||||
'name' => 'code',
|
||||
'alias' => 'currencyCode',
|
||||
'type' => 'string',
|
||||
'label' => 'Code',
|
||||
'sortable' => true,
|
||||
],
|
||||
[
|
||||
], [
|
||||
'name' => 'name',
|
||||
'alias' => 'currencyName',
|
||||
'type' => 'string',
|
||||
|
|
@ -100,14 +98,12 @@ class CurrencyDataGrid
|
|||
'alias' => 'currencyId',
|
||||
'type' => 'number',
|
||||
'label' => 'ID',
|
||||
],
|
||||
[
|
||||
], [
|
||||
'column' => 'code',
|
||||
'alias' => 'currencyCode',
|
||||
'type' => 'string',
|
||||
'label' => 'Code',
|
||||
],
|
||||
[
|
||||
], [
|
||||
'column' => 'name',
|
||||
'alias' => 'currencyName',
|
||||
'type' => 'string',
|
||||
|
|
@ -119,11 +115,14 @@ class CurrencyDataGrid
|
|||
|
||||
'searchable' => [
|
||||
[
|
||||
'column' => 'id',
|
||||
'alias' => 'currencyId',
|
||||
'type' => 'number',
|
||||
], [
|
||||
'column' => 'name',
|
||||
'type' => 'string',
|
||||
'label' => 'Name',
|
||||
],
|
||||
[
|
||||
], [
|
||||
'column' => 'code',
|
||||
'type' => 'string',
|
||||
'label' => 'Code',
|
||||
|
|
|
|||
|
|
@ -43,12 +43,12 @@ class CustomerDataGrid
|
|||
[
|
||||
'type' => 'Edit',
|
||||
'route' => route('admin.datagrid.delete'),
|
||||
'confirm_text' => 'Do you really want to do this?',
|
||||
'confirm_text' => 'Do you really want to edit this record?',
|
||||
'icon' => 'icon pencil-lg-icon',
|
||||
], [
|
||||
'type' => 'Delete',
|
||||
'route' => route('admin.datagrid.delete'),
|
||||
'confirm_text' => 'Do you really want to do this?',
|
||||
'confirm_text' => 'Do you really want to delete this record?',
|
||||
'icon' => 'icon trash-icon',
|
||||
],
|
||||
],
|
||||
|
|
@ -71,29 +71,19 @@ class CustomerDataGrid
|
|||
'type' => 'number',
|
||||
'label' => 'ID',
|
||||
'sortable' => true,
|
||||
],
|
||||
[
|
||||
'name' => 'cus.first_name',
|
||||
'alias' => 'FirstName',
|
||||
], [
|
||||
'name' => 'CONCAT(first_name, " ", last_name)',
|
||||
'alias' => 'Name',
|
||||
'type' => 'string',
|
||||
'label' => 'First Name',
|
||||
'sortable' => false,
|
||||
],
|
||||
[
|
||||
'name' => 'cus.email',
|
||||
'label' => 'Name',
|
||||
'sortable' => true,
|
||||
], [
|
||||
'name' => 'email',
|
||||
'alias' => 'Email',
|
||||
'type' => 'string',
|
||||
'label' => 'Email',
|
||||
'sortable' => false,
|
||||
],
|
||||
[
|
||||
'name' => 'cus.phone',
|
||||
'alias' => 'Phone',
|
||||
'type' => 'number',
|
||||
'label' => 'Phone',
|
||||
'sortable' => true,
|
||||
],
|
||||
[
|
||||
], [
|
||||
'name' => 'cg.name',
|
||||
'alias' => 'CustomerGroupName',
|
||||
'type' => 'string',
|
||||
|
|
@ -103,26 +93,18 @@ class CustomerDataGrid
|
|||
],
|
||||
|
||||
//don't use aliasing in case of filters
|
||||
|
||||
'filterable' => [
|
||||
[
|
||||
'column' => 'cus.id',
|
||||
'alias' => 'ID',
|
||||
'type' => 'number',
|
||||
'label' => 'ID',
|
||||
],
|
||||
[
|
||||
'column' => 'cus.first_name',
|
||||
'alias' => 'FirstName',
|
||||
], [
|
||||
'column' => 'email',
|
||||
'alias' => 'Email',
|
||||
'type' => 'string',
|
||||
'label' => 'First Name',
|
||||
'label' => 'Email',
|
||||
],
|
||||
[
|
||||
'column' => 'cg.name',
|
||||
'alias' => 'CustomerGroupName',
|
||||
'type' => 'string',
|
||||
'label' => 'Group Name',
|
||||
]
|
||||
],
|
||||
|
||||
//don't use aliasing in case of searchables
|
||||
|
|
@ -132,11 +114,10 @@ class CustomerDataGrid
|
|||
'column' => 'FirstName',
|
||||
'type' => 'string',
|
||||
'label' => 'First Name',
|
||||
],
|
||||
[
|
||||
], [
|
||||
'column' => 'email',
|
||||
'alias' => 'Email',
|
||||
'type' => 'string',
|
||||
'label' => 'Email',
|
||||
],
|
||||
],
|
||||
|
||||
|
|
|
|||
|
|
@ -54,13 +54,13 @@ class CustomerGroupDataGrid
|
|||
[
|
||||
'type' => 'Edit',
|
||||
'route' => route('admin.datagrid.delete'),
|
||||
'confirm_text' => 'Do you really wanis?',
|
||||
'confirm_text' => 'Do you really want to edit this record?',
|
||||
'icon' => 'icon pencil-lg-icon',
|
||||
],
|
||||
[
|
||||
'type' => 'Delete',
|
||||
'route' => route('admin.datagrid.delete'),
|
||||
'confirm_text' => 'Do you really want to do this?',
|
||||
'confirm_text' => 'Do you really want to delete this record?',
|
||||
'icon' => 'icon trash-icon',
|
||||
],
|
||||
],
|
||||
|
|
@ -82,8 +82,7 @@ class CustomerGroupDataGrid
|
|||
'type' => 'number',
|
||||
'label' => 'ID',
|
||||
'sortable' => true,
|
||||
],
|
||||
[
|
||||
], [
|
||||
'name' => 'cg.name',
|
||||
'alias' => 'Name',
|
||||
'type' => 'string',
|
||||
|
|
@ -91,6 +90,7 @@ class CustomerGroupDataGrid
|
|||
'sortable' => true,
|
||||
],
|
||||
],
|
||||
|
||||
//don't use aliasing in case of filters
|
||||
'filterable' => [
|
||||
[
|
||||
|
|
@ -98,8 +98,7 @@ class CustomerGroupDataGrid
|
|||
'alias' => 'Name',
|
||||
'type' => 'string',
|
||||
'label' => 'Name'
|
||||
],
|
||||
[
|
||||
], [
|
||||
'column' => 'cg.id',
|
||||
'alias' => 'ID',
|
||||
'type' => 'number',
|
||||
|
|
@ -112,8 +111,7 @@ class CustomerGroupDataGrid
|
|||
'column' => 'cg.id',
|
||||
'type' => 'number',
|
||||
'label' => 'Id'
|
||||
],
|
||||
[
|
||||
], [
|
||||
'column' => 'cg.name',
|
||||
'type' => 'string',
|
||||
'label' => 'Name'
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@ class ExchangeRatesDataGrid
|
|||
[
|
||||
'type' => 'Edit',
|
||||
'route' => route('admin.datagrid.delete'),
|
||||
'confirm_text' => 'Do you really edit this record?',
|
||||
'confirm_text' => 'Do you really want to edit this record?',
|
||||
'icon' => 'icon pencil-lg-icon',
|
||||
], [
|
||||
'type' => 'Delete',
|
||||
|
|
@ -85,6 +85,7 @@ class ExchangeRatesDataGrid
|
|||
'alias' => 'exchrate',
|
||||
'type' => 'string',
|
||||
'label' => 'Exchange Rate',
|
||||
'sortable' => true
|
||||
],
|
||||
],
|
||||
|
||||
|
|
@ -100,6 +101,11 @@ class ExchangeRatesDataGrid
|
|||
'alias' => 'exchcurrname',
|
||||
'type' => 'string',
|
||||
'label' => 'Currency Name',
|
||||
], [
|
||||
'column' => 'cer.rate',
|
||||
'alias' => 'exchrate',
|
||||
'type' => 'string',
|
||||
'label' => 'Exchange Rate',
|
||||
],
|
||||
],
|
||||
|
||||
|
|
@ -109,6 +115,10 @@ class ExchangeRatesDataGrid
|
|||
'column' => 'exchcurrname',
|
||||
'type' => 'string',
|
||||
'label' => 'Currency Name',
|
||||
], [
|
||||
'column' => 'cer.rate',
|
||||
'type' => 'string',
|
||||
'label' => 'Exchange Rate',
|
||||
],
|
||||
],
|
||||
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@ class InventorySourcesDataGrid
|
|||
[
|
||||
'type' => 'Edit',
|
||||
'route' => route('admin.datagrid.edit'),
|
||||
'confirm_text' => 'Do you really edit this record?',
|
||||
'confirm_text' => 'Do you really want to edit this record?',
|
||||
'icon' => 'icon pencil-lg-icon',
|
||||
], [
|
||||
'type' => 'Delete',
|
||||
|
|
@ -77,13 +77,13 @@ class InventorySourcesDataGrid
|
|||
'alias' => 'inventoryCode',
|
||||
'type' => 'string',
|
||||
'label' => 'Code',
|
||||
'sortable' => false,
|
||||
'sortable' => true,
|
||||
], [
|
||||
'name' => 'name',
|
||||
'alias' => 'inventoryName',
|
||||
'type' => 'string',
|
||||
'label' => 'Name',
|
||||
'sortable' => false,
|
||||
'sortable' => true,
|
||||
], [
|
||||
'name' => 'priority',
|
||||
'alias' => 'inventoryPriority',
|
||||
|
|
@ -114,14 +114,12 @@ class InventorySourcesDataGrid
|
|||
'alias' => 'inventoryID',
|
||||
'type' => 'number',
|
||||
'label' => 'ID',
|
||||
],
|
||||
[
|
||||
], [
|
||||
'column' => 'code',
|
||||
'alias' => 'inventoryCode',
|
||||
'type' => 'string',
|
||||
'label' => 'Code',
|
||||
],
|
||||
[
|
||||
], [
|
||||
'column' => 'name',
|
||||
'alias' => 'inventoryName',
|
||||
'type' => 'string',
|
||||
|
|
@ -136,11 +134,14 @@ class InventorySourcesDataGrid
|
|||
'column' => 'name',
|
||||
'type' => 'string',
|
||||
'label' => 'Name',
|
||||
],
|
||||
[
|
||||
], [
|
||||
'column' => 'code',
|
||||
'type' => 'string',
|
||||
'label' => 'Code',
|
||||
], [
|
||||
'column' => 'name',
|
||||
'type' => 'string',
|
||||
'label' => 'Name',
|
||||
],
|
||||
],
|
||||
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@ class LocalesDataGrid
|
|||
[
|
||||
'type' => 'Edit',
|
||||
'route' => route('admin.datagrid.delete'),
|
||||
'confirm_text' => 'Do you really edit this record?',
|
||||
'confirm_text' => 'Do you really want to edit this record?',
|
||||
'icon' => 'icon pencil-lg-icon',
|
||||
], [
|
||||
'type' => 'Delete',
|
||||
|
|
@ -64,25 +64,21 @@ class LocalesDataGrid
|
|||
// ]
|
||||
],
|
||||
|
||||
//use aliasing on secodary columns if join is performed
|
||||
|
||||
//use aliasing as attribute
|
||||
'columns' => [
|
||||
|
||||
[
|
||||
'name' => 'id',
|
||||
'alias' => 'localeId',
|
||||
'type' => 'number',
|
||||
'label' => 'ID',
|
||||
'sortable' => true,
|
||||
],
|
||||
[
|
||||
], [
|
||||
'name' => 'code',
|
||||
'alias' => 'localeCode',
|
||||
'type' => 'string',
|
||||
'label' => 'Code',
|
||||
'sortable' => true,
|
||||
],
|
||||
[
|
||||
], [
|
||||
'name' => 'name',
|
||||
'alias' => 'localeName',
|
||||
'type' => 'string',
|
||||
|
|
@ -93,21 +89,18 @@ class LocalesDataGrid
|
|||
],
|
||||
|
||||
//don't use aliasing in case of filters
|
||||
|
||||
'filterable' => [
|
||||
[
|
||||
'column' => 'id',
|
||||
'alias' => 'localeId',
|
||||
'type' => 'number',
|
||||
'label' => 'ID',
|
||||
],
|
||||
[
|
||||
], [
|
||||
'column' => 'code',
|
||||
'alias' => 'localeCode',
|
||||
'type' => 'string',
|
||||
'label' => 'Code',
|
||||
],
|
||||
[
|
||||
], [
|
||||
'column' => 'name',
|
||||
'alias' => 'localeName',
|
||||
'type' => 'string',
|
||||
|
|
@ -116,14 +109,12 @@ class LocalesDataGrid
|
|||
],
|
||||
|
||||
//don't use aliasing in case of searchables
|
||||
|
||||
'searchable' => [
|
||||
[
|
||||
'column' => 'name',
|
||||
'type' => 'string',
|
||||
'label' => 'Name',
|
||||
],
|
||||
[
|
||||
], [
|
||||
'column' => 'code',
|
||||
'type' => 'string',
|
||||
'label' => 'Code',
|
||||
|
|
|
|||
|
|
@ -0,0 +1,139 @@
|
|||
<?php
|
||||
|
||||
namespace Webkul\Admin\DataGrids;
|
||||
|
||||
use Illuminate\View\View;
|
||||
use Webkul\Ui\DataGrid\Facades\DataGrid;
|
||||
|
||||
/**
|
||||
* orderDataGrid
|
||||
*
|
||||
* @author Prashant Singh <prashant.singh852@webkul.com> @prashant-webkul
|
||||
* @copyright 2018 Webkul Software Pvt Ltd (http://www.webkul.com)
|
||||
*/
|
||||
|
||||
class NewsLetterDataGrid
|
||||
{
|
||||
/**
|
||||
* The Data Grid implementation.
|
||||
*
|
||||
* @var newsletterDataGrid
|
||||
* for orders
|
||||
*/
|
||||
public function newsLetterDataGrid()
|
||||
{
|
||||
|
||||
return DataGrid::make([
|
||||
'name' => 'Subscriberslist',
|
||||
'table' => 'subscribers_list as sublist',
|
||||
'select' => 'sublist.id',
|
||||
'perpage' => 10,
|
||||
'aliased' => false,
|
||||
//True in case of joins else aliasing key required on all cases
|
||||
|
||||
'massoperations' =>[
|
||||
// [
|
||||
// 'route' => route('admin.datagrid.delete'),
|
||||
// 'method' => 'DELETE',
|
||||
// 'label' => 'Delete',
|
||||
// 'type' => 'button',
|
||||
// ],
|
||||
],
|
||||
|
||||
'actions' => [
|
||||
[
|
||||
'type' => 'Delete',
|
||||
'route' => route('admin.datagrid.delete'),
|
||||
'confirm_text' => 'Do you really want to delete this record?',
|
||||
'icon' => 'icon trash-icon',
|
||||
],
|
||||
],
|
||||
|
||||
'join' => [],
|
||||
|
||||
//use aliasing on secodary columns if join is performed
|
||||
'columns' => [
|
||||
[
|
||||
'name' => 'sublist.id',
|
||||
'alias' => 'subid',
|
||||
'type' => 'number',
|
||||
'label' => 'ID',
|
||||
'sortable' => true
|
||||
], [
|
||||
'name' => 'sublist.is_subscribed',
|
||||
'alias' => 'issubs',
|
||||
'type' => 'string',
|
||||
'label' => 'Subscribed',
|
||||
'sortable' => true,
|
||||
'wrapper' => function ($value) {
|
||||
if($value == 0)
|
||||
return "False";
|
||||
else
|
||||
return "True";
|
||||
},
|
||||
], [
|
||||
'name' => 'sublist.email',
|
||||
'alias' => 'subsemail',
|
||||
'type' => 'string',
|
||||
'label' => 'Email',
|
||||
'sortable' => true
|
||||
]
|
||||
],
|
||||
|
||||
'filterable' => [
|
||||
[
|
||||
'column' => 'sublist.id',
|
||||
'alias' => 'subid',
|
||||
'type' => 'number',
|
||||
'label' => 'ID',
|
||||
], [
|
||||
'column' => 'sublist.is_subscribed',
|
||||
'alias' => 'issubs',
|
||||
'type' => 'string',
|
||||
'label' => 'Subscribed',
|
||||
], [
|
||||
'column' => 'sublist.email',
|
||||
'alias' => 'subsemail',
|
||||
'type' => 'string',
|
||||
'label' => 'Email',
|
||||
]
|
||||
],
|
||||
//don't use aliasing in case of searchables
|
||||
|
||||
'searchable' => [
|
||||
[
|
||||
'column' => 'sublist.id',
|
||||
'type' => 'number',
|
||||
'label' => 'ID',
|
||||
], [
|
||||
'column' => 'sublist.is_subscribed',
|
||||
'type' => 'string',
|
||||
'label' => 'Subscribed',
|
||||
], [
|
||||
'column' => 'sublist.email',
|
||||
'type' => 'string',
|
||||
'label' => 'Email',
|
||||
]
|
||||
],
|
||||
|
||||
//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->newsLetterDataGrid()->render();
|
||||
}
|
||||
}
|
||||
|
|
@ -44,7 +44,7 @@ class OrderDataGrid
|
|||
[
|
||||
'type' => 'View',
|
||||
'route' => route('admin.datagrid.delete'),
|
||||
'confirm_text' => 'Do you really want to do this?',
|
||||
'confirm_text' => 'Do you really want to view this record?',
|
||||
'icon' => 'icon pencil-lg-icon',
|
||||
],
|
||||
// [
|
||||
|
|
@ -92,16 +92,23 @@ class OrderDataGrid
|
|||
}
|
||||
], [
|
||||
'name' => 'or.created_at',
|
||||
'alias' => 'created_at',
|
||||
'alias' => 'createdat',
|
||||
'type' => 'string',
|
||||
'label' => 'Order Date',
|
||||
'sortable' => false,
|
||||
'sortable' => true,
|
||||
], [
|
||||
'name' => 'or.channel_name',
|
||||
'alias' => 'channelname',
|
||||
'type' => 'string',
|
||||
'label' => 'Channel Name',
|
||||
'sortable' => true,
|
||||
], [
|
||||
'name' => 'or.status',
|
||||
'alias' => 'orstatus',
|
||||
'type' => 'string',
|
||||
'label' => 'Status',
|
||||
'sortable' => true,
|
||||
'closure' => true, //to be used when ever wrappers or callables are used
|
||||
'wrapper' => function ($value) {
|
||||
if($value == 'processing')
|
||||
return '<span class="badge badge-md badge-success">Processing</span>';
|
||||
|
|
@ -128,11 +135,11 @@ class OrderDataGrid
|
|||
'type' => 'number',
|
||||
'label' => 'ID',
|
||||
], [
|
||||
'name' => 'or.status',
|
||||
'column' => 'or.status',
|
||||
'alias' => 'orstatus',
|
||||
'type' => 'string',
|
||||
'label' => 'Status'
|
||||
]
|
||||
],
|
||||
],
|
||||
//don't use aliasing in case of searchables
|
||||
|
||||
|
|
@ -141,12 +148,10 @@ class OrderDataGrid
|
|||
'column' => 'or.id',
|
||||
'alias' => 'orderid',
|
||||
'type' => 'number',
|
||||
'label' => 'ID',
|
||||
], [
|
||||
'name' => 'or.status',
|
||||
'column' => 'or.status',
|
||||
'alias' => 'orstatus',
|
||||
'type' => 'string',
|
||||
'label' => 'Status'
|
||||
]
|
||||
],
|
||||
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@ class OrderInvoicesDataGrid
|
|||
[
|
||||
'type' => 'View',
|
||||
'route' => route('admin.datagrid.delete'),
|
||||
'confirm_text' => 'Do you really want to do this?',
|
||||
'confirm_text' => 'Do you really want to view this record?',
|
||||
'icon' => 'icon pencil-lg-icon',
|
||||
],
|
||||
// [
|
||||
|
|
@ -55,13 +55,13 @@ class OrderInvoicesDataGrid
|
|||
],
|
||||
|
||||
'join' => [
|
||||
[
|
||||
'join' => 'leftjoin',
|
||||
'table' => 'orders as ors',
|
||||
'primaryKey' => 'inv.order_id',
|
||||
'condition' => '=',
|
||||
'secondaryKey' => 'ors.id',
|
||||
]
|
||||
// [
|
||||
// 'join' => 'leftjoin',
|
||||
// 'table' => 'orders as ors',
|
||||
// 'primaryKey' => 'inv.order_id',
|
||||
// 'condition' => '=',
|
||||
// 'secondaryKey' => 'ors.id',
|
||||
// ]
|
||||
],
|
||||
|
||||
//use aliasing on secodary columns if join is performed
|
||||
|
|
@ -79,24 +79,26 @@ class OrderInvoicesDataGrid
|
|||
'type' => 'number',
|
||||
'label' => 'Order ID',
|
||||
'sortable' => true
|
||||
], [
|
||||
'name' => 'inv.state',
|
||||
'alias' => 'invstate',
|
||||
'type' => 'string',
|
||||
'label' => 'State',
|
||||
'sortable' => false
|
||||
], [
|
||||
],
|
||||
// [
|
||||
// 'name' => 'inv.state',
|
||||
// 'alias' => 'invstate',
|
||||
// 'type' => 'string',
|
||||
// 'label' => 'State',
|
||||
// 'sortable' => false
|
||||
// ],
|
||||
[
|
||||
'name' => 'inv.grand_total',
|
||||
'alias' => 'invgrandtotal',
|
||||
'type' => 'number',
|
||||
'label' => 'Amount',
|
||||
'sortable' => false
|
||||
'sortable' => true
|
||||
], [
|
||||
'name' => 'inv.created_at',
|
||||
'alias' => 'invcreated_at',
|
||||
'type' => 'date',
|
||||
'label' => 'Invoice Date',
|
||||
'sortable' => false
|
||||
'sortable' => true
|
||||
]
|
||||
],
|
||||
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@ class OrderShipmentsDataGrid
|
|||
[
|
||||
'type' => 'View',
|
||||
'route' => route('admin.datagrid.delete'),
|
||||
'confirm_text' => 'Do you really want to do this?',
|
||||
'confirm_text' => 'Do you really want to view this record?',
|
||||
'icon' => 'icon pencil-lg-icon',
|
||||
],
|
||||
],
|
||||
|
|
@ -68,19 +68,19 @@ class OrderShipmentsDataGrid
|
|||
'sortable' => true
|
||||
], [
|
||||
'name' => 'ship.order_id',
|
||||
'alias' => 'order_id',
|
||||
'alias' => 'orderid',
|
||||
'type' => 'number',
|
||||
'label' => 'Order ID',
|
||||
'sortable' => true
|
||||
], [
|
||||
'name' => 'ship.total_qty',
|
||||
'alias' => 'total_qty',
|
||||
'alias' => 'shiptotalqty',
|
||||
'type' => 'number',
|
||||
'label' => 'Total Quantity',
|
||||
'sortable' => true
|
||||
], [
|
||||
'name' => 'CONCAT(ors.customer_first_name, " ", ors.customer_last_name)',
|
||||
'alias' => 'order_customer_first_name',
|
||||
'alias' => 'ordercustomerfirstname',
|
||||
'type' => 'string',
|
||||
'label' => 'Customer Name',
|
||||
'sortable' => false,
|
||||
|
|
@ -92,7 +92,7 @@ class OrderShipmentsDataGrid
|
|||
'sortable' => true
|
||||
], [
|
||||
'name' => 'ship.created_at',
|
||||
'alias' => 'ship_date',
|
||||
'alias' => 'shipdate',
|
||||
'type' => 'string',
|
||||
'label' => 'Shipment Date',
|
||||
'sortable' => false
|
||||
|
|
@ -111,10 +111,9 @@ class OrderShipmentsDataGrid
|
|||
|
||||
'searchable' => [
|
||||
// [
|
||||
// 'column' => 'or.id',
|
||||
// 'alias' => 'orderid',
|
||||
// 'type' => 'number',
|
||||
// 'label' => 'ID',
|
||||
// 'column' => 'ors.customer_first_name',
|
||||
// 'alias' => 'ordercustomerfirstname',
|
||||
// 'type' => 'string',
|
||||
// ]
|
||||
],
|
||||
|
||||
|
|
|
|||
|
|
@ -37,12 +37,12 @@ class ProductDataGrid
|
|||
[
|
||||
'type' => 'Edit',
|
||||
'route' => route('admin.datagrid.delete'),
|
||||
'confirm_text' => 'Do you really want to do this?',
|
||||
'confirm_text' => 'Do you really want to edit this record?',
|
||||
'icon' => 'icon pencil-lg-icon',
|
||||
], [
|
||||
'type' => 'Delete',
|
||||
'route' => route('admin.datagrid.delete'),
|
||||
'confirm_text' => 'Do you really want to do this?',
|
||||
'confirm_text' => 'Do you really want to delete this record?',
|
||||
'icon' => 'icon trash-icon',
|
||||
],
|
||||
],
|
||||
|
|
@ -71,19 +71,19 @@ class ProductDataGrid
|
|||
'alias' => 'ProductName',
|
||||
'type' => 'string',
|
||||
'label' => 'Name',
|
||||
'sortable' => false,
|
||||
'sortable' => true,
|
||||
], [
|
||||
'name' => 'prods.type',
|
||||
'alias' => 'ProductType',
|
||||
'type' => 'string',
|
||||
'label' => 'Type',
|
||||
'sortable' => false,
|
||||
'sortable' => true,
|
||||
], [
|
||||
'name' => 'prods.status',
|
||||
'alias' => 'ProductStatus',
|
||||
'type' => 'string',
|
||||
'label' => 'Status',
|
||||
'sortable' => false,
|
||||
'sortable' => true,
|
||||
'wrapper' => function ($value) {
|
||||
if($value == 1)
|
||||
return 'Active';
|
||||
|
|
@ -95,16 +95,22 @@ class ProductDataGrid
|
|||
'alias' => 'ProductPrice',
|
||||
'type' => 'string',
|
||||
'label' => 'Price',
|
||||
'sortable' => false,
|
||||
'sortable' => true,
|
||||
'wrapper' => function ($value) {
|
||||
return core()->formatBasePrice($value);
|
||||
},
|
||||
], [
|
||||
'name' => 'prods.attribute_family_name',
|
||||
'alias' => 'productattributefamilyname',
|
||||
'type' => 'string',
|
||||
'label' => 'Attribute Family',
|
||||
'sortable' => true,
|
||||
], [
|
||||
'name' => 'prods.quantity',
|
||||
'alias' => 'ProductQuantity',
|
||||
'type' => 'string',
|
||||
'label' => 'Product Quantity',
|
||||
'sortable' => false,
|
||||
'sortable' => true,
|
||||
],
|
||||
],
|
||||
|
||||
|
|
|
|||
|
|
@ -46,12 +46,12 @@ class ProductReviewDataGrid
|
|||
[
|
||||
'type' => 'Edit',
|
||||
'route' => route('admin.datagrid.delete'),
|
||||
'confirm_text' => 'Do you really want to do this?',
|
||||
'confirm_text' => 'Do you really want to edit this record?',
|
||||
'icon' => 'icon pencil-lg-icon',
|
||||
], [
|
||||
'type' => 'Delete',
|
||||
'route' => route('admin.datagrid.delete'),
|
||||
'confirm_text' => 'Do you really want to do this?',
|
||||
'confirm_text' => 'Do you really want to delete this record?',
|
||||
'icon' => 'icon trash-icon',
|
||||
],
|
||||
],
|
||||
|
|
@ -69,7 +69,6 @@ class ProductReviewDataGrid
|
|||
//use aliasing on secodary columns if join is performed
|
||||
|
||||
'columns' => [
|
||||
|
||||
[
|
||||
'name' => 'pr.id',
|
||||
'alias' => 'reviewId',
|
||||
|
|
@ -88,20 +87,19 @@ class ProductReviewDataGrid
|
|||
'type' => 'string',
|
||||
'label' => 'Comment',
|
||||
'sortable' => true,
|
||||
],
|
||||
[
|
||||
], [
|
||||
'name' => 'pt.name',
|
||||
'alias' => 'productName',
|
||||
'type' => 'string',
|
||||
'label' => 'Product Name',
|
||||
'sortable' => true,
|
||||
],
|
||||
[
|
||||
], [
|
||||
'name' => 'pr.status',
|
||||
'alias' => 'reviewStatus',
|
||||
'type' => 'number',
|
||||
'label' => 'Status',
|
||||
'sortable' => true,
|
||||
'closure' => true,
|
||||
'wrapper' => function ($value) {
|
||||
if($value == 'approved')
|
||||
return '<span class="badge badge-md badge-success">Approved</span>';
|
||||
|
|
@ -133,7 +131,7 @@ class ProductReviewDataGrid
|
|||
'alias' => 'productName',
|
||||
'type' => 'string',
|
||||
'label' => 'Product Name',
|
||||
],[
|
||||
], [
|
||||
'column' => 'pr.status',
|
||||
'alias' => 'reviewStatus',
|
||||
'type' => 'string',
|
||||
|
|
@ -151,6 +149,10 @@ class ProductReviewDataGrid
|
|||
'column' => 'rating',
|
||||
'type' => 'number',
|
||||
'label' => 'Rating',
|
||||
], [
|
||||
'column' => 'pt.name',
|
||||
'alias' => 'productName',
|
||||
'type' => 'string',
|
||||
],
|
||||
],
|
||||
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@ class RolesDataGrid
|
|||
[
|
||||
'type' => 'Edit',
|
||||
'route' => route('admin.datagrid.delete'),
|
||||
'confirm_text' => 'Do you really edit this record?',
|
||||
'confirm_text' => 'Do you really want to edit this record?',
|
||||
'icon' => 'icon pencil-lg-icon',
|
||||
], [
|
||||
'type' => 'Delete',
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@ class SliderDataGrid
|
|||
[
|
||||
'type' => 'Edit',
|
||||
'route' => route('admin.datagrid.delete'),
|
||||
'confirm_text' => 'Do you really edit this record?',
|
||||
'confirm_text' => 'Do you really want to edit this record?',
|
||||
'icon' => 'icon pencil-lg-icon',
|
||||
], [
|
||||
'type' => 'Delete',
|
||||
|
|
@ -78,13 +78,7 @@ class SliderDataGrid
|
|||
'alias' => 'sliderTitle',
|
||||
'type' => 'string',
|
||||
'label' => 'title',
|
||||
'sortable' => false
|
||||
], [
|
||||
'name' => 's.channel_id',
|
||||
'alias' => 'channelId',
|
||||
'type' => 'string',
|
||||
'label' => 'Channel ID',
|
||||
'sortable' => false,
|
||||
'sortable' => true
|
||||
], [
|
||||
'name' => 'c.name',
|
||||
'alias' => 'channelName',
|
||||
|
|
@ -106,7 +100,12 @@ class SliderDataGrid
|
|||
'alias' => 'sliderTitle',
|
||||
'type' => 'string',
|
||||
'label' => 'title'
|
||||
],
|
||||
], [
|
||||
'column' => 'c.name',
|
||||
'alias' => 'channelName',
|
||||
'type' => 'string',
|
||||
'label' => 'Channel Name',
|
||||
]
|
||||
],
|
||||
|
||||
//don't use aliasing in case of searchables
|
||||
|
|
@ -119,6 +118,10 @@ class SliderDataGrid
|
|||
'column' => 's.title',
|
||||
'type' => 'string',
|
||||
'label' => 'Slider Title'
|
||||
], [
|
||||
'column' => 'c.name',
|
||||
'type' => 'string',
|
||||
'label' => 'Channel Name',
|
||||
]
|
||||
],
|
||||
|
||||
|
|
|
|||
|
|
@ -54,13 +54,13 @@ class TaxCategoryDataGrid
|
|||
[
|
||||
'type' => 'Edit',
|
||||
'route' => route('admin.datagrid.delete'),
|
||||
'confirm_text' => 'Do you really wanis?',
|
||||
'confirm_text' => 'Do you really want to edit this record?',
|
||||
'icon' => 'icon pencil-lg-icon',
|
||||
],
|
||||
[
|
||||
'type' => 'Delete',
|
||||
'route' => route('admin.datagrid.delete'),
|
||||
'confirm_text' => 'Do you really want to do this?',
|
||||
'confirm_text' => 'Do you really want to delete this record?',
|
||||
'icon' => 'icon trash-icon',
|
||||
],
|
||||
],
|
||||
|
|
@ -82,18 +82,13 @@ class TaxCategoryDataGrid
|
|||
'type' => 'number',
|
||||
'label' => 'ID',
|
||||
'sortable' => true,
|
||||
],
|
||||
[
|
||||
], [
|
||||
'name' => 'tr.name',
|
||||
'alias' => 'Name',
|
||||
'type' => 'string',
|
||||
'label' => 'Name',
|
||||
'sortable' => true,
|
||||
// 'wrapper' => function ($value, $object) {
|
||||
// return '<a class="color-red">' . $object->Name . '</a>';
|
||||
// },
|
||||
],
|
||||
[
|
||||
], [
|
||||
'name' => 'tr.code',
|
||||
'alias' => 'code',
|
||||
'type' => 'string',
|
||||
|
|
@ -101,6 +96,7 @@ class TaxCategoryDataGrid
|
|||
'sortable' => true,
|
||||
],
|
||||
],
|
||||
|
||||
//don't use aliasing in case of filters
|
||||
'filterable' => [
|
||||
[
|
||||
|
|
@ -108,28 +104,26 @@ class TaxCategoryDataGrid
|
|||
'alias' => 'ID',
|
||||
'type' => 'number',
|
||||
'label' => 'ID'
|
||||
],
|
||||
[
|
||||
], [
|
||||
'column' => 'tr.name',
|
||||
'alias' => 'Name',
|
||||
'type' => 'string',
|
||||
'label' => 'Name'
|
||||
],
|
||||
[
|
||||
], [
|
||||
'column' => 'tr.code',
|
||||
'alias' => 'code',
|
||||
'type' => 'string',
|
||||
'label' => 'Code'
|
||||
]
|
||||
],
|
||||
|
||||
//don't use aliasing in case of searchables
|
||||
'searchable' => [
|
||||
[
|
||||
'column' => 'tr.code',
|
||||
'type' => 'string',
|
||||
'label' => 'Code'
|
||||
],
|
||||
[
|
||||
], [
|
||||
'column' => 'tr.name',
|
||||
'type' => 'string',
|
||||
'label' => 'Name'
|
||||
|
|
|
|||
|
|
@ -53,13 +53,13 @@ class TaxRateDataGrid
|
|||
[
|
||||
'type' => 'Edit',
|
||||
'route' => route('admin.datagrid.delete'),
|
||||
'confirm_text' => 'Do you really wanis?',
|
||||
'confirm_text' => 'Do you really want to edit this record?',
|
||||
'icon' => 'icon pencil-lg-icon',
|
||||
],
|
||||
[
|
||||
'type' => 'Delete',
|
||||
'route' => route('admin.datagrid.delete'),
|
||||
'confirm_text' => 'Do you really want to do this?',
|
||||
'confirm_text' => 'Do you really want to delete this record?',
|
||||
'icon' => 'icon trash-icon',
|
||||
],
|
||||
],
|
||||
|
|
@ -73,8 +73,7 @@ class TaxRateDataGrid
|
|||
'type' => 'number',
|
||||
'label' => 'ID',
|
||||
'sortable' => true,
|
||||
],
|
||||
[
|
||||
], [
|
||||
'name' => 'tr.identifier',
|
||||
'alias' => 'identifier',
|
||||
'type' => 'string',
|
||||
|
|
@ -83,25 +82,21 @@ class TaxRateDataGrid
|
|||
// 'wrapper' => function ($value, $object) {
|
||||
// return '<a class="color-red">' . $object->identifier . '</a>';
|
||||
// },
|
||||
],
|
||||
[
|
||||
], [
|
||||
'name' => 'tr.state',
|
||||
'alias' => 'state',
|
||||
'type' => 'string',
|
||||
'label' => 'State',
|
||||
'sortable' => true,
|
||||
],
|
||||
[
|
||||
], [
|
||||
'name' => 'tr.country',
|
||||
'alias' => 'country',
|
||||
'type' => 'string',
|
||||
'label' => 'Country',
|
||||
'sortable' => true,
|
||||
],
|
||||
|
||||
[
|
||||
], [
|
||||
'name' => 'tr.tax_rate',
|
||||
'alias' => 'tax_rate',
|
||||
'alias' => 'taxrate',
|
||||
'type' => 'number',
|
||||
'label' => 'Tax Rate',
|
||||
'sortable' => true,
|
||||
|
|
@ -131,7 +126,7 @@ class TaxRateDataGrid
|
|||
'label' => 'Country',
|
||||
], [
|
||||
'column' => 'tr.tax_rate',
|
||||
'alias' => 'tax_rate',
|
||||
'alias' => 'taxrate',
|
||||
'type' => 'number',
|
||||
'label' => 'Tax Rate',
|
||||
],
|
||||
|
|
@ -142,6 +137,18 @@ class TaxRateDataGrid
|
|||
'column' => 'tr.identifier',
|
||||
'type' => 'string',
|
||||
'label' => 'Identifier',
|
||||
], [
|
||||
'column' => 'tr.state',
|
||||
'type' => 'string',
|
||||
'label' => 'State',
|
||||
], [
|
||||
'column' => 'tr.country',
|
||||
'type' => 'string',
|
||||
'label' => 'Country',
|
||||
], [
|
||||
'column' => 'tr.tax_rate',
|
||||
'type' => 'number',
|
||||
'label' => 'Tax Rate',
|
||||
],
|
||||
],
|
||||
'operators' => [
|
||||
|
|
|
|||
|
|
@ -56,13 +56,13 @@ class UserDataGrid
|
|||
[
|
||||
'type' => 'Edit',
|
||||
'route' => route('admin.datagrid.delete'),
|
||||
'confirm_text' => 'Do you really wanis?',
|
||||
'confirm_text' => 'Do you really want to edit this record?',
|
||||
'icon' => 'icon pencil-lg-icon',
|
||||
],
|
||||
[
|
||||
'type' => 'Delete',
|
||||
'route' => route('admin.datagrid.delete'),
|
||||
'confirm_text' => 'Do you really want to do this?',
|
||||
'confirm_text' => 'Do you really want to delete this record?',
|
||||
'icon' => 'icon trash-icon',
|
||||
],
|
||||
],
|
||||
|
|
@ -84,51 +84,55 @@ class UserDataGrid
|
|||
'type' => 'string',
|
||||
'label' => 'Admin ID',
|
||||
'sortable' => true,
|
||||
'wrapper' => function ($value, $object) {
|
||||
return '<a class="color-red">' . $object->ID . '</a>';
|
||||
},
|
||||
],
|
||||
[
|
||||
// 'wrapper' => function ($value, $object) {
|
||||
// return '<a class="color-red">' . $object->ID . '</a>';
|
||||
// },
|
||||
], [
|
||||
'name' => 'u.name',
|
||||
'alias' => 'Name',
|
||||
'type' => 'string',
|
||||
'label' => 'Name',
|
||||
'sortable' => true,
|
||||
'wrapper' => function ($value, $object) {
|
||||
return '<a class="color-red">' . $object->Name . '</a>';
|
||||
},
|
||||
],
|
||||
[
|
||||
// 'wrapper' => function ($value, $object) {
|
||||
// return '<a class="color-red">' . $object->Name . '</a>';
|
||||
// },
|
||||
], [
|
||||
'name' => 'u.email',
|
||||
'alias' => 'Email',
|
||||
'type' => 'string',
|
||||
'label' => 'Email',
|
||||
'sortable' => true,
|
||||
],
|
||||
[
|
||||
], [
|
||||
'name' => 'r.name',
|
||||
'alias' => 'xa',
|
||||
'alias' => 'rolename',
|
||||
'type' => 'string',
|
||||
'label' => 'Role Name',
|
||||
'sortable' => true,
|
||||
],
|
||||
|
||||
],
|
||||
//don't use aliasing in case of filters
|
||||
'filterable' => [
|
||||
[
|
||||
'column' => 'u.name',
|
||||
'alias' => 'Name',
|
||||
'type' => 'string',
|
||||
'label' => 'Name'
|
||||
],
|
||||
[
|
||||
'column' => 'u.id',
|
||||
'alias' => 'ID',
|
||||
'type' => 'number',
|
||||
'label' => 'Admin ID'
|
||||
],
|
||||
|
||||
], [
|
||||
'column' => 'u.name',
|
||||
'alias' => 'Name',
|
||||
'type' => 'string',
|
||||
'label' => 'Name'
|
||||
], [
|
||||
'column' => 'u.email',
|
||||
'alias' => 'Email',
|
||||
'type' => 'string',
|
||||
'label' => 'Email',
|
||||
], [
|
||||
'column' => 'r.name',
|
||||
'alias' => 'rolename',
|
||||
'type' => 'string',
|
||||
'label' => 'Role Name',
|
||||
]
|
||||
],
|
||||
//don't use aliasing in case of searchables
|
||||
'searchable' => [
|
||||
|
|
@ -140,6 +144,14 @@ class UserDataGrid
|
|||
'column' => 'u.name',
|
||||
'type' => 'string',
|
||||
'label' => 'Name'
|
||||
], [
|
||||
'column' => 'u.email',
|
||||
'type' => 'string',
|
||||
'label' => 'Email',
|
||||
], [
|
||||
'column' => 'r.name',
|
||||
'type' => 'string',
|
||||
'label' => 'Role Name',
|
||||
]
|
||||
],
|
||||
'operators' => [
|
||||
|
|
|
|||
|
|
@ -459,22 +459,29 @@ Route::group(['middleware' => ['web']], function () {
|
|||
Route::put('/account', 'Webkul\User\Http\Controllers\AccountController@update')->name('admin.account.update');
|
||||
|
||||
//API Authorizations
|
||||
Route::get('/api/clients', 'Webkul\Admin\Http\Controllers\AuthorizationController@show')->defaults('_config', [
|
||||
'view' => 'admin::apiauth.client'
|
||||
])->name('admin.index.oauth.client');
|
||||
// Route::get('/api/clients', 'Webkul\Admin\Http\Controllers\AuthorizationController@show')->defaults('_config', [
|
||||
// 'view' => 'admin::apiauth.client'
|
||||
// ])->name('admin.index.oauth.client');
|
||||
|
||||
//view an OAuth API Client
|
||||
Route::get('/api/clients/view/{id}', 'Webkul\Admin\Http\Controllers\AuthorizationController@view')->defaults('_config', [
|
||||
'view' => 'admin::apiauth.view'
|
||||
])->name('admin.view.oauth.client');
|
||||
// //view an OAuth API Client
|
||||
// Route::get('/api/clients/view/{id}', 'Webkul\Admin\Http\Controllers\AuthorizationController@view')->defaults('_config', [
|
||||
// 'view' => 'admin::apiauth.view'
|
||||
// ])->name('admin.view.oauth.client');
|
||||
|
||||
//edit an OAuth API Client
|
||||
Route::get('/api/clients/delete/{id}', 'Webkul\Admin\Http\Controllers\AuthorizationController@delete')->defaults('_config', [
|
||||
'view' => 'admin::apiauth.edit'
|
||||
])->name('admin.delete.oauth.client');
|
||||
// //edit an OAuth API Client
|
||||
// Route::get('/api/clients/delete/{id}', 'Webkul\Admin\Http\Controllers\AuthorizationController@delete')->defaults('_config', [
|
||||
// 'view' => 'admin::apiauth.edit'
|
||||
// ])->name('admin.delete.oauth.client');
|
||||
|
||||
|
||||
// Admin Store Front Settings Route
|
||||
Route::get('/subscribers','Webkul\Core\Http\Controllers\SubscriptionController@index')->defaults('_config',[
|
||||
'view' => 'admin::settings.subscribers.index'
|
||||
])->name('admin.subscribers.index');
|
||||
|
||||
//destroy a newsletter subscription item
|
||||
Route::get('subscribers/delete/{id}', 'Webkul\Core\Http\Controllers\SubscriptionController@destroy');
|
||||
|
||||
//slider index
|
||||
Route::get('/slider','Webkul\Shop\Http\Controllers\SliderController@index')->defaults('_config',[
|
||||
'view' => 'admin::settings.sliders.index'
|
||||
|
|
|
|||
|
|
@ -64,7 +64,7 @@ class Product {
|
|||
'product_id' => $product->id,
|
||||
'sku' => $product->sku,
|
||||
'type' => $product->type,
|
||||
'attribute_family_name' => 'default',
|
||||
'attribute_family_name' => $product->toArray()['attribute_family']['name'],
|
||||
'name' => $product->name,
|
||||
'quantity' => 0,
|
||||
'status' => $product->status,
|
||||
|
|
@ -83,7 +83,7 @@ class Product {
|
|||
'product_id' => $variant->id,
|
||||
'sku' => $variant->sku,
|
||||
'type' => $variant->type,
|
||||
'attibute_family_name' => 'default',
|
||||
'attribute_family_name' => $variant->toArray()['attribute_family']['name'],
|
||||
'name' => $variant->name,
|
||||
'quantity' => 0,
|
||||
'status' => $variant->status,
|
||||
|
|
@ -133,7 +133,7 @@ class Product {
|
|||
'product_id' => $product->id,
|
||||
'sku' => $product->sku,
|
||||
'type' => $product->type,
|
||||
'attribute_family_name' => 'default',
|
||||
'attribute_family_name' => $product->toArray()['attribute_family']['name'],
|
||||
'name' => $product->name,
|
||||
'status' => $product->status,
|
||||
];
|
||||
|
|
@ -162,7 +162,7 @@ class Product {
|
|||
'product_id' => $variant->id,
|
||||
'sku' => $variant->sku,
|
||||
'type' => $variant->type,
|
||||
'attibute_family_name' => 'name',
|
||||
'attribute_family_name' => $variant->toArray()['attribute_family']['name'],
|
||||
'name' => $variant->name,
|
||||
'status' => $variant->status,
|
||||
'price' => $variant->price,
|
||||
|
|
@ -188,7 +188,7 @@ class Product {
|
|||
'product_id' => $variant->id,
|
||||
'sku' => $variant->sku,
|
||||
'type' => $variant->type,
|
||||
'attibute_family_name' => 'default',
|
||||
'attribute_family_name' => $variant->toArray()['attribute_family']['name'],
|
||||
'name' => $variant->name,
|
||||
'status' => $variant->status,
|
||||
'price' => $variant->price,
|
||||
|
|
|
|||
|
|
@ -108,7 +108,7 @@ class EventServiceProvider extends ServiceProvider
|
|||
'route' => 'admin.account.edit',
|
||||
'sort' => 1,
|
||||
'icon-class' => '',
|
||||
],
|
||||
],
|
||||
// [
|
||||
// 'key' => 'configuration.sales',
|
||||
// 'name' => 'Sales',
|
||||
|
|
@ -121,7 +121,7 @@ class EventServiceProvider extends ServiceProvider
|
|||
// 'route' => 'admin.configuration.sales.general',
|
||||
// 'sort' => 1,
|
||||
// 'icon-class' => '',
|
||||
// ],
|
||||
// ],
|
||||
[
|
||||
'key' => 'settings',
|
||||
'name' => 'Settings',
|
||||
|
|
@ -200,6 +200,12 @@ class EventServiceProvider extends ServiceProvider
|
|||
'route' => 'admin.tax-rates.index',
|
||||
'sort' => 2,
|
||||
'icon-class' => '',
|
||||
], [
|
||||
'key' => 'settings.subscribers',
|
||||
'name' => 'Newsletter Subscription',
|
||||
'route' => 'admin.subscribers.index',
|
||||
'sort' => 9,
|
||||
'icon-class' => '',
|
||||
],
|
||||
];
|
||||
|
||||
|
|
@ -276,11 +282,11 @@ class EventServiceProvider extends ServiceProvider
|
|||
$acl->add('catalog.attributes', 'Attributes', 'admin.catalog.attributes.index', 3);
|
||||
|
||||
$acl->add('catalog.families', 'Families', 'admin.catalog.families.index', 4);
|
||||
|
||||
|
||||
$acl->add('customers', 'Customers', 'admin.customers.index', 4);
|
||||
|
||||
$acl->add('customers.customers', 'Customers', 'admin.customers.index', 1);
|
||||
|
||||
|
||||
$acl->add('customers.groups', 'Groups', 'admin.groups.index', 2);
|
||||
|
||||
$acl->add('customers.reviews', 'Reviews', 'admin.customers.reviews.index', 3);
|
||||
|
|
|
|||
|
|
@ -499,6 +499,10 @@ return [
|
|||
'delete' => 'Tax Rate Deleted Successfully',
|
||||
'atleast-one' => 'Cannot Delete Last Tax Rate'
|
||||
],
|
||||
|
||||
'subscribers' => [
|
||||
'title' => 'News Letter Subscribers'
|
||||
]
|
||||
],
|
||||
|
||||
'customers' => [
|
||||
|
|
|
|||
|
|
@ -0,0 +1,28 @@
|
|||
@extends('admin::layouts.content')
|
||||
|
||||
@section('page_title')
|
||||
{{ __('admin::app.settings.subscribers.title') }}
|
||||
@stop
|
||||
|
||||
@section('content')
|
||||
|
||||
|
||||
<div class="content">
|
||||
<div class="page-header">
|
||||
<div class="page-title">
|
||||
<h1>{{ __('admin::app.settings.subscribers.title') }}</h1>
|
||||
</div>
|
||||
|
||||
{{-- <div class="page-action">
|
||||
<a href="{{ route('admin.subscribers.store') }}" class="btn btn-lg btn-primary">
|
||||
{{ __('admin::app.settings.subscribers.add-title') }}
|
||||
</a>
|
||||
</div> --}}
|
||||
</div>
|
||||
|
||||
<div class="page-content">
|
||||
@inject('subscribers','Webkul\Admin\DataGrids\NewsLetterDataGrid')
|
||||
{!! $subscribers->render() !!}
|
||||
</div>
|
||||
</div>
|
||||
@stop
|
||||
|
|
@ -0,0 +1,36 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
|
||||
class CreateSubscribersListTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('subscribers_list', function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->string('email');
|
||||
$table->boolean('is_subscribed')->default(0);
|
||||
$table->string('token')->nullable();
|
||||
$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('subscribers_list');
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,61 @@
|
|||
<?php
|
||||
|
||||
namespace Webkul\Core\Http\Controllers;
|
||||
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Http\Response;
|
||||
use Webkul\Core\Repositories\SubscribersListRepository as Subscribers;
|
||||
/**
|
||||
* Subscription controller
|
||||
*
|
||||
* @author Prashant Singh <prashant.singh852@webkul.com> @prashant-webkul
|
||||
* @copyright 2018 Webkul Software Pvt Ltd (http://www.webkul.com)
|
||||
*/
|
||||
class SubscriptionController extends Controller
|
||||
{
|
||||
/**
|
||||
* Contains route related configuration
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $_config;
|
||||
|
||||
/**
|
||||
* Subscription repository instance
|
||||
*
|
||||
* @var instanceof SubscribersListRepository
|
||||
*/
|
||||
protected $subscribers;
|
||||
|
||||
public function __construct(Subscribers $subscribers)
|
||||
{
|
||||
$this->middleware('admin');
|
||||
|
||||
$this->subscribers = $subscribers;
|
||||
|
||||
$this->_config = request('_config');
|
||||
}
|
||||
|
||||
/**
|
||||
* Display a listing of the resource.
|
||||
*
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
public function index()
|
||||
{
|
||||
return view($this->_config['view']);
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove the specified resource from storage.
|
||||
*
|
||||
* @param int $id
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
public function destroy($id)
|
||||
{
|
||||
$this->subscribers->delete($id);
|
||||
|
||||
return redirect()->back();
|
||||
}
|
||||
}
|
||||
|
|
@ -17,6 +17,7 @@ class CreateProductsGrid extends Migration
|
|||
$table->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();
|
||||
|
|
@ -24,7 +25,6 @@ class CreateProductsGrid extends Migration
|
|||
$table->string('cost')->default(0);
|
||||
$table->string('price')->nullable();
|
||||
$table->string('status')->nullable();
|
||||
$table->string('attribute_family_name')->nullable();
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -15,7 +15,6 @@ class RemoveCostColumnFromDatagrid extends Migration
|
|||
{
|
||||
Schema::table('products_grid', function (Blueprint $table) {
|
||||
$table->dropColumn('cost');
|
||||
$table->dropColumn('attribute_family_name');
|
||||
});
|
||||
}
|
||||
|
||||
|
|
@ -27,8 +26,7 @@ class RemoveCostColumnFromDatagrid extends Migration
|
|||
public function down()
|
||||
{
|
||||
Schema::table('products_grid', function (Blueprint $table) {
|
||||
$table->string('cost');
|
||||
$table->string('attribute_family_name')->nullable();
|
||||
$table->string('cost')->nullable();
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -655,12 +655,12 @@ section.slider-block {
|
|||
|
||||
div.slider-control {
|
||||
display: block;
|
||||
cursor: pointer;
|
||||
position: absolute;
|
||||
user-select: none;
|
||||
bottom: 2%;
|
||||
right: 2%;
|
||||
|
||||
|
||||
.dark-left-icon {
|
||||
background-color: $background-color;
|
||||
height: 48px;
|
||||
|
|
@ -920,6 +920,11 @@ section.slider-block {
|
|||
margin-bottom: 8px;
|
||||
}
|
||||
|
||||
.item-details .item-options {
|
||||
font-size: 16px;
|
||||
margin-bottom: 8px;
|
||||
}
|
||||
|
||||
.item-details .item-price {
|
||||
margin-bottom: 8px;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -25,6 +25,13 @@ return [
|
|||
'search-text' => 'Search products here'
|
||||
],
|
||||
|
||||
'minicart' => [
|
||||
'view-cart' => 'View Shopping Cart',
|
||||
'checkout' => 'Checkout',
|
||||
'cart' => 'Cart',
|
||||
'zero' => '0'
|
||||
],
|
||||
|
||||
'footer' => [
|
||||
'subscribe-newsletter' => 'Subscribe Newsletter',
|
||||
'subscribe' => 'Subscribe',
|
||||
|
|
|
|||
|
|
@ -62,9 +62,9 @@
|
|||
</div>
|
||||
|
||||
<div class="dropdown-footer">
|
||||
<a href="{{ route('shop.checkout.cart.index') }}">View Shopping Cart</a>
|
||||
<a href="{{ route('shop.checkout.cart.index') }}">{{ __('shop::app.minicart.view-cart') }}</a>
|
||||
|
||||
<a class="btn btn-primary btn-lg" style="color: white;" href="{{ route('shop.checkout.onepage.index') }}">CHECKOUT</a>
|
||||
<a class="btn btn-primary btn-lg" style="color: white;" href="{{ route('shop.checkout.onepage.index') }}">{{ __('shop::app.minicart.checkout') }}</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -75,7 +75,7 @@
|
|||
<div class="dropdown-toggle">
|
||||
<div style="display: inline-block; cursor: pointer;">
|
||||
|
||||
<span class="name">Cart<span class="count"> (0) </span></span>
|
||||
<span class="name">{{ __('shop::app.minicart.cart') }}<span class="count"> ({{ __('shop::app.minicart.zero') }}) </span></span>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
|
|
@ -76,7 +76,7 @@
|
|||
@auth('customer')
|
||||
<div class="dropdown-list bottom-right" style="display: none; max-width: 230px;">
|
||||
<div class="dropdown-container">
|
||||
<label>{{ __('shop::app.header.title') }}</label>
|
||||
<label>{{ auth()->guard('customer')->user()->first_name }}</label>
|
||||
<ul>
|
||||
<li><a href="{{ route('customer.profile.index') }}">{{ __('shop::app.header.profile') }}</a></li>
|
||||
|
||||
|
|
@ -127,7 +127,7 @@
|
|||
<div class="dropdown-list bottom-right" style="display: none;">
|
||||
<div class="dropdown-container">
|
||||
|
||||
<label>{{ __('shop::app.header.title') }}</label>
|
||||
<label>{{ auth()->guard('customer')->user()->first_name }}</label>
|
||||
|
||||
<ul>
|
||||
<li><a href="{{ route('customer.profile.index') }}">{{ __('shop::app.header.profile') }}</a></li>
|
||||
|
|
|
|||
|
|
@ -37,6 +37,13 @@
|
|||
formURL('search', 'all', search_value, params); //format for search
|
||||
});
|
||||
|
||||
$(".search-field").on('keyup', function (e) {
|
||||
if (e.keyCode == 13) {
|
||||
search_value = $(".search-field").val();
|
||||
formURL('search', 'all', search_value, params); //format for search
|
||||
}
|
||||
});
|
||||
|
||||
//controls for header when sorting is done
|
||||
$('.grid_head').on('click', function() {
|
||||
var column = $(this).data('column-name');
|
||||
|
|
|
|||
|
|
@ -15,7 +15,13 @@
|
|||
</span>
|
||||
</td> --}}
|
||||
@foreach ($columns as $column)
|
||||
<td class="">{!! $column->render($result) !!}</td>
|
||||
@if(isset($column->closure))
|
||||
@if($column->closure == true)
|
||||
<td class="">{!! $column->render($result) !!}</td>
|
||||
@endif
|
||||
@else
|
||||
<td class="">{{ $column->render($result) }}</td>
|
||||
@endif
|
||||
@endforeach
|
||||
@if(count($actions))
|
||||
<td class="action">
|
||||
|
|
|
|||
Loading…
Reference in New Issue