diff --git a/README.md b/README.md index 201f8a8a3..3c5d6dfc7 100644 --- a/README.md +++ b/README.md @@ -1,13 +1,16 @@ -![Bagisto Logo](https://bagisto.com/wp-content/themes/bagisto/images/logo.png) +                       ![Bagisto Logo](https://bagisto.com/wp-content/themes/bagisto/images/logo.png) -1. #### Introduction -2. #### Requirements -3. #### Installation -4. #### Configuration +# Topics +1. ### Introduction +2. ### Requirements +3. ### Installation +4. ### Configuration +5. ### Migration Guides +6. ### License -# 1. About Bagisto: +### 1. Introduction: [Bagisto](https://www.bagisto.com) is a hand tailored E-Commerce framework designed on some of the hottest opensource technologies such as [Laravel](https://laravel.com) a [PHP](https://secure.php.net/) framework, [Vue.js](https://vuejs.org) @@ -16,6 +19,8 @@ a [Node.js](https://nodejs.org) framework. **Bagisto is viable attempt to cut down your time, cost and workforce for building online stores or migrating from physical stores to the ever demanding online world. Your business whether small or huge it suits all and very simple to set it up.** +**We are also having a forum for any type of your concern, feature request discussions. Please visit: [Bagisto Forums](https://forums.bagisto.com/)** + It packs in lots of demanding features that allows your business to scale in no time: * Multiple Channels, Locale, Currencies. @@ -30,14 +35,13 @@ It packs in lots of demanding features that allows your business to scale in no * Orders Management System. * Customer Cart, Wishlist, Product Reviews. * Simple and Configurable Products. -* check out [more....](https://bagisto.com/features/). +* Check out [more....](https://bagisto.com/features/). **For Developers**: Dev guys can take advantage of two of the hottest frameworks used in this project Laravel and Vue.js, both of these frameworks have been used in Bagisto. Bagisto is using power of both of these frameworks and making best out of it out of the box. - -# 2. Requirements: +### 2. Requirements: * **OS**: Ubuntu 16.04 LTS or higher. * **SERVER**: Apache 2 or NGINX @@ -48,7 +52,7 @@ Bagisto is using power of both of these frameworks and making best out of it out * **Node**: 8.11.3 LTS or higher. * **Composer**: 1.6.5 or higher. -# 3. Configuration: +### 3. Configuration: **Run this Command** to download the project on to your local machine or server: ~~~ @@ -70,7 +74,7 @@ Although you have to set the mailer variables also for full functioning of your default. -# 4.Installation: +### 4. Installation: **1. Run the Command** ~~~ @@ -97,6 +101,17 @@ php artisan storage:link > That's it, now just execute the project on your specified domain entry point pointing to public folder inside installation directory. +### 5. Migration from v0.1.0 to v0.1.1 -# License +**Run commands below:** + +> **php artisan migrate** + +> **php artisan vendor:publish** + + +### 6. License Bagisto is a truly opensource E-Commerce framework which will always be free under the [MIT License](https://opensource.org/licenses/MIT). + +### Coming Soon: +-> API support for core and numerous fixes. diff --git a/packages/Webkul/Admin/src/Resources/views/common/create-country-state.blade.php b/packages/Webkul/Admin/src/Resources/views/common/create-country-state.blade.php deleted file mode 100644 index 7dbf7505b..000000000 --- a/packages/Webkul/Admin/src/Resources/views/common/create-country-state.blade.php +++ /dev/null @@ -1,25 +0,0 @@ -
- - -
- -
- - -
- -@push('scripts') - - - -@endpush \ No newline at end of file diff --git a/packages/Webkul/Admin/src/Resources/views/common/edit-country-state.blade.php b/packages/Webkul/Admin/src/Resources/views/common/edit-country-state.blade.php deleted file mode 100644 index 0e9856886..000000000 --- a/packages/Webkul/Admin/src/Resources/views/common/edit-country-state.blade.php +++ /dev/null @@ -1,28 +0,0 @@ -
- country ?> - - - - -
- -
- - -
- -@push('scripts') - - - -@endpush \ No newline at end of file diff --git a/packages/Webkul/Admin/src/Resources/views/settings/inventory_sources/create.blade.php b/packages/Webkul/Admin/src/Resources/views/settings/inventory_sources/create.blade.php index fc4c9c493..6460692e3 100644 --- a/packages/Webkul/Admin/src/Resources/views/settings/inventory_sources/create.blade.php +++ b/packages/Webkul/Admin/src/Resources/views/settings/inventory_sources/create.blade.php @@ -74,24 +74,27 @@
-
- - +
+ + + @{{ errors.first('contact_name') }}
-
- - +
+ + + @{{ errors.first('contact_email') }}
-
- - +
+ + + @{{ errors.first('contact_number') }}
- +
@@ -100,26 +103,24 @@
- @include ('admin::common.create-country-state') + @include ('admin::customers.country-state', ['countryCode' => old('country'), 'stateCode' => old('state')]) -
- - +
+ + + @{{ errors.first('city') }}
-
- - +
+ + + @{{ errors.first('street') }}
-
- - -
- -
- - +
+ + + @{{ errors.first('postcode') }}
diff --git a/packages/Webkul/Admin/src/Resources/views/settings/inventory_sources/edit.blade.php b/packages/Webkul/Admin/src/Resources/views/settings/inventory_sources/edit.blade.php index 71b752595..e1c7010a4 100644 --- a/packages/Webkul/Admin/src/Resources/views/settings/inventory_sources/edit.blade.php +++ b/packages/Webkul/Admin/src/Resources/views/settings/inventory_sources/edit.blade.php @@ -75,19 +75,22 @@
-
- - +
+ + + @{{ errors.first('contact_name') }}
-
- - +
+ + + @{{ errors.first('contact_email') }}
-
- - +
+ + + @{{ errors.first('contact_number') }}
@@ -101,21 +104,24 @@
- @include ('admin::common.edit-country-state', ['model' => $inventorySource]) + @include ('admin::customers.country-state', ['countryCode' => old('country') ?? $inventorySource->country, 'stateCode' => old('state') ?? $inventorySource->state]) -
- - +
+ + + @{{ errors.first('city') }}
-
- - +
+ + + @{{ errors.first('street') }}
-
- - +
+ + + @{{ errors.first('postcode') }}
diff --git a/packages/Webkul/Checkout/src/Cart.php b/packages/Webkul/Checkout/src/Cart.php index eb3f5651c..098237836 100644 --- a/packages/Webkul/Checkout/src/Cart.php +++ b/packages/Webkul/Checkout/src/Cart.php @@ -738,7 +738,8 @@ class Cart { * * @return boolean */ - public function validateItems() { + public function validateItems() + { $cart = $this->getCart(); //rare case of accident-->used when there are no items. diff --git a/packages/Webkul/Checkout/src/Database/Migrations/2018_11_21_144411_create_cart_item_inventories_table.php b/packages/Webkul/Checkout/src/Database/Migrations/2018_11_21_144411_create_cart_item_inventories_table.php new file mode 100644 index 000000000..f1f9418d9 --- /dev/null +++ b/packages/Webkul/Checkout/src/Database/Migrations/2018_11_21_144411_create_cart_item_inventories_table.php @@ -0,0 +1,34 @@ +increments('id'); + $table->integer('qty')->default(0); + $table->integer('inventory_source_id')->unsigned()->nullable(); + $table->integer('cart_item_id')->unsigned()->nullable(); + $table->timestamps(); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::dropIfExists('cart_item_inventories'); + } +} diff --git a/packages/Webkul/Inventory/src/Database/Migrations/2018_07_23_110040_create_inventory_sources_table.php b/packages/Webkul/Inventory/src/Database/Migrations/2018_07_23_110040_create_inventory_sources_table.php index 01f3a947e..8a717dbaa 100644 --- a/packages/Webkul/Inventory/src/Database/Migrations/2018_07_23_110040_create_inventory_sources_table.php +++ b/packages/Webkul/Inventory/src/Database/Migrations/2018_07_23_110040_create_inventory_sources_table.php @@ -18,15 +18,15 @@ class CreateInventorySourcesTable extends Migration $table->string('code')->unique(); $table->string('name'); $table->text('description')->nullable(); - $table->string('contact_name')->nullable(); - $table->string('contact_email')->nullable(); - $table->string('contact_number')->nullable(); + $table->string('contact_name'); + $table->string('contact_email'); + $table->string('contact_number'); $table->string('contact_fax')->nullable(); - $table->string('country')->nullable(); - $table->string('state')->nullable(); - $table->string('city')->nullable(); - $table->string('street')->nullable(); - $table->string('postcode')->nullable(); + $table->string('country'); + $table->string('state'); + $table->string('city'); + $table->string('street'); + $table->string('postcode'); $table->integer('priority')->default(0); $table->decimal('latitude', 10, 5)->nullable(); $table->decimal('longitude', 10, 5)->nullable(); diff --git a/packages/Webkul/Inventory/src/Database/Seeders/InventoryTableSeeder.php b/packages/Webkul/Inventory/src/Database/Seeders/InventoryTableSeeder.php index 7ae3ee6f8..e5493fcde 100644 --- a/packages/Webkul/Inventory/src/Database/Seeders/InventoryTableSeeder.php +++ b/packages/Webkul/Inventory/src/Database/Seeders/InventoryTableSeeder.php @@ -15,7 +15,15 @@ class InventoryTableSeeder extends Seeder 'id' => 1, 'code' => 'default', 'name' => 'Default', + 'contact_name' => 'Detroit Warehouse', + 'contact_email' => 'warehouse@example.com', + 'contact_number' => 1234567899, 'status' => 1, + 'country' => 'US', + 'state' => 'MI', + 'street' => '12th Street', + 'city' => 'Detroit', + 'postcode' => '48127', ]); } } \ No newline at end of file diff --git a/packages/Webkul/Inventory/src/Http/Controllers/InventorySourceController.php b/packages/Webkul/Inventory/src/Http/Controllers/InventorySourceController.php index be70c4ec0..13bdb4e6b 100644 --- a/packages/Webkul/Inventory/src/Http/Controllers/InventorySourceController.php +++ b/packages/Webkul/Inventory/src/Http/Controllers/InventorySourceController.php @@ -69,8 +69,16 @@ class InventorySourceController extends Controller public function store() { $this->validate(request(), [ - 'code' => ['required', 'unique:inventory_sources,code', new \Webkul\Core\Contracts\Validations\Code], - 'name' => 'required' + 'code' => ['required', 'unique:inventory_sources,code', new \Webkul\Core\Contracts\Validations\Code], + 'name' => 'required', + 'contact_name' => 'required', + 'contact_email' => 'required', + 'contact_number' => 'required', + 'street' => 'required', + 'country' => 'required', + 'state' => 'required', + 'city' => 'required', + 'postcode' => 'required' ]); $this->inventorySource->create(request()->all()); @@ -103,8 +111,16 @@ class InventorySourceController extends Controller public function update(Request $request, $id) { $this->validate(request(), [ - 'code' => ['required', 'unique:inventory_sources,code,' . $id, new \Webkul\Core\Contracts\Validations\Code], - 'name' => 'required', + 'code' => ['required', 'unique:inventory_sources,code,' . $id, new \Webkul\Core\Contracts\Validations\Code], + 'name' => 'required', + 'contact_name' => 'required', + 'contact_email' => 'required', + 'contact_number' => 'required', + 'street' => 'required', + 'country' => 'required', + 'state' => 'required', + 'city' => 'required', + 'postcode' => 'required' ]); $this->inventorySource->update(request()->all(), $id); diff --git a/packages/Webkul/User/src/Http/Controllers/AccountController.php b/packages/Webkul/User/src/Http/Controllers/AccountController.php index 94b89fde9..0b4750928 100644 --- a/packages/Webkul/User/src/Http/Controllers/AccountController.php +++ b/packages/Webkul/User/src/Http/Controllers/AccountController.php @@ -60,6 +60,8 @@ class AccountController extends Controller if(!$data['password']) unset($data['password']); + else + $data['password'] = bcrypt($data['password']); $user->update($data); diff --git a/packages/Webkul/User/src/Http/Controllers/UserController.php b/packages/Webkul/User/src/Http/Controllers/UserController.php index f562b793b..e3e3c6392 100644 --- a/packages/Webkul/User/src/Http/Controllers/UserController.php +++ b/packages/Webkul/User/src/Http/Controllers/UserController.php @@ -87,7 +87,12 @@ class UserController extends Controller */ public function store(UserForm $request) { - $this->admin->create(request()->all()); + $data = request()->all(); + + if(isset($data['password']) && $data['password']) + $data['password'] = bcrypt($data['password']); + + $this->admin->create($data); session()->flash('success', 'User created successfully.'); @@ -122,6 +127,8 @@ class UserController extends Controller if(!$data['password']) unset($data['password']); + else + $data['password'] = bcrypt($data['password']); $this->admin->update($data, $id);