Merge pull request #8 from bagisto/master

Sync fork's master with base's master
This commit is contained in:
Prashant Singh 2019-01-16 19:21:44 +05:30 committed by GitHub
commit 0199f0473b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1173 changed files with 6840 additions and 6099 deletions

0
CHANGELOG for v0.1.x.md Normal file → Executable file
View File

76
CODE_OF_CONDUCT.md Normal file
View File

@ -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

13
README.md Normal file → Executable file
View File

@ -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).

0
app/Console/Kernel.php Normal file → Executable file
View File

0
app/Exceptions/Handler.php Normal file → Executable file
View File

0
app/Http/Controllers/Controller.php Normal file → Executable file
View File

0
app/Http/Kernel.php Normal file → Executable file
View File

0
app/Http/Middleware/EncryptCookies.php Normal file → Executable file
View File

0
app/Http/Middleware/RedirectIfAuthenticated.php Normal file → Executable file
View File

0
app/Http/Middleware/TrimStrings.php Normal file → Executable file
View File

0
app/Http/Middleware/TrustProxies.php Normal file → Executable file
View File

0
app/Http/Middleware/VerifyCsrfToken.php Normal file → Executable file
View File

0
app/Providers/AppServiceProvider.php Normal file → Executable file
View File

0
app/Providers/AuthServiceProvider.php Normal file → Executable file
View File

0
app/Providers/BroadcastServiceProvider.php Normal file → Executable file
View File

0
app/Providers/EventServiceProvider.php Normal file → Executable file
View File

0
app/Providers/RouteServiceProvider.php Normal file → Executable file
View File

0
artisan Normal file → Executable file
View File

0
bootstrap/app.php Normal file → Executable file
View File

0
bower.json Normal file → Executable file
View File

0
composer.json Normal file → Executable file
View File

0
config/acl.php Normal file → Executable file
View File

18
config/app.php Normal file → Executable file
View File

@ -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
config/auth.php Normal file → Executable file
View File

0
config/broadcasting.php Normal file → Executable file
View File

0
config/cache.php Normal file → Executable file
View File

0
config/carriers.php Normal file → Executable file
View File

0
config/concord.php Normal file → Executable file
View File

0
config/core.php Normal file → Executable file
View File

0
config/database.php Normal file → Executable file
View File

90
config/datagrid.php Normal file
View File

@ -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
config/db-blade-compiler.php Normal file → Executable file
View File

0
config/debugbar.php Normal file → Executable file
View File

0
config/dompdf.php Normal file → Executable file
View File

0
config/excel.php Normal file → Executable file
View File

0
config/filesystems.php Normal file → Executable file
View File

0
config/hashing.php Normal file → Executable file
View File

0
config/image.php Normal file → Executable file
View File

0
config/imagecache.php Normal file → Executable file
View File

0
config/logging.php Normal file → Executable file
View File

0
config/mail.php Normal file → Executable file
View File

0
config/menu.php Normal file → Executable file
View File

0
config/modules.php Normal file → Executable file
View File

0
config/paymentmethods.php Normal file → Executable file
View File

0
config/queue.php Normal file → Executable file
View File

0
config/repository.php Normal file → Executable file
View File

0
config/services.php Normal file → Executable file
View File

0
config/session.php Normal file → Executable file
View File

0
config/themes.php Normal file → Executable file
View File

0
config/tinker.php Normal file → Executable file
View File

0
config/translatable.php Normal file → Executable file
View File

0
config/trustedproxy.php Normal file → Executable file
View File

0
config/view.php Normal file → Executable file
View File

0
database/.gitignore vendored Normal file → Executable file
View File

0
database/factories/UserFactory.php Normal file → Executable file
View File

View File

View File

0
database/seeds/DatabaseSeeder.php Normal file → Executable file
View File

0
migration guide.md Normal file → Executable file
View File

0
package.json Normal file → Executable file
View File

0
packages/Webkul/API/Http/Controllers/Controller.php Normal file → Executable file
View File

View 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);
}

View File

@ -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);

View 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']);

View 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]);

View File

View File

@ -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]);

View File

@ -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;

View File

View File

0
packages/Webkul/API/Http/api.php Normal file → Executable file
View File

0
packages/Webkul/API/Providers/APIServiceProvider.php Normal file → Executable file
View File

0
packages/Webkul/API/composer.json Normal file → Executable file
View File

0
packages/Webkul/Admin/.gitignore vendored Normal file → Executable file
View File

0
packages/Webkul/Admin/composer.json Normal file → Executable file
View File

0
packages/Webkul/Admin/package.json Normal file → Executable file
View File

2
packages/Webkul/Admin/publishable/assets/css/admin.css vendored Normal file → Executable file

File diff suppressed because one or more lines are too long

View File

Before

Width:  |  Height:  |  Size: 618 B

After

Width:  |  Height:  |  Size: 618 B

View File

Before

Width:  |  Height:  |  Size: 881 B

After

Width:  |  Height:  |  Size: 881 B

0
packages/Webkul/Admin/publishable/assets/js/admin.js vendored Normal file → Executable file
View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

Before

Width:  |  Height:  |  Size: 354 B

After

Width:  |  Height:  |  Size: 354 B

View File

Before

Width:  |  Height:  |  Size: 329 B

After

Width:  |  Height:  |  Size: 329 B

View File

Before

Width:  |  Height:  |  Size: 331 B

After

Width:  |  Height:  |  Size: 331 B

View File

Before

Width:  |  Height:  |  Size: 342 B

After

Width:  |  Height:  |  Size: 342 B

View File

Before

Width:  |  Height:  |  Size: 340 B

After

Width:  |  Height:  |  Size: 340 B

View File

Before

Width:  |  Height:  |  Size: 336 B

After

Width:  |  Height:  |  Size: 336 B

View File

Before

Width:  |  Height:  |  Size: 338 B

After

Width:  |  Height:  |  Size: 338 B

Some files were not shown because too many files have changed in this diff Show More