conflict
This commit is contained in:
commit
b329567370
|
|
@ -93,6 +93,28 @@ return [
|
||||||
|
|
||||||
'fallback_locale' => 'en',
|
'fallback_locale' => 'en',
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Base Currency Code
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Here you may specify the base currency code for your application.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'currency' => 'USD',
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Default channel Code
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Here you may specify the default channel code for your application.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'channel' => 'default',
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
| Encryption Key
|
| Encryption Key
|
||||||
|
|
|
||||||
|
|
@ -29,10 +29,10 @@ class AttributeDataGrid
|
||||||
'name' => 'Attributes',
|
'name' => 'Attributes',
|
||||||
'table' => 'attributes',
|
'table' => 'attributes',
|
||||||
'select' => 'id',
|
'select' => 'id',
|
||||||
'perpage' => 10,
|
'perpage' => 5,
|
||||||
'aliased' => false, //use this with false as default and true in case of joins
|
'aliased' => true,
|
||||||
|
|
||||||
'massoperations' =>[
|
'massoperations' => [
|
||||||
[
|
[
|
||||||
'route' => route('admin.datagrid.delete'),
|
'route' => route('admin.datagrid.delete'),
|
||||||
'method' => 'DELETE',
|
'method' => 'DELETE',
|
||||||
|
|
@ -55,20 +55,11 @@ class AttributeDataGrid
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
|
|
||||||
'join' => [
|
'join' => [],
|
||||||
// [
|
|
||||||
// 'join' => 'leftjoin',
|
|
||||||
// 'table' => 'roles as r',
|
|
||||||
// 'primaryKey' => 'u.role_id',
|
|
||||||
// 'condition' => '=',
|
|
||||||
// 'secondaryKey' => 'r.id',
|
|
||||||
// ]
|
|
||||||
],
|
|
||||||
|
|
||||||
//use aliasing on secodary columns if join is performed
|
//use aliasing on secodary columns if join is performed
|
||||||
|
|
||||||
'columns' => [
|
'columns' => [
|
||||||
|
|
||||||
[
|
[
|
||||||
'name' => 'id',
|
'name' => 'id',
|
||||||
'alias' => 'attributeId',
|
'alias' => 'attributeId',
|
||||||
|
|
@ -95,73 +86,106 @@ class AttributeDataGrid
|
||||||
'alias' => 'attributeType',
|
'alias' => 'attributeType',
|
||||||
'type' => 'string',
|
'type' => 'string',
|
||||||
'label' => 'Type',
|
'label' => 'Type',
|
||||||
'sortable' => true,
|
'sortable' => false,
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
'name' => 'is_required',
|
'name' => 'is_required',
|
||||||
'alias' => 'attributeIsRequired',
|
'alias' => 'attributeIsRequired',
|
||||||
'type' => 'string',
|
'type' => 'string',
|
||||||
'label' => 'Required',
|
'label' => 'Required',
|
||||||
'sortable' => true,
|
'sortable' => false,
|
||||||
|
'wrapper' => function ($value) {
|
||||||
|
if($value == 0)
|
||||||
|
return "False";
|
||||||
|
else
|
||||||
|
return "True";
|
||||||
|
},
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
'name' => 'is_unique',
|
'name' => 'is_unique',
|
||||||
'alias' => 'attributeIsUnique',
|
'alias' => 'attributeIsUnique',
|
||||||
'type' => 'string',
|
'type' => 'string',
|
||||||
'label' => 'Unique',
|
'label' => 'Unique',
|
||||||
'sortable' => true,
|
'sortable' => false,
|
||||||
|
'wrapper' => function ($value) {
|
||||||
|
if($value == 0)
|
||||||
|
return "False";
|
||||||
|
else
|
||||||
|
return "True";
|
||||||
|
},
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
'name' => 'value_per_locale',
|
'name' => 'value_per_locale',
|
||||||
'alias' => 'attributeValuePerLocale',
|
'alias' => 'attributeValuePerLocale',
|
||||||
'type' => 'string',
|
'type' => 'string',
|
||||||
'label' => 'ValuePerLocale',
|
'label' => 'ValuePerLocale',
|
||||||
'sortable' => true,
|
'sortable' => false,
|
||||||
|
'wrapper' => function ($value) {
|
||||||
|
if($value == 0)
|
||||||
|
return "False";
|
||||||
|
else
|
||||||
|
return "True";
|
||||||
|
},
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
'name' => 'value_per_channel',
|
'name' => 'value_per_channel',
|
||||||
'alias' => 'attributeValuePerChannel',
|
'alias' => 'attributeValuePerChannel',
|
||||||
'type' => 'string',
|
'type' => 'string',
|
||||||
'label' => 'ValuePerChannel',
|
'label' => 'ValuePerChannel',
|
||||||
'sortable' => true,
|
'sortable' => false,
|
||||||
|
'wrapper' => function ($value) {
|
||||||
|
if($value == 0)
|
||||||
|
return "False";
|
||||||
|
else
|
||||||
|
return "True";
|
||||||
|
},
|
||||||
],
|
],
|
||||||
|
|
||||||
],
|
],
|
||||||
|
|
||||||
'filterable' => [
|
'filterable' => [
|
||||||
// [
|
[
|
||||||
// 'column' => 'id',
|
'column' => 'id',
|
||||||
// 'alias' => 'attribute_family_id',
|
'alias' => 'attributeId',
|
||||||
// 'type' => 'number',
|
'type' => 'number',
|
||||||
// 'label' => 'ID',
|
'label' => 'ID',
|
||||||
// ],
|
],
|
||||||
// [
|
[
|
||||||
// 'column' => 'code',
|
'column' => 'code',
|
||||||
// 'alias' => 'attribute_family_code',
|
'alias' => 'attributeCode',
|
||||||
// 'type' => 'string',
|
'type' => 'string',
|
||||||
// 'label' => 'Code',
|
'label' => 'Code',
|
||||||
// ],
|
],
|
||||||
// [
|
[
|
||||||
// 'column' => 'name',
|
'column' => 'admin_name',
|
||||||
// 'alias' => 'attribute_family_name',
|
'alias' => 'attributeAdminName',
|
||||||
// 'type' => 'string',
|
'type' => 'string',
|
||||||
// 'label' => 'Name',
|
'label' => 'AdminName',
|
||||||
// ],
|
],
|
||||||
|
[
|
||||||
|
'column' => 'type',
|
||||||
|
'alias' => 'attributeType',
|
||||||
|
'type' => 'string',
|
||||||
|
'label' => 'Type',
|
||||||
|
],
|
||||||
],
|
],
|
||||||
|
|
||||||
//don't use aliasing in case of searchables
|
//don't use aliasing in case of searchables
|
||||||
|
|
||||||
'searchable' => [
|
'searchable' => [
|
||||||
// [
|
[
|
||||||
// 'column' => 'name',
|
'column' => 'code',
|
||||||
// 'type' => 'string',
|
'alias' => 'attributeCode',
|
||||||
// 'label' => 'Name',
|
'type' => 'string',
|
||||||
// ],
|
],
|
||||||
// [
|
[
|
||||||
// 'column' => 'code',
|
'column' => 'admin_name',
|
||||||
// 'type' => 'string',
|
'alias' => 'attributeAdminName',
|
||||||
// 'label' => 'Code',
|
'type' => 'string',
|
||||||
// ],
|
],
|
||||||
|
[
|
||||||
|
'column' => 'type',
|
||||||
|
'alias' => 'attributeType',
|
||||||
|
'type' => 'string',
|
||||||
|
],
|
||||||
],
|
],
|
||||||
|
|
||||||
//list of viable operators that will be used
|
//list of viable operators that will be used
|
||||||
|
|
@ -176,16 +200,14 @@ class AttributeDataGrid
|
||||||
'like' => "like",
|
'like' => "like",
|
||||||
'nlike' => "not like",
|
'nlike' => "not like",
|
||||||
],
|
],
|
||||||
// 'css' => []
|
|
||||||
|
|
||||||
|
// 'css' => []
|
||||||
]);
|
]);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function render()
|
public function render()
|
||||||
{
|
{
|
||||||
|
|
||||||
return $this->createAttributeDataGrid()->render();
|
return $this->createAttributeDataGrid()->render();
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -69,7 +69,6 @@ class CategoryDataGrid
|
||||||
'condition' => '=',
|
'condition' => '=',
|
||||||
'secondaryKey' => 'cta.category_id',
|
'secondaryKey' => 'cta.category_id',
|
||||||
],
|
],
|
||||||
|
|
||||||
],
|
],
|
||||||
|
|
||||||
//use aliasing on secodary columns if join is performed
|
//use aliasing on secodary columns if join is performed
|
||||||
|
|
@ -105,44 +104,56 @@ class CategoryDataGrid
|
||||||
'type' => 'string',
|
'type' => 'string',
|
||||||
'label' => 'Visible in Menu',
|
'label' => 'Visible in Menu',
|
||||||
'sortable' => true,
|
'sortable' => true,
|
||||||
|
'wrapper' => function ($value) {
|
||||||
|
if($value == 0)
|
||||||
|
return "False";
|
||||||
|
else
|
||||||
|
return "True";
|
||||||
|
},
|
||||||
],
|
],
|
||||||
|
|
||||||
],
|
],
|
||||||
|
|
||||||
'filterable' => [
|
'filterable' => [
|
||||||
// [
|
[
|
||||||
// 'column' => 'id',
|
'column' => 'cat.id',
|
||||||
// 'alias' => 'attribute_family_id',
|
'alias' => 'catID',
|
||||||
// 'type' => 'number',
|
'type' => 'number',
|
||||||
// 'label' => 'ID',
|
'label' => 'Category ID',
|
||||||
// ],
|
], [
|
||||||
// [
|
'column' => 'ct.name',
|
||||||
// 'column' => 'code',
|
'alias' => 'catName',
|
||||||
// 'alias' => 'attribute_family_code',
|
'type' => 'string',
|
||||||
// 'type' => 'string',
|
'label' => 'Category Name',
|
||||||
// 'label' => 'Code',
|
], [
|
||||||
// ],
|
'column' => 'cta.name',
|
||||||
// [
|
'alias' => 'parentName',
|
||||||
// 'column' => 'name',
|
'type' => 'string',
|
||||||
// 'alias' => 'attribute_family_name',
|
'label' => 'Parent Name',
|
||||||
// 'type' => 'string',
|
], [
|
||||||
// 'label' => 'Name',
|
'column' => 'cat.status',
|
||||||
// ],
|
'alias' => 'catStatus',
|
||||||
|
'type' => 'string',
|
||||||
|
'label' => 'Visible in Menu',
|
||||||
|
],
|
||||||
],
|
],
|
||||||
|
|
||||||
//don't use aliasing in case of searchables
|
//don't use aliasing in case of searchables
|
||||||
|
|
||||||
'searchable' => [
|
'searchable' => [
|
||||||
// [
|
[
|
||||||
// 'column' => 'name',
|
'column' => 'cat.id',
|
||||||
// 'type' => 'string',
|
'type' => 'number',
|
||||||
// 'label' => 'Name',
|
'label' => 'Category ID',
|
||||||
// ],
|
], [
|
||||||
// [
|
'column' => 'ct.name',
|
||||||
// 'column' => 'code',
|
'type' => 'string',
|
||||||
// 'type' => 'string',
|
'label' => 'Category Name',
|
||||||
// 'label' => 'Code',
|
], [
|
||||||
// ],
|
'column' => 'cat.status',
|
||||||
|
'type' => 'string',
|
||||||
|
'label' => 'Visible in Menu',
|
||||||
|
]
|
||||||
],
|
],
|
||||||
|
|
||||||
//list of viable operators that will be used
|
//list of viable operators that will be used
|
||||||
|
|
@ -158,14 +169,11 @@ class CategoryDataGrid
|
||||||
'nlike' => "not like",
|
'nlike' => "not like",
|
||||||
],
|
],
|
||||||
// 'css' => []
|
// 'css' => []
|
||||||
|
|
||||||
]);
|
]);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function render()
|
public function render()
|
||||||
{
|
{
|
||||||
|
|
||||||
return $this->createCategoryDataGrid()->render();
|
return $this->createCategoryDataGrid()->render();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -30,14 +30,14 @@ class CustomerDataGrid
|
||||||
'table' => 'customers',
|
'table' => 'customers',
|
||||||
'select' => 'id',
|
'select' => 'id',
|
||||||
'perpage' => 10,
|
'perpage' => 10,
|
||||||
'aliased' => false, //use this with false as default and true in case of joins
|
'aliased' => true, //use this with false as default and true in case of joins
|
||||||
|
|
||||||
'massoperations' =>[
|
'massoperations' =>[
|
||||||
[
|
[
|
||||||
'route' => route('admin.datagrid.delete'),
|
'route' => route('admin.datagrid.delete'),
|
||||||
'method' => 'DELETE',
|
'method' => 'DELETE',
|
||||||
'label' => 'Delete',
|
'label' => 'Delete',
|
||||||
'type' => 'button',
|
'type' => 'button', //select || button only
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
|
|
||||||
|
|
@ -56,53 +56,45 @@ class CustomerDataGrid
|
||||||
],
|
],
|
||||||
|
|
||||||
'join' => [
|
'join' => [
|
||||||
// [
|
|
||||||
// 'join' => 'leftjoin',
|
|
||||||
// 'table' => 'roles as r',
|
|
||||||
// 'primaryKey' => 'u.role_id',
|
|
||||||
// 'condition' => '=',
|
|
||||||
// 'secondaryKey' => 'r.id',
|
|
||||||
// ]
|
|
||||||
],
|
],
|
||||||
|
|
||||||
//use aliasing on secodary columns if join is performed
|
//use aliasing on secodary columns if join is performed
|
||||||
|
|
||||||
'columns' => [
|
'columns' => [
|
||||||
|
|
||||||
[
|
[
|
||||||
'name' => 'id',
|
'name' => 'id',
|
||||||
'alias' => 'customerId',
|
'alias' => 'ID',
|
||||||
'type' => 'number',
|
'type' => 'number',
|
||||||
'label' => 'ID',
|
'label' => 'Customer ID',
|
||||||
'sortable' => true,
|
'sortable' => true,
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
'name' => 'first_name',
|
'name' => 'first_name',
|
||||||
'alias' => 'customerFirstName',
|
'alias' => 'FirstName',
|
||||||
'type' => 'string',
|
'type' => 'string',
|
||||||
'label' => 'Name',
|
'label' => 'Customer First Name',
|
||||||
'sortable' => true,
|
'sortable' => false,
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
'name' => 'email',
|
'name' => 'email',
|
||||||
'alias' => 'customerEmail',
|
'alias' => 'Email',
|
||||||
'type' => 'string',
|
'type' => 'string',
|
||||||
'label' => 'Email',
|
'label' => 'Customer E-Mail',
|
||||||
'sortable' => true,
|
'sortable' => false,
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
'name' => 'phone',
|
'name' => 'phone',
|
||||||
'alias' => 'customerPhone',
|
'alias' => 'Phone',
|
||||||
'type' => 'number',
|
'type' => 'number',
|
||||||
'label' => 'Phone',
|
'label' => 'Customer Phone',
|
||||||
'sortable' => true,
|
'sortable' => true,
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
'name' => 'customer_group_id',
|
'name' => 'customer_group_id',
|
||||||
'alias' => 'customerGroupId',
|
'alias' => 'CustomerGroupId',
|
||||||
'type' => 'number',
|
'type' => 'number',
|
||||||
'label' => 'Customer Group',
|
'label' => 'Customer Group',
|
||||||
'sortable' => true,
|
'sortable' => false,
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
|
|
||||||
|
|
@ -111,49 +103,31 @@ class CustomerDataGrid
|
||||||
'filterable' => [
|
'filterable' => [
|
||||||
|
|
||||||
[
|
[
|
||||||
'name' => 'id',
|
'column' => 'id',
|
||||||
'alias' => 'customerId',
|
'alias' => 'ID',
|
||||||
'type' => 'number',
|
'type' => 'number',
|
||||||
'label' => 'ID',
|
'label' => 'Customer ID',
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
'name' => 'first_name',
|
'column' => 'first_name',
|
||||||
'alias' => 'customerFirstName',
|
'alias' => 'FirstName',
|
||||||
'type' => 'string',
|
'type' => 'string',
|
||||||
'label' => 'Name',
|
'label' => 'Customer First Name',
|
||||||
],
|
]
|
||||||
[
|
|
||||||
'name' => 'email',
|
|
||||||
'alias' => 'customerEmail',
|
|
||||||
'type' => 'string',
|
|
||||||
'label' => 'Email',
|
|
||||||
],
|
|
||||||
[
|
|
||||||
'name' => 'phone',
|
|
||||||
'alias' => 'customerPhone',
|
|
||||||
'type' => 'number',
|
|
||||||
'label' => 'Phone',
|
|
||||||
],
|
|
||||||
[
|
|
||||||
'name' => 'customer_group_id',
|
|
||||||
'alias' => 'customerGroupId',
|
|
||||||
'type' => 'string',
|
|
||||||
'label' => 'Customer Group',
|
|
||||||
],
|
|
||||||
],
|
],
|
||||||
|
|
||||||
//don't use aliasing in case of searchables
|
//don't use aliasing in case of searchables
|
||||||
|
|
||||||
'searchable' => [
|
'searchable' => [
|
||||||
[
|
[
|
||||||
'column' => 'first_name',
|
'column' => 'FirstName',
|
||||||
'type' => 'string',
|
'type' => 'string',
|
||||||
'label' => 'Title',
|
'label' => 'Customer First Name',
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
'column' => 'email',
|
'column' => 'email',
|
||||||
'type' => 'string',
|
'type' => 'string',
|
||||||
'label' => 'Rating',
|
'label' => 'Customer E-Mail',
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,7 @@ class CustomerReviewDataGrid
|
||||||
* The CustomerReviewDataGrid
|
* The CustomerReviewDataGrid
|
||||||
* implementation.
|
* implementation.
|
||||||
*
|
*
|
||||||
* @var ReviewsDataGrid
|
* @var CustomerReviewsDataGrid
|
||||||
* for Reviews
|
* for Reviews
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
@ -57,13 +57,6 @@ class CustomerReviewDataGrid
|
||||||
],
|
],
|
||||||
|
|
||||||
'join' => [
|
'join' => [
|
||||||
// [
|
|
||||||
// 'join' => 'leftjoin',
|
|
||||||
// 'table' => 'roles as r',
|
|
||||||
// 'primaryKey' => 'u.role_id',
|
|
||||||
// 'condition' => '=',
|
|
||||||
// 'secondaryKey' => 'r.id',
|
|
||||||
// ]
|
|
||||||
],
|
],
|
||||||
|
|
||||||
//use aliasing on secodary columns if join is performed
|
//use aliasing on secodary columns if join is performed
|
||||||
|
|
@ -76,67 +69,51 @@ class CustomerReviewDataGrid
|
||||||
'type' => 'number',
|
'type' => 'number',
|
||||||
'label' => 'ID',
|
'label' => 'ID',
|
||||||
'sortable' => true,
|
'sortable' => true,
|
||||||
],
|
], [
|
||||||
[
|
|
||||||
'name' => 'title',
|
'name' => 'title',
|
||||||
'alias' => 'titleName',
|
'alias' => 'titleName',
|
||||||
'type' => 'string',
|
'type' => 'string',
|
||||||
'label' => 'Title',
|
'label' => 'Title',
|
||||||
'sortable' => true,
|
'sortable' => true,
|
||||||
],
|
], [
|
||||||
[
|
|
||||||
'name' => 'rating',
|
|
||||||
'alias' => 'productRating',
|
|
||||||
'type' => 'number',
|
|
||||||
'label' => 'Rating',
|
|
||||||
'sortable' => true,
|
|
||||||
],
|
|
||||||
[
|
|
||||||
'name' => 'comment',
|
'name' => 'comment',
|
||||||
'alias' => 'productComment',
|
'alias' => 'productComment',
|
||||||
'type' => 'string',
|
'type' => 'string',
|
||||||
'label' => 'Comment',
|
'label' => 'Comment',
|
||||||
'sortable' => true,
|
'sortable' => true,
|
||||||
],
|
], [
|
||||||
[
|
|
||||||
'name' => 'status',
|
'name' => 'status',
|
||||||
'alias' => 'reviewStatus',
|
'alias' => 'reviewStatus',
|
||||||
'type' => 'number',
|
'type' => 'number',
|
||||||
'label' => 'Status',
|
'label' => 'Status',
|
||||||
'sortable' => true,
|
'sortable' => true,
|
||||||
],
|
],
|
||||||
|
|
||||||
],
|
],
|
||||||
|
|
||||||
//don't use aliasing in case of filters
|
//don't use aliasing in case of filters
|
||||||
|
|
||||||
'filterable' => [
|
'filterable' => [
|
||||||
[
|
[
|
||||||
'name' => 'id',
|
'column' => 'id',
|
||||||
'alias' => 'reviewId',
|
'alias' => 'reviewId',
|
||||||
'type' => 'number',
|
'type' => 'number',
|
||||||
'label' => 'ID',
|
'label' => 'ID',
|
||||||
],
|
], [
|
||||||
[
|
'column' => 'title',
|
||||||
'name' => 'title',
|
|
||||||
'alias' => 'titleName',
|
'alias' => 'titleName',
|
||||||
'type' => 'string',
|
'type' => 'string',
|
||||||
'label' => 'Title',
|
'label' => 'Title',
|
||||||
],
|
], [
|
||||||
[
|
'column' => 'rating',
|
||||||
'name' => 'rating',
|
|
||||||
'alias' => 'productRating',
|
'alias' => 'productRating',
|
||||||
'type' => 'number',
|
'type' => 'number',
|
||||||
'label' => 'Rating',
|
'label' => 'Rating',
|
||||||
],
|
], [
|
||||||
[
|
'column' => 'comment',
|
||||||
'name' => 'comment',
|
|
||||||
'alias' => 'productComment',
|
'alias' => 'productComment',
|
||||||
'type' => 'string',
|
'type' => 'string',
|
||||||
'label' => 'Comment',
|
'label' => 'Comment',
|
||||||
],
|
], [
|
||||||
[
|
'column' => 'status',
|
||||||
'name' => 'status',
|
|
||||||
'alias' => 'reviewStatus',
|
'alias' => 'reviewStatus',
|
||||||
'type' => 'string',
|
'type' => 'string',
|
||||||
'label' => 'Status',
|
'label' => 'Status',
|
||||||
|
|
@ -144,14 +121,12 @@ class CustomerReviewDataGrid
|
||||||
],
|
],
|
||||||
|
|
||||||
//don't use aliasing in case of searchables
|
//don't use aliasing in case of searchables
|
||||||
|
|
||||||
'searchable' => [
|
'searchable' => [
|
||||||
[
|
[
|
||||||
'column' => 'title',
|
'column' => 'title',
|
||||||
'type' => 'string',
|
'type' => 'string',
|
||||||
'label' => 'Title',
|
'label' => 'Title',
|
||||||
],
|
], [
|
||||||
[
|
|
||||||
'column' => 'rating',
|
'column' => 'rating',
|
||||||
'type' => 'number',
|
'type' => 'number',
|
||||||
'label' => 'Rating',
|
'label' => 'Rating',
|
||||||
|
|
|
||||||
|
|
@ -76,13 +76,6 @@ class ExchangeRatesDataGrid
|
||||||
'label' => 'Rate ID',
|
'label' => 'Rate ID',
|
||||||
'sortable' => true,
|
'sortable' => true,
|
||||||
],
|
],
|
||||||
[
|
|
||||||
'name' => 'source_currency',
|
|
||||||
'alias' => 'exchSourceCurrency',
|
|
||||||
'type' => 'string',
|
|
||||||
'label' => 'Source Currency',
|
|
||||||
'sortable' => true,
|
|
||||||
],
|
|
||||||
[
|
[
|
||||||
'name' => 'target_currency',
|
'name' => 'target_currency',
|
||||||
'alias' => 'exchTargetCurrency',
|
'alias' => 'exchTargetCurrency',
|
||||||
|
|
@ -91,10 +84,10 @@ class ExchangeRatesDataGrid
|
||||||
'sortable' => true,
|
'sortable' => true,
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
'name' => 'ratio',
|
'name' => 'rate',
|
||||||
'alias' => 'exchRatio',
|
'alias' => 'exchRate',
|
||||||
'type' => 'string',
|
'type' => 'string',
|
||||||
'label' => 'Exchange Ratio',
|
'label' => 'Exchange Rate',
|
||||||
],
|
],
|
||||||
|
|
||||||
],
|
],
|
||||||
|
|
@ -108,13 +101,6 @@ class ExchangeRatesDataGrid
|
||||||
'type' => 'number',
|
'type' => 'number',
|
||||||
'label' => 'Rate ID',
|
'label' => 'Rate ID',
|
||||||
],
|
],
|
||||||
[
|
|
||||||
'column' => 'source_currency',
|
|
||||||
'alias' => 'exchSourceCurrency',
|
|
||||||
'type' => 'string',
|
|
||||||
'label' => 'Source Currency',
|
|
||||||
'sortable' => true,
|
|
||||||
],
|
|
||||||
[
|
[
|
||||||
'column' => 'target_currency',
|
'column' => 'target_currency',
|
||||||
'alias' => 'exchTargetCurrency',
|
'alias' => 'exchTargetCurrency',
|
||||||
|
|
@ -127,11 +113,6 @@ class ExchangeRatesDataGrid
|
||||||
//don't use aliasing in case of searchables
|
//don't use aliasing in case of searchables
|
||||||
|
|
||||||
'searchable' => [
|
'searchable' => [
|
||||||
[
|
|
||||||
'column' => 'source_currency',
|
|
||||||
'type' => 'string',
|
|
||||||
'label' => 'Source Currency',
|
|
||||||
],
|
|
||||||
[
|
[
|
||||||
'column' => 'target_currency',
|
'column' => 'target_currency',
|
||||||
'type' => 'string',
|
'type' => 'string',
|
||||||
|
|
|
||||||
|
|
@ -64,7 +64,6 @@ class InventorySourcesDataGrid
|
||||||
],
|
],
|
||||||
|
|
||||||
//use aliasing on secodary columns if join is performed
|
//use aliasing on secodary columns if join is performed
|
||||||
|
|
||||||
'columns' => [
|
'columns' => [
|
||||||
|
|
||||||
[
|
[
|
||||||
|
|
@ -73,34 +72,36 @@ class InventorySourcesDataGrid
|
||||||
'type' => 'number',
|
'type' => 'number',
|
||||||
'label' => 'ID',
|
'label' => 'ID',
|
||||||
'sortable' => true,
|
'sortable' => true,
|
||||||
],
|
], [
|
||||||
[
|
|
||||||
'name' => 'code',
|
'name' => 'code',
|
||||||
'alias' => 'inventoryCode',
|
'alias' => 'inventoryCode',
|
||||||
'type' => 'string',
|
'type' => 'string',
|
||||||
'label' => 'Code',
|
'label' => 'Code',
|
||||||
'sortable' => true,
|
'sortable' => false,
|
||||||
],
|
], [
|
||||||
[
|
|
||||||
'name' => 'name',
|
'name' => 'name',
|
||||||
'alias' => 'inventoryName',
|
'alias' => 'inventoryName',
|
||||||
'type' => 'string',
|
'type' => 'string',
|
||||||
'label' => 'Name',
|
'label' => 'Name',
|
||||||
'sortable' => true,
|
'sortable' => false,
|
||||||
],
|
], [
|
||||||
[
|
|
||||||
'name' => 'priority',
|
'name' => 'priority',
|
||||||
'alias' => 'inventoryPriority',
|
'alias' => 'inventoryPriority',
|
||||||
'type' => 'string',
|
'type' => 'string',
|
||||||
'label' => 'Priority',
|
'label' => 'Priority',
|
||||||
'sortable' => true,
|
'sortable' => true,
|
||||||
],
|
], [
|
||||||
[
|
|
||||||
'name' => 'status',
|
'name' => 'status',
|
||||||
'alias' => 'inventoryStatus',
|
'alias' => 'inventoryStatus',
|
||||||
'type' => 'string',
|
'type' => 'string',
|
||||||
'label' => 'Status',
|
'label' => 'Status',
|
||||||
'sortable' => true,
|
'sortable' => true,
|
||||||
|
'wrapper' => function ($value) {
|
||||||
|
if($value == 0)
|
||||||
|
return "In Active";
|
||||||
|
else
|
||||||
|
return "Active";
|
||||||
|
},
|
||||||
],
|
],
|
||||||
|
|
||||||
],
|
],
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,179 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace Webkul\Admin\DataGrids;
|
||||||
|
|
||||||
|
use Illuminate\View\View;
|
||||||
|
use Webkul\Ui\DataGrid\Facades\DataGrid;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Order DataGrid
|
||||||
|
*
|
||||||
|
* @author Prashant Singh <prashant.singh852@webkul.com> @prashant-webkul
|
||||||
|
* @copyright 2018 Webkul Software Pvt Ltd (http://www.webkul.com)
|
||||||
|
*/
|
||||||
|
|
||||||
|
class OrderDataGrid
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* The Data Grid implementation.
|
||||||
|
*
|
||||||
|
* @var AttributeDataGrid
|
||||||
|
* for countries
|
||||||
|
*/
|
||||||
|
|
||||||
|
public function createCategoryDataGrid()
|
||||||
|
{
|
||||||
|
|
||||||
|
return DataGrid::make([
|
||||||
|
'name' => 'Orders',
|
||||||
|
'table' => 'orders as ord',
|
||||||
|
'select' => 'ord.id',
|
||||||
|
'perpage' => 5,
|
||||||
|
'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,
|
||||||
|
'wrapper' => function ($value) {
|
||||||
|
if($value == 0)
|
||||||
|
return "False";
|
||||||
|
else
|
||||||
|
return "True";
|
||||||
|
},
|
||||||
|
],
|
||||||
|
|
||||||
|
],
|
||||||
|
|
||||||
|
'filterable' => [
|
||||||
|
[
|
||||||
|
'column' => 'cat.id',
|
||||||
|
'alias' => 'catID',
|
||||||
|
'type' => 'number',
|
||||||
|
'label' => 'Category ID',
|
||||||
|
], [
|
||||||
|
'column' => 'ct.name',
|
||||||
|
'alias' => 'catName',
|
||||||
|
'type' => 'string',
|
||||||
|
'label' => 'Category Name',
|
||||||
|
], [
|
||||||
|
'column' => 'cta.name',
|
||||||
|
'alias' => 'parentName',
|
||||||
|
'type' => 'string',
|
||||||
|
'label' => 'Parent Name',
|
||||||
|
], [
|
||||||
|
'column' => 'cat.status',
|
||||||
|
'alias' => 'catStatus',
|
||||||
|
'type' => 'string',
|
||||||
|
'label' => 'Visible in Menu',
|
||||||
|
],
|
||||||
|
],
|
||||||
|
|
||||||
|
//don't use aliasing in case of searchables
|
||||||
|
|
||||||
|
'searchable' => [
|
||||||
|
[
|
||||||
|
'column' => 'cat.id',
|
||||||
|
'type' => 'number',
|
||||||
|
'label' => 'Category ID',
|
||||||
|
], [
|
||||||
|
'column' => 'ct.name',
|
||||||
|
'type' => 'string',
|
||||||
|
'label' => 'Category Name',
|
||||||
|
], [
|
||||||
|
'column' => 'cat.status',
|
||||||
|
'type' => 'string',
|
||||||
|
'label' => 'Visible in Menu',
|
||||||
|
]
|
||||||
|
],
|
||||||
|
|
||||||
|
//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();
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -129,25 +129,25 @@ class ProductDataGrid
|
||||||
'filterable' => [
|
'filterable' => [
|
||||||
//column, type, and label
|
//column, type, and label
|
||||||
[
|
[
|
||||||
'name' => 'prods.id',
|
'column' => 'prods.id',
|
||||||
'alias' => 'productID',
|
'alias' => 'productID',
|
||||||
'type' => 'number',
|
'type' => 'number',
|
||||||
'label' => 'ID',
|
'label' => 'ID',
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
'name' => 'prods.sku',
|
'column' => 'prods.sku',
|
||||||
'alias' => 'productCode',
|
'alias' => 'productCode',
|
||||||
'type' => 'string',
|
'type' => 'string',
|
||||||
'label' => 'SKU',
|
'label' => 'SKU',
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
'name' => 'attfam.name',
|
'column' => 'attfam.name',
|
||||||
'alias' => 'FamilyName',
|
'alias' => 'FamilyName',
|
||||||
'type' => 'string',
|
'type' => 'string',
|
||||||
'label' => 'Family Name',
|
'label' => 'Family Name',
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
'name' => 'pi.qty',
|
'column' => 'pi.qty',
|
||||||
'alias' => 'ProductQuantity',
|
'alias' => 'ProductQuantity',
|
||||||
'type' => 'number',
|
'type' => 'number',
|
||||||
'label' => 'Product Quatity',
|
'label' => 'Product Quatity',
|
||||||
|
|
|
||||||
|
|
@ -67,28 +67,25 @@ class SliderDataGrid
|
||||||
//use aliasing on secodary columns if join is performed
|
//use aliasing on secodary columns if join is performed
|
||||||
|
|
||||||
'columns' => [
|
'columns' => [
|
||||||
|
|
||||||
[
|
[
|
||||||
'name' => 's.id',
|
'name' => 's.id',
|
||||||
'alias' => 'sliderId',
|
'alias' => 'sliderId',
|
||||||
'type' => 'number',
|
'type' => 'number',
|
||||||
'label' => 'ID',
|
'label' => 'ID',
|
||||||
'sortable' => true,
|
'sortable' => true,
|
||||||
],
|
], [
|
||||||
[
|
|
||||||
'name' => 's.title',
|
'name' => 's.title',
|
||||||
'alias' => 'sliderTitle',
|
'alias' => 'sliderTitle',
|
||||||
'type' => 'string',
|
'type' => 'string',
|
||||||
'label' => 'title',
|
'label' => 'title',
|
||||||
],
|
'sortable' => false
|
||||||
[
|
], [
|
||||||
'name' => 's.channel_id',
|
'name' => 's.channel_id',
|
||||||
'alias' => 'channelId',
|
'alias' => 'channelId',
|
||||||
'type' => 'string',
|
'type' => 'string',
|
||||||
'label' => 'Channel ID',
|
'label' => 'Channel ID',
|
||||||
'sortable' => true,
|
'sortable' => false,
|
||||||
],
|
], [
|
||||||
[
|
|
||||||
'name' => 'c.name',
|
'name' => 'c.name',
|
||||||
'alias' => 'channelName',
|
'alias' => 'channelName',
|
||||||
'type' => 'string',
|
'type' => 'string',
|
||||||
|
|
@ -98,41 +95,31 @@ class SliderDataGrid
|
||||||
],
|
],
|
||||||
|
|
||||||
//don't use aliasing in case of filters
|
//don't use aliasing in case of filters
|
||||||
|
|
||||||
'filterable' => [
|
'filterable' => [
|
||||||
[
|
[
|
||||||
'column' => 'id',
|
'column' => 's.id',
|
||||||
'alias' => 'locale_id',
|
'alias' => 'sliderId',
|
||||||
'type' => 'number',
|
'type' => 'number',
|
||||||
'label' => 'ID',
|
'label' => 'ID'
|
||||||
],
|
], [
|
||||||
[
|
'column' => 's.title',
|
||||||
'column' => 'code',
|
'alias' => 'SliderTitle',
|
||||||
'alias' => 'locale_code',
|
|
||||||
'type' => 'string',
|
'type' => 'string',
|
||||||
'label' => 'Code',
|
'label' => 'Slider Title'
|
||||||
],
|
|
||||||
[
|
|
||||||
'column' => 'name',
|
|
||||||
'alias' => 'locale_name',
|
|
||||||
'type' => 'string',
|
|
||||||
'label' => 'Name',
|
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
|
|
||||||
//don't use aliasing in case of searchables
|
//don't use aliasing in case of searchables
|
||||||
|
|
||||||
'searchable' => [
|
'searchable' => [
|
||||||
// [
|
[
|
||||||
// 'column' => 'name',
|
'column' => 's.id',
|
||||||
// 'type' => 'string',
|
'type' => 'number',
|
||||||
// 'label' => 'Name',
|
'label' => 'ID'
|
||||||
// ],
|
], [
|
||||||
// [
|
'column' => 's.title',
|
||||||
// 'column' => 'code',
|
'type' => 'string',
|
||||||
// 'type' => 'string',
|
'label' => 'Slider Title'
|
||||||
// 'label' => 'Code',
|
]
|
||||||
// ],
|
|
||||||
],
|
],
|
||||||
|
|
||||||
//list of viable operators that will be used
|
//list of viable operators that will be used
|
||||||
|
|
@ -148,9 +135,7 @@ class SliderDataGrid
|
||||||
'nlike' => "not like",
|
'nlike' => "not like",
|
||||||
],
|
],
|
||||||
// 'css' => []
|
// 'css' => []
|
||||||
|
|
||||||
]);
|
]);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function render()
|
public function render()
|
||||||
|
|
|
||||||
|
|
@ -6,26 +6,26 @@ use Illuminate\View\View;
|
||||||
use Webkul\Ui\DataGrid\Facades\DataGrid;
|
use Webkul\Ui\DataGrid\Facades\DataGrid;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Tax Rules DataGrid
|
* Tax Category DataGrid
|
||||||
*
|
*
|
||||||
* @author Prashant Singh <prashant.singh852@webkul.com> @prashant-webkul
|
* @author Prashant Singh <prashant.singh852@webkul.com> @prashant-webkul
|
||||||
* @copyright 2018 Webkul Software Pvt Ltd (http://www.webkul.com)
|
* @copyright 2018 Webkul Software Pvt Ltd (http://www.webkul.com)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
class TaxRuleDataGrid
|
class TaxCategoryDataGrid
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* The Tax Rule Data
|
* The Tax Category Data
|
||||||
* Grid implementation.
|
* Grid implementation.
|
||||||
*
|
*
|
||||||
* @var TaxRuleDataGrid
|
* @var TaxCategoryDataGrid
|
||||||
*/
|
*/
|
||||||
public function createTaxRuleDataGrid()
|
public function createTaxCategoryDataGrid()
|
||||||
{
|
{
|
||||||
|
|
||||||
return DataGrid::make([
|
return DataGrid::make([
|
||||||
|
|
||||||
'name' => 'Tax Rule',
|
'name' => 'Tax Category',
|
||||||
'table' => 'tax_categories as tr',
|
'table' => 'tax_categories as tr',
|
||||||
'select' => 'tr.id',
|
'select' => 'tr.id',
|
||||||
'perpage' => 10,
|
'perpage' => 10,
|
||||||
|
|
@ -154,7 +154,7 @@ class TaxRuleDataGrid
|
||||||
|
|
||||||
public function render() {
|
public function render() {
|
||||||
|
|
||||||
return $this->createTaxRuleDataGrid()->render();
|
return $this->createTaxCategoryDataGrid()->render();
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -15,7 +15,7 @@ use Webkul\Ui\DataGrid\Facades\DataGrid;
|
||||||
class TaxRateDataGrid
|
class TaxRateDataGrid
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* The Tax Rule Data
|
* The Tax Category Data
|
||||||
* Grid implementation.
|
* Grid implementation.
|
||||||
*
|
*
|
||||||
* @var TaxRateDataGrid
|
* @var TaxRateDataGrid
|
||||||
|
|
@ -24,7 +24,6 @@ class TaxRateDataGrid
|
||||||
{
|
{
|
||||||
|
|
||||||
return DataGrid::make([
|
return DataGrid::make([
|
||||||
|
|
||||||
'name' => 'Tax Rates',
|
'name' => 'Tax Rates',
|
||||||
'table' => 'tax_rates as tr',
|
'table' => 'tax_rates as tr',
|
||||||
'select' => 'tr.id',
|
'select' => 'tr.id',
|
||||||
|
|
@ -64,21 +63,13 @@ class TaxRateDataGrid
|
||||||
'icon' => 'icon trash-icon',
|
'icon' => 'icon trash-icon',
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
'join' => [
|
'join' => [],
|
||||||
// [
|
|
||||||
// 'join' => 'leftjoin',
|
|
||||||
// 'table' => 'roles as r',
|
|
||||||
// 'primaryKey' => 'u.role_id',
|
|
||||||
// 'condition' => '=',
|
|
||||||
// 'secondaryKey' => 'r.id',
|
|
||||||
// ]
|
|
||||||
],
|
|
||||||
|
|
||||||
//use aliasing on secodary columns if join is performed
|
//use aliasing on secodary columns if join is performed
|
||||||
'columns' => [
|
'columns' => [
|
||||||
[
|
[
|
||||||
'name' => 'tr.id',
|
'name' => 'tr.id',
|
||||||
'alias' => 'ID',
|
'alias' => 'id',
|
||||||
'type' => 'number',
|
'type' => 'number',
|
||||||
'label' => 'ID',
|
'label' => 'ID',
|
||||||
'sortable' => true,
|
'sortable' => true,
|
||||||
|
|
@ -90,7 +81,7 @@ class TaxRateDataGrid
|
||||||
'label' => 'Identifier',
|
'label' => 'Identifier',
|
||||||
'sortable' => true,
|
'sortable' => true,
|
||||||
// 'wrapper' => function ($value, $object) {
|
// 'wrapper' => function ($value, $object) {
|
||||||
// return '<a class="color-red">' . $object->Name . '</a>';
|
// return '<a class="color-red">' . $object->identifier . '</a>';
|
||||||
// },
|
// },
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
|
|
@ -119,32 +110,27 @@ class TaxRateDataGrid
|
||||||
//don't use aliasing in case of filters
|
//don't use aliasing in case of filters
|
||||||
'filterable' => [
|
'filterable' => [
|
||||||
[
|
[
|
||||||
'name' => 'tr.id',
|
'column' => 'tr.id',
|
||||||
'alias' => 'ID',
|
'alias' => 'ID',
|
||||||
'type' => 'number',
|
'type' => 'number',
|
||||||
'label' => 'ID',
|
'label' => 'ID',
|
||||||
],
|
], [
|
||||||
[
|
'column' => 'tr.identifier',
|
||||||
'name' => 'tr.identifier',
|
|
||||||
'alias' => 'identifier',
|
'alias' => 'identifier',
|
||||||
'type' => 'string',
|
'type' => 'string',
|
||||||
'label' => 'Identifier',
|
'label' => 'Identifier',
|
||||||
],
|
], [
|
||||||
[
|
'column' => 'tr.state',
|
||||||
'name' => 'tr.state',
|
|
||||||
'alias' => 'state',
|
'alias' => 'state',
|
||||||
'type' => 'string',
|
'type' => 'string',
|
||||||
'label' => 'State',
|
'label' => 'State',
|
||||||
],
|
], [
|
||||||
[
|
'column' => 'tr.country',
|
||||||
'name' => 'tr.country',
|
|
||||||
'alias' => 'country',
|
'alias' => 'country',
|
||||||
'type' => 'string',
|
'type' => 'string',
|
||||||
'label' => 'Country',
|
'label' => 'Country',
|
||||||
],
|
], [
|
||||||
|
'column' => 'tr.tax_rate',
|
||||||
[
|
|
||||||
'name' => 'tr.tax_rate',
|
|
||||||
'alias' => 'tax_rate',
|
'alias' => 'tax_rate',
|
||||||
'type' => 'number',
|
'type' => 'number',
|
||||||
'label' => 'Tax Rate',
|
'label' => 'Tax Rate',
|
||||||
|
|
@ -157,22 +143,6 @@ class TaxRateDataGrid
|
||||||
'type' => 'string',
|
'type' => 'string',
|
||||||
'label' => 'Identifier',
|
'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' => [
|
'operators' => [
|
||||||
'eq' => "=",
|
'eq' => "=",
|
||||||
|
|
|
||||||
|
|
@ -88,7 +88,7 @@ Route::group(['middleware' => ['web']], function () {
|
||||||
'view' => 'admin::sales.orders.view'
|
'view' => 'admin::sales.orders.view'
|
||||||
])->name('admin.sales.orders.view');
|
])->name('admin.sales.orders.view');
|
||||||
|
|
||||||
Route::get('/orders/cancel/{order_id}', 'Webkul\Admin\Http\Controllers\Sales\OrderController@cancel')->defaults('_config', [
|
Route::get('/orders/cancel/{id}', 'Webkul\Admin\Http\Controllers\Sales\OrderController@cancel')->defaults('_config', [
|
||||||
'view' => 'admin::sales.orders.cancel'
|
'view' => 'admin::sales.orders.cancel'
|
||||||
])->name('admin.sales.orders.cancel');
|
])->name('admin.sales.orders.cancel');
|
||||||
|
|
||||||
|
|
@ -197,6 +197,10 @@ Route::group(['middleware' => ['web']], function () {
|
||||||
'redirect' => 'admin.catalog.attributes.index'
|
'redirect' => 'admin.catalog.attributes.index'
|
||||||
])->name('admin.catalog.attributes.update');
|
])->name('admin.catalog.attributes.update');
|
||||||
|
|
||||||
|
Route::get('/attributes/delete/{id}', 'Webkul\Attribute\Http\Controllers\AttributeController@destroy')->defaults('_config', [
|
||||||
|
'view' => 'admin::catalog.attributes.delete'
|
||||||
|
])->name('admin.catalog.attributes.delete');
|
||||||
|
|
||||||
|
|
||||||
// Catalog Family Routes
|
// Catalog Family Routes
|
||||||
Route::get('/families', 'Webkul\Attribute\Http\Controllers\AttributeFamilyController@index')->defaults('_config', [
|
Route::get('/families', 'Webkul\Attribute\Http\Controllers\AttributeFamilyController@index')->defaults('_config', [
|
||||||
|
|
@ -367,8 +371,6 @@ Route::group(['middleware' => ['web']], function () {
|
||||||
'redirect' => 'admin.channels.index'
|
'redirect' => 'admin.channels.index'
|
||||||
])->name('admin.channels.update');
|
])->name('admin.channels.update');
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// Admin Profile route
|
// Admin Profile route
|
||||||
Route::get('/account', 'Webkul\User\Http\Controllers\AccountController@edit')->defaults('_config', [
|
Route::get('/account', 'Webkul\User\Http\Controllers\AccountController@edit')->defaults('_config', [
|
||||||
'view' => 'admin::account.edit'
|
'view' => 'admin::account.edit'
|
||||||
|
|
@ -396,7 +398,7 @@ Route::group(['middleware' => ['web']], function () {
|
||||||
'view' => 'admin::tax.tax-categories.index'
|
'view' => 'admin::tax.tax-categories.index'
|
||||||
])->name('admin.tax-categories.index');
|
])->name('admin.tax-categories.index');
|
||||||
|
|
||||||
// tax rule routes
|
// tax category routes
|
||||||
Route::get('/tax-categories/create', 'Webkul\Tax\Http\Controllers\TaxCategoryController@show')->defaults('_config', [
|
Route::get('/tax-categories/create', 'Webkul\Tax\Http\Controllers\TaxCategoryController@show')->defaults('_config', [
|
||||||
'view' => 'admin::tax.tax-categories.create'
|
'view' => 'admin::tax.tax-categories.create'
|
||||||
])->name('admin.tax-categories.show');
|
])->name('admin.tax-categories.show');
|
||||||
|
|
@ -413,7 +415,7 @@ Route::group(['middleware' => ['web']], function () {
|
||||||
'redirect' => 'admin.tax-categories.index'
|
'redirect' => 'admin.tax-categories.index'
|
||||||
])->name('admin.tax-categories.update');
|
])->name('admin.tax-categories.update');
|
||||||
|
|
||||||
//tax rule ends
|
//tax category ends
|
||||||
|
|
||||||
|
|
||||||
//tax rate
|
//tax rate
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,47 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace Webkul\Admin\Listeners;
|
||||||
|
|
||||||
|
use Illuminate\Support\Facades\Mail;
|
||||||
|
use Webkul\Admin\Mail\NewOrderNotification;
|
||||||
|
use Webkul\Admin\Mail\NewInvoiceNotification;
|
||||||
|
use Webkul\Admin\Mail\NewShipmentNotification;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Order event handler
|
||||||
|
*
|
||||||
|
* @author Jitendra Singh <jitendra@webkul.com>
|
||||||
|
* @copyright 2018 Webkul Software Pvt Ltd (http://www.webkul.com)
|
||||||
|
*/
|
||||||
|
class Order {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param mixed $order
|
||||||
|
*
|
||||||
|
* Send new order confirmation mail to the customer
|
||||||
|
*/
|
||||||
|
public function sendNewOrderMail($order)
|
||||||
|
{
|
||||||
|
Mail::send(new NewOrderNotification($order));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param mixed $invoice
|
||||||
|
*
|
||||||
|
* Send new invoice mail to the customer
|
||||||
|
*/
|
||||||
|
public function sendNewInvoiceMail($invoice)
|
||||||
|
{
|
||||||
|
Mail::send(new NewInvoiceNotification($invoice));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param mixed $shipment
|
||||||
|
*
|
||||||
|
* Send new shipment mail to the customer
|
||||||
|
*/
|
||||||
|
public function sendNewShipmentMail($shipment)
|
||||||
|
{
|
||||||
|
Mail::send(new NewShipmentNotification($shipment));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,51 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace Webkul\Admin\Mail;
|
||||||
|
|
||||||
|
use Illuminate\Bus\Queueable;
|
||||||
|
use Illuminate\Mail\Mailable;
|
||||||
|
use Illuminate\Queue\SerializesModels;
|
||||||
|
use Illuminate\Contracts\Queue\ShouldQueue;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* New Invoice Mail class
|
||||||
|
*
|
||||||
|
* @author Jitendra Singh <jitendra@webkul.com>
|
||||||
|
* @copyright 2018 Webkul Software Pvt Ltd (http://www.webkul.com)
|
||||||
|
*/
|
||||||
|
class NewInvoiceNotification extends Mailable
|
||||||
|
{
|
||||||
|
use Queueable, SerializesModels;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The invoice instance.
|
||||||
|
*
|
||||||
|
* @var Invoice
|
||||||
|
*/
|
||||||
|
public $invoice;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create a new message instance.
|
||||||
|
*
|
||||||
|
* @param mixed $invoice
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function __construct($invoice)
|
||||||
|
{
|
||||||
|
$this->invoice = $invoice;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Build the message.
|
||||||
|
*
|
||||||
|
* @return $this
|
||||||
|
*/
|
||||||
|
public function build()
|
||||||
|
{
|
||||||
|
$order = $this->invoice->order;
|
||||||
|
|
||||||
|
return $this->to($order->customer_email, $order->customer_full_name)
|
||||||
|
->subject(trans('admin::app.mail.invoice.subject', ['order_id' => $order->id]))
|
||||||
|
->view('admin::emails.sales.new-invoice');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,48 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace Webkul\Admin\Mail;
|
||||||
|
|
||||||
|
use Illuminate\Bus\Queueable;
|
||||||
|
use Illuminate\Mail\Mailable;
|
||||||
|
use Illuminate\Queue\SerializesModels;
|
||||||
|
use Illuminate\Contracts\Queue\ShouldQueue;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* New Order Mail class
|
||||||
|
*
|
||||||
|
* @author Jitendra Singh <jitendra@webkul.com>
|
||||||
|
* @copyright 2018 Webkul Software Pvt Ltd (http://www.webkul.com)
|
||||||
|
*/
|
||||||
|
class NewOrderNotification extends Mailable
|
||||||
|
{
|
||||||
|
use Queueable, SerializesModels;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The order instance.
|
||||||
|
*
|
||||||
|
* @var Order
|
||||||
|
*/
|
||||||
|
public $order;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create a new message instance.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function __construct($order)
|
||||||
|
{
|
||||||
|
$this->order = $order;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Build the message.
|
||||||
|
*
|
||||||
|
* @return $this
|
||||||
|
*/
|
||||||
|
public function build()
|
||||||
|
{
|
||||||
|
return $this->to($this->order->customer_email, $this->order->customer_full_name)
|
||||||
|
->subject(trans('admin::app.mail.order.subject'))
|
||||||
|
->view('admin::emails.sales.new-order');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,51 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace Webkul\Admin\Mail;
|
||||||
|
|
||||||
|
use Illuminate\Bus\Queueable;
|
||||||
|
use Illuminate\Mail\Mailable;
|
||||||
|
use Illuminate\Queue\SerializesModels;
|
||||||
|
use Illuminate\Contracts\Queue\ShouldQueue;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* New Shipment Mail class
|
||||||
|
*
|
||||||
|
* @author Jitendra Singh <jitendra@webkul.com>
|
||||||
|
* @copyright 2018 Webkul Software Pvt Ltd (http://www.webkul.com)
|
||||||
|
*/
|
||||||
|
class NewShipmentNotification extends Mailable
|
||||||
|
{
|
||||||
|
use Queueable, SerializesModels;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The shipment instance.
|
||||||
|
*
|
||||||
|
* @var Shipment
|
||||||
|
*/
|
||||||
|
public $shipment;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create a new message instance.
|
||||||
|
*
|
||||||
|
* @param mixed $shipment
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function __construct($shipment)
|
||||||
|
{
|
||||||
|
$this->shipment = $shipment;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Build the message.
|
||||||
|
*
|
||||||
|
* @return $this
|
||||||
|
*/
|
||||||
|
public function build()
|
||||||
|
{
|
||||||
|
$order = $this->shipment->order;
|
||||||
|
|
||||||
|
return $this->to($order->customer_email, $order->customer_full_name)
|
||||||
|
->subject(trans('admin::app.mail.shipment.subject', ['order_id' => $order->id]))
|
||||||
|
->view('admin::emails.sales.new-shipment');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -10,6 +10,160 @@ use Webkul\Admin\ProductFormAccordian;
|
||||||
|
|
||||||
class EventServiceProvider extends ServiceProvider
|
class EventServiceProvider extends ServiceProvider
|
||||||
{
|
{
|
||||||
|
protected $menuItems = [
|
||||||
|
[
|
||||||
|
'key' => 'dashboard',
|
||||||
|
'name' => 'Dashboard',
|
||||||
|
'route' => 'admin.dashboard.index',
|
||||||
|
'sort' => 1,
|
||||||
|
'icon-class' => 'dashboard-icon',
|
||||||
|
], [
|
||||||
|
'key' => 'sales',
|
||||||
|
'name' => 'Sales',
|
||||||
|
'route' => 'admin.sales.orders.index',
|
||||||
|
'sort' => 2,
|
||||||
|
'icon-class' => 'sales-icon',
|
||||||
|
], [
|
||||||
|
'key' => 'catalog',
|
||||||
|
'name' => 'Catalog',
|
||||||
|
'route' => 'admin.catalog.products.index',
|
||||||
|
'sort' => 3,
|
||||||
|
'icon-class' => 'catalog-icon',
|
||||||
|
], [
|
||||||
|
'key' => 'catalog.products',
|
||||||
|
'name' => 'Products',
|
||||||
|
'route' => 'admin.catalog.products.index',
|
||||||
|
'sort' => 1,
|
||||||
|
'icon-class' => '',
|
||||||
|
], [
|
||||||
|
'key' => 'catalog.categories',
|
||||||
|
'name' => 'Categories',
|
||||||
|
'route' => 'admin.catalog.categories.index',
|
||||||
|
'sort' => 2,
|
||||||
|
'icon-class' => '',
|
||||||
|
], [
|
||||||
|
'key' => 'catalog.attributes',
|
||||||
|
'name' => 'Attributes',
|
||||||
|
'route' => 'admin.catalog.attributes.index',
|
||||||
|
'sort' => 3,
|
||||||
|
'icon-class' => '',
|
||||||
|
], [
|
||||||
|
'key' => 'catalog.families',
|
||||||
|
'name' => 'Families',
|
||||||
|
'route' => 'admin.catalog.families.index',
|
||||||
|
'sort' => 4,
|
||||||
|
'icon-class' => '',
|
||||||
|
], [
|
||||||
|
'key' => 'customers',
|
||||||
|
'name' => 'Customers',
|
||||||
|
'route' => 'admin.customer.index',
|
||||||
|
'sort' => 4,
|
||||||
|
'icon-class' => 'customer-icon',
|
||||||
|
], [
|
||||||
|
'key' => 'customers.customers',
|
||||||
|
'name' => 'Customers',
|
||||||
|
'route' => 'admin.customer.index',
|
||||||
|
'sort' => 1,
|
||||||
|
'icon-class' => '',
|
||||||
|
], [
|
||||||
|
'key' => 'customers.reviews',
|
||||||
|
'name' => 'Reviews',
|
||||||
|
'route' => 'admin.customer.review.index',
|
||||||
|
'sort' => 2,
|
||||||
|
'icon-class' => '',
|
||||||
|
], [
|
||||||
|
'key' => 'configuration',
|
||||||
|
'name' => 'Configure',
|
||||||
|
'route' => 'admin.account.edit',
|
||||||
|
'sort' => 5,
|
||||||
|
'icon-class' => 'configuration-icon',
|
||||||
|
], [
|
||||||
|
'key' => 'configuration.account',
|
||||||
|
'name' => 'My Account',
|
||||||
|
'route' => 'admin.account.edit',
|
||||||
|
'sort' => 1,
|
||||||
|
'icon-class' => '',
|
||||||
|
], [
|
||||||
|
'key' => 'settings',
|
||||||
|
'name' => 'Settings',
|
||||||
|
'route' => 'admin.locales.index',
|
||||||
|
'sort' => 6,
|
||||||
|
'icon-class' => 'settings-icon',
|
||||||
|
], [
|
||||||
|
'key' => 'settings.locales',
|
||||||
|
'name' => 'Locales',
|
||||||
|
'route' => 'admin.locales.index',
|
||||||
|
'sort' => 1,
|
||||||
|
'icon-class' => '',
|
||||||
|
], [
|
||||||
|
'key' => 'settings.currencies',
|
||||||
|
'name' => 'Currencies',
|
||||||
|
'route' => 'admin.currencies.index',
|
||||||
|
'sort' => 2,
|
||||||
|
'icon-class' => '',
|
||||||
|
], [
|
||||||
|
'key' => 'settings.exchange_rates',
|
||||||
|
'name' => 'Exchange Rates',
|
||||||
|
'route' => 'admin.exchange_rates.index',
|
||||||
|
'sort' => 3,
|
||||||
|
'icon-class' => '',
|
||||||
|
], [
|
||||||
|
'key' => 'settings.inventory_sources',
|
||||||
|
'name' => 'Inventory Sources',
|
||||||
|
'route' => 'admin.inventory_sources.index',
|
||||||
|
'sort' => 4,
|
||||||
|
'icon-class' => '',
|
||||||
|
], [
|
||||||
|
'key' => 'settings.channels',
|
||||||
|
'name' => 'Channels',
|
||||||
|
'route' => 'admin.channels.index',
|
||||||
|
'sort' => 5,
|
||||||
|
'icon-class' => '',
|
||||||
|
], [
|
||||||
|
'key' => 'settings.users',
|
||||||
|
'name' => 'Users',
|
||||||
|
'route' => 'admin.users.index',
|
||||||
|
'sort' => 6,
|
||||||
|
'icon-class' => '',
|
||||||
|
], [
|
||||||
|
'key' => 'settings.users.users',
|
||||||
|
'name' => 'Users',
|
||||||
|
'route' => 'admin.users.index',
|
||||||
|
'sort' => 1,
|
||||||
|
'icon-class' => '',
|
||||||
|
], [
|
||||||
|
'key' => 'settings.users.roles',
|
||||||
|
'name' => 'Roles',
|
||||||
|
'route' => 'admin.roles.index',
|
||||||
|
'sort' => 2,
|
||||||
|
'icon-class' => '',
|
||||||
|
], [
|
||||||
|
'key' => 'settings.sliders',
|
||||||
|
'name' => 'Create Sliders',
|
||||||
|
'route' => 'admin.sliders.index',
|
||||||
|
'sort' => 7,
|
||||||
|
'icon-class' => '',
|
||||||
|
], [
|
||||||
|
'key' => 'settings.taxes',
|
||||||
|
'name' => 'Taxes',
|
||||||
|
'route' => 'admin.tax-categories.index',
|
||||||
|
'sort' => 8,
|
||||||
|
'icon-class' => '',
|
||||||
|
], [
|
||||||
|
'key' => 'settings.taxes.tax-categories',
|
||||||
|
'name' => 'Tax Categories',
|
||||||
|
'route' => 'admin.tax-categories.index',
|
||||||
|
'sort' => 1,
|
||||||
|
'icon-class' => '',
|
||||||
|
], [
|
||||||
|
'key' => 'settings.taxes.tax-rates',
|
||||||
|
'name' => 'Tax Rates',
|
||||||
|
'route' => 'admin.tax-rates.index',
|
||||||
|
'sort' => 2,
|
||||||
|
'icon-class' => '',
|
||||||
|
],
|
||||||
|
];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Bootstrap services.
|
* Bootstrap services.
|
||||||
*
|
*
|
||||||
|
|
@ -24,6 +178,12 @@ class EventServiceProvider extends ServiceProvider
|
||||||
$this->registerACL();
|
$this->registerACL();
|
||||||
|
|
||||||
$this->createProductFormAccordian();
|
$this->createProductFormAccordian();
|
||||||
|
|
||||||
|
Event::listen('checkout.order.save.after', 'Webkul\Admin\Listeners\Order@sendNewOrderMail');
|
||||||
|
|
||||||
|
Event::listen('checkout.invoice.save.after', 'Webkul\Admin\Listeners\Order@sendNewInvoiceMail');
|
||||||
|
|
||||||
|
Event::listen('checkout.invoice.save.after', 'Webkul\Admin\Listeners\Order@sendNewShipmentMail');
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -40,59 +200,11 @@ class EventServiceProvider extends ServiceProvider
|
||||||
});
|
});
|
||||||
|
|
||||||
Event::listen('admin.menu.build', function ($menu) {
|
Event::listen('admin.menu.build', function ($menu) {
|
||||||
$menu->add('dashboard', 'Dashboard', 'admin.dashboard.index', 1, 'dashboard-icon');
|
foreach($this->menuItems as $item){
|
||||||
|
if (bouncer()->hasPermission($item['key'])) {
|
||||||
$menu->add('sales', 'Sales', 'admin.sales.orders.index', 1, 'sales-icon');
|
$menu->add($item['key'], $item['name'], $item['route'], $item['sort'], $item['icon-class']);
|
||||||
|
}
|
||||||
$menu->add('catalog', 'Catalog', 'admin.catalog.products.index', 3, 'catalog-icon');
|
}
|
||||||
|
|
||||||
$menu->add('catalog.products', 'Products', 'admin.catalog.products.index', 1);
|
|
||||||
|
|
||||||
$menu->add('catalog.categories', 'Categories', 'admin.catalog.categories.index', 2);
|
|
||||||
|
|
||||||
$menu->add('catalog.attributes', 'Attributes', 'admin.catalog.attributes.index', 3);
|
|
||||||
|
|
||||||
$menu->add('catalog.families', 'Families', 'admin.catalog.families.index', 4);
|
|
||||||
|
|
||||||
$menu->add('customers', 'Customers', 'admin.customer.index', 5, 'customer-icon');
|
|
||||||
|
|
||||||
$menu->add('customers.customers', 'Customers', 'admin.customer.index', 1, '');
|
|
||||||
|
|
||||||
$menu->add('customers.reviews', 'Review', 'admin.customer.review.index', 2, '');
|
|
||||||
|
|
||||||
// $menu->add('customers.blocked_customer', 'Blocked Customers', 'admin.account.edit', 2, '');
|
|
||||||
|
|
||||||
// $menu->add('customers.allowed_customer', 'Allowed Customers', 'admin.account.edit', 4, '');
|
|
||||||
|
|
||||||
$menu->add('configuration', 'Configure', 'admin.account.edit', 6, 'configuration-icon');
|
|
||||||
|
|
||||||
$menu->add('configuration.account', 'My Account', 'admin.account.edit', 1);
|
|
||||||
|
|
||||||
$menu->add('settings', 'Settings', 'admin.locales.index', 6, 'settings-icon');
|
|
||||||
|
|
||||||
$menu->add('settings.locales', 'Locales', 'admin.locales.index', 1, '');
|
|
||||||
|
|
||||||
$menu->add('settings.currencies', 'Currencies', 'admin.currencies.index', 2, '');
|
|
||||||
|
|
||||||
$menu->add('settings.exchange_rates', 'Exchange Rates', 'admin.exchange_rates.index', 3, '');
|
|
||||||
|
|
||||||
$menu->add('settings.inventory_sources', 'Inventory Sources', 'admin.inventory_sources.index', 4, '');
|
|
||||||
|
|
||||||
$menu->add('settings.channels', 'Channels', 'admin.channels.index', 5, '');
|
|
||||||
|
|
||||||
$menu->add('settings.users', 'Users', 'admin.users.index', 6, '');
|
|
||||||
|
|
||||||
$menu->add('settings.users.users', 'Users', 'admin.users.index', 1, '');
|
|
||||||
|
|
||||||
$menu->add('settings.users.roles', 'Roles', 'admin.roles.index', 2, '');
|
|
||||||
|
|
||||||
$menu->add('settings.sliders', 'Create Sliders', 'admin.sliders.index', 8, '');
|
|
||||||
|
|
||||||
$menu->add('settings.tax', 'Taxes', 'admin.tax-categories.index', 9, '');
|
|
||||||
|
|
||||||
$menu->add('settings.tax.tax-categories', 'Add Tax Category', 'admin.tax-categories.index', 1, '');
|
|
||||||
|
|
||||||
$menu->add('settings.tax.tax-rates', 'Add Tax Rates', 'admin.tax-rates.index', 2, '');
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -6,8 +6,11 @@ return [
|
||||||
'country' => 'Country',
|
'country' => 'Country',
|
||||||
'state' => 'State'
|
'state' => 'State'
|
||||||
],
|
],
|
||||||
|
'dashboard' => [
|
||||||
|
'title' => 'Dashboard'
|
||||||
|
],
|
||||||
'account' => [
|
'account' => [
|
||||||
'header-title' => 'My Account',
|
'title' => 'My Account',
|
||||||
'save-btn-title' => 'Save',
|
'save-btn-title' => 'Save',
|
||||||
'general' => 'General',
|
'general' => 'General',
|
||||||
'name' => 'Name',
|
'name' => 'Name',
|
||||||
|
|
@ -154,7 +157,7 @@ return [
|
||||||
],
|
],
|
||||||
'catalog' => [
|
'catalog' => [
|
||||||
'products' => [
|
'products' => [
|
||||||
'products' => 'Products',
|
'title' => 'Products',
|
||||||
'add-product-btn-title' => 'Add Product',
|
'add-product-btn-title' => 'Add Product',
|
||||||
'add-title' => 'Add Product',
|
'add-title' => 'Add Product',
|
||||||
'edit-title' => 'Edit Product',
|
'edit-title' => 'Edit Product',
|
||||||
|
|
@ -185,6 +188,7 @@ return [
|
||||||
'add-image-btn-title' => 'Add Image'
|
'add-image-btn-title' => 'Add Image'
|
||||||
],
|
],
|
||||||
'attributes' => [
|
'attributes' => [
|
||||||
|
'title' => 'Attributes',
|
||||||
'add-title' => 'Add Attribute',
|
'add-title' => 'Add Attribute',
|
||||||
'edit-title' => 'Edit Attribute',
|
'edit-title' => 'Edit Attribute',
|
||||||
'save-btn-title' => 'Save Attribute',
|
'save-btn-title' => 'Save Attribute',
|
||||||
|
|
@ -225,7 +229,7 @@ return [
|
||||||
'is_visible_on_front' => 'Visible on Product View Page on Front-end'
|
'is_visible_on_front' => 'Visible on Product View Page on Front-end'
|
||||||
],
|
],
|
||||||
'families' => [
|
'families' => [
|
||||||
'families' => 'Families',
|
'title' => 'Families',
|
||||||
'add-family-btn-title' => 'Add Family',
|
'add-family-btn-title' => 'Add Family',
|
||||||
'add-title' => 'Add Family',
|
'add-title' => 'Add Family',
|
||||||
'edit-title' => 'Edit Family',
|
'edit-title' => 'Edit Family',
|
||||||
|
|
@ -243,7 +247,7 @@ return [
|
||||||
'group-exist-error' => 'Group with same name already exists.'
|
'group-exist-error' => 'Group with same name already exists.'
|
||||||
],
|
],
|
||||||
'categories' => [
|
'categories' => [
|
||||||
'categories' => 'Categories',
|
'title' => 'Categories',
|
||||||
'add-title' => 'Add Category',
|
'add-title' => 'Add Category',
|
||||||
'edit-title' => 'Edit Category',
|
'edit-title' => 'Edit Category',
|
||||||
'save-btn-title' => 'Save Category',
|
'save-btn-title' => 'Save Category',
|
||||||
|
|
@ -265,13 +269,10 @@ return [
|
||||||
],
|
],
|
||||||
|
|
||||||
'configuration' => [
|
'configuration' => [
|
||||||
'tax' => [
|
|
||||||
'title' => 'Taxes',
|
|
||||||
'add-title' => 'Add Tax Category'
|
|
||||||
],
|
|
||||||
|
|
||||||
'tax-categories' => [
|
'tax-categories' => [
|
||||||
'title' => 'Add Tax Category',
|
'title' => 'Tax Categories',
|
||||||
|
'add-title' => 'Add Tax Category',
|
||||||
|
'edit-title' => 'Edit Tax Category',
|
||||||
'save-btn-title' => 'Save Tax Category',
|
'save-btn-title' => 'Save Tax Category',
|
||||||
'general' => 'Tax Category',
|
'general' => 'Tax Category',
|
||||||
'select-channel' => 'Select Channel',
|
'select-channel' => 'Select Channel',
|
||||||
|
|
@ -286,7 +287,9 @@ return [
|
||||||
],
|
],
|
||||||
|
|
||||||
'tax-rates' => [
|
'tax-rates' => [
|
||||||
'title' => 'Add Tax Rate',
|
'title' => 'Tax Rates',
|
||||||
|
'add-title' => 'Add Tax Rate',
|
||||||
|
'edit-title' => 'Edit Tax Rate',
|
||||||
'save-btn-title' => 'Save Tax Rate',
|
'save-btn-title' => 'Save Tax Rate',
|
||||||
'general' => 'Tax Rate',
|
'general' => 'Tax Rate',
|
||||||
'identifier' => 'Identifier',
|
'identifier' => 'Identifier',
|
||||||
|
|
@ -342,7 +345,7 @@ return [
|
||||||
'general' => 'General',
|
'general' => 'General',
|
||||||
'source_currency' => 'Source Currency',
|
'source_currency' => 'Source Currency',
|
||||||
'target_currency' => 'Target Currency',
|
'target_currency' => 'Target Currency',
|
||||||
'ratio' => 'Ratio'
|
'rate' => 'Rate'
|
||||||
],
|
],
|
||||||
'inventory_sources' => [
|
'inventory_sources' => [
|
||||||
'title' => 'Inventory Sources',
|
'title' => 'Inventory Sources',
|
||||||
|
|
@ -409,11 +412,46 @@ return [
|
||||||
'save-btn-title' => 'Save Customer'
|
'save-btn-title' => 'Save Customer'
|
||||||
],
|
],
|
||||||
'reviews' => [
|
'reviews' => [
|
||||||
'title' => 'Title',
|
'title' => 'Reviews',
|
||||||
'name' => 'Reviews',
|
'edit-title' => 'Edit Review',
|
||||||
'rating' => 'Rating',
|
'rating' => 'Rating',
|
||||||
'status' => 'Status',
|
'status' => 'Status',
|
||||||
'comment' => 'Comment'
|
'comment' => 'Comment'
|
||||||
]
|
]
|
||||||
|
],
|
||||||
|
'mail' => [
|
||||||
|
'order' => [
|
||||||
|
'subject' => 'New Order Confirmation',
|
||||||
|
'heading' => 'Order Confirmation!',
|
||||||
|
'dear' => 'Dear :customer_name',
|
||||||
|
'greeting' => 'Thanks for your Order :order_id placed on :created_at',
|
||||||
|
'summary' => 'Summary of Order',
|
||||||
|
'shipping-address' => 'Shipping Address',
|
||||||
|
'billing-address' => 'Billing Address',
|
||||||
|
'contact' => 'Contact',
|
||||||
|
'shipping' => 'Shipping',
|
||||||
|
'payment' => 'Payment',
|
||||||
|
'price' => 'Price',
|
||||||
|
'quantity' => 'Quantity',
|
||||||
|
'subtotal' => 'Subtotal',
|
||||||
|
'shipping-handling' => 'Shipping & Handling',
|
||||||
|
'tax' => 'Tax',
|
||||||
|
'grand-total' => 'Grand Total',
|
||||||
|
'final-summary' => 'Thanks for showing your intrest in our store. we will send you track number once it shiped.',
|
||||||
|
'help' => 'If you need any kind of help please contact us at :support_email',
|
||||||
|
'thanks' => 'Thanks!'
|
||||||
|
],
|
||||||
|
'invoice' => [
|
||||||
|
'heading' => 'Your Invoice #:invoice_id for Order #:order_id',
|
||||||
|
'subject' => 'Invoice for your order #:order_id',
|
||||||
|
'summary' => 'Summary of Invoice',
|
||||||
|
],
|
||||||
|
'shipment' => [
|
||||||
|
'heading' => 'Your Shipment #:shipment_id for Order #:order_id',
|
||||||
|
'subject' => 'Shipment for your order #:order_id',
|
||||||
|
'summary' => 'Summary of Shipment',
|
||||||
|
'carrier' => 'Carrier',
|
||||||
|
'tracking-number' => 'Tracking Number'
|
||||||
|
]
|
||||||
]
|
]
|
||||||
];
|
];
|
||||||
|
|
@ -1,12 +1,16 @@
|
||||||
@extends('admin::layouts.content')
|
@extends('admin::layouts.content')
|
||||||
|
|
||||||
|
@section('page_title')
|
||||||
|
{{ __('admin::app.account.title') }}
|
||||||
|
@stop
|
||||||
|
|
||||||
@section('content')
|
@section('content')
|
||||||
<div class="content">
|
<div class="content">
|
||||||
<form method="POST" action="" @submit.prevent="onSubmit">
|
<form method="POST" action="" @submit.prevent="onSubmit">
|
||||||
<div class="page-header">
|
<div class="page-header">
|
||||||
<div class="page-title">
|
<div class="page-title">
|
||||||
<h1>
|
<h1>
|
||||||
{{ __('admin::app.account.header-title') }}
|
{{ __('admin::app.account.title') }}
|
||||||
</h1>
|
</h1>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,14 @@
|
||||||
@extends('admin::layouts.content')
|
@extends('admin::layouts.content')
|
||||||
|
|
||||||
|
@section('page_title')
|
||||||
|
{{ __('admin::app.catalog.attributes.title') }}
|
||||||
|
@stop
|
||||||
|
|
||||||
@section('content')
|
@section('content')
|
||||||
<div class="content">
|
<div class="content">
|
||||||
<div class="page-header">
|
<div class="page-header">
|
||||||
<div class="page-title">
|
<div class="page-title">
|
||||||
Attributes
|
<h1>{{ __('admin::app.catalog.attributes.title') }}</h1>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="page-action">
|
<div class="page-action">
|
||||||
|
|
|
||||||
|
|
@ -6,8 +6,8 @@
|
||||||
|
|
||||||
@section('content')
|
@section('content')
|
||||||
<div class="content">
|
<div class="content">
|
||||||
|
|
||||||
<form method="POST" action="{{ route('admin.catalog.categories.store') }}" @submit.prevent="onSubmit">
|
<form method="POST" action="{{ route('admin.catalog.categories.store') }}" @submit.prevent="onSubmit" enctype="multipart/form-data">
|
||||||
|
|
||||||
<div class="page-header">
|
<div class="page-header">
|
||||||
<div class="page-title">
|
<div class="page-title">
|
||||||
|
|
@ -108,7 +108,7 @@
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
@stop
|
@stop
|
||||||
|
|
@ -1,10 +1,14 @@
|
||||||
@extends('admin::layouts.content')
|
@extends('admin::layouts.content')
|
||||||
|
|
||||||
|
@section('page_title')
|
||||||
|
{{ __('admin::app.catalog.categories.title') }}
|
||||||
|
@stop
|
||||||
|
|
||||||
@section('content')
|
@section('content')
|
||||||
<div class="content">
|
<div class="content">
|
||||||
<div class="page-header">
|
<div class="page-header">
|
||||||
<div class="page-title">
|
<div class="page-title">
|
||||||
Categories
|
<h1>{{ __('admin::app.catalog.categories.title') }}</h1>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="page-action">
|
<div class="page-action">
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,14 @@
|
||||||
@extends('admin::layouts.content')
|
@extends('admin::layouts.content')
|
||||||
|
|
||||||
|
@section('page_title')
|
||||||
|
{{ __('admin::app.catalog.families.title') }}
|
||||||
|
@stop
|
||||||
|
|
||||||
@section('content')
|
@section('content')
|
||||||
<div class="content">
|
<div class="content">
|
||||||
<div class="page-header">
|
<div class="page-header">
|
||||||
<div class="page-title">
|
<div class="page-title">
|
||||||
{{ __('admin::app.catalog.families.families') }}
|
<h1>{{ __('admin::app.catalog.families.title') }}</h1>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="page-action">
|
<div class="page-action">
|
||||||
|
|
|
||||||
|
|
@ -83,10 +83,14 @@
|
||||||
|
|
||||||
@if(view()->exists($typeView = 'admin::catalog.products.field-types.' . $attribute->type))
|
@if(view()->exists($typeView = 'admin::catalog.products.field-types.' . $attribute->type))
|
||||||
|
|
||||||
<div class="control-group" :class="[errors.has('{{ $attribute->code }}') ? 'has-error' : '']">
|
<div class="control-group {{ $attribute->type }}" :class="[errors.has('{{ $attribute->code }}') ? 'has-error' : '']">
|
||||||
<label for="{{ $attribute->code }}" {{ $attribute->is_required ? 'class=required' : '' }}>
|
<label for="{{ $attribute->code }}" {{ $attribute->is_required ? 'class=required' : '' }}>
|
||||||
{{ $attribute->admin_name }}
|
{{ $attribute->admin_name }}
|
||||||
|
|
||||||
|
@if ($attribute->type == 'price')
|
||||||
|
<span class="currency-code">({{ core()->getBaseCurrencySymbol() }})</span>
|
||||||
|
@endif
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
$channel_locale = [];
|
$channel_locale = [];
|
||||||
if($attribute->value_per_channel) {
|
if($attribute->value_per_channel) {
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,14 @@
|
||||||
@extends('admin::layouts.content')
|
@extends('admin::layouts.content')
|
||||||
|
|
||||||
|
@section('page_title')
|
||||||
|
{{ __('admin::app.catalog.products.title') }}
|
||||||
|
@stop
|
||||||
|
|
||||||
@section('content')
|
@section('content')
|
||||||
<div class="content">
|
<div class="content">
|
||||||
<div class="page-header">
|
<div class="page-header">
|
||||||
<div class="page-title">
|
<div class="page-title">
|
||||||
<h1>{{ __('admin::app.catalog.products.products') }}</h1>
|
<h1>{{ __('admin::app.catalog.products.title') }}</h1>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="page-action">
|
<div class="page-action">
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
@extends('admin::layouts.content')
|
@extends('admin::layouts.content')
|
||||||
|
|
||||||
@section('page_title')
|
@section('page_title')
|
||||||
|
{{ __('admin::app.customers.customers.title') }}
|
||||||
@stop
|
@stop
|
||||||
|
|
||||||
@section('content')
|
@section('content')
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,9 @@
|
||||||
@extends('admin::layouts.content')
|
@extends('admin::layouts.content')
|
||||||
|
|
||||||
|
@section('page_title')
|
||||||
|
{{ __('admin::app.customers.reviews.edit-title') }}
|
||||||
|
@stop
|
||||||
|
|
||||||
@section('content')
|
@section('content')
|
||||||
<div class="content">
|
<div class="content">
|
||||||
<form method="POST" action="{{ route('admin.customer.review.update', $review->id) }}">
|
<form method="POST" action="{{ route('admin.customer.review.update', $review->id) }}">
|
||||||
|
|
@ -7,7 +11,7 @@
|
||||||
<div class="page-header">
|
<div class="page-header">
|
||||||
<div class="page-title">
|
<div class="page-title">
|
||||||
<h1>
|
<h1>
|
||||||
{{ __('admin::app.customers.reviews.name') }}
|
{{ __('admin::app.customers.reviews.edit-title') }}
|
||||||
</h1>
|
</h1>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
@extends('admin::layouts.content')
|
@extends('admin::layouts.content')
|
||||||
|
|
||||||
@section('page_title')
|
@section('page_title')
|
||||||
|
{{ __('admin::app.customers.reviews.title') }}
|
||||||
@stop
|
@stop
|
||||||
|
|
||||||
@section('content')
|
@section('content')
|
||||||
|
|
@ -9,7 +9,7 @@
|
||||||
<div class="content">
|
<div class="content">
|
||||||
<div class="page-header">
|
<div class="page-header">
|
||||||
<div class="page-title">
|
<div class="page-title">
|
||||||
<h1>{{ __('admin::app.customers.reviews.name') }}</h1>
|
<h1>{{ __('admin::app.customers.reviews.title') }}</h1>
|
||||||
</div>
|
</div>
|
||||||
<div class="page-action">
|
<div class="page-action">
|
||||||
{{-- <a href="{{ route('admin.users.create') }}" class="btn btn-lg btn-primary">
|
{{-- <a href="{{ route('admin.users.create') }}" class="btn btn-lg btn-primary">
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,9 @@
|
||||||
@extends('admin::layouts.master')
|
@extends('admin::layouts.master')
|
||||||
|
|
||||||
|
@section('page_title')
|
||||||
|
{{ __('admin::app.dashboard.title') }}
|
||||||
|
@stop
|
||||||
|
|
||||||
@section('content-wrapper')
|
@section('content-wrapper')
|
||||||
<div class="content full-page">
|
<div class="content full-page">
|
||||||
<h1>Dashboard</h1>
|
<h1>Dashboard</h1>
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,22 @@
|
||||||
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||||
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||||
|
<head>
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||||
|
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
||||||
|
<link href="https://fonts.googleapis.com/css?family=Montserrat:400,500" rel="stylesheet" type="text/css">
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body style="font-family: montserrat, sans-serif;">
|
||||||
|
<div style="max-width: 1000px; margin-left: auto; margin-right: auto;">
|
||||||
|
<div style="text-align: center;">
|
||||||
|
{{ $header ?? '' }}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div>
|
||||||
|
{{ $slot }}
|
||||||
|
|
||||||
|
{{ $subcopy ?? '' }}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
|
@ -0,0 +1,175 @@
|
||||||
|
@component('admin::emails.layouts.master')
|
||||||
|
<div style="text-align: center;">
|
||||||
|
<a href="{{ config('app.url') }}">
|
||||||
|
<img src="{{ bagisto_asset('vendor/webkul/shop/assets/images/logo.svg') }}">
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<?php $order = $invoice->order; ?>
|
||||||
|
|
||||||
|
<div style="padding: 30px;">
|
||||||
|
<div style="font-size: 20px;color: #242424;line-height: 30px;margin-bottom: 34px;">
|
||||||
|
<span style="font-weight: bold;">
|
||||||
|
{{ __('admin::app.mail.invoice.heading', ['order_id' => $order->id, 'invoice_id' => $invoice->id]) }}
|
||||||
|
</span> <br>
|
||||||
|
|
||||||
|
<p style="font-size: 16px;color: #5E5E5E;line-height: 24px;">
|
||||||
|
{{ __('admin::app.mail.order.dear', ['customer_name' => $order->customer_full_name]) }},
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<p style="font-size: 16px;color: #5E5E5E;line-height: 24px;">
|
||||||
|
{!! __('admin::app.mail.order.greeting', [
|
||||||
|
'order_id' => '<a href="' . route('customer.orders.view', $order->id) . '" style="color: #0041FF; font-weight: bold;">#' . $order->id . '</a>',
|
||||||
|
'created_at' => $order->created_at
|
||||||
|
])
|
||||||
|
!!}
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div style="font-weight: bold;font-size: 20px;color: #242424;line-height: 30px;margin-bottom: 20px !important;">
|
||||||
|
{{ __('admin::app.mail.invoice.summary') }}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div style="display: flex;flex-direction: row;margin-top: 20px;justify-content: space-between;margin-bottom: 40px;">
|
||||||
|
<div style="line-height: 25px;">
|
||||||
|
<div style="font-weight: bold;font-size: 16px;color: #242424;">
|
||||||
|
{{ __('admin::app.mail.order.shipping-address') }}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div>
|
||||||
|
{{ $order->shipping_address->name }}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div>
|
||||||
|
{{ $order->shipping_address->address1 }}, {{ $order->shipping_address->address2 ? $order->shipping_address->address2 . ',' : '' }} {{ $order->shipping_address->state }}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div>
|
||||||
|
{{ country()->name($order->shipping_address->country) }} {{ $order->shipping_address->postcode }}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div>---</div>
|
||||||
|
|
||||||
|
<div style="margin-bottom: 40px;">
|
||||||
|
{{ __('admin::app.mail.order.contact') }} : {{ $order->shipping_address->phone }}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div style="font-size: 16px;color: #242424;">
|
||||||
|
{{ __('admin::app.mail.order.shipping') }}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div style="font-weight: bold;font-size: 16px;color: #242424;">
|
||||||
|
{{ $order->shipping_title }}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div style="line-height: 25px;">
|
||||||
|
<div style="font-weight: bold;font-size: 16px;color: #242424;">
|
||||||
|
{{ __('admin::app.mail.order.billing-address') }}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div>
|
||||||
|
{{ $order->billing_address->name }}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div>
|
||||||
|
{{ $order->billing_address->address1 }}, {{ $order->billing_address->address2 ? $order->billing_address->address2 . ',' : '' }} {{ $order->billing_address->state }}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div>
|
||||||
|
{{ country()->name($order->billing_address->country) }} {{ $order->billing_address->postcode }}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div>---</div>
|
||||||
|
|
||||||
|
<div style="margin-bottom: 40px;">
|
||||||
|
{{ __('admin::app.mail.order.contact') }} : {{ $order->billing_address->phone }}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div style="font-size: 16px; color: #242424;">
|
||||||
|
{{ __('admin::app.mail.order.payment') }}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div style="font-weight: bold;font-size: 16px; color: #242424;">
|
||||||
|
{{ core()->getConfigData('paymentmethods.' . $order->payment->method . '.title') }}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
@foreach ($invoice->items as $item)
|
||||||
|
<div style="background: #FFFFFF;border: 1px solid #E8E8E8;border-radius: 3px;padding: 20px">
|
||||||
|
<p style="font-size: 18px;color: #242424;line-height: 24px;margin-top: 0;margin-bottom: 10px;font-weight: bold;">
|
||||||
|
{{ $item->name }}
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<div style="margin-bottom: 10px;">
|
||||||
|
<label style="font-size: 16px;color: #5E5E5E;">
|
||||||
|
{{ __('admin::app.mail.order.price') }}
|
||||||
|
</label>
|
||||||
|
<span style="font-size: 18px;color: #242424;margin-left: 40px;font-weight: bold;">
|
||||||
|
{{ core()->formatPrice($item->price, $invoice->order_currency_code) }}
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div style="margin-bottom: 10px;">
|
||||||
|
<label style="font-size: 16px;color: #5E5E5E;">
|
||||||
|
{{ __('admin::app.mail.order.quantity') }}
|
||||||
|
</label>
|
||||||
|
<span style="font-size: 18px;color: #242424;margin-left: 40px;font-weight: bold;">
|
||||||
|
{{ $item->qty }}
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div style="">
|
||||||
|
<label style="margin-top: 10px; font-size: 16px;color: #5E5E5E; display: block;">
|
||||||
|
Color : Gray, Size : S
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
@endforeach
|
||||||
|
|
||||||
|
<div style="font-size: 16px;color: #242424;line-height: 30px;float: right;width: 40%;margin-top: 20px;">
|
||||||
|
<div>
|
||||||
|
<span>{{ __('admin::app.mail.order.subtotal') }}</span>
|
||||||
|
<span style="float: right;">
|
||||||
|
{{ core()->formatPrice($invoice->sub_total, $invoice->order_currency_code) }}
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div>
|
||||||
|
<span>{{ __('admin::app.mail.order.shipping-handling') }}</span>
|
||||||
|
<span style="float: right;">
|
||||||
|
{{ core()->formatPrice($invoice->shipping_amount, $invoice->order_currency_code) }}
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div>
|
||||||
|
<span>{{ __('admin::app.mail.order.tax') }}</span>
|
||||||
|
<span style="float: right;">
|
||||||
|
{{ core()->formatPrice($invoice->tax_amount, $invoice->order_currency_code) }}
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div style="font-weight: bold">
|
||||||
|
<span>{{ __('admin::app.mail.order.grand-total') }}</span>
|
||||||
|
<span style="float: right;">
|
||||||
|
{{ core()->formatPrice($invoice->grand_total, $invoice->order_currency_code) }}
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div style="margin-top: 65px;font-size: 16px;color: #5E5E5E;line-height: 24px;display: inline-block;width: 100%">
|
||||||
|
<p style="font-size: 16px;color: #5E5E5E;line-height: 24px;">
|
||||||
|
{!!
|
||||||
|
__('admin::app.mail.order.help', [
|
||||||
|
'support_email' => '<a style="color:#0041FF" href="mailto:' . config('mail.from.address') . '">' . config('mail.from.address'). '</a>'
|
||||||
|
])
|
||||||
|
!!}
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<p style="font-size: 16px;color: #5E5E5E;line-height: 24px;">
|
||||||
|
{{ __('admin::app.mail.order.thanks') }}
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
@endcomponent
|
||||||
|
|
@ -0,0 +1,177 @@
|
||||||
|
@component('admin::emails.layouts.master')
|
||||||
|
<div style="text-align: center;">
|
||||||
|
<a href="{{ config('app.url') }}">
|
||||||
|
<img src="{{ bagisto_asset('vendor/webkul/shop/assets/images/logo.svg') }}">
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div style="padding: 30px;">
|
||||||
|
<div style="font-size: 20px;color: #242424;line-height: 30px;margin-bottom: 34px;">
|
||||||
|
<span style="font-weight: bold;">
|
||||||
|
{{ __('admin::app.mail.order.heading') }}
|
||||||
|
</span> <br>
|
||||||
|
|
||||||
|
<p style="font-size: 16px;color: #5E5E5E;line-height: 24px;">
|
||||||
|
{{ __('admin::app.mail.order.dear', ['customer_name' => $order->customer_full_name]) }},
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<p style="font-size: 16px;color: #5E5E5E;line-height: 24px;">
|
||||||
|
{!! __('admin::app.mail.order.greeting', [
|
||||||
|
'order_id' => '<a href="' . route('customer.orders.view', $order->id) . '" style="color: #0041FF; font-weight: bold;">#' . $order->id . '</a>',
|
||||||
|
'created_at' => $order->created_at
|
||||||
|
])
|
||||||
|
!!}
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div style="font-weight: bold;font-size: 20px;color: #242424;line-height: 30px;margin-bottom: 20px !important;">
|
||||||
|
{{ __('admin::app.mail.order.summary') }}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div style="display: flex;flex-direction: row;margin-top: 20px;justify-content: space-between;margin-bottom: 40px;">
|
||||||
|
<div style="line-height: 25px;">
|
||||||
|
<div style="font-weight: bold;font-size: 16px;color: #242424;">
|
||||||
|
{{ __('admin::app.mail.order.shipping-address') }}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div>
|
||||||
|
{{ $order->shipping_address->name }}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div>
|
||||||
|
{{ $order->shipping_address->address1 }}, {{ $order->shipping_address->address2 ? $order->shipping_address->address2 . ',' : '' }} {{ $order->shipping_address->state }}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div>
|
||||||
|
{{ country()->name($order->shipping_address->country) }} {{ $order->shipping_address->postcode }}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div>---</div>
|
||||||
|
|
||||||
|
<div style="margin-bottom: 40px;">
|
||||||
|
{{ __('admin::app.mail.order.contact') }} : {{ $order->shipping_address->phone }}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div style="font-size: 16px;color: #242424;">
|
||||||
|
{{ __('admin::app.mail.order.shipping') }}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div style="font-weight: bold;font-size: 16px;color: #242424;">
|
||||||
|
{{ $order->shipping_title }}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div style="line-height: 25px;">
|
||||||
|
<div style="font-weight: bold;font-size: 16px;color: #242424;">
|
||||||
|
{{ __('admin::app.mail.order.billing-address') }}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div>
|
||||||
|
{{ $order->billing_address->name }}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div>
|
||||||
|
{{ $order->billing_address->address1 }}, {{ $order->billing_address->address2 ? $order->billing_address->address2 . ',' : '' }} {{ $order->billing_address->state }}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div>
|
||||||
|
{{ country()->name($order->billing_address->country) }} {{ $order->billing_address->postcode }}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div>---</div>
|
||||||
|
|
||||||
|
<div style="margin-bottom: 40px;">
|
||||||
|
{{ __('admin::app.mail.order.contact') }} : {{ $order->billing_address->phone }}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div style="font-size: 16px; color: #242424;">
|
||||||
|
{{ __('admin::app.mail.order.payment') }}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div style="font-weight: bold;font-size: 16px; color: #242424;">
|
||||||
|
{{ core()->getConfigData('paymentmethods.' . $order->payment->method . '.title') }}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
@foreach ($order->items as $item)
|
||||||
|
<div style="background: #FFFFFF;border: 1px solid #E8E8E8;border-radius: 3px;padding: 20px">
|
||||||
|
<p style="font-size: 18px;color: #242424;line-height: 24px;margin-top: 0;margin-bottom: 10px;font-weight: bold;">
|
||||||
|
{{ $item->name }}
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<div style="margin-bottom: 10px;">
|
||||||
|
<label style="font-size: 16px;color: #5E5E5E;">
|
||||||
|
{{ __('admin::app.mail.order.price') }}
|
||||||
|
</label>
|
||||||
|
<span style="font-size: 18px;color: #242424;margin-left: 40px;font-weight: bold;">
|
||||||
|
{{ core()->formatPrice($item->price, $order->order_currency_code) }}
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div style="margin-bottom: 10px;">
|
||||||
|
<label style="font-size: 16px;color: #5E5E5E;">
|
||||||
|
{{ __('admin::app.mail.order.quantity') }}
|
||||||
|
</label>
|
||||||
|
<span style="font-size: 18px;color: #242424;margin-left: 40px;font-weight: bold;">
|
||||||
|
{{ $item->qty_ordered }}
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div style="">
|
||||||
|
<label style="margin-top: 10px; font-size: 16px;color: #5E5E5E; display: block;">
|
||||||
|
Color : Gray, Size : S
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
@endforeach
|
||||||
|
|
||||||
|
<div style="font-size: 16px;color: #242424;line-height: 30px;float: right;width: 40%;margin-top: 20px;">
|
||||||
|
<div>
|
||||||
|
<span>{{ __('admin::app.mail.order.subtotal') }}</span>
|
||||||
|
<span style="float: right;">
|
||||||
|
{{ core()->formatPrice($order->sub_total, $order->order_currency_code) }}
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div>
|
||||||
|
<span>{{ __('admin::app.mail.order.shipping-handling') }}</span>
|
||||||
|
<span style="float: right;">
|
||||||
|
{{ core()->formatPrice($order->shipping_amount, $order->order_currency_code) }}
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div>
|
||||||
|
<span>{{ __('admin::app.mail.order.tax') }}</span>
|
||||||
|
<span style="float: right;">
|
||||||
|
{{ core()->formatPrice($order->tax_amount, $order->order_currency_code) }}
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div style="font-weight: bold">
|
||||||
|
<span>{{ __('admin::app.mail.order.grand-total') }}</span>
|
||||||
|
<span style="float: right;">
|
||||||
|
{{ core()->formatPrice($order->grand_total, $order->order_currency_code) }}
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div style="margin-top: 65px;font-size: 16px;color: #5E5E5E;line-height: 24px;display: inline-block">
|
||||||
|
<p style="font-size: 16px;color: #5E5E5E;line-height: 24px;">
|
||||||
|
{{ __('admin::app.mail.order.final-summary') }}
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<p style="font-size: 16px;color: #5E5E5E;line-height: 24px;">
|
||||||
|
{!!
|
||||||
|
__('admin::app.mail.order.help', [
|
||||||
|
'support_email' => '<a style="color:#0041FF" href="mailto:' . config('mail.from.address') . '">' . config('mail.from.address'). '</a>'
|
||||||
|
])
|
||||||
|
!!}
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<p style="font-size: 16px;color: #5E5E5E;line-height: 24px;">
|
||||||
|
{{ __('admin::app.mail.order.thanks') }}
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
@endcomponent
|
||||||
|
|
@ -0,0 +1,155 @@
|
||||||
|
@component('admin::emails.layouts.master')
|
||||||
|
<div style="text-align: center;">
|
||||||
|
<a href="{{ config('app.url') }}">
|
||||||
|
<img src="{{ bagisto_asset('vendor/webkul/shop/assets/images/logo.svg') }}">
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<?php $order = $shipment->order; ?>
|
||||||
|
|
||||||
|
<div style="padding: 30px;">
|
||||||
|
<div style="font-size: 20px;color: #242424;line-height: 30px;margin-bottom: 34px;">
|
||||||
|
<span style="font-weight: bold;">
|
||||||
|
{{ __('admin::app.mail.shipment.heading', ['order_id' => $order->id, 'shipment_id' => $shipment->id]) }}
|
||||||
|
</span> <br>
|
||||||
|
|
||||||
|
<p style="font-size: 16px;color: #5E5E5E;line-height: 24px;">
|
||||||
|
{{ __('admin::app.mail.order.dear', ['customer_name' => $order->customer_full_name]) }},
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<p style="font-size: 16px;color: #5E5E5E;line-height: 24px;">
|
||||||
|
{!! __('admin::app.mail.order.greeting', [
|
||||||
|
'order_id' => '<a href="' . route('customer.orders.view', $order->id) . '" style="color: #0041FF; font-weight: bold;">#' . $order->id . '</a>',
|
||||||
|
'created_at' => $order->created_at
|
||||||
|
])
|
||||||
|
!!}
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div style="font-weight: bold;font-size: 20px;color: #242424;line-height: 30px;margin-bottom: 20px !important;">
|
||||||
|
{{ __('admin::app.mail.shipment.summary') }}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div style="display: flex;flex-direction: row;margin-top: 20px;justify-content: space-between;margin-bottom: 40px;">
|
||||||
|
<div style="line-height: 25px;">
|
||||||
|
<div style="font-weight: bold;font-size: 16px;color: #242424;">
|
||||||
|
{{ __('admin::app.mail.order.shipping-address') }}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div>
|
||||||
|
{{ $order->shipping_address->name }}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div>
|
||||||
|
{{ $order->shipping_address->address1 }}, {{ $order->shipping_address->address2 ? $order->shipping_address->address2 . ',' : '' }} {{ $order->shipping_address->state }}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div>
|
||||||
|
{{ country()->name($order->shipping_address->country) }} {{ $order->shipping_address->postcode }}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div>---</div>
|
||||||
|
|
||||||
|
<div style="margin-bottom: 40px;">
|
||||||
|
{{ __('admin::app.mail.order.contact') }} : {{ $order->shipping_address->phone }}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div style="font-size: 16px;color: #242424;">
|
||||||
|
{{ __('admin::app.mail.order.shipping') }}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div style="font-size: 16px;color: #242424;">
|
||||||
|
<div style="font-weight: bold;">
|
||||||
|
{{ $order->shipping_title }}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div style="margin-top: 5px;">
|
||||||
|
<span style="font-weight: bold;">{{ __('admin::app.mail.shipment.carrier') }} : </span>{{ $shipment->carrier_title }}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div style="margin-top: 5px;">
|
||||||
|
<span style="font-weight: bold;">{{ __('admin::app.mail.shipment.tracking-number') }} : </span>{{ $shipment->track_number }}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div style="line-height: 25px;">
|
||||||
|
<div style="font-weight: bold;font-size: 16px;color: #242424;">
|
||||||
|
{{ __('admin::app.mail.order.billing-address') }}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div>
|
||||||
|
{{ $order->billing_address->name }}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div>
|
||||||
|
{{ $order->billing_address->address1 }}, {{ $order->billing_address->address2 ? $order->billing_address->address2 . ',' : '' }} {{ $order->billing_address->state }}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div>
|
||||||
|
{{ country()->name($order->billing_address->country) }} {{ $order->billing_address->postcode }}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div>---</div>
|
||||||
|
|
||||||
|
<div style="margin-bottom: 40px;">
|
||||||
|
{{ __('admin::app.mail.order.contact') }} : {{ $order->billing_address->phone }}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div style="font-size: 16px; color: #242424;">
|
||||||
|
{{ __('admin::app.mail.order.payment') }}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div style="font-weight: bold;font-size: 16px; color: #242424;">
|
||||||
|
{{ core()->getConfigData('paymentmethods.' . $order->payment->method . '.title') }}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
@foreach ($shipment->items as $item)
|
||||||
|
<div style="background: #FFFFFF;border: 1px solid #E8E8E8;border-radius: 3px;padding: 20px">
|
||||||
|
<p style="font-size: 18px;color: #242424;line-height: 24px;margin-top: 0;margin-bottom: 10px;font-weight: bold;">
|
||||||
|
{{ $item->name }}
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<div style="margin-bottom: 10px;">
|
||||||
|
<label style="font-size: 16px;color: #5E5E5E;">
|
||||||
|
{{ __('admin::app.mail.order.price') }}
|
||||||
|
</label>
|
||||||
|
<span style="font-size: 18px;color: #242424;margin-left: 40px;font-weight: bold;">
|
||||||
|
{{ core()->formatPrice($item->price, $order->order_currency_code) }}
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div style="margin-bottom: 10px;">
|
||||||
|
<label style="font-size: 16px;color: #5E5E5E;">
|
||||||
|
{{ __('admin::app.mail.order.quantity') }}
|
||||||
|
</label>
|
||||||
|
<span style="font-size: 18px;color: #242424;margin-left: 40px;font-weight: bold;">
|
||||||
|
{{ $item->qty }}
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div style="">
|
||||||
|
<label style="margin-top: 10px; font-size: 16px;color: #5E5E5E; display: block;">
|
||||||
|
Color : Gray, Size : S
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
@endforeach
|
||||||
|
|
||||||
|
<div style="margin-top: 20px;font-size: 16px;color: #5E5E5E;line-height: 24px;display: inline-block;width: 100%">
|
||||||
|
<p style="font-size: 16px;color: #5E5E5E;line-height: 24px;">
|
||||||
|
{!!
|
||||||
|
__('admin::app.mail.order.help', [
|
||||||
|
'support_email' => '<a style="color:#0041FF" href="mailto:' . config('mail.from.address') . '">' . config('mail.from.address'). '</a>'
|
||||||
|
])
|
||||||
|
!!}
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<p style="font-size: 16px;color: #5E5E5E;line-height: 24px;">
|
||||||
|
{{ __('admin::app.mail.order.thanks') }}
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
@endcomponent
|
||||||
|
|
@ -5,6 +5,7 @@
|
||||||
@stop
|
@stop
|
||||||
|
|
||||||
@section('content-wrapper')
|
@section('content-wrapper')
|
||||||
|
|
||||||
<?php $order = $invoice->order; ?>
|
<?php $order = $invoice->order; ?>
|
||||||
|
|
||||||
<div class="content full-page">
|
<div class="content full-page">
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,9 @@
|
||||||
@extends('admin::layouts.content')
|
@extends('admin::layouts.content')
|
||||||
|
|
||||||
|
@section('page_title')
|
||||||
|
{{ __('admin::app.settings.channels.title') }}
|
||||||
|
@stop
|
||||||
|
|
||||||
@section('content')
|
@section('content')
|
||||||
<div class="content">
|
<div class="content">
|
||||||
<div class="page-header">
|
<div class="page-header">
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,9 @@
|
||||||
@extends('admin::layouts.content')
|
@extends('admin::layouts.content')
|
||||||
|
|
||||||
|
@section('page_title')
|
||||||
|
{{ __('admin::app.settings.currencies.add-title') }}
|
||||||
|
@stop
|
||||||
|
|
||||||
@section('content')
|
@section('content')
|
||||||
<div class="content">
|
<div class="content">
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,50 +0,0 @@
|
||||||
@extends('admin::layouts.content')
|
|
||||||
|
|
||||||
@section('content')
|
|
||||||
<div class="content">
|
|
||||||
|
|
||||||
<form method="POST" action="{{ route('admin.currencies.update', $currency->id) }}" @submit.prevent="onSubmit">
|
|
||||||
<div class="page-header">
|
|
||||||
<div class="page-title">
|
|
||||||
<h1>{{ __('admin::app.settings.currencies.edit-title') }}</h1>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="page-action">
|
|
||||||
<button type="submit" class="btn btn-lg btn-primary">
|
|
||||||
{{ __('admin::app.settings.currencies.save-btn-title') }}
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="page-content">
|
|
||||||
<div class="form-container">
|
|
||||||
@csrf()
|
|
||||||
<input name="_method" type="hidden" value="PUT">
|
|
||||||
|
|
||||||
<accordian :title="'{{ __('admin::app.settings.currencies.general') }}'" :active="true">
|
|
||||||
<div slot="body">
|
|
||||||
<div class="control-group" :class="[errors.has('code') ? 'has-error' : '']">
|
|
||||||
<label for="code" class="required">{{ __('admin::app.settings.currencies.code') }}</label>
|
|
||||||
<input v-validate="'required'" class="control" id="code" name="code" value="{{ old('code') ?: $currency->code }}" v-code/>
|
|
||||||
<span class="control-error" v-if="errors.has('code')">@{{ errors.first('code') }}</span>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="control-group" :class="[errors.has('name') ? 'has-error' : '']">
|
|
||||||
<label for="name" class="required">{{ __('admin::app.settings.currencies.name') }}</label>
|
|
||||||
<input v-validate="'required'" class="control" id="name" name="name" value="{{ old('name') ?: $currency->name }}"/>
|
|
||||||
<span class="control-error" v-if="errors.has('name')">@{{ errors.first('name') }}</span>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="control-group" :class="[errors.has('symbol') ? 'has-error' : '']">
|
|
||||||
<label for="symbol" class="required">{{ __('admin::app.settings.currencies.symbol') }}</label>
|
|
||||||
<input v-validate="'required'" class="control" id="symbol" name="symbol" value="{{ old('symbol') ?: $currency->symbol }}"/>
|
|
||||||
<span class="control-error" v-if="errors.has('symbol')">@{{ errors.first('symbol') }}</span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</accordian>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</form>
|
|
||||||
</div>
|
|
||||||
@stop
|
|
||||||
|
|
@ -1,5 +1,9 @@
|
||||||
@extends('admin::layouts.content')
|
@extends('admin::layouts.content')
|
||||||
|
|
||||||
|
@section('page_title')
|
||||||
|
{{ __('admin::app.settings.currencies.title') }}
|
||||||
|
@stop
|
||||||
|
|
||||||
@section('content')
|
@section('content')
|
||||||
<div class="content">
|
<div class="content">
|
||||||
<div class="page-header">
|
<div class="page-header">
|
||||||
|
|
|
||||||
|
|
@ -24,36 +24,49 @@
|
||||||
<div class="form-container">
|
<div class="form-container">
|
||||||
@csrf()
|
@csrf()
|
||||||
|
|
||||||
<accordian :title="'{{ __('admin::app.settings.exchange_rates.general') }}'" :active="true">
|
<div class="table">
|
||||||
<div slot="body">
|
<table>
|
||||||
<div class="control-group" :class="[errors.has('source_currency') ? 'has-error' : '']">
|
<thead>
|
||||||
<label for="source_currency" class="required">{{ __('admin::app.settings.exchange_rates.source_currency') }}</label>
|
<tr>
|
||||||
<select v-validate="'required'" class="control" name="source_currency">
|
<th>
|
||||||
@foreach($currencies as $currency)
|
{{ __('admin::app.settings.exchange_rates.source_currency') }}
|
||||||
<option value="{{ $currency->id }}">{{ $currency->name }}</option>
|
</th>
|
||||||
@endforeach
|
<th>
|
||||||
</select>
|
{{ __('admin::app.settings.exchange_rates.target_currency') }}
|
||||||
<span class="control-error" v-if="errors.has('source_currency')">@{{ errors.first('source_currency') }}</span>
|
</th>
|
||||||
</div>
|
<th>
|
||||||
|
{{ __('admin::app.settings.exchange_rates.rate') }}
|
||||||
|
</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
|
||||||
<div class="control-group" :class="[errors.has('target_currency') ? 'has-error' : '']">
|
<tbody>
|
||||||
<label for="target_currency" class="required">{{ __('admin::app.settings.exchange_rates.target_currency') }}</label>
|
<tr>
|
||||||
<select v-validate="'required'" class="control" name="target_currency">
|
<td>
|
||||||
@foreach($currencies as $currency)
|
{{ core()->getBaseCurrencyCode() }}
|
||||||
<option value="{{ $currency->id }}">{{ $currency->name }}</option>
|
</td>
|
||||||
@endforeach
|
|
||||||
</select>
|
|
||||||
<span class="control-error" v-if="errors.has('target_currency')">@{{ errors.first('target_currency') }}</span>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="control-group" :class="[errors.has('ratio') ? 'has-error' : '']">
|
|
||||||
<label for="ratio" class="required">{{ __('admin::app.settings.exchange_rates.ratio') }}</label>
|
|
||||||
<input v-validate="'required'" class="control" id="ratio" name="ratio" value="{{ old('ratio') }}"/>
|
|
||||||
<span class="control-error" v-if="errors.has('ratio')">@{{ errors.first('ratio') }}</span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</accordian>
|
|
||||||
|
|
||||||
|
<td>
|
||||||
|
<div class="control-group" :class="[errors.has('target_currency') ? 'has-error' : '']">
|
||||||
|
<select v-validate="'required'" class="control" name="target_currency">
|
||||||
|
@foreach($currencies as $currency)
|
||||||
|
<option value="{{ $currency->id }}">{{ $currency->name }}</option>
|
||||||
|
@endforeach
|
||||||
|
</select>
|
||||||
|
<span class="control-error" v-if="errors.has('target_currency')">@{{ errors.first('target_currency') }}</span>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
|
||||||
|
<td>
|
||||||
|
<div class="control-group" :class="[errors.has('rate') ? 'has-error' : '']">
|
||||||
|
<input v-validate="'required'" class="control" id="rate" name="rate" value="{{ old('rate') }}"/>
|
||||||
|
<span class="control-error" v-if="errors.has('rate')">@{{ errors.first('rate') }}</span>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
|
|
|
||||||
|
|
@ -25,39 +25,51 @@
|
||||||
@csrf()
|
@csrf()
|
||||||
<input name="_method" type="hidden" value="PUT">
|
<input name="_method" type="hidden" value="PUT">
|
||||||
|
|
||||||
<accordian :title="'{{ __('admin::app.settings.exchange_rates.general') }}'" :active="true">
|
<div class="table">
|
||||||
<div slot="body">
|
<table>
|
||||||
<div class="control-group" :class="[errors.has('source_currency') ? 'has-error' : '']">
|
<thead>
|
||||||
<label for="source_currency" class="required">{{ __('admin::app.settings.exchange_rates.source_currency') }}</label>
|
<tr>
|
||||||
<select v-validate="'required'" class="control" name="source_currency">
|
<th>
|
||||||
@foreach($currencies as $currency)
|
{{ __('admin::app.settings.exchange_rates.source_currency') }}
|
||||||
<option value="{{ $currency->id }}" {{ $exchangeRate->source_currency == $currency->id ? 'selected' : '' }}>
|
</th>
|
||||||
{{ $currency->name }}
|
<th>
|
||||||
</option>
|
{{ __('admin::app.settings.exchange_rates.target_currency') }}
|
||||||
@endforeach
|
</th>
|
||||||
</select>
|
<th>
|
||||||
<span class="control-error" v-if="errors.has('source_currency')">@{{ errors.first('source_currency') }}</span>
|
{{ __('admin::app.settings.exchange_rates.rate') }}
|
||||||
</div>
|
</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
|
||||||
<div class="control-group" :class="[errors.has('target_currency') ? 'has-error' : '']">
|
<tbody>
|
||||||
<label for="target_currency" class="required">{{ __('admin::app.settings.exchange_rates.target_currency') }}</label>
|
<tr>
|
||||||
<select v-validate="'required'" class="control" name="target_currency">
|
<td>
|
||||||
@foreach($currencies as $currency)
|
{{ core()->getBaseCurrencyCode() }}
|
||||||
<option value="{{ $currency->id }}" {{ $exchangeRate->target_currency == $currency->id ? 'selected' : '' }}>
|
</td>
|
||||||
{{ $currency->name }}
|
|
||||||
</option>
|
|
||||||
@endforeach
|
|
||||||
</select>
|
|
||||||
<span class="control-error" v-if="errors.has('target_currency')">@{{ errors.first('target_currency') }}</span>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="control-group" :class="[errors.has('ratio') ? 'has-error' : '']">
|
<td>
|
||||||
<label for="ratio" class="required">{{ __('admin::app.settings.exchange_rates.ratio') }}</label>
|
<div class="control-group" :class="[errors.has('target_currency') ? 'has-error' : '']">
|
||||||
<input v-validate="'required'" class="control" id="ratio" name="ratio" value="{{ old('ratio') ?: $exchangeRate->ratio }}"/>
|
<select v-validate="'required'" class="control" name="target_currency">
|
||||||
<span class="control-error" v-if="errors.has('ratio')">@{{ errors.first('ratio') }}</span>
|
@foreach($currencies as $currency)
|
||||||
</div>
|
<option value="{{ $currency->id }}" {{ $exchangeRate->target_currency == $currency->id ? 'selected' : '' }}>
|
||||||
</div>
|
{{ $currency->name }}
|
||||||
</accordian>
|
</option>
|
||||||
|
@endforeach
|
||||||
|
</select>
|
||||||
|
<span class="control-error" v-if="errors.has('target_currency')">@{{ errors.first('target_currency') }}</span>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
|
||||||
|
<td>
|
||||||
|
<div class="control-group" :class="[errors.has('ratio') ? 'has-error' : '']">
|
||||||
|
<input v-validate="'required'" class="control" id="ratio" name="ratio" value="{{ old('ratio') ?: $exchangeRate->ratio }}"/>
|
||||||
|
<span class="control-error" v-if="errors.has('ratio')">@{{ errors.first('ratio') }}</span>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
<tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,9 @@
|
||||||
@extends('admin::layouts.content')
|
@extends('admin::layouts.content')
|
||||||
|
|
||||||
|
@section('page_title')
|
||||||
|
{{ __('admin::app.settings.locales.title') }}
|
||||||
|
@stop
|
||||||
|
|
||||||
@section('content')
|
@section('content')
|
||||||
<div class="content">
|
<div class="content">
|
||||||
<div class="page-header">
|
<div class="page-header">
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
@extends('admin::layouts.content')
|
@extends('admin::layouts.content')
|
||||||
|
|
||||||
@section('page_title')
|
@section('page_title')
|
||||||
{{ __('admin::app.configuration.tax-categories.title') }}
|
{{ __('admin::app.configuration.tax-categories.add-title') }}
|
||||||
@stop
|
@stop
|
||||||
|
|
||||||
@section('content')
|
@section('content')
|
||||||
|
|
@ -9,7 +9,7 @@
|
||||||
<form method="POST" action="{{ route('admin.tax-categories.create') }}" @submit.prevent="onSubmit">
|
<form method="POST" action="{{ route('admin.tax-categories.create') }}" @submit.prevent="onSubmit">
|
||||||
<div class="page-header">
|
<div class="page-header">
|
||||||
<div class="page-title">
|
<div class="page-title">
|
||||||
<h1>{{ __('admin::app.configuration.tax-categories.title') }}</h1>
|
<h1>{{ __('admin::app.configuration.tax-categories.add-title') }}</h1>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="page-action">
|
<div class="page-action">
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@
|
||||||
|
|
||||||
@section('content')
|
@section('content')
|
||||||
<div class="content">
|
<div class="content">
|
||||||
<form method="POST" action="{{ route('admin.tax-categories.update', $data[0][0]['id']) }}" @submit.prevent="onSubmit">
|
<form method="POST" action="{{ route('admin.tax-categories.update', $taxCategory->id) }}" @submit.prevent="onSubmit">
|
||||||
<div class="page-header">
|
<div class="page-header">
|
||||||
<div class="page-title">
|
<div class="page-title">
|
||||||
<h1>{{ __('admin::app.configuration.tax-categories.edit.title') }}</h1>
|
<h1>{{ __('admin::app.configuration.tax-categories.edit.title') }}</h1>
|
||||||
|
|
@ -32,7 +32,7 @@
|
||||||
<select class="control" name="channel">
|
<select class="control" name="channel">
|
||||||
@foreach(core()->getAllChannels() as $channelModel)
|
@foreach(core()->getAllChannels() as $channelModel)
|
||||||
|
|
||||||
<option @if($data[0][0]['channel_id'] == $channelModel->id) selected @endif value="{{ $channelModel->id }}">
|
<option @if($taxCategory->channel_id == $channelModel->id) selected @endif value="{{ $channelModel->id }}">
|
||||||
{{ $channelModel->name }}
|
{{ $channelModel->name }}
|
||||||
</option>
|
</option>
|
||||||
|
|
||||||
|
|
@ -45,7 +45,7 @@
|
||||||
<div class="control-group" :class="[errors.has('code') ? 'has-error' : '']">
|
<div class="control-group" :class="[errors.has('code') ? 'has-error' : '']">
|
||||||
<label for="code" class="required">{{ __('admin::app.configuration.tax-categories.code') }}</label>
|
<label for="code" class="required">{{ __('admin::app.configuration.tax-categories.code') }}</label>
|
||||||
|
|
||||||
<input v-validate="'required'" class="control" id="code" name="code" value="{{ $data[0][0]['code'] }}"/>
|
<input v-validate="'required'" class="control" id="code" name="code" value="{{ $taxCategory->code }}"/>
|
||||||
|
|
||||||
<span class="control-error" v-if="errors.has('code')">@{{ errors.first('code') }}</span>
|
<span class="control-error" v-if="errors.has('code')">@{{ errors.first('code') }}</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -53,7 +53,7 @@
|
||||||
<div class="control-group" :class="[errors.has('name') ? 'has-error' : '']">
|
<div class="control-group" :class="[errors.has('name') ? 'has-error' : '']">
|
||||||
<label for="name" class="required">{{ __('admin::app.configuration.tax-categories.name') }}</label>
|
<label for="name" class="required">{{ __('admin::app.configuration.tax-categories.name') }}</label>
|
||||||
|
|
||||||
<input v-validate="'required'" class="control" id="name" name="name" value="{{ $data[0][0]['name'] }}"/>
|
<input v-validate="'required'" class="control" id="name" name="name" value="{{ $taxCategory->name }}"/>
|
||||||
|
|
||||||
<span class="control-error" v-if="errors.has('name')">@{{ errors.first('name') }}</span>
|
<span class="control-error" v-if="errors.has('name')">@{{ errors.first('name') }}</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -61,7 +61,7 @@
|
||||||
<div class="control-group" :class="[errors.has('description') ? 'has-error' : '']">
|
<div class="control-group" :class="[errors.has('description') ? 'has-error' : '']">
|
||||||
<label for="description" class="required">{{ __('admin::app.configuration.tax-categories.description') }}</label>
|
<label for="description" class="required">{{ __('admin::app.configuration.tax-categories.description') }}</label>
|
||||||
|
|
||||||
<textarea v-validate="'required'" class="control" id="description" name="description">{{ $data[0][0]['description'] }}</textarea>
|
<textarea v-validate="'required'" class="control" id="description" name="description">{{ $taxCategory->description }}</textarea>
|
||||||
|
|
||||||
<span class="control-error" v-if="errors.has('description')">@{{ errors.first('description') }}</span>
|
<span class="control-error" v-if="errors.has('description')">@{{ errors.first('description') }}</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -74,12 +74,7 @@
|
||||||
<select multiple="multiple" class="control" id="taxrates" name="taxrates[]" v-validate="'required'">
|
<select multiple="multiple" class="control" id="taxrates" name="taxrates[]" v-validate="'required'">
|
||||||
@foreach($taxRates->all() as $taxRate)
|
@foreach($taxRates->all() as $taxRate)
|
||||||
|
|
||||||
<option value="{{ $taxRate->id }}"
|
<option value="{{ $taxRate->id }}" {{ is_numeric($taxCategory->pluck('id')->search($taxRate->id)) ? 'selected' : '' }}>
|
||||||
@foreach($data[1] as $selectedRate)
|
|
||||||
@if($taxRate->id == $selectedRate['id'])
|
|
||||||
selected
|
|
||||||
@endif
|
|
||||||
@endforeach>
|
|
||||||
{{ $taxRate->identifier }}
|
{{ $taxRate->identifier }}
|
||||||
</option>
|
</option>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,21 +1,25 @@
|
||||||
@extends('admin::layouts.content')
|
@extends('admin::layouts.content')
|
||||||
|
|
||||||
|
@section('page_title')
|
||||||
|
{{ __('admin::app.configuration.tax-categories.title') }}
|
||||||
|
@stop
|
||||||
|
|
||||||
@section('content')
|
@section('content')
|
||||||
<div class="content">
|
<div class="content">
|
||||||
<div class="page-header">
|
<div class="page-header">
|
||||||
<div class="page-title">
|
<div class="page-title">
|
||||||
<h1>{{ __('admin::app.configuration.tax.title') }}</h1>
|
<h1>{{ __('admin::app.configuration.tax-categories.title') }}</h1>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="page-action">
|
<div class="page-action">
|
||||||
<a href="{{ route('admin.tax-categories.show') }}" class="btn btn-lg btn-primary">
|
<a href="{{ route('admin.tax-categories.show') }}" class="btn btn-lg btn-primary">
|
||||||
{{ __('admin::app.configuration.tax.add-title') }}
|
{{ __('admin::app.configuration.tax-categories.add-title') }}
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="page-content">
|
<div class="page-content">
|
||||||
@inject('taxCategories','Webkul\Admin\DataGrids\TaxRuleDataGrid')
|
@inject('taxCategories','Webkul\Admin\DataGrids\TaxCategoryDataGrid')
|
||||||
{!! $taxCategories->render() !!}
|
{!! $taxCategories->render() !!}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
@extends('admin::layouts.content')
|
@extends('admin::layouts.content')
|
||||||
|
|
||||||
@section('page_title')
|
@section('page_title')
|
||||||
{{ __('admin::app.configuration.tax-rates.title') }}
|
{{ __('admin::app.configuration.tax-rates.add-title') }}
|
||||||
@stop
|
@stop
|
||||||
|
|
||||||
@section('content')
|
@section('content')
|
||||||
|
|
@ -9,7 +9,7 @@
|
||||||
<form method="POST" action="{{ route('admin.tax-rates.create') }}" @submit.prevent="onSubmit">
|
<form method="POST" action="{{ route('admin.tax-rates.create') }}" @submit.prevent="onSubmit">
|
||||||
<div class="page-header">
|
<div class="page-header">
|
||||||
<div class="page-title">
|
<div class="page-title">
|
||||||
<h1>{{ __('admin::app.configuration.tax-rates.title') }}</h1>
|
<h1>{{ __('admin::app.configuration.tax-rates.add-title') }}</h1>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="page-action">
|
<div class="page-action">
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
@extends('admin::layouts.content')
|
@extends('admin::layouts.content')
|
||||||
|
|
||||||
@section('page_title')
|
@section('page_title')
|
||||||
{{ __('admin::app.configuration.tax-rates.title') }}
|
{{ __('admin::app.configuration.tax-rates.edit-title') }}
|
||||||
@stop
|
@stop
|
||||||
|
|
||||||
@section('content')
|
@section('content')
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,7 @@
|
||||||
|
|
||||||
<div class="page-action">
|
<div class="page-action">
|
||||||
<a href="{{ route('admin.tax-rates.show') }}" class="btn btn-lg btn-primary">
|
<a href="{{ route('admin.tax-rates.show') }}" class="btn btn-lg btn-primary">
|
||||||
{{ __('admin::app.configuration.tax-rates.title') }}
|
{{ __('admin::app.configuration.tax-rates.add-title') }}
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,9 @@
|
||||||
@extends('admin::layouts.content')
|
@extends('admin::layouts.content')
|
||||||
|
|
||||||
|
@section('page_title')
|
||||||
|
{{ __('admin::app.users.roles.title') }}
|
||||||
|
@stop
|
||||||
|
|
||||||
@section('content')
|
@section('content')
|
||||||
<div class="content">
|
<div class="content">
|
||||||
<div class="page-header">
|
<div class="page-header">
|
||||||
|
|
|
||||||
|
|
@ -164,7 +164,7 @@ class AttributeTableSeeder extends Seeder
|
||||||
'position' => 11,
|
'position' => 11,
|
||||||
'is_required' => 1,
|
'is_required' => 1,
|
||||||
'value_per_locale' => 0,
|
'value_per_locale' => 0,
|
||||||
'value_per_channel' => 1,
|
'value_per_channel' => 0,
|
||||||
'is_filterable' => 1,
|
'is_filterable' => 1,
|
||||||
'is_configurable' => 0,
|
'is_configurable' => 0,
|
||||||
'is_user_defined' => 0
|
'is_user_defined' => 0
|
||||||
|
|
@ -192,7 +192,7 @@ class AttributeTableSeeder extends Seeder
|
||||||
'position' => 13,
|
'position' => 13,
|
||||||
'is_required' => 0,
|
'is_required' => 0,
|
||||||
'value_per_locale' => 0,
|
'value_per_locale' => 0,
|
||||||
'value_per_channel' => 1,
|
'value_per_channel' => 0,
|
||||||
'is_filterable' => 0,
|
'is_filterable' => 0,
|
||||||
'is_configurable' => 0,
|
'is_configurable' => 0,
|
||||||
'is_user_defined' => 0
|
'is_user_defined' => 0
|
||||||
|
|
|
||||||
|
|
@ -127,6 +127,16 @@ class AttributeController extends Controller
|
||||||
*/
|
*/
|
||||||
public function destroy($id)
|
public function destroy($id)
|
||||||
{
|
{
|
||||||
//
|
$attribute = $this->attribute->findOrFail($id);
|
||||||
|
|
||||||
|
if(!$attribute->is_user_defined) {
|
||||||
|
session()->flash('error', 'Can not delete system attribute.');
|
||||||
|
} else {
|
||||||
|
$this->attribute->delete($id);
|
||||||
|
|
||||||
|
session()->flash('success', 'Attribute deleted successfully.');
|
||||||
|
}
|
||||||
|
|
||||||
|
return redirect()->back();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -135,6 +135,14 @@ class AttributeFamilyController extends Controller
|
||||||
*/
|
*/
|
||||||
public function destroy($id)
|
public function destroy($id)
|
||||||
{
|
{
|
||||||
//
|
if($this->attributeFamily->count() == 1) {
|
||||||
|
session()->flash('error', 'At least one family is required.');
|
||||||
|
} else {
|
||||||
|
$this->attributeFamily->delete($id);
|
||||||
|
|
||||||
|
session()->flash('success', 'Family deleted successfully.');
|
||||||
|
}
|
||||||
|
|
||||||
|
return redirect()->back();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -4,7 +4,6 @@ namespace Webkul\Attribute\Providers;
|
||||||
|
|
||||||
use Illuminate\Support\ServiceProvider;
|
use Illuminate\Support\ServiceProvider;
|
||||||
use Illuminate\Routing\Router;
|
use Illuminate\Routing\Router;
|
||||||
use Webkul\User\Http\Middleware\RedirectIfNotAdmin;
|
|
||||||
|
|
||||||
class AttributeServiceProvider extends ServiceProvider
|
class AttributeServiceProvider extends ServiceProvider
|
||||||
{
|
{
|
||||||
|
|
@ -15,8 +14,6 @@ class AttributeServiceProvider extends ServiceProvider
|
||||||
*/
|
*/
|
||||||
public function boot(Router $router)
|
public function boot(Router $router)
|
||||||
{
|
{
|
||||||
$router->aliasMiddleware('admin', RedirectIfNotAdmin::class);
|
|
||||||
|
|
||||||
$this->loadMigrationsFrom(__DIR__ . '/../Database/Migrations');
|
$this->loadMigrationsFrom(__DIR__ . '/../Database/Migrations');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -133,6 +133,6 @@ class CategoryController extends Controller
|
||||||
*/
|
*/
|
||||||
public function destroy($id)
|
public function destroy($id)
|
||||||
{
|
{
|
||||||
//
|
$this->category->delete($id);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -11,5 +11,5 @@ class Category extends TranslatableModel
|
||||||
|
|
||||||
public $translatedAttributes = ['name', 'description', 'slug', 'meta_title', 'meta_description', 'meta_keywords'];
|
public $translatedAttributes = ['name', 'description', 'slug', 'meta_title', 'meta_description', 'meta_keywords'];
|
||||||
|
|
||||||
protected $fillable = ['position', 'status', 'parent_id'];
|
protected $fillable = ['position', 'status', 'parent_id','image'];
|
||||||
}
|
}
|
||||||
|
|
@ -5,7 +5,6 @@ namespace Webkul\Category\Providers;
|
||||||
use Illuminate\Support\ServiceProvider;
|
use Illuminate\Support\ServiceProvider;
|
||||||
use Illuminate\Foundation\AliasLoader;
|
use Illuminate\Foundation\AliasLoader;
|
||||||
use Illuminate\Routing\Router;
|
use Illuminate\Routing\Router;
|
||||||
use Webkul\User\Http\Middleware\RedirectIfNotAdmin;
|
|
||||||
|
|
||||||
class CategoryServiceProvider extends ServiceProvider
|
class CategoryServiceProvider extends ServiceProvider
|
||||||
{
|
{
|
||||||
|
|
@ -16,8 +15,6 @@ class CategoryServiceProvider extends ServiceProvider
|
||||||
*/
|
*/
|
||||||
public function boot(Router $router)
|
public function boot(Router $router)
|
||||||
{
|
{
|
||||||
$router->aliasMiddleware('admin', RedirectIfNotAdmin::class);
|
|
||||||
|
|
||||||
$this->loadMigrationsFrom(__DIR__ . '/../Database/Migrations');
|
$this->loadMigrationsFrom(__DIR__ . '/../Database/Migrations');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -107,8 +107,6 @@ class Cart {
|
||||||
{
|
{
|
||||||
$product = $this->product->findOneByField('id', $productId);
|
$product = $this->product->findOneByField('id', $productId);
|
||||||
|
|
||||||
// dd($product);
|
|
||||||
|
|
||||||
//Check if the product's information is proper or not.
|
//Check if the product's information is proper or not.
|
||||||
if(!isset($data['product']) || !isset($data['quantity'])) {
|
if(!isset($data['product']) || !isset($data['quantity'])) {
|
||||||
session()->flash('error', trans('shop::app.checkout.cart.integrity.missing_fields'));
|
session()->flash('error', trans('shop::app.checkout.cart.integrity.missing_fields'));
|
||||||
|
|
@ -300,8 +298,8 @@ class Cart {
|
||||||
//set the currency column with the respective currency
|
//set the currency column with the respective currency
|
||||||
$cartData['global_currency_code'] = core()->getBaseCurrencyCode();
|
$cartData['global_currency_code'] = core()->getBaseCurrencyCode();
|
||||||
$cartData['base_currency_code'] = core()->getBaseCurrencyCode();
|
$cartData['base_currency_code'] = core()->getBaseCurrencyCode();
|
||||||
$cartData['channel_currency_code'] = core()->getBaseCurrencyCode();
|
$cartData['channel_currency_code'] = core()->getChannelBaseCurrencyCode();
|
||||||
$cartData['cart_currency_code'] = core()->getBaseCurrencyCode();
|
$cartData['cart_currency_code'] = core()->getCurrentCurrencyCode();
|
||||||
//set the cart items and quantity
|
//set the cart items and quantity
|
||||||
$cartData['items_count'] = 1;
|
$cartData['items_count'] = 1;
|
||||||
$cartData['items_qty'] = $data['quantity'];
|
$cartData['items_qty'] = $data['quantity'];
|
||||||
|
|
@ -961,4 +959,24 @@ class Cart {
|
||||||
|
|
||||||
return $finalData;
|
return $finalData;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Move to Cart
|
||||||
|
*
|
||||||
|
* Move a wishlist item to cart
|
||||||
|
*/
|
||||||
|
public function moveToCart($productId) {
|
||||||
|
$data = [
|
||||||
|
'product' => $productId,
|
||||||
|
'quantity' => 1,
|
||||||
|
];
|
||||||
|
|
||||||
|
$result = $this->add($productId, $data);
|
||||||
|
|
||||||
|
if($result instanceof Collection || $result == true) {
|
||||||
|
return true;
|
||||||
|
} else {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -9,7 +9,7 @@ use Webkul\Checkout\Repositories\CartRepository;
|
||||||
use Webkul\Checkout\Repositories\CartItemRepository;
|
use Webkul\Checkout\Repositories\CartItemRepository;
|
||||||
|
|
||||||
//Product Image Helper Class
|
//Product Image Helper Class
|
||||||
use Webkul\Product\Product\ProductImage;
|
use Webkul\Product\Helpers\ProductImage;
|
||||||
|
|
||||||
use Cart;
|
use Cart;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,6 @@ use Illuminate\Support\ServiceProvider;
|
||||||
use Illuminate\Support\Facades\Validator;
|
use Illuminate\Support\Facades\Validator;
|
||||||
use Illuminate\Routing\Router;
|
use Illuminate\Routing\Router;
|
||||||
use Illuminate\Foundation\AliasLoader;
|
use Illuminate\Foundation\AliasLoader;
|
||||||
use Webkul\User\Http\Middleware\RedirectIfNotAdmin;
|
|
||||||
use Webkul\Customer\Http\Middleware\RedirectIfNotCustomer;
|
use Webkul\Customer\Http\Middleware\RedirectIfNotCustomer;
|
||||||
use Webkul\Checkout\Facades\Cart;
|
use Webkul\Checkout\Facades\Cart;
|
||||||
use Webkul\Checkout\Providers\ComposerServiceProvider;
|
use Webkul\Checkout\Providers\ComposerServiceProvider;
|
||||||
|
|
@ -19,10 +18,6 @@ class CheckoutServiceProvider extends ServiceProvider
|
||||||
include __DIR__ . '/../Http/helpers.php';
|
include __DIR__ . '/../Http/helpers.php';
|
||||||
|
|
||||||
$this->loadMigrationsFrom(__DIR__ . '/../Database/Migrations');
|
$this->loadMigrationsFrom(__DIR__ . '/../Database/Migrations');
|
||||||
|
|
||||||
$router->aliasMiddleware('admin', RedirectIfNotAdmin::class);
|
|
||||||
|
|
||||||
$router->aliasMiddleware('customer', RedirectIfNotCustomer::class);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -3,63 +3,80 @@
|
||||||
namespace Webkul\Core;
|
namespace Webkul\Core;
|
||||||
|
|
||||||
use Carbon\Carbon;
|
use Carbon\Carbon;
|
||||||
use Webkul\Core\Models\Channel as ChannelModel;
|
|
||||||
use Webkul\Core\Models\Locale as LocaleModel;
|
|
||||||
use Webkul\Core\Models\Currency as CurrencyModel;
|
|
||||||
use Webkul\Core\Models\TaxCategory as TaxCategory;
|
|
||||||
use Webkul\Core\Models\TaxRate as TaxRate;
|
|
||||||
use Webkul\Core\Repositories\CurrencyRepository;
|
use Webkul\Core\Repositories\CurrencyRepository;
|
||||||
use Webkul\Core\Repositories\ExchangeRateRepository;
|
use Webkul\Core\Repositories\ExchangeRateRepository;
|
||||||
use Webkul\Core\Repositories\CountryRepository;
|
use Webkul\Core\Repositories\CountryRepository;
|
||||||
use Webkul\Core\Repositories\CountryStateRepository;
|
use Webkul\Core\Repositories\CountryStateRepository;
|
||||||
|
use Webkul\Core\Repositories\ChannelRepository;
|
||||||
|
use Webkul\Core\Repositories\LocaleRepository;
|
||||||
use Illuminate\Support\Facades\Config;
|
use Illuminate\Support\Facades\Config;
|
||||||
|
|
||||||
class Core
|
class Core
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* CurrencyRepository model
|
* ChannelRepository class
|
||||||
|
*
|
||||||
|
* @var mixed
|
||||||
|
*/
|
||||||
|
protected $channelRepository;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* CurrencyRepository class
|
||||||
*
|
*
|
||||||
* @var mixed
|
* @var mixed
|
||||||
*/
|
*/
|
||||||
protected $currencyRepository;
|
protected $currencyRepository;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ExchangeRateRepository model
|
* ExchangeRateRepository class
|
||||||
*
|
*
|
||||||
* @var mixed
|
* @var mixed
|
||||||
*/
|
*/
|
||||||
protected $exchangeRateRepository;
|
protected $exchangeRateRepository;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* CountryRepository model
|
* CountryRepository class
|
||||||
*
|
*
|
||||||
* @var mixed
|
* @var mixed
|
||||||
*/
|
*/
|
||||||
protected $countryRepository;
|
protected $countryRepository;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* CountryStateRepository model
|
* CountryStateRepository class
|
||||||
*
|
*
|
||||||
* @var mixed
|
* @var mixed
|
||||||
*/
|
*/
|
||||||
protected $countryStateRepository;
|
protected $countryStateRepository;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* LocaleRepository class
|
||||||
|
*
|
||||||
|
* @var mixed
|
||||||
|
*/
|
||||||
|
protected $localeRepository;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create a new instance.
|
* Create a new instance.
|
||||||
*
|
*
|
||||||
|
* @param Webkul\Core\Repositories\ChannelRepository $channelRepository
|
||||||
* @param Webkul\Core\Repositories\CurrencyRepository $currencyRepository
|
* @param Webkul\Core\Repositories\CurrencyRepository $currencyRepository
|
||||||
* @param Webkul\Core\Repositories\ExchangeRateRepository $exchangeRateRepository
|
* @param Webkul\Core\Repositories\ExchangeRateRepository $exchangeRateRepository
|
||||||
* @param Webkul\Core\Repositories\CountryRepository $countryRepository
|
* @param Webkul\Core\Repositories\CountryRepository $countryRepository
|
||||||
* @param Webkul\Core\Repositories\CountryStateRepository $countryStateRepository
|
* @param Webkul\Core\Repositories\CountryStateRepository $countryStateRepository
|
||||||
|
* @param Webkul\Core\Repositories\LocaleRepository $localeRepository
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function __construct(
|
public function __construct(
|
||||||
|
ChannelRepository $channelRepository,
|
||||||
CurrencyRepository $currencyRepository,
|
CurrencyRepository $currencyRepository,
|
||||||
ExchangeRateRepository $exchangeRateRepository,
|
ExchangeRateRepository $exchangeRateRepository,
|
||||||
CountryRepository $countryRepository,
|
CountryRepository $countryRepository,
|
||||||
CountryStateRepository $countryStateRepository
|
CountryStateRepository $countryStateRepository,
|
||||||
|
LocaleRepository $localeRepository
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
$this->channelRepository = $channelRepository;
|
||||||
|
|
||||||
$this->currencyRepository = $currencyRepository;
|
$this->currencyRepository = $currencyRepository;
|
||||||
|
|
||||||
$this->exchangeRateRepository = $exchangeRateRepository;
|
$this->exchangeRateRepository = $exchangeRateRepository;
|
||||||
|
|
@ -67,6 +84,8 @@ class Core
|
||||||
$this->countryRepository = $countryRepository;
|
$this->countryRepository = $countryRepository;
|
||||||
|
|
||||||
$this->countryStateRepository = $countryStateRepository;
|
$this->countryStateRepository = $countryStateRepository;
|
||||||
|
|
||||||
|
$this->localeRepository = $localeRepository;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -80,7 +99,7 @@ class Core
|
||||||
if($channels)
|
if($channels)
|
||||||
return $channels;
|
return $channels;
|
||||||
|
|
||||||
return $channels = ChannelModel::all();
|
return $channels = $this->channelRepository->all();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -94,7 +113,7 @@ class Core
|
||||||
if($channel)
|
if($channel)
|
||||||
return $channel;
|
return $channel;
|
||||||
|
|
||||||
return $channel = ChannelModel::first();
|
return $channel = $this->channelRepository->first();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -122,7 +141,7 @@ class Core
|
||||||
if($channel)
|
if($channel)
|
||||||
return $channel;
|
return $channel;
|
||||||
|
|
||||||
return $channel = ChannelModel::first();
|
return $channel = $this->channelRepository->first();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -150,7 +169,7 @@ class Core
|
||||||
if($locales)
|
if($locales)
|
||||||
return $locales;
|
return $locales;
|
||||||
|
|
||||||
return $locales = LocaleModel::all();
|
return $locales = $this->localeRepository->all();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -165,7 +184,7 @@ class Core
|
||||||
if($currencies)
|
if($currencies)
|
||||||
return $currencies;
|
return $currencies;
|
||||||
|
|
||||||
return $currencies = CurrencyModel::all();
|
return $currencies = $this->currencyRepository->all();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -180,9 +199,12 @@ class Core
|
||||||
if($currency)
|
if($currency)
|
||||||
return $currency;
|
return $currency;
|
||||||
|
|
||||||
$currenctChannel = $this->getCurrentChannel();
|
$baseCurrency = $this->currencyRepository->findOneByField('code', config('app.currency'));
|
||||||
|
|
||||||
return $currency = $currenctChannel->base_currency;
|
if(!$baseCurrency)
|
||||||
|
$baseCurrency = $this->currencyRepository->first();
|
||||||
|
|
||||||
|
return $currency = $baseCurrency;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -212,7 +234,54 @@ class Core
|
||||||
if($currencySymbol)
|
if($currencySymbol)
|
||||||
return $currencySymbol;
|
return $currencySymbol;
|
||||||
|
|
||||||
return $currencySymbol = $this->getCurrentCurrency()->symbol;
|
return $currencySymbol = $this->getBaseCurrency()->symbol ?? $this->getBaseCurrencyCode();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns base channel's currency model
|
||||||
|
*
|
||||||
|
* @return mixed
|
||||||
|
*/
|
||||||
|
public function getChannelBaseCurrency()
|
||||||
|
{
|
||||||
|
static $currency;
|
||||||
|
|
||||||
|
if($currency)
|
||||||
|
return $currency;
|
||||||
|
|
||||||
|
$currenctChannel = $this->getCurrentChannel();
|
||||||
|
|
||||||
|
return $currency = $currenctChannel->base_currency;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns base channel's currency code
|
||||||
|
*
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
public function getChannelBaseCurrencyCode()
|
||||||
|
{
|
||||||
|
static $currencyCode;
|
||||||
|
|
||||||
|
if($currencyCode)
|
||||||
|
return $currencyCode;
|
||||||
|
|
||||||
|
return ($currency = $this->getChannelBaseCurrency()) ? $currencyCode = $currency->code : '';
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns base channel's currency symbol
|
||||||
|
*
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
public function getChannelBaseCurrencySymbol()
|
||||||
|
{
|
||||||
|
static $currencySymbol;
|
||||||
|
|
||||||
|
if($currencySymbol)
|
||||||
|
return $currencySymbol;
|
||||||
|
|
||||||
|
return $currencySymbol = $this->getChannelBaseCurrency()->symbol;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -227,7 +296,7 @@ class Core
|
||||||
if($currency)
|
if($currency)
|
||||||
return $currency;
|
return $currency;
|
||||||
|
|
||||||
return $currency = CurrencyModel::first();
|
return $currency = $this->currencyRepository->first();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -261,39 +330,29 @@ class Core
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Convert price with currency symbol
|
* Converts price
|
||||||
*
|
*
|
||||||
* @param float $price
|
* @param float $price
|
||||||
* @return string
|
* @param string $targetCurrencyCode
|
||||||
|
* @return string
|
||||||
*/
|
*/
|
||||||
public function convertPrice($amount, $sourceCurrencyCode = null, $targetCurrencyCode = null)
|
public function convertPrice($amount, $targetCurrencyCode = null)
|
||||||
{
|
{
|
||||||
$sourceCurrency = !$sourceCurrencyCode
|
|
||||||
? $this->getBaseCurrency()
|
|
||||||
: $this->currencyRepository->findByField('code', $sourceCurrencyCode);
|
|
||||||
|
|
||||||
$targetCurrency = !$targetCurrencyCode
|
$targetCurrency = !$targetCurrencyCode
|
||||||
? $this->getCurrentCurrency()
|
? $this->getCurrentCurrency()
|
||||||
: $this->currencyRepository->findByField('code', $targetCurrencyCode);
|
: $this->currencyRepository->findByField('code', $targetCurrencyCode);
|
||||||
|
|
||||||
if(!$sourceCurrency || !$sourceCurrency)
|
if(!$targetCurrency)
|
||||||
return $amount;
|
|
||||||
|
|
||||||
if ($sourceCurrency->code === $targetCurrency->code)
|
|
||||||
return $amount;
|
return $amount;
|
||||||
|
|
||||||
$exchangeRate = $this->exchangeRateRepository->findOneWhere([
|
$exchangeRate = $this->exchangeRateRepository->findOneWhere([
|
||||||
'source_currency' => $sourceCurrency->id,
|
|
||||||
'target_currency' => $targetCurrency->id,
|
'target_currency' => $targetCurrency->id,
|
||||||
]);
|
]);
|
||||||
|
|
||||||
if (null === $exchangeRate)
|
if (null === $exchangeRate)
|
||||||
return $amount;
|
return $amount;
|
||||||
|
|
||||||
if ($exchangeRate->source_currency->code === $sourceCurrencyCode)
|
return (float) round($amount * $exchangeRate->rate);
|
||||||
return (float) round($amount * $exchangeRate->ratio);
|
|
||||||
|
|
||||||
return (float) round($amount / $exchangeRate->ratio);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -406,27 +465,6 @@ class Core
|
||||||
return preg_replace('#[ 0:-]#', '', $date) === '';
|
return preg_replace('#[ 0:-]#', '', $date) === '';
|
||||||
}
|
}
|
||||||
|
|
||||||
// $timezonelist = \DateTimeZone::listIdentifiers(\DateTimeZone::ALL);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Find all the tax rates associated with a tax category.
|
|
||||||
*
|
|
||||||
* @return Array
|
|
||||||
*/
|
|
||||||
|
|
||||||
public function withRates($id) {
|
|
||||||
return TaxCategory::findOrFail($id)->tax_rates;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* To fetch all tax rates.
|
|
||||||
*
|
|
||||||
* @return Collection
|
|
||||||
*/
|
|
||||||
public function getAllTaxRates() {
|
|
||||||
return TaxRate::all();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Format date using current channel.
|
* Format date using current channel.
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -15,10 +15,9 @@ class CreateCurrencyExchangeRatesTable extends Migration
|
||||||
{
|
{
|
||||||
Schema::create('currency_exchange_rates', function (Blueprint $table) {
|
Schema::create('currency_exchange_rates', function (Blueprint $table) {
|
||||||
$table->increments('id');
|
$table->increments('id');
|
||||||
$table->integer('source_currency')->unsigned();
|
$table->decimal('rate', 10, 5);
|
||||||
|
|
||||||
$table->integer('target_currency')->unsigned();
|
$table->integer('target_currency')->unsigned();
|
||||||
$table->decimal('ratio', 10, 5);
|
|
||||||
$table->foreign('source_currency')->references('id')->on('currencies')->onDelete('cascade');
|
|
||||||
$table->foreign('target_currency')->references('id')->on('currencies')->onDelete('cascade');
|
$table->foreign('target_currency')->references('id')->on('currencies')->onDelete('cascade');
|
||||||
$table->timestamps();
|
$table->timestamps();
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -82,6 +82,14 @@ abstract class Repository extends BaseRepository {
|
||||||
return $this->parserResult($model);
|
return $this->parserResult($model);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return mixed
|
||||||
|
*/
|
||||||
|
public function count()
|
||||||
|
{
|
||||||
|
return $this->model->count();
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return mixed
|
* @return mixed
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -133,6 +133,14 @@ class ChannelController extends Controller
|
||||||
*/
|
*/
|
||||||
public function destroy($id)
|
public function destroy($id)
|
||||||
{
|
{
|
||||||
//
|
if($this->channel->count() == 1) {
|
||||||
|
session()->flash('error', 'At least one channel is required.');
|
||||||
|
} else {
|
||||||
|
$this->channel->delete($id);
|
||||||
|
|
||||||
|
session()->flash('success', 'Channel deleted successfully.');
|
||||||
|
}
|
||||||
|
|
||||||
|
return redirect()->back();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -92,6 +92,14 @@ class CurrencyController extends Controller
|
||||||
*/
|
*/
|
||||||
public function destroy($id)
|
public function destroy($id)
|
||||||
{
|
{
|
||||||
//
|
if($this->currency->count() == 1) {
|
||||||
|
session()->flash('error', 'At least one currency is required.');
|
||||||
|
} else {
|
||||||
|
$this->currency->delete($id);
|
||||||
|
|
||||||
|
session()->flash('success', 'Currency deleted successfully.');
|
||||||
|
}
|
||||||
|
|
||||||
|
return redirect()->back();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -84,15 +84,9 @@ class ExchangeRateController extends Controller
|
||||||
*/
|
*/
|
||||||
public function store(Request $request)
|
public function store(Request $request)
|
||||||
{
|
{
|
||||||
$sourceCurrency = request()->get('source_currency');
|
|
||||||
$this->validate(request(), [
|
$this->validate(request(), [
|
||||||
'source_currency' => 'required',
|
'target_currency' => 'required',
|
||||||
'target_currency' => ['required', function ($attribute, $value, $fail) use ($sourceCurrency) {
|
'rate' => 'required|numeric'
|
||||||
if ($value == $sourceCurrency) {
|
|
||||||
$fail('The :attribute value should be different from source currency.');
|
|
||||||
}
|
|
||||||
}],
|
|
||||||
'ratio' => 'required|numeric'
|
|
||||||
]);
|
]);
|
||||||
|
|
||||||
$this->exchangeRate->create(request()->all());
|
$this->exchangeRate->create(request()->all());
|
||||||
|
|
@ -127,7 +121,6 @@ class ExchangeRateController extends Controller
|
||||||
public function update(Request $request, $id)
|
public function update(Request $request, $id)
|
||||||
{
|
{
|
||||||
$this->validate(request(), [
|
$this->validate(request(), [
|
||||||
'source_currency' => 'required',
|
|
||||||
'target_currency' => 'required',
|
'target_currency' => 'required',
|
||||||
'ratio' => 'required|numeric'
|
'ratio' => 'required|numeric'
|
||||||
]);
|
]);
|
||||||
|
|
@ -147,6 +140,6 @@ class ExchangeRateController extends Controller
|
||||||
*/
|
*/
|
||||||
public function destroy($id)
|
public function destroy($id)
|
||||||
{
|
{
|
||||||
//
|
$this->exchangeRate->delete($id);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -91,6 +91,14 @@ class LocaleController extends Controller
|
||||||
*/
|
*/
|
||||||
public function destroy($id)
|
public function destroy($id)
|
||||||
{
|
{
|
||||||
//
|
if($this->locale->count() == 1) {
|
||||||
|
session()->flash('error', 'At least one locale is required.');
|
||||||
|
} else {
|
||||||
|
$this->locale->delete($id);
|
||||||
|
|
||||||
|
session()->flash('success', 'Locale deleted successfully.');
|
||||||
|
}
|
||||||
|
|
||||||
|
return redirect()->back();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -12,6 +12,6 @@ class CurrencyExchangeRate extends Model
|
||||||
* @var array
|
* @var array
|
||||||
*/
|
*/
|
||||||
protected $fillable = [
|
protected $fillable = [
|
||||||
'source_currency', 'target_currency', 'ratio'
|
'target_currency', 'rate'
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
@ -18,19 +18,15 @@ class CoreServiceProvider extends ServiceProvider
|
||||||
public function boot(Router $router)
|
public function boot(Router $router)
|
||||||
{
|
{
|
||||||
include __DIR__ . '/../Http/helpers.php';
|
include __DIR__ . '/../Http/helpers.php';
|
||||||
|
|
||||||
$this->loadMigrationsFrom(__DIR__ . '/../Database/Migrations');
|
$this->loadMigrationsFrom(__DIR__ . '/../Database/Migrations');
|
||||||
|
|
||||||
$this->loadTranslationsFrom(__DIR__ . '/../Resources/lang', 'core');
|
$this->loadTranslationsFrom(__DIR__ . '/../Resources/lang', 'core');
|
||||||
|
|
||||||
$router->aliasMiddleware('locale', Locale::class);
|
$router->aliasMiddleware('locale', Locale::class);
|
||||||
|
|
||||||
$router->aliasMiddleware('admin', RedirectIfNotAdmin::class);
|
|
||||||
|
|
||||||
$router->aliasMiddleware('customer', RedirectIfNotCustomer::class);
|
|
||||||
|
|
||||||
// $this->publishes([
|
|
||||||
// __DIR__ . '/../../publishable/lang' => public_path('vendor/webkul/core/lang'),
|
|
||||||
// ], 'public');
|
|
||||||
|
|
||||||
Validator::extend('slug', 'Webkul\Core\Contracts\Validations\Slug@passes');
|
Validator::extend('slug', 'Webkul\Core\Contracts\Validations\Slug@passes');
|
||||||
|
|
||||||
Validator::extend('code', 'Webkul\Core\Contracts\Validations\Code@passes');
|
Validator::extend('code', 'Webkul\Core\Contracts\Validations\Code@passes');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,61 +0,0 @@
|
||||||
<?php
|
|
||||||
|
|
||||||
namespace Webkul\Customer\Http\Controllers;
|
|
||||||
|
|
||||||
use Illuminate\Http\Request;
|
|
||||||
use Illuminate\Http\Response;
|
|
||||||
use Webkul\Customer\Repositories\CustomerRepository;
|
|
||||||
use Webkul\Sales\Repositories\OrderRepository;
|
|
||||||
use Auth;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Customer controlller for the customer
|
|
||||||
* basically for the tasks of customers
|
|
||||||
* which will be done after customer
|
|
||||||
* authenticastion.
|
|
||||||
*
|
|
||||||
* @author Prashant Singh <prashant.singh852@webkul.com>
|
|
||||||
* @copyright 2018 Webkul Software Pvt Ltd (http://www.webkul.com)
|
|
||||||
*/
|
|
||||||
class OrdersController extends Controller
|
|
||||||
{
|
|
||||||
/**
|
|
||||||
* Display a listing of the resource.
|
|
||||||
*
|
|
||||||
* @return \Illuminate\Http\Response
|
|
||||||
*/
|
|
||||||
protected $_config;
|
|
||||||
protected $customer;
|
|
||||||
protected $order;
|
|
||||||
|
|
||||||
|
|
||||||
public function __construct(CustomerRepository $customer ,OrderRepository $order)
|
|
||||||
{
|
|
||||||
$this->middleware('customer');
|
|
||||||
|
|
||||||
$this->_config = request('_config');
|
|
||||||
|
|
||||||
$this->customer = $customer;
|
|
||||||
|
|
||||||
$this->order = $order;
|
|
||||||
}
|
|
||||||
|
|
||||||
public function index() {
|
|
||||||
$id = auth()->guard('customer')->user()->id;
|
|
||||||
|
|
||||||
$customer = $this->getCustomer($id);
|
|
||||||
|
|
||||||
return view($this->_config['view'])->with('customer', $customer);
|
|
||||||
}
|
|
||||||
|
|
||||||
public function orders() {
|
|
||||||
|
|
||||||
$id = auth()->guard('customer')->user()->id;
|
|
||||||
|
|
||||||
$orders = $this->order->customerOrder($id);
|
|
||||||
|
|
||||||
return view($this->_config['view'],compact('orders'));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -5,7 +5,9 @@ namespace Webkul\Customer\Http\Controllers;
|
||||||
use Illuminate\Http\Request;
|
use Illuminate\Http\Request;
|
||||||
use Illuminate\Http\Response;
|
use Illuminate\Http\Response;
|
||||||
use Webkul\Customer\Repositories\CustomerRepository;
|
use Webkul\Customer\Repositories\CustomerRepository;
|
||||||
|
use Webkul\Product\Repositories\ProductRepository;
|
||||||
use Webkul\Customer\Repositories\WishlistRepository;
|
use Webkul\Customer\Repositories\WishlistRepository;
|
||||||
|
use Cart;
|
||||||
use Auth;
|
use Auth;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -26,13 +28,15 @@ class WishlistController extends Controller
|
||||||
|
|
||||||
protected $wishlist;
|
protected $wishlist;
|
||||||
|
|
||||||
|
protected $product;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Initializes the required repository instances.
|
* Initializes the required repository instances.
|
||||||
*
|
*
|
||||||
* @param $customer
|
* @param $customer
|
||||||
* @param $wishlist
|
* @param $wishlist
|
||||||
*/
|
*/
|
||||||
public function __construct(CustomerRepository $customer, WishlistRepository $wishlist)
|
public function __construct(CustomerRepository $customer, WishlistRepository $wishlist, ProductRepository $product)
|
||||||
{
|
{
|
||||||
$this->middleware('customer');
|
$this->middleware('customer');
|
||||||
|
|
||||||
|
|
@ -41,6 +45,8 @@ class WishlistController extends Controller
|
||||||
$this->customer = $customer;
|
$this->customer = $customer;
|
||||||
|
|
||||||
$this->wishlist = $wishlist;
|
$this->wishlist = $wishlist;
|
||||||
|
|
||||||
|
$this->product = $product;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -67,6 +73,15 @@ class WishlistController extends Controller
|
||||||
* @param integer $itemId
|
* @param integer $itemId
|
||||||
*/
|
*/
|
||||||
public function add($itemId) {
|
public function add($itemId) {
|
||||||
|
$product = $this->product->findOneByField('id', $itemId);
|
||||||
|
|
||||||
|
if($product->type == "configurable") {
|
||||||
|
$slug = $product->url_key;
|
||||||
|
|
||||||
|
session()->flash('warning', trans('customer::app.wishlist.select-options'));
|
||||||
|
|
||||||
|
return redirect()->route('shop.products.index', $slug);
|
||||||
|
}
|
||||||
|
|
||||||
$data = [
|
$data = [
|
||||||
'channel_id' => core()->getCurrentChannel()->id,
|
'channel_id' => core()->getCurrentChannel()->id,
|
||||||
|
|
@ -111,12 +126,45 @@ class WishlistController extends Controller
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Add the configurable product
|
||||||
|
* to the wishlist.
|
||||||
|
*
|
||||||
|
* @return response
|
||||||
|
*/
|
||||||
|
public function addconfigurable($urlkey) {
|
||||||
|
dd($urlkey);
|
||||||
|
session()->flash('warning', trans('Select options before adding to wishlist'));
|
||||||
|
return redirect()->route('shop.products.index', $urlkey);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Function to move item from wishlist to cart.
|
* Function to move item from wishlist to cart.
|
||||||
*
|
*
|
||||||
* @param integer $itemId
|
* @param integer $itemId
|
||||||
*/
|
*/
|
||||||
public function moveToCart() {
|
public function moveAll() {
|
||||||
dd('adding item to wishlist');
|
Cart::moveAllToCart();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Function to move item from wishlist to cart.
|
||||||
|
*
|
||||||
|
* @param integer $itemId
|
||||||
|
*/
|
||||||
|
public function move($productId) {
|
||||||
|
$result = Cart::moveToCart($productId);
|
||||||
|
|
||||||
|
$wishlist = $this->wishlist->findWhere(['customer_id' => auth()->guard('customer')->user()->id, 'product_id' => $productId]);
|
||||||
|
|
||||||
|
if($this->wishlist->delete($wishlist[0]->id)) {
|
||||||
|
session()->flash('success', 'Item Moved To Cart Successfully');
|
||||||
|
|
||||||
|
return redirect()->back();
|
||||||
|
} else {
|
||||||
|
session()->flash('error', 'Item Cannot Be Moved To Cart Successfully');
|
||||||
|
|
||||||
|
return redirect()->back();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,51 +0,0 @@
|
||||||
<?php
|
|
||||||
|
|
||||||
namespace Webkul\Customer;
|
|
||||||
|
|
||||||
use Illuminate\Support\Facades\HTML;
|
|
||||||
use Illuminate\Support\Facades\Request;
|
|
||||||
use Illuminate\Support\Facades\URL;
|
|
||||||
|
|
||||||
class Menu
|
|
||||||
{
|
|
||||||
public $items = array();
|
|
||||||
public $current;
|
|
||||||
public $currentKey;
|
|
||||||
|
|
||||||
public function __construct() {
|
|
||||||
$this->current = Request::url();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
public static function create($callback)
|
|
||||||
{
|
|
||||||
$menu = new Menu();
|
|
||||||
$callback($menu);
|
|
||||||
return $menu;
|
|
||||||
}
|
|
||||||
|
|
||||||
public function add($route, $name)
|
|
||||||
{
|
|
||||||
$url = route($route);
|
|
||||||
$item = [
|
|
||||||
'name' => $name,
|
|
||||||
'url' => $url,
|
|
||||||
];
|
|
||||||
array_push($this->items, $item);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Method to find the active links
|
|
||||||
*
|
|
||||||
* @param array $item Item that
|
|
||||||
* needs to be checked if active
|
|
||||||
* @return string
|
|
||||||
*/
|
|
||||||
public function getActive($item)
|
|
||||||
{
|
|
||||||
$url = trim($item['url'], '/');
|
|
||||||
if ((strpos($this->current, $url) !== false) || (strpos($this->currentKey, $item['key']) === 0)) {
|
|
||||||
return 'active';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -3,11 +3,8 @@
|
||||||
namespace Webkul\Customer\Providers;
|
namespace Webkul\Customer\Providers;
|
||||||
|
|
||||||
use Illuminate\Support\ServiceProvider;
|
use Illuminate\Support\ServiceProvider;
|
||||||
use Illuminate\Support\Facades\Event;
|
|
||||||
use Illuminate\Routing\Router;
|
use Illuminate\Routing\Router;
|
||||||
use Illuminate\Support\Facades\Blade;
|
|
||||||
use Webkul\Customer\Http\Middleware\RedirectIfNotCustomer;
|
use Webkul\Customer\Http\Middleware\RedirectIfNotCustomer;
|
||||||
use Webkul\Customer\Providers\EventServiceProvider;
|
|
||||||
|
|
||||||
class CustomerServiceProvider extends ServiceProvider
|
class CustomerServiceProvider extends ServiceProvider
|
||||||
{
|
{
|
||||||
|
|
@ -20,28 +17,5 @@ class CustomerServiceProvider extends ServiceProvider
|
||||||
$this->loadMigrationsFrom(__DIR__ . '/../Database/migrations');
|
$this->loadMigrationsFrom(__DIR__ . '/../Database/migrations');
|
||||||
|
|
||||||
$this->loadViewsFrom(__DIR__ . '/../Resources/views', 'customer');
|
$this->loadViewsFrom(__DIR__ . '/../Resources/views', 'customer');
|
||||||
|
|
||||||
$this->composeView();
|
|
||||||
|
|
||||||
$this->app->register(EventServiceProvider::class);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Register services.
|
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
public function register()
|
|
||||||
{
|
|
||||||
// $this->app->bind('datagrid', 'Webkul\Ui\DataGrid\DataGrid');
|
|
||||||
}
|
|
||||||
|
|
||||||
protected function composeView()
|
|
||||||
{
|
|
||||||
view()->composer(['shop::customers.account.partials.sidemenu'], function ($view) {
|
|
||||||
$menu = current(Event::fire('customer.menu.create'));
|
|
||||||
|
|
||||||
$view->with('menu', $menu);
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,52 +0,0 @@
|
||||||
<?php
|
|
||||||
|
|
||||||
namespace Webkul\Customer\Providers;
|
|
||||||
|
|
||||||
use Illuminate\Foundation\Support\Providers\EventServiceProvider as ServiceProvider;
|
|
||||||
use Illuminate\Support\Facades\Event;
|
|
||||||
use Illuminate\Support\Facades\View;
|
|
||||||
use Webkul\Customer\Menu;
|
|
||||||
|
|
||||||
class EventServiceProvider extends ServiceProvider
|
|
||||||
{
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Bootstrap services.
|
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
public function boot()
|
|
||||||
{
|
|
||||||
$this->createCustomerAccountSideMenu();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* This method fires an event for menu creation, any package can add their menu item by listening to the customer.menu.build event
|
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
|
|
||||||
public function createCustomerAccountSideMenu()
|
|
||||||
{
|
|
||||||
|
|
||||||
Event::listen('customer.menu.create', function () {
|
|
||||||
return Menu::create(function ($menu) {
|
|
||||||
Event::fire('customer.menu.build', $menu);
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
Event::listen('customer.menu.build', function ($menu) {
|
|
||||||
|
|
||||||
$menu->add('customer.profile.index', 'Profile');
|
|
||||||
|
|
||||||
$menu->add('customer.orders.index', 'Orders');
|
|
||||||
|
|
||||||
$menu->add('customer.address.index', 'Address');
|
|
||||||
|
|
||||||
$menu->add('customer.reviews.index', 'Reviews');
|
|
||||||
|
|
||||||
$menu->add('customer.wishlist.index', 'Wishlist');
|
|
||||||
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -7,6 +7,7 @@ return [
|
||||||
'already' => 'Item Already Present In Your Wishlist',
|
'already' => 'Item Already Present In Your Wishlist',
|
||||||
'removed' => 'Item Successfully Added To Wishlist',
|
'removed' => 'Item Successfully Added To Wishlist',
|
||||||
'remove-fail' => 'Item Cannot Be Removed From Wishlist',
|
'remove-fail' => 'Item Cannot Be Removed From Wishlist',
|
||||||
'empty' => 'You Don\'t Have Any Items In Your Wishlist'
|
'empty' => 'You Don\'t Have Any Items In Your Wishlist',
|
||||||
|
'select-options' => 'Need To Select Options Before Adding To Wishlist'
|
||||||
],
|
],
|
||||||
];
|
];
|
||||||
|
|
@ -120,6 +120,14 @@ class InventorySourceController extends Controller
|
||||||
*/
|
*/
|
||||||
public function destroy($id)
|
public function destroy($id)
|
||||||
{
|
{
|
||||||
//
|
if($this->inventorySource->count() == 1) {
|
||||||
|
session()->flash('error', 'At least one inventory source is required.');
|
||||||
|
} else {
|
||||||
|
$this->inventorySource->delete($id);
|
||||||
|
|
||||||
|
session()->flash('success', 'Inventory source deleted successfully.');
|
||||||
|
}
|
||||||
|
|
||||||
|
return redirect()->back();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -5,7 +5,6 @@ namespace Webkul\Inventory\Providers;
|
||||||
use Illuminate\Support\ServiceProvider;
|
use Illuminate\Support\ServiceProvider;
|
||||||
use Illuminate\Foundation\AliasLoader;
|
use Illuminate\Foundation\AliasLoader;
|
||||||
use Illuminate\Routing\Router;
|
use Illuminate\Routing\Router;
|
||||||
use Webkul\User\Http\Middleware\RedirectIfNotAdmin;
|
|
||||||
|
|
||||||
class InventoryServiceProvider extends ServiceProvider
|
class InventoryServiceProvider extends ServiceProvider
|
||||||
{
|
{
|
||||||
|
|
@ -16,8 +15,6 @@ class InventoryServiceProvider extends ServiceProvider
|
||||||
*/
|
*/
|
||||||
public function boot(Router $router)
|
public function boot(Router $router)
|
||||||
{
|
{
|
||||||
$router->aliasMiddleware('admin', RedirectIfNotAdmin::class);
|
|
||||||
|
|
||||||
$this->loadMigrationsFrom(__DIR__ . '/../Database/Migrations');
|
$this->loadMigrationsFrom(__DIR__ . '/../Database/Migrations');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@ use Prettus\Repository\Contracts\CriteriaInterface;
|
||||||
use Prettus\Repository\Contracts\RepositoryInterface;
|
use Prettus\Repository\Contracts\RepositoryInterface;
|
||||||
use Webkul\Product\Models\ProductAttributeValue;
|
use Webkul\Product\Models\ProductAttributeValue;
|
||||||
use Webkul\Attribute\Repositories\AttributeRepository;
|
use Webkul\Attribute\Repositories\AttributeRepository;
|
||||||
use Webkul\Product\Product\AbstractProduct;
|
use Webkul\Product\Helpers\AbstractProduct;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class MyCriteria.
|
* Class MyCriteria.
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@ namespace Webkul\Product\Contracts\Criteria;
|
||||||
use Prettus\Repository\Contracts\CriteriaInterface;
|
use Prettus\Repository\Contracts\CriteriaInterface;
|
||||||
use Prettus\Repository\Contracts\RepositoryInterface;
|
use Prettus\Repository\Contracts\RepositoryInterface;
|
||||||
use Webkul\Attribute\Repositories\AttributeRepository;
|
use Webkul\Attribute\Repositories\AttributeRepository;
|
||||||
use Webkul\Product\Product\AbstractProduct;
|
use Webkul\Product\Helpers\AbstractProduct;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class MyCriteria.
|
* Class MyCriteria.
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@ use Prettus\Repository\Contracts\CriteriaInterface;
|
||||||
use Prettus\Repository\Contracts\RepositoryInterface;
|
use Prettus\Repository\Contracts\RepositoryInterface;
|
||||||
use Webkul\Product\Models\ProductAttributeValue;
|
use Webkul\Product\Models\ProductAttributeValue;
|
||||||
use Webkul\Attribute\Repositories\AttributeRepository;
|
use Webkul\Attribute\Repositories\AttributeRepository;
|
||||||
use Webkul\Product\Product\AbstractProduct;
|
use Webkul\Product\Helpers\AbstractProduct;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class MyCriteria.
|
* Class MyCriteria.
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@ namespace Webkul\Product\Contracts\Criteria;
|
||||||
use Prettus\Repository\Contracts\CriteriaInterface;
|
use Prettus\Repository\Contracts\CriteriaInterface;
|
||||||
use Prettus\Repository\Contracts\RepositoryInterface;
|
use Prettus\Repository\Contracts\RepositoryInterface;
|
||||||
use Webkul\Attribute\Repositories\AttributeRepository;
|
use Webkul\Attribute\Repositories\AttributeRepository;
|
||||||
use Webkul\Product\Product\AbstractProduct;
|
use Webkul\Product\Helpers\AbstractProduct;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class MyCriteria.
|
* Class MyCriteria.
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@ use Prettus\Repository\Contracts\CriteriaInterface;
|
||||||
use Prettus\Repository\Contracts\RepositoryInterface;
|
use Prettus\Repository\Contracts\RepositoryInterface;
|
||||||
use Webkul\Product\Models\ProductAttributeValue;
|
use Webkul\Product\Models\ProductAttributeValue;
|
||||||
use Webkul\Attribute\Repositories\AttributeRepository;
|
use Webkul\Attribute\Repositories\AttributeRepository;
|
||||||
use Webkul\Product\Product\AbstractProduct;
|
use Webkul\Product\Helpers\AbstractProduct;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class MyCriteria.
|
* Class MyCriteria.
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,7 @@ class CreateProductsTable extends Migration
|
||||||
$table->timestamps();
|
$table->timestamps();
|
||||||
$table->integer('parent_id')->unsigned()->nullable();
|
$table->integer('parent_id')->unsigned()->nullable();
|
||||||
$table->integer('attribute_family_id')->unsigned()->nullable();
|
$table->integer('attribute_family_id')->unsigned()->nullable();
|
||||||
$table->foreign('attribute_family_id')->references('id')->on('attribute_families')->onDelete('cascade');
|
$table->foreign('attribute_family_id')->references('id')->on('attribute_families')->onDelete('restrict');
|
||||||
});
|
});
|
||||||
|
|
||||||
Schema::table('products', function (Blueprint $table) {
|
Schema::table('products', function (Blueprint $table) {
|
||||||
|
|
@ -45,7 +45,7 @@ class CreateProductsTable extends Migration
|
||||||
$table->integer('product_id')->unsigned();
|
$table->integer('product_id')->unsigned();
|
||||||
$table->integer('attribute_id')->unsigned();
|
$table->integer('attribute_id')->unsigned();
|
||||||
$table->foreign('product_id')->references('id')->on('products')->onDelete('cascade');
|
$table->foreign('product_id')->references('id')->on('products')->onDelete('cascade');
|
||||||
$table->foreign('attribute_id')->references('id')->on('attributes')->onDelete('cascade');
|
$table->foreign('attribute_id')->references('id')->on('attributes')->onDelete('restrict');
|
||||||
});
|
});
|
||||||
|
|
||||||
Schema::create('product_up_sells', function (Blueprint $table) {
|
Schema::create('product_up_sells', function (Blueprint $table) {
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace Webkul\Product\Product;
|
namespace Webkul\Product\Helpers;
|
||||||
|
|
||||||
use Webkul\Product\Models\ProductAttributeValue;
|
use Webkul\Product\Models\ProductAttributeValue;
|
||||||
|
|
||||||
|
|
@ -1,10 +1,10 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace Webkul\Product\Product;
|
namespace Webkul\Product\Helpers;
|
||||||
|
|
||||||
use Webkul\Attribute\Repositories\AttributeOptionRepository as AttributeOption;
|
use Webkul\Attribute\Repositories\AttributeOptionRepository as AttributeOption;
|
||||||
use Webkul\Product\Product\ProductImage;
|
use Webkul\Product\Helpers\ProductImage;
|
||||||
use Webkul\Product\Product\Price;
|
use Webkul\Product\Helpers\Price;
|
||||||
use Webkul\Product\Models\Product;
|
use Webkul\Product\Models\Product;
|
||||||
use Webkul\Product\Models\ProductAttributeValue;
|
use Webkul\Product\Models\ProductAttributeValue;
|
||||||
|
|
||||||
|
|
@ -35,8 +35,8 @@ class ConfigurableOption extends AbstractProduct
|
||||||
* Create a new controller instance.
|
* Create a new controller instance.
|
||||||
*
|
*
|
||||||
* @param Webkul\Attribute\Repositories\AttributeOptionRepository $attributeOption
|
* @param Webkul\Attribute\Repositories\AttributeOptionRepository $attributeOption
|
||||||
* @param Webkul\Product\Product\ProductImage $productImage
|
* @param Webkul\Product\Helpers\ProductImage $productImage
|
||||||
* @param Webkul\Product\Product\Price $price
|
* @param Webkul\Product\Helpers\Price $price
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function __construct(
|
public function __construct(
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace Webkul\Product\Product;
|
namespace Webkul\Product\Helpers;
|
||||||
|
|
||||||
use Webkul\Attribute\Repositories\AttributeRepository as Attribute;
|
use Webkul\Attribute\Repositories\AttributeRepository as Attribute;
|
||||||
use Webkul\Product\Models\ProductAttributeValue;
|
use Webkul\Product\Models\ProductAttributeValue;
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace Webkul\Product\Product;
|
namespace Webkul\Product\Helpers;
|
||||||
|
|
||||||
use Webkul\Attribute\Repositories\AttributeOptionRepository as AttributeOption;
|
use Webkul\Attribute\Repositories\AttributeOptionRepository as AttributeOption;
|
||||||
use Illuminate\Support\Facades\Storage;
|
use Illuminate\Support\Facades\Storage;
|
||||||
|
|
@ -1,13 +1,13 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace Webkul\Product\Product;
|
namespace Webkul\Product\Helpers;
|
||||||
|
|
||||||
class Review extends AbstractProduct
|
class Review extends AbstractProduct
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Returns the product's avg rating
|
* Returns the product's avg rating
|
||||||
*
|
*
|
||||||
* @param Product $product
|
* @param Product $product
|
||||||
* @return float
|
* @return float
|
||||||
*/
|
*/
|
||||||
public function getReviews($product)
|
public function getReviews($product)
|
||||||
|
|
@ -18,7 +18,7 @@ class Review extends AbstractProduct
|
||||||
/**
|
/**
|
||||||
* Returns the product's avg rating
|
* Returns the product's avg rating
|
||||||
*
|
*
|
||||||
* @param Product $product
|
* @param Product $product
|
||||||
* @return float
|
* @return float
|
||||||
*/
|
*/
|
||||||
public function getAverageRating($product)
|
public function getAverageRating($product)
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace Webkul\Product\Product;
|
namespace Webkul\Product\Helpers;
|
||||||
|
|
||||||
class Toolbar extends AbstractProduct
|
class Toolbar extends AbstractProduct
|
||||||
{
|
{
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace Webkul\Product\Product;
|
namespace Webkul\Product\Helpers;
|
||||||
|
|
||||||
class View extends AbstractProduct
|
class View extends AbstractProduct
|
||||||
{
|
{
|
||||||
|
|
@ -17,7 +17,7 @@ class View extends AbstractProduct
|
||||||
$attributes = $product->attribute_family->custom_attributes;
|
$attributes = $product->attribute_family->custom_attributes;
|
||||||
|
|
||||||
foreach($attributes as $attribute) {
|
foreach($attributes as $attribute) {
|
||||||
if($attribute->is_visible_on_front) {
|
if($attribute->is_visible_on_front && $product->{$attribute->code}) {
|
||||||
$data[] = [
|
$data[] = [
|
||||||
'code' => $attribute->code,
|
'code' => $attribute->code,
|
||||||
'label' => $attribute->name,
|
'label' => $attribute->name,
|
||||||
|
|
@ -176,6 +176,6 @@ class ProductController extends Controller
|
||||||
*/
|
*/
|
||||||
public function destroy($id)
|
public function destroy($id)
|
||||||
{
|
{
|
||||||
//
|
$this->product->delete($id);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -45,7 +45,7 @@ class Order extends Model implements OrderContract
|
||||||
*/
|
*/
|
||||||
public function getTotalDueAttribute()
|
public function getTotalDueAttribute()
|
||||||
{
|
{
|
||||||
return $this->grand_total - $this->base_total_invoiced;
|
return $this->grand_total - $this->grand_total_invoiced;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -286,13 +286,4 @@ class OrderRepository extends Repository
|
||||||
|
|
||||||
return $order;
|
return $order;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @param int $customerId
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
public function customerOrder($customerId)
|
|
||||||
{
|
|
||||||
return $this->model->where('customer_id',$customerId)->get();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
@ -8,8 +8,8 @@ use Webkul\Checkout\Repositories\CartRepository;
|
||||||
use Webkul\Checkout\Repositories\CartItemRepository;
|
use Webkul\Checkout\Repositories\CartItemRepository;
|
||||||
use Webkul\Product\Repositories\ProductRepository;
|
use Webkul\Product\Repositories\ProductRepository;
|
||||||
use Webkul\Customer\Repositories\CustomerRepository;
|
use Webkul\Customer\Repositories\CustomerRepository;
|
||||||
use Webkul\Product\Product\ProductImage;
|
use Webkul\Product\Helpers\ProductImage;
|
||||||
use Webkul\Product\Product\View as ProductView;
|
use Webkul\Product\Helpers\View as ProductView;
|
||||||
use Cart;
|
use Cart;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,6 @@ use Webkul\Core\Repositories\SliderRepository as Sliders;
|
||||||
* @author Prashant Singh <prashant.singh852@webkul.com>
|
* @author Prashant Singh <prashant.singh852@webkul.com>
|
||||||
* @copyright 2018 Webkul Software Pvt Ltd (http://www.webkul.com)
|
* @copyright 2018 Webkul Software Pvt Ltd (http://www.webkul.com)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
class HomeController extends controller
|
class HomeController extends controller
|
||||||
{
|
{
|
||||||
protected $_config;
|
protected $_config;
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,73 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace Webkul\Shop\Http\Controllers;
|
||||||
|
|
||||||
|
use Illuminate\Http\Request;
|
||||||
|
use Illuminate\Http\Response;
|
||||||
|
use Webkul\Sales\Repositories\OrderRepository;
|
||||||
|
use Auth;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Customer controlller for the customer basically for the tasks of customers
|
||||||
|
* which will be done after customer authenticastion.
|
||||||
|
*
|
||||||
|
* @author Prashant Singh <prashant.singh852@webkul.com>
|
||||||
|
* @copyright 2018 Webkul Software Pvt Ltd (http://www.webkul.com)
|
||||||
|
*/
|
||||||
|
class OrderController extends Controller
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Contains route related configuration
|
||||||
|
*
|
||||||
|
* @var array
|
||||||
|
*/
|
||||||
|
protected $_config;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* OrderrRepository object
|
||||||
|
*
|
||||||
|
* @var array
|
||||||
|
*/
|
||||||
|
protected $order;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create a new controller instance.
|
||||||
|
*
|
||||||
|
* @param Webkul\Order\Repositories\OrderRepository $order
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function __construct(OrderRepository $order)
|
||||||
|
{
|
||||||
|
$this->middleware('customer');
|
||||||
|
|
||||||
|
$this->_config = request('_config');
|
||||||
|
|
||||||
|
$this->order = $order;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Display a listing of the resource.
|
||||||
|
*
|
||||||
|
* @return \Illuminate\Http\Response
|
||||||
|
*/
|
||||||
|
public function index() {
|
||||||
|
$orders = $this->order->findWhere([
|
||||||
|
'customer_id' => auth()->guard('customer')->user()->id
|
||||||
|
]);
|
||||||
|
|
||||||
|
return view($this->_config['view'], compact('orders'));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Show the view for the specified resource.
|
||||||
|
*
|
||||||
|
* @param int $id
|
||||||
|
* @return \Illuminate\Http\Response
|
||||||
|
*/
|
||||||
|
public function view($id)
|
||||||
|
{
|
||||||
|
$order = $this->order->find($id);
|
||||||
|
|
||||||
|
return view($this->_config['view'], compact('order'));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
Route::group(['middleware' => ['web']], function () {
|
Route::group(['middleware' => ['web']], function () {
|
||||||
|
|
||||||
Route::get('/', 'Webkul\Shop\Http\Controllers\HomeController@index')->defaults('_config', [
|
Route::get('/', 'Webkul\Shop\Http\Controllers\HomeController@index')->defaults('_config', [
|
||||||
'view' => 'shop::home.index'
|
'view' => 'shop::home.index'
|
||||||
])->name('shop.home.index');
|
])->name('shop.home.index');
|
||||||
|
|
@ -119,6 +120,10 @@ Route::group(['middleware' => ['web']], function () {
|
||||||
|
|
||||||
Route::get('wishlist/remove/{id}', 'Webkul\Customer\Http\Controllers\WishlistController@remove')->name('customer.wishlist.remove');
|
Route::get('wishlist/remove/{id}', 'Webkul\Customer\Http\Controllers\WishlistController@remove')->name('customer.wishlist.remove');
|
||||||
|
|
||||||
|
Route::get('wishlist/move/{id}', 'Webkul\Customer\Http\Controllers\WishlistController@move')->name('customer.wishlist.move');
|
||||||
|
|
||||||
|
Route::get('wishlist/moveall', 'Webkul\Customer\Http\Controllers\WishlistController@moveAll')->name('customer.wishlist.moveall');
|
||||||
|
|
||||||
//customer account
|
//customer account
|
||||||
Route::prefix('account')->group(function () {
|
Route::prefix('account')->group(function () {
|
||||||
|
|
||||||
|
|
@ -163,7 +168,6 @@ Route::group(['middleware' => ['web']], function () {
|
||||||
Route::post('address/edit', 'Webkul\Customer\Http\Controllers\AddressController@edit')->defaults('_config', [
|
Route::post('address/edit', 'Webkul\Customer\Http\Controllers\AddressController@edit')->defaults('_config', [
|
||||||
'redirect' => 'customer.address.index'
|
'redirect' => 'customer.address.index'
|
||||||
])->name('customer.address.edit');
|
])->name('customer.address.edit');
|
||||||
|
|
||||||
/* Routes for Addresses ends here */
|
/* Routes for Addresses ends here */
|
||||||
|
|
||||||
/* Wishlist route */
|
/* Wishlist route */
|
||||||
|
|
@ -172,10 +176,14 @@ Route::group(['middleware' => ['web']], function () {
|
||||||
])->name('customer.wishlist.index');
|
])->name('customer.wishlist.index');
|
||||||
|
|
||||||
/* Orders route */
|
/* Orders route */
|
||||||
Route::get('orders', 'Webkul\Customer\Http\Controllers\OrdersController@orders')->defaults('_config', [
|
Route::get('orders', 'Webkul\Shop\Http\Controllers\OrderController@index')->defaults('_config', [
|
||||||
'view' => 'shop::customers.account.orders.orders'
|
'view' => 'shop::customers.account.orders.index'
|
||||||
])->name('customer.orders.index');
|
])->name('customer.orders.index');
|
||||||
|
|
||||||
|
Route::get('orders/view/{id}', 'Webkul\Shop\Http\Controllers\OrderController@view')->defaults('_config', [
|
||||||
|
'view' => 'shop::customers.account.orders.view'
|
||||||
|
])->name('customer.orders.view');
|
||||||
|
|
||||||
/* Reviews route */
|
/* Reviews route */
|
||||||
Route::get('reviews', 'Webkul\Customer\Http\Controllers\CustomerController@reviews')->defaults('_config', [
|
Route::get('reviews', 'Webkul\Customer\Http\Controllers\CustomerController@reviews')->defaults('_config', [
|
||||||
'view' => 'shop::customers.account.reviews.index'
|
'view' => 'shop::customers.account.reviews.index'
|
||||||
|
|
@ -184,5 +192,4 @@ Route::group(['middleware' => ['web']], function () {
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
//customer routes end here
|
//customer routes end here
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@ namespace Webkul\Shop\Providers;
|
||||||
use Illuminate\Support\Facades\Event;
|
use Illuminate\Support\Facades\Event;
|
||||||
use Illuminate\Support\Facades\Blade;
|
use Illuminate\Support\Facades\Blade;
|
||||||
use Illuminate\Support\ServiceProvider;
|
use Illuminate\Support\ServiceProvider;
|
||||||
use Webkul\Product\Product\ProductImage;
|
use Webkul\Product\Helpers\ProductImage;
|
||||||
use View;
|
use View;
|
||||||
|
|
||||||
class ComposerServiceProvider extends ServiceProvider
|
class ComposerServiceProvider extends ServiceProvider
|
||||||
|
|
|
||||||
|
|
@ -6,10 +6,8 @@ use Illuminate\Support\ServiceProvider;
|
||||||
use Illuminate\Support\Facades\Event;
|
use Illuminate\Support\Facades\Event;
|
||||||
use Illuminate\Routing\Router;
|
use Illuminate\Routing\Router;
|
||||||
use Illuminate\Support\Facades\Blade;
|
use Illuminate\Support\Facades\Blade;
|
||||||
use Illuminate\Contracts\Debug\ExceptionHandler;
|
|
||||||
use Webkul\Shop\Providers\ComposerServiceProvider;
|
use Webkul\Shop\Providers\ComposerServiceProvider;
|
||||||
use Webkul\Shop\Exceptions\Handler;
|
use Webkul\Ui\Menu;
|
||||||
|
|
||||||
|
|
||||||
class ShopServiceProvider extends ServiceProvider
|
class ShopServiceProvider extends ServiceProvider
|
||||||
{
|
{
|
||||||
|
|
@ -31,14 +29,49 @@ class ShopServiceProvider extends ServiceProvider
|
||||||
$this->loadViewsFrom(__DIR__ . '/../Resources/views', 'shop');
|
$this->loadViewsFrom(__DIR__ . '/../Resources/views', 'shop');
|
||||||
|
|
||||||
$this->app->register(ComposerServiceProvider::class);
|
$this->app->register(ComposerServiceProvider::class);
|
||||||
|
|
||||||
|
$this->composeView();
|
||||||
|
|
||||||
|
$this->createCustomerMenu();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Register services.
|
* Bind the the data to the views
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function register()
|
protected function composeView()
|
||||||
{
|
{
|
||||||
|
view()->composer('shop::customers.account.partials.sidemenu', function ($view) {
|
||||||
|
$menu = current(Event::fire('customer.menu.create'));
|
||||||
|
|
||||||
|
$view->with('menu', $menu);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
/**
|
||||||
|
* This method fires an event for menu creation, any package can add their menu item by listening to the customer.menu.build event
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function createCustomerMenu()
|
||||||
|
{
|
||||||
|
Event::listen('customer.menu.create', function () {
|
||||||
|
return Menu::create(function ($menu) {
|
||||||
|
Event::fire('customer.menu.build', $menu);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
Event::listen('customer.menu.build', function ($menu) {
|
||||||
|
$menu->add('profile', 'Profile', 'customer.profile.index', 1);
|
||||||
|
|
||||||
|
$menu->add('orders', 'Orders', 'customer.orders.index', 2);
|
||||||
|
|
||||||
|
$menu->add('address', 'Address', 'customer.address.index', 3);
|
||||||
|
|
||||||
|
$menu->add('reviews', 'Reviews', 'customer.reviews.index', 4);
|
||||||
|
|
||||||
|
$menu->add('wishlist', 'Wishlist', 'customer.wishlist.index', 5);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,11 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<svg width="32px" height="32px" viewBox="0 0 32 32" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||||
|
<!-- Generator: Sketch 50 (54983) - http://www.bohemiancoding.com/sketch -->
|
||||||
|
<title>Artboard</title>
|
||||||
|
<desc>Created with Sketch.</desc>
|
||||||
|
<defs></defs>
|
||||||
|
<g id="Artboard" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" stroke-linecap="round">
|
||||||
|
<path d="M9.06852618,23.2496556 L22.5678375,9.75034436" id="Line-2" stroke="#242424" stroke-width="3"></path>
|
||||||
|
<path d="M9.06852618,9.75034436 L22.5678375,23.2496556" id="Line-2" stroke="#242424" stroke-width="3"></path>
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 708 B |
|
|
@ -482,7 +482,7 @@ section.slider-block {
|
||||||
}
|
}
|
||||||
|
|
||||||
.nav a:first-child{
|
.nav a:first-child{
|
||||||
margin-left: 20px;
|
// margin-left: 20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.nav li > .icon{
|
.nav li > .icon{
|
||||||
|
|
@ -1054,7 +1054,7 @@ section.product-detail {
|
||||||
.full-specifications {
|
.full-specifications {
|
||||||
td {
|
td {
|
||||||
padding: 10px 0;
|
padding: 10px 0;
|
||||||
color: $font-color-light;
|
color: $other-font-color;
|
||||||
|
|
||||||
&:first-child {
|
&:first-child {
|
||||||
padding-right: 40px;
|
padding-right: 40px;
|
||||||
|
|
@ -1647,62 +1647,52 @@ section.review {
|
||||||
|
|
||||||
.review-layouter {
|
.review-layouter {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-flow: row;
|
flex-direction: row;
|
||||||
margin-top: 20px;
|
|
||||||
|
|
||||||
.product-info {
|
.product-info {
|
||||||
|
|
||||||
.image {
|
.product-image {
|
||||||
border:1px solid red;
|
|
||||||
|
|
||||||
img {
|
img {
|
||||||
|
display: block;
|
||||||
height: 280px;
|
height: 280px;
|
||||||
width: 280px;
|
width: 280px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.heading {
|
.product-name {
|
||||||
margin-top: 20px;
|
margin-top: 20px;
|
||||||
|
|
||||||
span {
|
span {
|
||||||
font-size: 24px;
|
font-size: 24px;
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.price {
|
.product-price {
|
||||||
margin-top: 10px;
|
margin-top: 10px;
|
||||||
|
|
||||||
.pro-price {
|
.pro-price {
|
||||||
font-size: 24px;
|
font-size: 24px;
|
||||||
color: $disc-price;
|
color: $disc-price;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.pro-price-not {
|
.pro-price-not {
|
||||||
margin-left: 10px;
|
margin-left: 10px;
|
||||||
color: $disc-price-pro;
|
color: $disc-price-pro;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.offer {
|
.offer {
|
||||||
margin-left: 10px;
|
margin-left: 10px;
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.review-info {
|
.review-form {
|
||||||
margin-left: 20px;
|
margin-left: 20px;
|
||||||
width: 49%;
|
width: 49%;
|
||||||
|
|
||||||
.heading {
|
.heading {
|
||||||
margin-top: 10px;
|
margin-top: 10px;
|
||||||
|
|
||||||
span {
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
.btn.btn-primary.right {
|
.btn.btn-primary.right {
|
||||||
float: right;
|
float: right;
|
||||||
margin-top: -10px;
|
margin-top: -10px;
|
||||||
|
|
@ -1886,8 +1876,8 @@ section.review {
|
||||||
border: 1px solid $border-color;
|
border: 1px solid $border-color;
|
||||||
width: 25%;
|
width: 25%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
text-transform: capitalize;
|
|
||||||
color: $font-color-light;
|
color: $font-color-light;
|
||||||
|
position: relative;
|
||||||
|
|
||||||
li {
|
li {
|
||||||
width: 95%;
|
width: 95%;
|
||||||
|
|
@ -1899,6 +1889,16 @@ section.review {
|
||||||
align-items: center;
|
align-items: center;
|
||||||
border-bottom: 1px solid $border-color;
|
border-bottom: 1px solid $border-color;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
|
||||||
|
a {
|
||||||
|
color: #5E5E5E;
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon {
|
||||||
|
display: none;
|
||||||
|
position: absolute;
|
||||||
|
right: 12px;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
li:first-child {
|
li:first-child {
|
||||||
|
|
@ -1910,98 +1910,23 @@ section.review {
|
||||||
}
|
}
|
||||||
|
|
||||||
li.active {
|
li.active {
|
||||||
color: $brand-color;
|
a {
|
||||||
|
color: $brand-color;
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon {
|
||||||
|
display: inline-block;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.responsive-side-menu{
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
//customer account pages content
|
//customer account pages content
|
||||||
.account-layout {
|
.account-layout {
|
||||||
margin-left: 5.5%;
|
margin-left: 40px;
|
||||||
margin-top: 1%;
|
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
|
||||||
.back-icon {
|
.account-head {
|
||||||
display: none;
|
margin-bottom: 20px;
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
//customer account page respoinsive css
|
|
||||||
@media only screen and (max-width: 770px) {
|
|
||||||
.account-content {
|
|
||||||
flex-direction: column;
|
|
||||||
|
|
||||||
.account-side-menu {
|
|
||||||
display: none;
|
|
||||||
width:100%;
|
|
||||||
border: none;
|
|
||||||
|
|
||||||
li {
|
|
||||||
margin-left: 0%;
|
|
||||||
width: 100%;
|
|
||||||
|
|
||||||
a {
|
|
||||||
color : $font-color;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.responsive-side-menu {
|
|
||||||
cursor: pointer;
|
|
||||||
padding-top:13px;
|
|
||||||
display: block;
|
|
||||||
height: 46px;
|
|
||||||
border-bottom: 1px solid $border-color;
|
|
||||||
border-top: 1px solid $border-color;
|
|
||||||
|
|
||||||
.right {
|
|
||||||
float: right;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.account-layout {
|
|
||||||
margin-left: 0%;
|
|
||||||
margin-top: 20px;
|
|
||||||
|
|
||||||
.account-head {
|
|
||||||
display: flex;
|
|
||||||
justify-content: space-between;
|
|
||||||
border-bottom: 1px solid $border-color;
|
|
||||||
border-top: 1px solid $border-color;
|
|
||||||
height: 46px;
|
|
||||||
|
|
||||||
.back-icon {
|
|
||||||
display: block;
|
|
||||||
}
|
|
||||||
|
|
||||||
span {
|
|
||||||
margin-top: 12px;
|
|
||||||
font-size: 18px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.horizontal-rule {
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.account-table-content {
|
|
||||||
margin-top: 2%;
|
|
||||||
|
|
||||||
table tbody tr {
|
|
||||||
display: grid;
|
|
||||||
margin-bottom: 20px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.account-items-list , .edit-form {
|
|
||||||
margin-top: 20px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.control-group .control {
|
|
||||||
width: 100%;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -2032,3 +1957,97 @@ section.review {
|
||||||
min-height: 345px;
|
min-height: 345px;
|
||||||
padding: 25px;
|
padding: 25px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.sale-container {
|
||||||
|
color: #5E5E5E;
|
||||||
|
|
||||||
|
.sale-section {
|
||||||
|
|
||||||
|
.secton-title {
|
||||||
|
font-size: 18px;
|
||||||
|
color: #8E8E8E;
|
||||||
|
padding: 15px 0;
|
||||||
|
border-bottom: 1px solid $border-color;
|
||||||
|
}
|
||||||
|
|
||||||
|
.section-content {
|
||||||
|
display: block;
|
||||||
|
padding: 20px 0;
|
||||||
|
border-bottom: 1px solid #E8E8E8;
|
||||||
|
|
||||||
|
.row {
|
||||||
|
display: block;
|
||||||
|
padding: 7px 0;
|
||||||
|
|
||||||
|
.title {
|
||||||
|
width: 200px;
|
||||||
|
letter-spacing: -0.26px;
|
||||||
|
display: inline-block;
|
||||||
|
}
|
||||||
|
|
||||||
|
.value {
|
||||||
|
letter-spacing: -0.26px;
|
||||||
|
display: inline-block;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.order-box-container {
|
||||||
|
display: inline-block;
|
||||||
|
width: 100%;
|
||||||
|
|
||||||
|
.box {
|
||||||
|
float: left;
|
||||||
|
width: 25%;
|
||||||
|
|
||||||
|
.box-title {
|
||||||
|
padding: 10px 0;
|
||||||
|
font-size: 18px;
|
||||||
|
color: #8E8E8E;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.box-content {
|
||||||
|
color: #3A3A3A;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.qty-row {
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.totals {
|
||||||
|
padding-top: 20px;
|
||||||
|
display: inline-block;
|
||||||
|
width: 100%;
|
||||||
|
border-top: solid 1px #E8E8E8;
|
||||||
|
|
||||||
|
.sale-summary {
|
||||||
|
height: 130px;
|
||||||
|
float: right;
|
||||||
|
border-collapse: collapse;
|
||||||
|
|
||||||
|
tr {
|
||||||
|
|
||||||
|
td {
|
||||||
|
padding: 5px 8px;
|
||||||
|
width: auto;
|
||||||
|
color: #3A3A3A;
|
||||||
|
}
|
||||||
|
|
||||||
|
&.bold {
|
||||||
|
font-weight: 600;
|
||||||
|
font-size: 15px;
|
||||||
|
}
|
||||||
|
|
||||||
|
&.border {
|
||||||
|
td {
|
||||||
|
border-bottom: 1px solid $border-color;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue