diff --git a/composer.json b/composer.json
index 58323a4e4..e4e0e4b2f 100755
--- a/composer.json
+++ b/composer.json
@@ -60,9 +60,7 @@
"bagisto/laravel-tax": "v0.1.0",
"bagisto/laravel-api": "v0.1.0",
"bagisto/laravel-paypal": "v0.1.0",
- "bagisto/laravel-discount": "v0.1.0",
- "bagisto/laravel-customer-document": "v0.1.0",
- "bagisto/laravel-bulk-add-to-cart": "v0.1.0"
+ "bagisto/laravel-discount": "v0.1.0"
},
"autoload": {
"classmap": [
@@ -90,9 +88,7 @@
"Webkul\\Sales\\": "packages/Webkul/Sales/src",
"Webkul\\Tax\\": "packages/Webkul/Tax/src",
"Webkul\\API\\": "packages/Webkul/API",
- "Webkul\\CustomerDocument\\": "packages/Webkul/CustomerDocument/src",
- "Webkul\\Discount\\": "packages/Webkul/Discount/src",
- "Webkul\\BulkAddToCart\\": "packages/Webkul/BulkAddToCart/src"
+ "Webkul\\Discount\\": "packages/Webkul/Discount/src"
}
},
"autoload-dev": {
diff --git a/config/app.php b/config/app.php
index 83f330445..890414dba 100755
--- a/config/app.php
+++ b/config/app.php
@@ -245,9 +245,7 @@ return [
Webkul\Sales\Providers\SalesServiceProvider::class,
Webkul\Tax\Providers\TaxServiceProvider::class,
Webkul\API\Providers\APIServiceProvider::class,
- Webkul\CustomerDocument\Providers\CustomerDocumentServiceProvider::class,
Webkul\Discount\Providers\DiscountServiceProvider::class,
- Webkul\BulkAddToCart\Providers\BulkAddToCartServiceProvider::class,
],
/*
diff --git a/packages/Webkul/BulkAddToCart/composer.json b/packages/Webkul/BulkAddToCart/composer.json
deleted file mode 100644
index 36b409ba8..000000000
--- a/packages/Webkul/BulkAddToCart/composer.json
+++ /dev/null
@@ -1,24 +0,0 @@
-{
- "name": "bagisto/laravel-bulk-add-to-cart",
- "license": "MIT",
- "authors": [
- {
- "name": "Rahul Shukla",
- "email": "rahulshukla517@webkul.com"
- }
- ],
- "autoload": {
- "psr-4": {
- "Webkul\\BulkAddToCart\\": "src/"
- }
- },
- "extra": {
- "laravel": {
- "providers": [
- "Webkul\\BulkAddToCart\\BulkAddToCartServiceProvider"
- ],
- "aliases": {}
- }
- },
- "minimum-stability": "dev"
-}
\ No newline at end of file
diff --git a/packages/Webkul/BulkAddToCart/src/Config/menu.php b/packages/Webkul/BulkAddToCart/src/Config/menu.php
deleted file mode 100644
index 20ef523ad..000000000
--- a/packages/Webkul/BulkAddToCart/src/Config/menu.php
+++ /dev/null
@@ -1,12 +0,0 @@
- 'account.bulk-add-to-cart',
- 'name' => 'bulkaddtocart::app.products.bulk-add-to-cart',
- 'route' =>'cart.bulk-add-to-cart.create',
- 'sort' => 7
- ]
-];
-
-?>
\ No newline at end of file
diff --git a/packages/Webkul/BulkAddToCart/src/Http/Controllers/BulkAddToCartController.php b/packages/Webkul/BulkAddToCart/src/Http/Controllers/BulkAddToCartController.php
deleted file mode 100644
index f4b02b50c..000000000
--- a/packages/Webkul/BulkAddToCart/src/Http/Controllers/BulkAddToCartController.php
+++ /dev/null
@@ -1,163 +0,0 @@
-
- * @copyright 2018 Webkul Software Pvt Ltd (http://www.webkul.com)
- */
-class BulkAddToCartController extends Controller
-{
- /**
- * Contains route related configuration
- *
- * @var array
- */
- protected $_config;
-
- /**
- * ProductRepository object
- *
- * @var array
- */
- protected $product;
-
- /**
- * Create a new controller instance.
- *
- * @param \Webkul\Product\Repositories\ProductRepository $product
- * @return void
- */
- public function __construct(Product $product)
- {
- $this->product = $product;
-
- $this->_config = request('_config');
- }
-
- /**
- * Show the form for creating a new resource.
- *
- * @return \Illuminate\Http\Response
- */
- public function create()
- {
- return view($this->_config['view']);
- }
-
- /**
- * Store a newly created resource in storage.
- *
- * @return \Illuminate\Http\Response
- */
- public function store()
- {
- $valid_extension = ['xlsx', 'csv', 'xls', 'ods'];
-
- if (! in_array(request()->file('file')->getClientOriginalExtension(), $valid_extension)) {
- session()->flash('error', trans('bulkaddtocart::app.products.upload-error'));
-
- return redirect()->back();
- } else {
- try {
- $excelData = (new DataGridImport)->toArray(request()->file('file'));
- $cart = [];
-
- foreach ($excelData as $data) {
- foreach ($data as $column => $uploadData) {
- $validator = Validator::make($uploadData, [
- 'sku' => 'required',
- 'quantity' => 'required|numeric',
- ]);
-
- $product = $this->product->findOneWhere([
- 'sku' => $uploadData['sku'],
- ]);
-
- if ($product) {
- $canAdd = $product->haveSufficientQuantity($uploadData['quantity']);
-
- if (! $canAdd) {
- $sufficientQuantity[] = $column + 1;
- }
- }
-
- if ($validator->fails()) {
- $failedRules[$column+1] = $validator->errors();
- }
- }
- }
-
- if (isset($failedRules)) {
- foreach ($failedRules as $coulmn => $fail) {
- if ($fail->first('sku')) {
- $errorMsg[$coulmn] = $fail->first('sku');
- } else if ($fail->first('quantity')) {
- $errorMsg[$coulmn] = $fail->first('quantity');
- }
- }
-
- foreach ($errorMsg as $key => $msg) {
- $msg = str_replace(".", "", $msg);
- $message[] = $msg. ' at Row ' .$key . '.';
- }
-
- $finalMsg = implode(" ", $message);
-
- session()->flash('error', $finalMsg);
-
- return redirect()->back();
- } else if (isset($sufficientQuantity)) {
- $errorRows = implode(",", $sufficientQuantity);
- $finalMsg = trans('bulkaddtocart::app.products.quantity-error') . ' ' . $errorRows;
-
- session()->flash('error', $finalMsg);
-
- return redirect()->back();
- } else {
- foreach ($excelData as $data) {
- foreach ($data as $column => $uploadData) {
- $product = $this->product->findOneWhere([
- 'sku' => $uploadData['sku'],
- ]);
-
- if ($product->type == 'simple') {
- $cart['product'] = (string)$product->id;
- $cart['quantity'] = (string)$uploadData['quantity'];
- $cart['is_configurable'] = 'false';
-
- Event::fire('checkout.cart.add.before', $cart['product']);
-
- $result = Cart::add($cart['product'], $cart);
-
- Event::fire('checkout.cart.add.after', $result);
-
- Cart::collectTotals();
- }
- }
- }
- }
-
- session()->flash('success', trans('bulkaddtocart::app.products.upload-sucess'));
-
- return redirect()->route($this->_config['redirect']);
- } catch (\Exception $e) {
- $failure = new Failure(1, 'rows', [0 => trans('bulkaddtocart::app.products.enough-row-error')]);
-
- session()->flash('error', $failure->errors()[0]);
-
- return redirect()->back();
- }
- }
- }
-}
\ No newline at end of file
diff --git a/packages/Webkul/BulkAddToCart/src/Http/Controllers/Controller.php b/packages/Webkul/BulkAddToCart/src/Http/Controllers/Controller.php
deleted file mode 100644
index 47f4fa3ef..000000000
--- a/packages/Webkul/BulkAddToCart/src/Http/Controllers/Controller.php
+++ /dev/null
@@ -1,13 +0,0 @@
- ['web', 'locale', 'theme', 'currency']], function () {
-
- Route::prefix('customer')->group(function () {
-
- Route::group(['middleware' => ['customer']], function () {
-
- Route::get('bulk-add-to-cart', 'Webkul\BulkAddToCart\Http\Controllers\BulkAddToCartController@create')->defaults('_config', [
- 'view' => 'bulkaddtocart::products.bulk-add-to-cart'
- ])->name('cart.bulk-add-to-cart.create');
-
- Route::post('bulk-add-to-cart', 'Webkul\BulkAddToCart\Http\Controllers\BulkAddToCartController@store')->defaults('_config', [
- 'redirect' => 'shop.checkout.cart.index'
- ])->name('cart.bulk-add-to-cart.store');
- });
- });
-});
\ No newline at end of file
diff --git a/packages/Webkul/BulkAddToCart/src/Providers/BulkAddToCartServiceProvider.php b/packages/Webkul/BulkAddToCart/src/Providers/BulkAddToCartServiceProvider.php
deleted file mode 100644
index f9f096835..000000000
--- a/packages/Webkul/BulkAddToCart/src/Providers/BulkAddToCartServiceProvider.php
+++ /dev/null
@@ -1,45 +0,0 @@
-loadRoutesFrom(__DIR__ . '/../Http/routes.php');
-
- $this->loadTranslationsFrom(__DIR__ . '/../Resources/lang', 'bulkaddtocart');
-
- $this->loadViewsFrom(__DIR__ . '/../Resources/views', 'bulkaddtocart');
- }
-
- /**
- * Register services.
- *
- * @return void
- */
- public function register()
- {
- $this->registerConfig();
- }
-
- /**
- * Register package config.
- *
- * @return void
- */
- protected function registerConfig()
- {
- $this->mergeConfigFrom(
- dirname(__DIR__) . '/Config/menu.php', 'menu.customer'
- );
- }
-}
\ No newline at end of file
diff --git a/packages/Webkul/BulkAddToCart/src/Resources/lang/en/app.php b/packages/Webkul/BulkAddToCart/src/Resources/lang/en/app.php
deleted file mode 100644
index edef522ce..000000000
--- a/packages/Webkul/BulkAddToCart/src/Resources/lang/en/app.php
+++ /dev/null
@@ -1,13 +0,0 @@
- [
- 'bulk-add-to-cart' => 'Bulk Add to Cart',
- 'file' => 'File',
- 'submit' => 'Submit',
- 'upload-sucess' => 'Products Sucessfully added to Cart',
- 'quantity-error' => 'Products have not sufficient quantity at row',
- 'upload-error' => 'The file must be a file of type: xls, xlsx, csv, ods.',
- 'enough-row-error' => 'file has not enough rows',
- ],
-];
\ No newline at end of file
diff --git a/packages/Webkul/BulkAddToCart/src/Resources/views/products/bulk-add-to-cart.blade.php b/packages/Webkul/BulkAddToCart/src/Resources/views/products/bulk-add-to-cart.blade.php
deleted file mode 100644
index 5f369b688..000000000
--- a/packages/Webkul/BulkAddToCart/src/Resources/views/products/bulk-add-to-cart.blade.php
+++ /dev/null
@@ -1,39 +0,0 @@
-@extends('shop::layouts.master')
-
-@section('page_title')
- {{ __('bulkaddtocart::app.products.bulk-add-to-cart') }}
-@endsection
-
-@section('content-wrapper')
-
-
- @include('shop::customers.account.partials.sidemenu')
-
-
-
-
-
{{ __('bulkaddtocart::app.products.bulk-add-to-cart') }}
-
-
-
-
-
-
-
-
-@endsection
\ No newline at end of file
diff --git a/packages/Webkul/CustomerDocument/composer.json b/packages/Webkul/CustomerDocument/composer.json
deleted file mode 100644
index 173c4ddf7..000000000
--- a/packages/Webkul/CustomerDocument/composer.json
+++ /dev/null
@@ -1,24 +0,0 @@
-{
- "name": "bagisto/laravel-customer-document",
- "license": "MIT",
- "authors": [
- {
- "name": "Rahul Shukla",
- "email": "rahulshukla517@webkul.com"
- }
- ],
- "autoload": {
- "psr-4": {
- "Webkul\\CustomerDocument\\": "src/"
- }
- },
- "extra": {
- "laravel": {
- "providers": [
- "Webkul\\CustomerDocument\\CustomerDocumentServiceProvider"
- ],
- "aliases": {}
- }
- },
- "minimum-stability": "dev"
-}
\ No newline at end of file
diff --git a/packages/Webkul/CustomerDocument/src/Config/menu.php b/packages/Webkul/CustomerDocument/src/Config/menu.php
deleted file mode 100644
index b469239ea..000000000
--- a/packages/Webkul/CustomerDocument/src/Config/menu.php
+++ /dev/null
@@ -1,12 +0,0 @@
- 'account.documents',
- 'name' => 'customerdocument::app.admin.customers.documents',
- 'route' =>'customer.documents.index',
- 'sort' => 6
- ]
-];
-
-?>
\ No newline at end of file
diff --git a/packages/Webkul/CustomerDocument/src/Contracts/CustomerDocument.php b/packages/Webkul/CustomerDocument/src/Contracts/CustomerDocument.php
deleted file mode 100644
index 44ca2e742..000000000
--- a/packages/Webkul/CustomerDocument/src/Contracts/CustomerDocument.php
+++ /dev/null
@@ -1,7 +0,0 @@
-increments('id');
- $table->string('name');
- $table->string('path');
- $table->integer('customer_id')->unsigned();
- $table->foreign('customer_id')->references('id')->on('customers')->onDelete('cascade');
- $table->timestamps();
- });
- }
-
- /**
- * Reverse the migrations.
- *
- * @return void
- */
- public function down()
- {
- Schema::dropIfExists('customer_documents');
- }
-}
diff --git a/packages/Webkul/CustomerDocument/src/Http/Controllers/Controller.php b/packages/Webkul/CustomerDocument/src/Http/Controllers/Controller.php
deleted file mode 100644
index ec04aa1e9..000000000
--- a/packages/Webkul/CustomerDocument/src/Http/Controllers/Controller.php
+++ /dev/null
@@ -1,13 +0,0 @@
-
- * @copyright 2018 Webkul Software Pvt Ltd (http://www.webkul.com)
- */
-class DocumentController extends Controller
-{
- /**
- * Contains route related configuration
- *
- * @var array
- */
- protected $_config;
-
- /**
- * CustomerDocumentRepository object
- *
- * @var array
- */
- protected $customerDocument;
-
- /**
- * Create a new controller instance.
- *
- * @param \Webkul\Customer\Repositories\CustomerDocumentRepository $customerDocument
- */
- public function __construct(CustomerDocumentRepository $customerDocument)
- {
- $this->_config = request('_config');
-
- $this->customerDocument = $customerDocument;
- }
-
- /**
- * Display a listing of the resource.
- *
- * @return \Illuminate\Http\Response
- */
- public function index()
- {
- $documents = $this->customerDocument->findWhere(['customer_id' => auth()->guard('customer')->user()->id]);
-
- return view($this->_config['view'], compact('documents'));
- }
-
- /**
- * upload document
- *
- * @return \Illuminate\Http\Response
- */
- public function upload()
- {
- $data = request()->all();
-
- if (request()->hasFile('file')) {
- $dir = 'customer';
- $document['path'] = request()->file('file')->store($dir);
- }
-
- $document['customer_id'] = $data['customer_id'];
- $document['name'] = $data['name'];
-
- $this->customerDocument->create($document);
-
- session()->flash('success', trans('customerdocument::app.admin.customers.upload-success'));
-
- return redirect()->back();
- }
-
- /**
- * download the file for the specified resource.
- *
- * @param int $id
- * @return \Illuminate\Http\Response
- */
- public function download($id)
- {
- $document = $this->customerDocument->findOrfail($id);
-
- return Storage::download($document['path']);
- }
-
- /**
- * Remove the specified resource from storage..
- *
- * @param int $id
- * @return \Illuminate\Http\Response
- */
- public function delete($id)
- {
- $document = $this->customerDocument->findOrfail($id);
-
- $this->customerDocument->delete($id);
-
- Storage::delete($document['path']);
-
- session()->flash('success', trans('customerdocument::app.admin.customers.delete-success'));
-
- return redirect()->back();
- }
-}
\ No newline at end of file
diff --git a/packages/Webkul/CustomerDocument/src/Http/admin-routes.php b/packages/Webkul/CustomerDocument/src/Http/admin-routes.php
deleted file mode 100644
index 303622754..000000000
--- a/packages/Webkul/CustomerDocument/src/Http/admin-routes.php
+++ /dev/null
@@ -1,26 +0,0 @@
- ['web']], function () {
-
- Route::prefix('admin')->group(function () {
-
- Route::group(['middleware' => ['admin']], function () {
-
- //document Management Routes
- Route::post('upload-document', 'Webkul\CustomerDocument\Http\Controllers\DocumentController@upload')->defaults('_config', [
- 'redirect' => 'admin.customer.index'
- ])->name('admin.customer.document.upload');
-
- Route::get('download-document/{id}', 'Webkul\CustomerDocument\Http\Controllers\DocumentController@download')->defaults('_config', [
- 'redirect' => 'admin.customer.index'
- ])->name('admin.customer.document.download');
-
- Route::get('delete-document/{id}', 'Webkul\CustomerDocument\Http\Controllers\DocumentController@delete')->defaults('_config', [
- 'redirect' => 'admin.customer.index'
- ])->name('admin.customer.document.delete');
-
- });
-
- });
-
-});
diff --git a/packages/Webkul/CustomerDocument/src/Http/front-routes.php b/packages/Webkul/CustomerDocument/src/Http/front-routes.php
deleted file mode 100644
index 51aa04022..000000000
--- a/packages/Webkul/CustomerDocument/src/Http/front-routes.php
+++ /dev/null
@@ -1,21 +0,0 @@
- ['web', 'locale', 'theme', 'currency']], function () {
-
- Route::prefix('customer')->group(function () {
-
- Route::group(['middleware' => ['customer']], function () {
-
- Route::prefix('account')->group(function () {
-
- Route::get('documents', 'Webkul\CustomerDocument\Http\Controllers\DocumentController@index')->defaults('_config', [
- 'view' => 'customerdocument::shop.customers.document'
- ])->name('customer.documents.index');
-
- Route::get('download-document/{id}', 'Webkul\CustomerDocument\Http\Controllers\DocumentController@download')->defaults('_config', [
- 'redirect' => 'admin.customer.index'
- ])->name('customer.document.download');
- });
- });
- });
-});
\ No newline at end of file
diff --git a/packages/Webkul/CustomerDocument/src/Models/CustomerDocument.php b/packages/Webkul/CustomerDocument/src/Models/CustomerDocument.php
deleted file mode 100644
index 690f5d3a0..000000000
--- a/packages/Webkul/CustomerDocument/src/Models/CustomerDocument.php
+++ /dev/null
@@ -1,13 +0,0 @@
-loadRoutesFrom(__DIR__ . '/../Http/admin-routes.php');
-
- $this->loadRoutesFrom(__DIR__ . '/../Http/front-routes.php');
-
- $this->loadTranslationsFrom(__DIR__ . '/../Resources/lang', 'customerdocument');
-
- $this->loadViewsFrom(__DIR__ . '/../Resources/views', 'customerdocument');
-
- $this->loadMigrationsFrom(__DIR__ . '/../Database/migrations');
-
- $this->app->register(ModuleServiceProvider::class);
-
- $this->app->register(EventServiceProvider::class);
- }
-
- /**
- * Register services.
- *
- * @return void
- */
- public function register()
- {
- $this->registerConfig();
- }
-
- /**
- * Register package config.
- *
- * @return void
- */
- protected function registerConfig()
- {
- $this->mergeConfigFrom(
- dirname(__DIR__) . '/Config/menu.php', 'menu.customer'
- );
- }
-}
\ No newline at end of file
diff --git a/packages/Webkul/CustomerDocument/src/Providers/EventServiceProvider.php b/packages/Webkul/CustomerDocument/src/Providers/EventServiceProvider.php
deleted file mode 100644
index 0feff68cc..000000000
--- a/packages/Webkul/CustomerDocument/src/Providers/EventServiceProvider.php
+++ /dev/null
@@ -1,21 +0,0 @@
-addTemplate('customerdocument::admin.customers.upload');
- });
- }
-}
\ No newline at end of file
diff --git a/packages/Webkul/CustomerDocument/src/Providers/ModuleServiceProvider.php b/packages/Webkul/CustomerDocument/src/Providers/ModuleServiceProvider.php
deleted file mode 100644
index 49aaf5ace..000000000
--- a/packages/Webkul/CustomerDocument/src/Providers/ModuleServiceProvider.php
+++ /dev/null
@@ -1,12 +0,0 @@
-
- * @copyright 2018 Webkul Software Pvt Ltd (http://www.webkul.com)
- */
-class CustomerDocumentRepository extends Repository
-{
- /**
- * Specify Model class name
- *
- * @return mixed
- */
-
- function model()
- {
- return 'Webkul\CustomerDocument\Contracts\CustomerDocument';
- }
-}
\ No newline at end of file
diff --git a/packages/Webkul/CustomerDocument/src/Resources/lang/en/app.php b/packages/Webkul/CustomerDocument/src/Resources/lang/en/app.php
deleted file mode 100644
index d7fbf56ac..000000000
--- a/packages/Webkul/CustomerDocument/src/Resources/lang/en/app.php
+++ /dev/null
@@ -1,17 +0,0 @@
-[
- 'customers' => [
- 'documents' => 'Documents',
- 'add-document' => 'Add Document',
- 'submit' => 'Submit',
- 'file' => 'File',
- 'name' => 'Name',
- 'download' => 'Download',
- 'upload-success' => 'Document uploaded successfully.',
- 'delete-success' => 'Document deleted successfully.',
- 'empty' => 'You Do not Have Any Documents.'
- ],
- ],
-];
\ No newline at end of file
diff --git a/packages/Webkul/CustomerDocument/src/Resources/views/admin/customers/upload.blade.php b/packages/Webkul/CustomerDocument/src/Resources/views/admin/customers/upload.blade.php
deleted file mode 100644
index 0d5235107..000000000
--- a/packages/Webkul/CustomerDocument/src/Resources/views/admin/customers/upload.blade.php
+++ /dev/null
@@ -1,76 +0,0 @@
-findWhere(['customer_id' => $customer->id]);
-
-?>
-
-
-
-
-
-
-
-
-
-
- | {{ __('customerdocument::app.admin.customers.name') }} |
- {{ __('customerdocument::app.admin.customers.download') }} |
- |
-
-
-
-
- @foreach ($documents as $document)
-
- | {{ $document->name }} |
-
-
-
-
- |
-
-
-
-
- |
-
- @endforeach
-
-
-
-
-
-
-
-
- {{ __('customerdocument::app.admin.customers.add-document') }}
-
-
-
\ No newline at end of file
diff --git a/packages/Webkul/CustomerDocument/src/Resources/views/shop/customers/document.blade.php b/packages/Webkul/CustomerDocument/src/Resources/views/shop/customers/document.blade.php
deleted file mode 100644
index 3e9844e62..000000000
--- a/packages/Webkul/CustomerDocument/src/Resources/views/shop/customers/document.blade.php
+++ /dev/null
@@ -1,55 +0,0 @@
-@extends('shop::layouts.master')
-
-@section('page_title')
- {{ __('customerdocument::app.admin.customers.documents') }}
-@endsection
-
-@section('content-wrapper')
-
-
- @include('shop::customers.account.partials.sidemenu')
-
-
-
-
-
{{ __('customerdocument::app.admin.customers.documents') }}
-
-
-
-
-
- @if ($documents->count())
-
-
-
-
- | {{ __('customerdocument::app.admin.customers.name') }} |
- {{ __('customerdocument::app.admin.customers.download') }} |
- |
-
-
-
-
- @foreach ($documents as $document)
-
- | {{ $document->name }} |
-
-
-
-
- |
-
- @endforeach
-
-
-
- @else
-
- {{ __('customerdocument::app.admin.customers.empty') }}
-
- @endif
-
-
-
-
-@endsection
\ No newline at end of file