From b1b07c8fef646f6a9e8c5bbc9451258ffcb89aa0 Mon Sep 17 00:00:00 2001 From: Amanmyrat Date: Tue, 5 Sep 2023 16:19:21 +0500 Subject: [PATCH] Add seller related api's --- .../Sarga/API/Http/Controllers/Products.php | 5 - .../API/Http/Controllers/SellerProduct.php | 329 ++++++++++ .../API/Http/Resources/Catalog/Product.php | 3 +- packages/Sarga/API/Http/routes.php | 14 +- .../src/DataGrids/Admin/ProductDataGrid.php | 2 +- .../Shop/Account/AssignProductController.php | 6 +- .../src/Http/Requests/SellerForm.php | 4 +- .../src/Repositories/ProductRepository.php | 5 +- .../src/Repositories/SellerRepository.php | 13 +- .../Marketplace/src/Resources/lang/ru/app.php | 563 ++++++++++++++++++ .../sellers/account/profile/edit.blade.php | 4 +- 11 files changed, 929 insertions(+), 19 deletions(-) create mode 100644 packages/Sarga/API/Http/Controllers/SellerProduct.php create mode 100644 packages/Webkul/Marketplace/src/Resources/lang/ru/app.php diff --git a/packages/Sarga/API/Http/Controllers/Products.php b/packages/Sarga/API/Http/Controllers/Products.php index caf7edc..2d9b6a1 100644 --- a/packages/Sarga/API/Http/Controllers/Products.php +++ b/packages/Sarga/API/Http/Controllers/Products.php @@ -4,17 +4,12 @@ namespace Sarga\API\Http\Controllers; use Illuminate\Support\Facades\DB; use Illuminate\Support\Facades\Log; -use Sarga\API\Http\Resources\Catalog\HomeResource; use Sarga\API\Http\Resources\Catalog\ProductVariant; -use Sarga\API\Http\Resources\Catalog\Suggestion; use Sarga\API\Http\Resources\Catalog\SuperAttribute; -use Sarga\Brand\Repositories\BrandRepository; use Sarga\Shop\Repositories\ProductRepository; use Webkul\API\Http\Controllers\Shop\ProductController; use Sarga\API\Http\Resources\Catalog\Product as ProductResource; use Sarga\Shop\Repositories\AttributeOptionRepository; -use Webkul\Product\Repositories\ProductFlatRepository; -use Sarga\API\Http\Controllers\Banners as Slider; use Webkul\Core\Repositories\SliderRepository; use Carbon\Carbon; diff --git a/packages/Sarga/API/Http/Controllers/SellerProduct.php b/packages/Sarga/API/Http/Controllers/SellerProduct.php new file mode 100644 index 0000000..d517b89 --- /dev/null +++ b/packages/Sarga/API/Http/Controllers/SellerProduct.php @@ -0,0 +1,329 @@ +_config = request('_config'); + $this->productRepository = $productRepository; + $this->sellerRepository = $sellerRepository; + } + + + public function reportSeller(Request $request) + { + $validation = Validator::make($request->all(), [ + 'seller_id' => 'required', + 'user' => 'required', + 'password' => 'required', + ]); + + + if ($validation->fails()) { + return response()->json(['errors' => $validation->getMessageBag()->all()], 422); + } + + $user = $request->get('user'); + $pass = $request->get('password'); + + if ($user == "romanah_" && $pass == "bt110226$$") { + + $seller = $this->sellerRepository->isSellerMarket($request->get('seller_id')); + + if ($seller) { + $orders = SellerOrderModel::where('marketplace_seller_id', $seller->id)->count(); + $sellerProducts = SellerProductModel::where('marketplace_seller_id', $seller->id)->count(); + return response([ + "sellerOrders" => $orders, + "sellerProducts" => $sellerProducts, + "status" => 200 + ]); + } else { + return response([ + 'status' => 500, + 'message' => 'not found seller' + ]); + } + } else { + return response([ + 'status' => 500, + 'message' => 'not authorized' + ]); + } + } + public function sellerOrderDetail(Request $request) + { + $validation = Validator::make($request->all(), [ + 'order_id' => 'required', + 'user' => 'required', + 'password' => 'required', + ]); + + + if ($validation->fails()) { + return response()->json(['errors' => $validation->getMessageBag()->all()], 422); + } + + $user = $request->get('user'); + $pass = $request->get('password'); + + if ($user == "romanah_" && $pass == "bt110226$$") { + + $orderItems = SellerOrderItemModel::where('marketplace_order_id', $request->get('order_id'))->with(['product', 'item.product.images'])->paginate(12); + + $order = SellerOrderModel::where('id', $request->get('order_id'))->with('order.customer')->with('order.shipping_address')->first(); + + if ($orderItems) { + return response([ + "order" => $order, + "items" => $orderItems + ]); + } else { + return response([ + 'status' => 500, + 'message' => 'not found order Items' + ]); + } + } else { + return response([ + 'status' => 500, + 'message' => 'not authorized' + ]); + } + } + + public function sellerOrders(Request $request) + { + $validation = Validator::make($request->all(), [ + 'seller_id' => 'required', + 'user' => 'required', + 'password' => 'required', + ]); + + + if ($validation->fails()) { + return response()->json(['errors' => $validation->getMessageBag()->all()], 422); + } + + $user = $request->get('user'); + $pass = $request->get('password'); + + if ($user == "romanah_" && $pass == "bt110226$$") { + + $seller = $this->sellerRepository->isSellerMarket($request->get('seller_id')); + + if ($seller) { + $orders = SellerOrderModel::where('marketplace_seller_id', $seller->id)->orderByDesc('created_at')->with('order.customer')->paginate(15); + return response($orders); + } else { + return response([ + 'status' => 500, + 'message' => 'not found seller' + ]); + } + } else { + return response([ + 'status' => 500, + 'message' => 'not authorized' + ]); + } + } + + public function storeSellerProd(Request $request) + { + $data = $request->all(); + $validation = Validator::make($request->all(), [ + 'type' => 'required', + 'sku' => ['required', 'unique:products,sku', new \Webkul\Core\Contracts\Validations\Slug], + 'marketplace_seller_id' => 'required', + 'user' => 'required', + 'password' => 'required', + ]); + + + if ($validation->fails()) { + return response()->json(['errors' => $validation->getMessageBag()->all()], 422); + } + + $user = $request->get('user'); + $pass = $request->get('password'); + + if ($user == "romanah_" && $pass == "bt110226$$") { + + $product = new Product; + + $product->type = 'simple'; + $product->attribute_family_id = '1'; + $product->sku = $request->get('sku'); + $product->save(); + + if (!$product) { + response([ + 'error' => "error create prod" + ]); + } + + $sellerProduct = new SellerProductModel; + $sellerProduct->price = 0; + $sellerProduct->description = ""; + $sellerProduct->is_approved = 0; + $sellerProduct->is_owner = 0; + $sellerProduct->product_id = $product->id; + $sellerProduct->marketplace_seller_id = $request->get('marketplace_seller_id'); + $sellerProduct->save(); + + if (!$sellerProduct) { + response([ + 'error' => "error create SELLER prod" + ]); + } + + $productInventory = ProductInventory::create([ + 'qty' => 0, + 'product_id' => $product->id, + 'inventory_source_id' => 1, + 'vendor_id' => $request->get('marketplace_seller_id') + ]); + + if (!$productInventory) { + response([ + 'error' => "error create prod inventory" + ]); + } + + return response([ + 'status' => 200, + 'data' => $product, + 'message' => 'succesfully created product' + ]); + } else { + return response([ + 'status' => 500, + 'message' => 'not authorized' + ]); + } + } + + public function updateProductFlat(Request $request) + { + $validation = Validator::make($request->all(), [ + 'product_id' => 'required', + 'user' => 'required', + 'password' => 'required', + ]); + + + if ($validation->fails()) { + return response()->json(['errors' => $validation->getMessageBag()->all()], 422); + } + + $user = $request->get('user'); + $pass = $request->get('password'); + + if ($user == "romanah_" && $pass == "bt110226$$") { + + $prodId = $request->get('product_id'); + + // $product = ProductFlat::where('product_id', $prodId)->first(); + + // \Log::info($product); + + $data = array( + "status" => $request->get('status'), + "product_number" => $request->get('product_number'), + "name" => $request->get('name'), + "description" => $request->get('description'), + "url_key" => Str::slug($request->get('name')), + "featured" => $request->get('featured'), + "status" => $request->get('status'), + "price" => $request->get('price'), + "special_price" => $request->get('special_price'), + "weight" => 0, + "visible_individually" => 1, + "locale" => 'tm', + "channel" => 'Nurgul', + "short_description" => $request->get('short_description'), + "images" => $request['images'], + "categories" => $request['categories'], + ); + + $product = $this->productRepository->update($data, $prodId, 'id'); + + + $productInventory = ProductInventory::where('product_id', $prodId)->first(); + if ($productInventory) { + $productInventory->qty = $request->get('qty'); + $productInventory->save(); + } else { + return response([ + 'status' => 500, + 'message' => 'cant find product inv' + ]); + } + + if ($product && $productInventory) { + return response([ + 'status' => 200, + 'data' => $product, + 'message' => 'succesfully updated product' + ]); + } else { + return response([ + 'status' => 500, + 'message' => 'cant update product' + ]); + } + } else { + return response([ + 'status' => 500, + 'message' => 'not authorized' + ]); + } + } +} diff --git a/packages/Sarga/API/Http/Resources/Catalog/Product.php b/packages/Sarga/API/Http/Resources/Catalog/Product.php index e4dd147..13fac99 100644 --- a/packages/Sarga/API/Http/Resources/Catalog/Product.php +++ b/packages/Sarga/API/Http/Resources/Catalog/Product.php @@ -40,6 +40,7 @@ class Product extends JsonResource // 'sku' => $product->sku, 'type' => $product->type, 'name' => $product->name, + 'categories' => $product->categories, 'url_key' => $product->url_key, 'price' => core()->convertPrice($productTypeInstance->getMinimalPrice()), 'formatted_price' => core()->currency($productTypeInstance->getMinimalPrice()), @@ -55,7 +56,7 @@ class Product extends JsonResource 'new' => $this->new, 'featured' => $this->featured, // 'brand' => $product->brand->name ?? '', - + // 'show_quantity_changer' => $this->when( // $product->type !== 'grouped', diff --git a/packages/Sarga/API/Http/routes.php b/packages/Sarga/API/Http/routes.php index f3b4ce3..4753b4c 100644 --- a/packages/Sarga/API/Http/routes.php +++ b/packages/Sarga/API/Http/routes.php @@ -15,7 +15,7 @@ use Sarga\API\Http\Controllers\Vendors; use Sarga\API\Http\Controllers\ReviewMarketplace; use Sarga\API\Http\Controllers\Products; use Sarga\API\Http\Controllers\Wishlists; -use Sarga\Shop\Repositories\CategoryRepository; +use Sarga\API\Http\Controllers\SellerProduct; use Webkul\API\Http\Controllers\Shop\ResourceController; use Webkul\Attribute\Repositories\AttributeOptionRepository; use Sarga\API\Http\Resources\Catalog\AttributeOption; @@ -27,6 +27,18 @@ use Webkul\RestApi\Http\Controllers\V1\Shop\Customer\TransactionController; use Webkul\RestApi\Http\Controllers\V1\Shop\Customer\WishlistController; Route::group(['prefix' => 'api'], function () { + + Route::group(['prefix' => 'seller'],function (){ + Route::post('report',[SellerProduct::class, 'reportSeller']); + + Route::post('orders',[SellerProduct::class, 'sellerOrders']); + Route::post('order', [SellerProduct::class, 'sellerOrderDetail']); + + Route::get('products/{vendor_id}',[Vendors::class,'sellerProducts']); + Route::post('create/product', [SellerProduct::class, 'storeSellerProd']); + Route::post('update/product', [SellerProduct::class, 'updateProductFlat']); + }); + Route::group(['middleware' => ['locale', 'currency']], function () { //Channel routes Route::get('channels',[Channels::class, 'index']); diff --git a/packages/Webkul/Marketplace/src/DataGrids/Admin/ProductDataGrid.php b/packages/Webkul/Marketplace/src/DataGrids/Admin/ProductDataGrid.php index 95c4cd4..a9c94f8 100644 --- a/packages/Webkul/Marketplace/src/DataGrids/Admin/ProductDataGrid.php +++ b/packages/Webkul/Marketplace/src/DataGrids/Admin/ProductDataGrid.php @@ -25,7 +25,7 @@ class ProductDataGrid extends DataGrid { $queryBuilder = DB::table('marketplace_products') - ->leftJoin('product_flat', 'marketplace_products.product_id', '=', 'product_flat.id') + ->leftJoin('product_flat', 'marketplace_products.product_id', '=', 'product_flat.product_id') ->leftJoin('marketplace_product_flags', 'product_flat.product_id', '=', 'marketplace_product_flags.product_id') ->leftJoin('marketplace_sellers', 'marketplace_products.marketplace_seller_id', '=', 'marketplace_sellers.id') ->leftJoin('customers', 'marketplace_sellers.customer_id', '=', 'customers.id') diff --git a/packages/Webkul/Marketplace/src/Http/Controllers/Shop/Account/AssignProductController.php b/packages/Webkul/Marketplace/src/Http/Controllers/Shop/Account/AssignProductController.php index 11177e1..19469e7 100644 --- a/packages/Webkul/Marketplace/src/Http/Controllers/Shop/Account/AssignProductController.php +++ b/packages/Webkul/Marketplace/src/Http/Controllers/Shop/Account/AssignProductController.php @@ -115,9 +115,9 @@ class AssignProductController extends Controller if ($key == 'phone' && $sellerInput == null) { return redirect()->back()->with('warning', __('marketplace::app.shop.sellers.account.profile.validation.phone')); } - // if ($key == 'state' && $sellerInput == null) { - // return redirect()->back()->with('warning', __('marketplace::app.shop.sellers.account.profile.validation.state')); - // } + if ($key == 'state' && $sellerInput == null) { + return redirect()->back()->with('warning', __('marketplace::app.shop.sellers.account.profile.validation.state')); + } if ($key == 'city' && $sellerInput == null) { return redirect()->back()->with('warning', __('marketplace::app.shop.sellers.account.profile.validation.city')); } diff --git a/packages/Webkul/Marketplace/src/Http/Requests/SellerForm.php b/packages/Webkul/Marketplace/src/Http/Requests/SellerForm.php index 388c0e1..7555eb0 100644 --- a/packages/Webkul/Marketplace/src/Http/Requests/SellerForm.php +++ b/packages/Webkul/Marketplace/src/Http/Requests/SellerForm.php @@ -24,13 +24,13 @@ class SellerForm extends FormRequest public function rules() { return [ - 'url' => ['required', 'unique:marketplace_sellers,url,'], + 'url' => ['required', 'unique:marketplace_sellers,url,' . $this->route('id'), new \Webkul\Core\Contracts\Validations\Slug], 'shop_title' => 'required', 'phone' => 'required', 'address1' => 'required', // 'city' => 'required', // 'postcode' => 'required', - 'state' => 'required', + // 'state' => 'required', // 'country' => 'required', ]; } diff --git a/packages/Webkul/Marketplace/src/Repositories/ProductRepository.php b/packages/Webkul/Marketplace/src/Repositories/ProductRepository.php index c7069bf..daab700 100644 --- a/packages/Webkul/Marketplace/src/Repositories/ProductRepository.php +++ b/packages/Webkul/Marketplace/src/Repositories/ProductRepository.php @@ -149,7 +149,10 @@ class ProductRepository extends Repository { Event::dispatch('marketplace.catalog.product.create.before'); - $seller = $this->sellerRepository->findOneByField('customer_id', auth()->guard('customer')->user()->id); + + $seller = $this->sellerRepository->isSellerMarket($data["marketplace_seller_id"]); + + // \Log::info($seller); $sellerProduct = parent::create(array_merge($data, [ 'marketplace_seller_id' => $seller->id, diff --git a/packages/Webkul/Marketplace/src/Repositories/SellerRepository.php b/packages/Webkul/Marketplace/src/Repositories/SellerRepository.php index 82201bc..2f9f11b 100644 --- a/packages/Webkul/Marketplace/src/Repositories/SellerRepository.php +++ b/packages/Webkul/Marketplace/src/Repositories/SellerRepository.php @@ -89,7 +89,7 @@ class SellerRepository extends Repository */ public function update(array $data, $id, $attribute = "id") { - + Event::dispatch('marketplace.seller.profile.update.before', $id); $seller = $this->find($id); @@ -121,6 +121,13 @@ class SellerRepository extends Repository return $isSeller ? $this->isSellerApproved($customerId) : false; } + public function isSellerMarket($sellerId) + { + $seller = $this->getModel()->where('id', $sellerId)->where('is_approved', 1)->first(); + + return $seller; + } + /** * Checks if seller is approved or not * @@ -145,12 +152,12 @@ class SellerRepository extends Repository */ public function uploadImages($data, $seller, $type = "logo") { - + if (isset($data[$type])) { foreach ($data[$type] as $imageId => $image) { $file = $type . '.' . $imageId; $dir = 'seller/' . $seller->id; - + if (request()->hasFile($file)) { if ($seller->{$type}) { Storage::delete($seller->{$type}); diff --git a/packages/Webkul/Marketplace/src/Resources/lang/ru/app.php b/packages/Webkul/Marketplace/src/Resources/lang/ru/app.php new file mode 100644 index 0000000..7dbd8bd --- /dev/null +++ b/packages/Webkul/Marketplace/src/Resources/lang/ru/app.php @@ -0,0 +1,563 @@ + [ + 'layouts' => [ + 'become-seller' => 'Стать продавцом', + 'marketplace' => 'Рынок', + 'profile' => 'Профиль', + 'dashboard' => 'Панель инструментов', + 'products' => 'Продукты', + 'orders' => 'Заказы', + 'reviews' => 'Отзывы', + 'transactions' => 'Транзакции', + 'sell' => 'Продавать', + 'sellerFlag' => 'Флаг продавца', + 'productFlag' => 'Флаг продукта', + 'earnings' => 'Доход', + 'customers' => 'Клиенты', + 'seller-category' => 'Категория продавца', + 'paymentRequest' => 'Платежный запрос' + ], + + 'marketplace' => [ + 'title' => 'Превратите свое увлечение в бизнес', + 'open-shop-label' => 'Открыть магазин', + 'features' => 'Привлекательные черты', + 'features-info' => 'Хотите начать онлайн-бизнес? Прежде чем принять решение, ознакомьтесь с функциями, которые мы можем предложить.', + 'popular-sellers' => 'Популярные продавцы', + 'setup-title' => 'Установка проще', + 'setup-info' => 'Легче создать и настроить свой интернет-магазин.', + 'setup-1' => 'Открыть счет', + 'setup-2' => 'Добавьте информацию о вашем магазине', + 'setup-3' => 'Настройте свой профиль', + 'setup-4' => 'Добавить продукт', + 'setup-5' => 'Начните продавать свою продукцию', + 'open-shop-info' => 'Откройте свой интернет-магазин вместе с нами и шагните в новый мир с миллионами покупателей.' + ], + + 'sellers' => [ + 'account' => [ + 'signup' => [ + 'want-to-be-seller' => 'Вы хотите стать продавцом?', + 'shop_url' => 'URL магазина', + 'yes' => 'Да', + 'no' => 'Нет', + 'shop_url_available' => 'URL-адрес магазина доступен.', + 'shop_url_not_available' => 'URL-адрес магазина недоступен.' + ], + + 'profile' => [ + 'create-title' => 'Стать продавцом', + 'edit-title' => 'Изменить профиль продавца', + 'url' => 'URL магазина', + 'save-btn-title' => 'Сохранить', + 'view-collection-page' => 'Смотрите страницу коллекции', + 'view-seller-page' => 'Смотрите страницу продавца', + 'waiting-for-approval' => 'Ожидает одобрения администратора', + 'general' => 'Общий', + 'shop_title' => 'Название магазина', + 'tax_vat' => 'Налоговый номер/номер GBSS', + 'phone' => 'Номер телефона', + 'address1' => 'Ссылка 1', + 'address2' => 'Ссылка 2', + 'city' => 'Город', + 'state' => 'Провинция', + 'country' => 'Страна', + 'postcode' => 'Почтовый индекс', + 'media' => 'Медиа', + 'logo' => 'Логотип', + 'banner' => 'Баннер', + 'add-image-btn-title' => 'Добавить фото', + 'about' => 'О магазине', + 'social_links' => 'Социальные ссылки', + 'twitter' => 'Twitter ID', + 'facebook' => 'Facebook ID', + 'youtube' => 'Youtube ID', + 'instagram' => 'Instagram ID', + 'skype' => 'Skype Id', + 'linked_in' => 'Linked In', + 'pinterest' => 'Pinterest Id', + 'policies' => 'Правила', + 'return_policy' => 'Политика возврата', + 'shipping_policy' => 'Политика доставки', + 'privacy_policy' => 'Политика конфиденциальности', + 'seo' => 'SEO', + 'meta_title' => 'Мета название', + 'meta_description' => 'Мета описание', + 'meta_keywords' => 'Мета ключевые слова', + ], + + 'dashboard' => [ + 'title' => 'Доска объявлений' + ], + + 'catalog' => [ + 'products' => [ + 'title' => 'Продукты', + 'create' => 'Создавать', + 'create-new' => 'Создать новый', + 'search-title' => 'Поиск продуктов', + 'create-title' => 'Добавить продукт', + 'assing-title' => 'Продать свой продукт', + 'assing-edit-title' => 'Изменить продукт', + 'edit-title' => 'Изменить продукт', + 'save-btn-title' => 'Сохранить', + 'assign-info' => 'Ищите продукты, если продукт доступен, продайте свой продукт по другой цене или :create_link', + 'search' => 'Поиск', + 'search-term' => 'Наименование товара ...', + 'no-result-found' => 'Товар с таким названием не найден.', + 'enter-search-term' => 'Введите не менее 3 букв', + 'searching' => 'Идёт поиск ...', + 'general' => 'Общий', + 'product-condition' => 'Состояние продукта', + 'new' => 'Новый', + 'old' => 'Старый', + 'price' => 'Цена', + 'description' => 'Описание', + 'images' => 'Фотографии', + 'inventory' => 'Инвентарь', + 'variations' => 'Типы', + 'id' => 'Id', + 'sku' => 'SKU', + 'name' => 'Имя', + 'price' => 'Цена', + 'quantity' => 'Количество', + 'is-approved' => 'Подтвержденный', + 'yes' => 'Да', + 'no' => 'Нет', + 'delete' => 'Удалить' + ] + ], + + 'sales' => [ + 'orders' => [ + 'title' => 'Заказы', + 'view-title' => 'Заказ #:order_id', + 'info' => 'Информация', + 'invoices' => 'Счета-фактуры', + 'shipments' => 'Доставки', + 'placed-on' => 'Размещен', + 'status' => 'Статус', + 'customer-name' => 'Имя Клиента', + 'email' => 'Электронная почта', + 'inventory-source' => 'Инвентарь-источник', + 'carrier-title' => 'Титул перевозчика', + 'tracking-number' => 'Идентификационный номер', + 'id' => 'Id', + 'base-total' => 'Базовый итог', + 'grand-total' => 'Общий итог', + 'order-date' => 'Дата заказа', + 'channel-name' => 'Название канала', + 'status' => 'Статус', + 'processing' => 'Обработка', + 'completed' => 'Завершено', + 'canceled' => 'Отменен', + 'closed' => 'Закрыто', + 'pending' => 'Ожидается', + 'pending-payment' => 'Ожидается оплата', + 'fraud' => 'Мошенничество', + 'billed-to' => 'Оплаченный', + 'total-seller-amount' => 'Общая сумма продавца', + 'total-admin-commission' => 'Общая административная комиссия', + 'admin-commission' => 'Административная комиссия', + ], + + 'invoices' => [ + 'title' => 'Счета', + 'create-title' => 'Создать счет', + 'create' => 'Создать', + 'order-id' => 'Номер заказа', + 'qty-ordered' => 'Заказанное количество', + 'qty-to-invoice' => 'Сумма для выставления счета', + 'product-name' => 'Название продукта' + ], + + 'shipments' => [ + 'title' => 'Доставки', + 'create-title' => 'Создать доставку', + 'create' => 'Создать', + 'order-id' => 'Номер заказа', + 'carrier-title' => 'Имя курьера', + 'tracking-number' => 'Идентификационный номер', + 'source' => 'Источник', + 'select-source' => 'Выберите источник', + 'product-name' => 'Название продукта', + 'qty-ordered' => 'Заказанное количество', + 'qty-to-ship' => 'Количество для доставки', + 'available-sources' => 'Доступные источники', + 'qty-available' => 'Доступное количество' + ], + + 'transactions' => [ + 'title' => 'Транзакции', + 'view-title' => 'Транзакция #:transaction_id', + 'id' => 'Id', + 'total' => 'Всего', + 'transaction-id' => 'Номер транзакции', + 'comment' => 'Комментарий', + 'order-id' => 'Заказ #:order_id', + 'commission' => 'Комиссия', + 'seller-total' => 'Итого продавца', + 'created-at' => 'Создан в', + 'payment-method' => 'Способ оплаты', + 'total-sale' => 'Общая продажа', + 'total-payout' => 'Общая выплата', + 'remaining-payout' => 'Оставшаяся выплата', + 'sub-total' => 'Начальная сумма', + 'tax' => 'Налог' + ] + ], + + 'reviews' => [ + 'title' => 'Отзывы', + 'id' => 'Id', + 'customer-name' => 'Имя Клиента', + 'rating' => 'Рейтинг', + 'comment' => 'Комментарий', + 'status' => 'Статус' + ] + ], + + 'profile' => [ + 'count-products' => ':count продукт', + 'contact-seller' => 'Связаться с продавцом', + 'total-rating' => ':total_rating Рейтинги и :total_reviews обзоры', + 'visit-store' => 'Посетить магазин', + 'about-seller' => 'О продавце', + 'member-since' => ':date член с', + 'all-reviews' => 'Все отзывы', + 'return-policy' => 'Политика возврата', + 'shipping-policy' => 'Политика доставки', + 'by-user-date' => '- по :name :date', + 'name' => 'Имя', + 'email' => 'Электронная почта', + 'subject' => 'Предмет', + 'query' => 'Запрос', + 'submit' => 'Отправить' + ], + + 'reviews' => [ + 'title' => 'Synlar - :shop_title', + 'create-title' => 'Написать обзор - :shop_title', + 'write-review' => 'Написать обзор', + 'total-rating' => ':total_rating Рейтинги & :total_reviews обзоры', + 'view-more' => 'Обширный', + 'write-review' => 'Написать обзор', + 'by-user-date' => '- по :name :date', + 'rating' => 'Рейтинг', + 'comment' => 'Комментарий' + ], + + 'products' => [ + 'title' => 'Продукты - :shop_title' + ], + + 'mails' => [ + 'contact-seller' => [ + 'subject' => 'Заявка клиента - :subject', + 'dear' => 'Уважаемый :name', + 'info' => 'У меня есть вопрос к вам, пожалуйста, ответьте как можно скорее.', + 'query' => 'Заявка', + 'thanks' => 'Спасибо!' + ] + ] + ], + + 'products' => [ + 'popular-products' => 'Популярные продукты', + 'all-products' => 'Все продукты', + 'sold-by' => 'продается по :url', + 'seller-count' => 'Более :count поставщик(и)', + 'more-sellers' => 'Другие поставщики', + 'seller-total-rating' => ':avg_rating (:total_rating рейтинги)', + 'add-to-cart' => 'Добавить в корзину', + 'new' => 'Новый', + 'used' => 'Использованный', + 'out-of-stock' => 'Распродано' + ], + ], + + 'admin' => [ + 'layouts' => [ + 'marketplace' => 'Рынок', + 'sellers' => 'Продавцы', + 'products' => 'Продукты', + 'seller-reviews' => 'Отзывы о продавце', + 'orders' => 'Заказы', + 'transactions' => 'Транзакции', + 'payment-requests' => 'Платежные требования' + ], + + 'dashboard' => [ + 'remaining-payout' => 'Оставшаяся выплата', + 'sellers-with-most-sales' => 'Лучшие продавцы с наибольшим объемом продаж TM' + ], + + 'acl' => [ + 'marketplace' => 'Рынок', + 'sellers' => 'Продавцы', + 'products' => 'Продукты', + 'reviews' => 'Отзывы' + ], + + 'system' => [ + 'marketplace' => 'Рынок', + 'settings' => 'Настройки', + 'general' => 'Общий', + 'commission-per-unit' => 'Комиссия за единицу (в процентах)', + 'seller-approval-required' => 'Требуется одобрение продавца', + 'product-approval-required' => 'Требуется одобрение продукта', + 'can-create-invoice' => 'Может создать счет-фактуру', + 'can-create-shipment' => 'Можно создать доставку', + 'yes' => 'Да', + 'no' => 'Нет', + 'landing-page' => 'Главная страница', + 'page-title' => 'Название страницы', + 'show-banner' => 'Показать баннер', + 'banner' => 'Баннер', + 'banner-content' => 'Содержимое баннера', + 'show-features' => 'Показать особенности', + 'feature-heading' => 'Заголовок функции', + 'feature-info' => 'Информация о функциях', + 'feature-icon-1' => 'Значок функции 1', + 'feature-icon-label-1' => 'Метка значка функции 1', + 'feature-icon-2' => 'Значок функции 2', + 'feature-icon-label-2' => 'Метка значка функции 2', + 'feature-icon-3' => 'Значок функции 3', + 'feature-icon-label-3' => 'Метка значка функции 3', + 'feature-icon-4' => 'Значок функции 4', + 'feature-icon-label-4' => 'Метка значка функции 4', + 'feature-icon-5' => 'Значок функции 5', + 'feature-icon-label-5' => 'Метка значка функции 5', + 'feature-icon-6' => 'Значок функции 6', + 'feature-icon-label-6' => 'Метка значка функции 6', + 'feature-icon-7' => 'Значок функции 7', + 'feature-icon-label-7' => 'Метка значка функции 7', + 'feature-icon-8' => 'Значок функции 8', + 'feature-icon-label-8' => 'Метка значка функции 8', + 'show-popular-sellers' => 'Показать популярных продавцов', + 'open-shop-button-label' => 'Ярлык кнопки открытия магазина', + 'about-marketplace' => 'О рынке', + 'show-open-shop-block' => 'Показать блок открытого магазина', + 'open-shop-info' => 'Информация об открытом магазине', + ], + + 'sellers' => [ + 'title' => 'Продавцы', + 'id' => 'Id', + 'seller-name' => 'Имя продавца', + 'seller-email' => 'Электронная почта продавца', + 'customer-name' => 'Имя клиента', + 'customer-email' => 'Электронная почта клиента', + 'created-at' => 'Создан в', + 'is-approved' => 'Одобрено', + 'approved' => 'Одобренный', + 'un-approved' => 'Не одобренный', + 'approve' => 'Утвердить', + 'unapprove' => 'Не одобрять', + 'delete' => 'Удалить', + 'update' => 'Обновлять', + 'delete-success-msg' => 'Удалить успешное сообщение', + 'mass-delete-success' => 'Успешное массовое удаление', + 'mass-update-success' => 'Успешное массовое обновление', + + 'flag' => [ + 'title' => 'Причины флага продавца', + 'add-btn-title' => 'Добавить причину пометки', + 'create-success' => 'Причина пометки продавца успешно создана', + 'update-success' => 'Причина пометки продавца успешно обновлена', + 'delete-success' => 'Причина пометки продавца успешно удалена', + 'title' => 'Причины флага продавца', + 'edit-title' => 'Изменить причину пометки', + + 'create' => [ + 'add-title' => 'Создать причину', + 'create-btn-title' => 'Сохранить', + 'reason' => 'Имя', + 'status' => 'Статус' + ] + ], + + 'category' => [ + 'title' => 'Категория продавцов tm', + 'add-title' => 'Назначить категорию продавцу', + 'add-btn-title' => 'Назначить категорию', + 'save-btn-title' => 'Сохранить назначенную категорию', + 'edit-title' => 'Обновить назначенную категорию продавцу', + 'edit-btn-title' => 'Обновить назначенную категорию', + 'update-btn-title' => 'Обновить назначенную категорию', + 'create' => 'Назначить категорию', + 'seller' => 'Выберите продавца', + 'update-success' => 'Присвоенная категория успешно обновлена', + 'delete-success' => 'Назначенная категория успешно удалена', + 'save-success' => 'Категории успешно назначены', + ] + ], + + 'orders' => [ + 'title' => 'Заказы', + 'manage-title' => 'Управление заказами поставщиков', + 'order-id' => 'Номер заказа', + 'seller-name' => 'Имя продавца', + 'sub-total' => 'Начальная сумма', + 'grand-total' => 'Общий итог', + 'commission' => 'Комиссия', + 'seller-total' => 'Итого продавца', + 'total-paid' => 'Итого оплаченный', + 'remaining-total' => 'Оставшаяся сумма', + 'invoice-pending' => 'Ожидающий счета-фактура', + 'seller-total-invoiced' => 'Общая сумма выставленного счета продавца', + 'order-date' => 'Дата заказа', + 'channel-name' => 'Название канала', + 'status' => 'Статус', + 'processing' => 'Обработка', + 'completed' => 'Завершенный', + 'canceled' => 'Отменен', + 'closed' => 'Закрыто', + 'pending' => 'В ожидании', + 'pending-payment' => 'Ожидающий платеж', + 'fraud' => 'Мошенничество', + 'billed-to' => 'Выставленный счет', + 'withdrawal-requested' => 'Запрос на снятие средств', + 'pay' => 'Платить', + 'already-paid' => 'Уже оплачено', + 'yes' => 'Да', + 'no' => 'Нет', + 'pay-seller' => 'Платить продавцу', + 'comment' => 'Комментарий', + 'payment-success-msg' => 'Сообщение об успешной оплате', + 'order-not-exist' => 'Заказ не существует', + 'no-amount-to-paid' => 'Нет суммы к оплате' + ], + + 'transactions' => [ + 'title' => 'Транзакции', + 'id' => 'Id', + 'seller-name' => 'Имя продавца', + 'total' => 'Всего', + 'transaction-id' => 'Номер транзакции', + 'comment' => 'Комментарий', + 'order-id' => 'Заказ #:order_id', + 'commission' => 'Комиссия', + 'seller-total' => 'Итого продавца', + 'created-at' => 'Создан в', + 'payment-method' => 'Способ оплаты', + 'total-sale' => 'Общая продажа', + 'total-payout' => 'Общая выплата', + 'remaining-payout' => 'Оставшаяся выплата', + 'seller-id' => 'Номер продавца' + ], + + 'payment-request' => [ + 'title' => 'Платежные запросы tm' + ], + + 'products' => [ + 'id' => 'Id', + 'title' => 'Продукты', + 'product-id' => 'Номер продукта', + 'seller-name' => 'Имя продавца', + 'sku' => 'Sku', + 'name' => 'Имя', + 'description' => 'Описание', + 'url-key' => 'Url ключ', + 'price' => 'Цена', + 'cost' => 'Расходы', + 'weight' => 'Масса', + 'color' => 'Цвет', + 'size' => 'Размер', + 'quantity' => 'Количество', + 'status' => 'Статус', + 'is-approved' => 'Одобрено', + 'approved' => 'Одобренный', + 'un-approved' => 'Не одобренный', + 'approve' => 'Утвердить', + 'unapprove' => 'Не одобрять', + 'delete' => 'Удалить', + 'update' => 'Обновлять', + 'delete-success-msg' => 'Удалить сообщение об успехе', + 'mass-delete-success' => 'Успешное массовое удаление', + 'mass-update-success' => 'Успешное массовое обновление', + 'flag' => [ + 'flag-title' => 'Флаги', + 'title' => 'Причины флага продукта tm', + 'reason' => 'Причина', + 'status' => 'Статус', + 'create-success' => 'Флаг продукта успешно создан', + 'delete-success' => 'Флаг продукта успешно удален', + 'update-success' => 'Флаг продукта успешно обновлен' + + ], + + ], + + 'reviews' => [ + 'title' => 'Отзывы', + 'id' => 'Id', + 'comment' => 'Комментарий', + 'rating' => 'Рейтинг', + 'customer-name' => 'Имя клиента', + 'seller-name' => 'Имя продавца', + 'status' => 'Статус', + 'approved' => 'Одобренный', + 'un-approved' => 'Не одобренный', + 'approve' => 'Утвердить', + 'unapprove' => 'Не одобрять', + 'update' => 'Обновлять', + ], + + 'response' => [ + 'create-success' => ':name успешно создан.', + 'update-success' => ':name успешно обновлено', + 'delete-success' => ':name успешно удален', + ] + ], + + 'mail' => [ + 'seller' => [ + 'welcome' => [ + 'subject' => 'Уведомление о запросе продавца', + 'dear' => 'Уважаемый :name', + 'info' => 'Спасибо за регистрацию в качестве продавца! Ваша учетная запись обрабатывается, и мы сообщим вам по почте, как только ваша учетная запись будет одобрена.' + ], + + 'approval' => [ + 'subject' => 'Уведомление о проверке продавца', + 'dear' => 'Уважаемый :name', + 'info' => 'Получив это письмо, вы утверждены в качестве продавца. Нажмите кнопку ниже, чтобы войти в свою учетную запись.', + 'login' => 'Авторизоваться' + ], + + 'regisration' => [ + 'subject' => 'Оповещение о новом продавце', + 'dear' => 'Здравствуйте :name', + 'info' => 'Продавец по имени :name зарегистрировался на вашей торговой площадке. Пожалуйста, подтвердите это на панели инструментов.', + ], + ], + + 'sales' => [ + 'order' => [ + 'subject' => 'Оповещение о новом заказе', + 'greeting' => 'От тебя создано в :created_at заказ под номером :order_id', + ], + + 'invoice' => [ + 'subject' => 'Оповещение о новом счете', + 'greeting' => 'В :created_at создано для заказа :order_id создан новый счет-фактура', + ], + + 'shipment' => [ + 'heading' => 'Подтверждение доставки!', + 'subject' => 'Предупреждение о новом доставке', + 'greeting' => 'В :created_at создано для заказа :order_id создан новая доставка', + ] + ], + + 'product' => [ + 'subject' => 'Уведомление об утверждении продукта', + 'dear' => 'Уважаемый :name', + 'info' => 'Это письмо сообщает о потверждении продукта по имени :name.' + ] + ] +]; \ No newline at end of file diff --git a/packages/Webkul/Marketplace/src/Resources/views/shop/default/sellers/account/profile/edit.blade.php b/packages/Webkul/Marketplace/src/Resources/views/shop/default/sellers/account/profile/edit.blade.php index 6f2f44a..e7396c6 100644 --- a/packages/Webkul/Marketplace/src/Resources/views/shop/default/sellers/account/profile/edit.blade.php +++ b/packages/Webkul/Marketplace/src/Resources/views/shop/default/sellers/account/profile/edit.blade.php @@ -123,7 +123,7 @@ - {{-- +
@@ -162,7 +162,7 @@
-
--}} +