Merge pull request #8 from bagisto/master
Sync fork's master with base's master
|
|
@ -0,0 +1,76 @@
|
|||
# Contributor Covenant Code of Conduct
|
||||
|
||||
## Our Pledge
|
||||
|
||||
In the interest of fostering an open and welcoming environment, we as
|
||||
contributors and maintainers pledge to making participation in our project and
|
||||
our community a harassment-free experience for everyone, regardless of age, body
|
||||
size, disability, ethnicity, sex characteristics, gender identity and expression,
|
||||
level of experience, education, socio-economic status, nationality, personal
|
||||
appearance, race, religion, or sexual identity and orientation.
|
||||
|
||||
## Our Standards
|
||||
|
||||
Examples of behavior that contributes to creating a positive environment
|
||||
include:
|
||||
|
||||
* Using welcoming and inclusive language
|
||||
* Being respectful of differing viewpoints and experiences
|
||||
* Gracefully accepting constructive criticism
|
||||
* Focusing on what is best for the community
|
||||
* Showing empathy towards other community members
|
||||
|
||||
Examples of unacceptable behavior by participants include:
|
||||
|
||||
* The use of sexualized language or imagery and unwelcome sexual attention or
|
||||
advances
|
||||
* Trolling, insulting/derogatory comments, and personal or political attacks
|
||||
* Public or private harassment
|
||||
* Publishing others' private information, such as a physical or electronic
|
||||
address, without explicit permission
|
||||
* Other conduct which could reasonably be considered inappropriate in a
|
||||
professional setting
|
||||
|
||||
## Our Responsibilities
|
||||
|
||||
Project maintainers are responsible for clarifying the standards of acceptable
|
||||
behavior and are expected to take appropriate and fair corrective action in
|
||||
response to any instances of unacceptable behavior.
|
||||
|
||||
Project maintainers have the right and responsibility to remove, edit, or
|
||||
reject comments, commits, code, wiki edits, issues, and other contributions
|
||||
that are not aligned to this Code of Conduct, or to ban temporarily or
|
||||
permanently any contributor for other behaviors that they deem inappropriate,
|
||||
threatening, offensive, or harmful.
|
||||
|
||||
## Scope
|
||||
|
||||
This Code of Conduct applies both within project spaces and in public spaces
|
||||
when an individual is representing the project or its community. Examples of
|
||||
representing a project or community include using an official project e-mail
|
||||
address, posting via an official social media account, or acting as an appointed
|
||||
representative at an online or offline event. Representation of a project may be
|
||||
further defined and clarified by project maintainers.
|
||||
|
||||
## Enforcement
|
||||
|
||||
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
||||
reported by contacting the project team at support@bagisto.com. All
|
||||
complaints will be reviewed and investigated and will result in a response that
|
||||
is deemed necessary and appropriate to the circumstances. The project team is
|
||||
obligated to maintain confidentiality with regard to the reporter of an incident.
|
||||
Further details of specific enforcement policies may be posted separately.
|
||||
|
||||
Project maintainers who do not follow or enforce the Code of Conduct in good
|
||||
faith may face temporary or permanent repercussions as determined by other
|
||||
members of the project's leadership.
|
||||
|
||||
## Attribution
|
||||
|
||||
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
|
||||
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
|
||||
|
||||
[homepage]: https://www.contributor-covenant.org
|
||||
|
||||
For answers to common questions about this code of conduct, see
|
||||
https://www.contributor-covenant.org/faq
|
||||
|
|
@ -63,7 +63,7 @@ Bagisto is using power of both of these frameworks and making best out of it out
|
|||
|
||||
**Run this Command** to download the project on to your local machine or server:
|
||||
|
||||
>> Note: If you have downloaded zip file then ignore this.
|
||||
> Note: If you have downloaded zip file then ignore this.
|
||||
|
||||
~~~
|
||||
composer create-project bagisto/bagisto
|
||||
|
|
@ -89,11 +89,12 @@ default.
|
|||
|
||||
**Run these Commands Below**
|
||||
|
||||
>> Run this command below, if installing from the zip else skip:
|
||||
> Run this command, in case installing from the zip else skip this command (no need to run this command if you are creating project through composer):
|
||||
~~~
|
||||
composer install
|
||||
~~~
|
||||
|
||||
> Continue run these command below:
|
||||
~~~
|
||||
php artisan migrate
|
||||
~~~
|
||||
|
|
@ -115,6 +116,14 @@ composer dump-autoload
|
|||
|
||||
> That's it, now just execute the project on your specified domain entry point pointing to public folder inside installation directory.
|
||||
|
||||
> **Note: you can fetch your admin panel by follow below url:**
|
||||
~~~
|
||||
http(s)://example.com/admin/login
|
||||
~~~
|
||||
~~~
|
||||
email:admin@example.com
|
||||
password:admin123
|
||||
~~~
|
||||
|
||||
### 5. License
|
||||
Bagisto is a truly opensource E-Commerce framework which will always be free under the [MIT License](https://github.com/bagisto/bagisto/blob/master/LICENSE).
|
||||
|
|
|
|||
|
|
@ -146,6 +146,24 @@ return [
|
|||
*/
|
||||
'editor' =>'vscode',
|
||||
|
||||
/**
|
||||
* Debug blacklisting
|
||||
*/
|
||||
'debug_blacklist' => [
|
||||
'_ENV' => [
|
||||
'APP_KEY',
|
||||
'DB_PASSWORD'
|
||||
],
|
||||
|
||||
'_SERVER' => [
|
||||
'APP_KEY',
|
||||
'DB_PASSWORD'
|
||||
],
|
||||
|
||||
'_POST' => [
|
||||
'password'
|
||||
],
|
||||
],
|
||||
|
||||
'providers' => [
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,90 @@
|
|||
<?php
|
||||
|
||||
return [
|
||||
|
||||
/**
|
||||
* Default Select Value
|
||||
*/
|
||||
'default_index' => 'id',
|
||||
|
||||
/**
|
||||
* Default OrderBy
|
||||
*
|
||||
* * Accepted Values = Array
|
||||
*/
|
||||
'order' => [
|
||||
'default' => 'descending',
|
||||
'descending' => 'desc',
|
||||
'ascending' => 'asc'
|
||||
],
|
||||
|
||||
/**
|
||||
* Select distinct records only
|
||||
*
|
||||
* Accepted Values = True || False
|
||||
*/
|
||||
'distinct' => true,
|
||||
|
||||
/**
|
||||
* Default pagination
|
||||
*
|
||||
* Accepted Value = integer
|
||||
*/
|
||||
'paginate' => false,
|
||||
|
||||
'operators' => [
|
||||
'eq' => "=",
|
||||
'lt' => "<",
|
||||
'gt' => ">",
|
||||
'lte' => "<=",
|
||||
'gte' => ">=",
|
||||
'neqs' => "<>",
|
||||
'neqn' => "!=",
|
||||
'eqo' => "<=>",
|
||||
'like' => "like",
|
||||
'blike' => "like binary",
|
||||
'nlike' => "not like",
|
||||
'ilike' => "ilike",
|
||||
'and' => "&",
|
||||
'bor' => "|",
|
||||
'regex' => "regexp",
|
||||
'notregex' => "not regexp",
|
||||
// 14 => "^",
|
||||
// 15 => "<<",
|
||||
// 16 => ">>",
|
||||
// 17 => "rlike",
|
||||
// 20 => "~",
|
||||
// 21 => "~*",
|
||||
// 22 => "!~",
|
||||
// 23 => "!~*",
|
||||
// 24 => "similar to",
|
||||
// 25 => "not similar to",
|
||||
// 26 => "not ilike",
|
||||
// 27 => "~~*",
|
||||
// 28 => "!~~*"
|
||||
],
|
||||
|
||||
'bindings' => [
|
||||
0 => "select",
|
||||
1 => "from",
|
||||
2 => "join",
|
||||
3 => "where",
|
||||
4 => "having",
|
||||
5 => "order",
|
||||
6 => "union"
|
||||
],
|
||||
|
||||
'selectcomponents' => [
|
||||
0 => "aggregate",
|
||||
1 => "columns",
|
||||
2 => "from",
|
||||
3 => "joins",
|
||||
4 => "wheres",
|
||||
5 => "groups",
|
||||
6 => "havings",
|
||||
7 => "orders",
|
||||
8 => "limit",
|
||||
9 => "offset",
|
||||
10 => "lock"
|
||||
]
|
||||
];
|
||||
0
database/migrations/2014_10_12_100000_create_password_resets_table.php
Normal file → Executable file
14
packages/Webkul/API/Http/Controllers/Customer/AddressController.php
Normal file → Executable file
|
|
@ -28,7 +28,7 @@ class AddressController extends Controller
|
|||
|
||||
$this->customerAddress = $customerAddress;
|
||||
|
||||
if(auth()->guard('customer')->check()) {
|
||||
if (auth()->guard('customer')->check()) {
|
||||
$this->customer = auth()->guard('customer')->user();
|
||||
} else {
|
||||
$this->customer['message'] = 'unauthorized';
|
||||
|
|
@ -46,7 +46,7 @@ class AddressController extends Controller
|
|||
* @return response JSON
|
||||
*/
|
||||
public function get() {
|
||||
if($this->customer == false) {
|
||||
if ($this->customer == false) {
|
||||
return response()->json($this->customer, 401);
|
||||
} else {
|
||||
$addresses = $this->customer->addresses;
|
||||
|
|
@ -56,7 +56,7 @@ class AddressController extends Controller
|
|||
}
|
||||
|
||||
public function getDefault() {
|
||||
if($this->customer == false) {
|
||||
if ($this->customer == false) {
|
||||
return response()->json($this->customer, 401);
|
||||
} else {
|
||||
$defaultAddress = $this->customer->default_address;
|
||||
|
|
@ -89,13 +89,13 @@ class AddressController extends Controller
|
|||
$cust_id['customer_id'] = $this->customer->id;
|
||||
$data = array_merge($cust_id, $data);
|
||||
|
||||
if($this->customer->addresses->count() == 0) {
|
||||
if ($this->customer->addresses->count() == 0) {
|
||||
$data['default_address'] = 1;
|
||||
}
|
||||
|
||||
$result = $this->customerAddress->create($data);
|
||||
|
||||
if($result) {
|
||||
if ($result) {
|
||||
return response()->json(true, 200);
|
||||
} else {
|
||||
return response()->json(false, 200);
|
||||
|
|
@ -111,11 +111,11 @@ class AddressController extends Controller
|
|||
public function makeDefault($id) {
|
||||
$defaultAddress = $this->customer->default_address;
|
||||
|
||||
if($defaultAddress != null && $defaultAddress->count() > 0) {
|
||||
if ($defaultAddress != null && $defaultAddress->count() > 0) {
|
||||
$defaultAddress->update(['default_address' => 0]);
|
||||
}
|
||||
|
||||
if($this->customerAddress->find($id)->default_address == 1) {
|
||||
if ($this->customerAddress->find($id)->default_address == 1) {
|
||||
return response()->json(false, 200);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -26,8 +26,8 @@ class AuthController extends Controller
|
|||
public function create() {
|
||||
$data = request()->except('_token');
|
||||
|
||||
if(!auth()->guard('customer')->check()) {
|
||||
if(!auth()->guard('customer')->attempt($data)) {
|
||||
if (! auth()->guard('customer')->check()) {
|
||||
if (! auth()->guard('customer')->attempt($data)) {
|
||||
return response()->json(['message' => 'unauthenticated', 'details' => 'invalid creds'], 401);
|
||||
} else {
|
||||
return response()->json(['message' => 'authenticated', 'user' => auth()->guard('customer')->user()], 200);
|
||||
|
|
|
|||
14
packages/Webkul/API/Http/Controllers/Customer/CustomerController.php
Normal file → Executable file
|
|
@ -23,7 +23,7 @@ class CustomerController extends Controller
|
|||
|
||||
public function __construct()
|
||||
{
|
||||
if(auth()->guard('customer')->check()) {
|
||||
if (auth()->guard('customer')->check()) {
|
||||
$this->customer = auth()->guard('customer')->user();
|
||||
} else {
|
||||
$this->customer['message'] = 'unauthorized';
|
||||
|
|
@ -63,10 +63,10 @@ class CustomerController extends Controller
|
|||
|
||||
$data = collect(request()->all())->toArray();
|
||||
|
||||
if($data['oldpassword'] == null) {
|
||||
if ($data['oldpassword'] == null) {
|
||||
$data = collect(request()->input())->except([ 'oldpassword', 'password', 'password_confirmation'])->toArray();
|
||||
} else {
|
||||
if(Hash::check($data['oldpassword'], auth()->guard('customer')->user()->password)) {
|
||||
if (Hash::check($data['oldpassword'], auth()->guard('customer')->user()->password)) {
|
||||
$data = collect(request()->input())->toArray();
|
||||
|
||||
$data['password'] = bcrypt($data['password']);
|
||||
|
|
@ -77,7 +77,7 @@ class CustomerController extends Controller
|
|||
|
||||
$result = $this->customer->update($data);
|
||||
|
||||
if($result) {
|
||||
if ($result) {
|
||||
return response()->json(true, 200);
|
||||
} else {
|
||||
return response()->json(false, 200);
|
||||
|
|
@ -92,7 +92,7 @@ class CustomerController extends Controller
|
|||
public function getAllCart() {
|
||||
$carts = $this->customer->carts;
|
||||
|
||||
if($cart->count() > 0) {
|
||||
if ($cart->count() > 0) {
|
||||
return response()->json(['message' => 'successful','items' => $cart], 200);
|
||||
} else {
|
||||
return response()->json(['message' => 'empty', 'items' => null], 200);
|
||||
|
|
@ -102,11 +102,11 @@ class CustomerController extends Controller
|
|||
public function getActiveCart() {
|
||||
$cart = Cart::getCart();
|
||||
|
||||
if($cart == null) {
|
||||
if ($cart == null) {
|
||||
return response()->json(['message' => 'empty', 'items' => 'null']);
|
||||
}
|
||||
|
||||
if($cart->count() > 0 ) {
|
||||
if ($cart->count() > 0 ) {
|
||||
return response()->json(['message' => 'success', 'items' => $cart]);
|
||||
} else {
|
||||
return response()->json(['message' => 'empty', 'items' => 'null']);
|
||||
|
|
|
|||
0
packages/Webkul/API/Http/Controllers/Customer/RegistrationController.php
Normal file → Executable file
12
packages/Webkul/API/Http/Controllers/Customer/WishlistController.php
Normal file → Executable file
|
|
@ -24,7 +24,7 @@ class WishlistController extends Controller
|
|||
|
||||
public function __construct(Product $product, Wishlist $wishlist)
|
||||
{
|
||||
if(auth()->guard('customer')->check()) {
|
||||
if (auth()->guard('customer')->check()) {
|
||||
$this->product = $product;
|
||||
$this->wishlist = $wishlist;
|
||||
$this->customer = auth()->guard('customer')->user();
|
||||
|
|
@ -43,7 +43,7 @@ class WishlistController extends Controller
|
|||
{
|
||||
$wishlist = $this->customer->wishlist_items;
|
||||
|
||||
if($wishlist->count() > 0) {
|
||||
if ($wishlist->count() > 0) {
|
||||
return response()->json($wishlist, 200);
|
||||
} else {
|
||||
return response()->json(['message' => 'Wishlist Empty', 'Items' => null], 200);
|
||||
|
|
@ -67,14 +67,14 @@ class WishlistController extends Controller
|
|||
];
|
||||
|
||||
//accidental case if some one adds id of the product in the anchor tag amd gives id of a variant.
|
||||
if($product->parent_id != null) {
|
||||
if ($product->parent_id != null) {
|
||||
$data['product_id'] = $productId = $product->parent_id;
|
||||
}
|
||||
|
||||
$checked = $this->wishlist->findWhere(['channel_id' => core()->getCurrentChannel()->id, 'product_id' => $productId, 'customer_id' => auth()->guard('customer')->user()->id]);
|
||||
|
||||
if($checked->isEmpty()) {
|
||||
if($wishlistItem = $this->wishlist->create($data)) {
|
||||
if ($checked->isEmpty()) {
|
||||
if ($wishlistItem = $this->wishlist->create($data)) {
|
||||
return response()->json(['message' => 'Successfully Added Item To Wishlist', 'items' => $wishlistItem], 200);
|
||||
} else {
|
||||
return response()->json(['message' => 'Error! Cannot Add Item To Wishlist', 'items' => null], 401);
|
||||
|
|
@ -93,7 +93,7 @@ class WishlistController extends Controller
|
|||
{
|
||||
$result = $this->wishlist->deleteWhere(['customer_id' => auth()->guard('customer')->user()->id, 'channel_id' => core()->getCurrentChannel()->id, 'id' => $itemId]);
|
||||
|
||||
if($result) {
|
||||
if ($result) {
|
||||
return response()->json(['message' => 'Item Successfully Removed From Wishlist', 'status' => $result]);
|
||||
} else {
|
||||
return response()->json(['message' => 'Error! While Removing Item From Wishlist', 'status' => $result]);
|
||||
|
|
|
|||
|
|
@ -89,7 +89,7 @@ class ReviewController extends Controller
|
|||
|
||||
$result = $this->productReview->create($data);
|
||||
|
||||
if($result) {
|
||||
if ($result) {
|
||||
return response()->json(['message' => 'success', 'status' => $result]);
|
||||
} else {
|
||||
return response()->json(['message' => 'failed', 'status' => $result]);
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ class CartController extends Controller
|
|||
public function get() {
|
||||
$cart = Cart::getCart();
|
||||
|
||||
if($cart == null || $cart == 'null') {
|
||||
if ($cart == null || $cart == 'null') {
|
||||
return response()->json(['message' => 'empty', 'items' => null]);
|
||||
}
|
||||
|
||||
|
|
@ -54,7 +54,7 @@ class CartController extends Controller
|
|||
public function add($id) {
|
||||
$result = Cart::add($id, request()->all());
|
||||
|
||||
if($result) {
|
||||
if ($result) {
|
||||
Cart::collectTotals();
|
||||
|
||||
return response()->json(['message' => 'successful', 'items' => Cart::getCart()->items]);
|
||||
|
|
@ -84,7 +84,7 @@ class CartController extends Controller
|
|||
public function onePage() {
|
||||
$cart = Cart::getCart();
|
||||
|
||||
if($cart == null || $cart == 'null') {
|
||||
if ($cart == null || $cart == 'null') {
|
||||
return response()->json(['message' => 'empty', 'items' => null]);
|
||||
}
|
||||
|
||||
|
|
@ -102,13 +102,13 @@ class CartController extends Controller
|
|||
public function updateOnePage() {
|
||||
$request = request()->except('_token');
|
||||
|
||||
foreach($request['qty'] as $id => $quantity) {
|
||||
if($quantity <= 0) {
|
||||
foreach ($request['qty'] as $id => $quantity) {
|
||||
if ($quantity <= 0) {
|
||||
return response()->json(['message' => 'Illegal Quantity', 'status' => 'error']);
|
||||
}
|
||||
}
|
||||
|
||||
foreach($request['qty'] as $key => $value) {
|
||||
foreach ($request['qty'] as $key => $value) {
|
||||
$item = $this->cartItem->findOneByField('id', $key);
|
||||
|
||||
$data['quantity'] = $value;
|
||||
|
|
|
|||
|
Before Width: | Height: | Size: 618 B After Width: | Height: | Size: 618 B |
0
packages/Webkul/Admin/publishable/assets/images/Icon-Graph-Green.svg
Normal file → Executable file
|
Before Width: | Height: | Size: 881 B After Width: | Height: | Size: 881 B |
0
packages/Webkul/Admin/publishable/assets/js/tinyMCE/plugins/advlist/plugin.min.js
vendored
Normal file → Executable file
0
packages/Webkul/Admin/publishable/assets/js/tinyMCE/plugins/anchor/plugin.min.js
vendored
Normal file → Executable file
0
packages/Webkul/Admin/publishable/assets/js/tinyMCE/plugins/autolink/plugin.min.js
vendored
Normal file → Executable file
0
packages/Webkul/Admin/publishable/assets/js/tinyMCE/plugins/autoresize/plugin.min.js
vendored
Normal file → Executable file
0
packages/Webkul/Admin/publishable/assets/js/tinyMCE/plugins/autosave/plugin.min.js
vendored
Normal file → Executable file
0
packages/Webkul/Admin/publishable/assets/js/tinyMCE/plugins/bbcode/plugin.min.js
vendored
Normal file → Executable file
0
packages/Webkul/Admin/publishable/assets/js/tinyMCE/plugins/charmap/plugin.min.js
vendored
Normal file → Executable file
0
packages/Webkul/Admin/publishable/assets/js/tinyMCE/plugins/code/plugin.min.js
vendored
Normal file → Executable file
0
packages/Webkul/Admin/publishable/assets/js/tinyMCE/plugins/codesample/css/prism.css
vendored
Normal file → Executable file
0
packages/Webkul/Admin/publishable/assets/js/tinyMCE/plugins/codesample/plugin.min.js
vendored
Normal file → Executable file
0
packages/Webkul/Admin/publishable/assets/js/tinyMCE/plugins/contextmenu/plugin.min.js
vendored
Normal file → Executable file
0
packages/Webkul/Admin/publishable/assets/js/tinyMCE/plugins/directionality/plugin.min.js
vendored
Normal file → Executable file
0
packages/Webkul/Admin/publishable/assets/js/tinyMCE/plugins/emoticons/img/smiley-cool.gif
Normal file → Executable file
|
Before Width: | Height: | Size: 354 B After Width: | Height: | Size: 354 B |
0
packages/Webkul/Admin/publishable/assets/js/tinyMCE/plugins/emoticons/img/smiley-cry.gif
Normal file → Executable file
|
Before Width: | Height: | Size: 329 B After Width: | Height: | Size: 329 B |
0
packages/Webkul/Admin/publishable/assets/js/tinyMCE/plugins/emoticons/img/smiley-embarassed.gif
Normal file → Executable file
|
Before Width: | Height: | Size: 331 B After Width: | Height: | Size: 331 B |
0
packages/Webkul/Admin/publishable/assets/js/tinyMCE/plugins/emoticons/img/smiley-foot-in-mouth.gif
Normal file → Executable file
|
Before Width: | Height: | Size: 342 B After Width: | Height: | Size: 342 B |
0
packages/Webkul/Admin/publishable/assets/js/tinyMCE/plugins/emoticons/img/smiley-frown.gif
Normal file → Executable file
|
Before Width: | Height: | Size: 340 B After Width: | Height: | Size: 340 B |
0
packages/Webkul/Admin/publishable/assets/js/tinyMCE/plugins/emoticons/img/smiley-innocent.gif
Normal file → Executable file
|
Before Width: | Height: | Size: 336 B After Width: | Height: | Size: 336 B |
0
packages/Webkul/Admin/publishable/assets/js/tinyMCE/plugins/emoticons/img/smiley-kiss.gif
Normal file → Executable file
|
Before Width: | Height: | Size: 338 B After Width: | Height: | Size: 338 B |