Compare commits
2 Commits
e37912798d
...
aa92e0db6d
| Author | SHA1 | Date |
|---|---|---|
|
|
aa92e0db6d | |
|
|
991a4822ba |
|
|
@ -88,6 +88,12 @@ class Vendors extends V1Controller
|
|||
return ProductResource::collection($products);
|
||||
}
|
||||
|
||||
public function sellerProductsById(ProductRepository $productRepository,$seller_id, $product_id){
|
||||
$products = $productRepository->findAllBySellerNotActive($seller_id,request()->input('category_id'), $product_id);
|
||||
|
||||
return ProductResource::collection($products);
|
||||
}
|
||||
|
||||
public function vendor($seller_id){
|
||||
$vendor = $this->vendorRepository->select('marketplace_sellers.id','url','logo','banner','shop_title','ship_time','ship_price','slogan')
|
||||
->where('id',$seller_id)
|
||||
|
|
|
|||
|
|
@ -35,6 +35,7 @@ Route::group(['prefix' => 'api'], function () {
|
|||
Route::post('order', [SellerProduct::class, 'sellerOrderDetail']);
|
||||
|
||||
Route::get('products/{vendor_id}',[Vendors::class,'sellerProducts']);
|
||||
Route::get('products/{vendor_id}/{product_id}',[Vendors::class,'sellerProductsById']);
|
||||
Route::post('create/product', [SellerProduct::class, 'storeSellerProd']);
|
||||
Route::post('update/product', [SellerProduct::class, 'updateProductFlat']);
|
||||
});
|
||||
|
|
|
|||
|
|
@ -423,11 +423,11 @@ class ProductRepository extends WProductRepository
|
|||
* @param integer $seller
|
||||
* @return Collection
|
||||
*/
|
||||
public function findAllBySellerNotActive($seller_id,$category_id = null)
|
||||
public function findAllBySellerNotActive($seller_id, $category_id = null, $product_id = null)
|
||||
{
|
||||
$params = request()->input();
|
||||
|
||||
$results = app('Webkul\Product\Repositories\ProductFlatRepository')->scopeQuery(function($query) use($seller_id, $params,$category_id) {
|
||||
$results = app('Webkul\Product\Repositories\ProductFlatRepository')->scopeQuery(function($query) use($seller_id, $params,$category_id, $product_id) {
|
||||
$channel = request()->get('channel') ?: (core()->getCurrentChannelCode() ?: core()->getDefaultChannelCode());
|
||||
|
||||
$locale = request()->get('locale') ?: app()->getLocale();
|
||||
|
|
@ -456,6 +456,9 @@ class ProductRepository extends WProductRepository
|
|||
if ($category_id) {
|
||||
$qb->whereIn('product_categories.category_id', explode(',', $category_id));
|
||||
}
|
||||
if ($product_id) {
|
||||
$qb->where('products.id', $product_id);
|
||||
}
|
||||
if (isset($params['new'])){
|
||||
$qb->where('product_flat.new', $params['new']);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -179,7 +179,6 @@ return [
|
|||
'id' => 'Id',
|
||||
'sku' => 'SKU',
|
||||
'name' => 'Name',
|
||||
'price' => 'Price',
|
||||
'product-number' => 'Product Number',
|
||||
'quantity' => 'Quantity',
|
||||
'is-approved' => 'Is Approved',
|
||||
|
|
@ -211,7 +210,6 @@ return [
|
|||
'grand-total' => 'Grand Total',
|
||||
'order-date' => 'Order Date',
|
||||
'channel-name' => 'Channel Name',
|
||||
'status' => 'Status',
|
||||
'processing' => 'Processing',
|
||||
'completed' => 'Completed',
|
||||
'canceled' => 'Canceled',
|
||||
|
|
@ -313,7 +311,6 @@ return [
|
|||
'write-review' => 'Write Review',
|
||||
'total-rating' => ':total_rating Ratings & :total_reviews Reviews',
|
||||
'view-more' => 'View More',
|
||||
'write-review' => 'Write Review',
|
||||
'by-user-date' => '- By :name :date',
|
||||
'rating' => 'Rating',
|
||||
'comment' => 'Comment'
|
||||
|
|
@ -518,7 +515,6 @@ return [
|
|||
'create-success' => 'Seller flag reason created successfully',
|
||||
'update-success' => 'Seller flag reason updated successfully',
|
||||
'delete-success' => 'Seller flag reason deleted successfully',
|
||||
'title' => 'Seller flag reasons',
|
||||
'edit-title' => 'Edit flag reason',
|
||||
|
||||
'create' => [
|
||||
|
|
|
|||
|
|
@ -36,6 +36,13 @@ return [
|
|||
'open-shop-info' => 'Откройте свой интернет-магазин вместе с нами и шагните в новый мир с миллионами покупателей.'
|
||||
],
|
||||
|
||||
'flag' => [
|
||||
'title' => 'Флаги',
|
||||
'name' => 'Имя',
|
||||
'email' => 'Электронная почта',
|
||||
'reason' => 'Причины'
|
||||
],
|
||||
|
||||
'sellers' => [
|
||||
'account' => [
|
||||
'signup' => [
|
||||
|
|
@ -121,7 +128,6 @@ return [
|
|||
'id' => 'Id',
|
||||
'sku' => 'SKU',
|
||||
'name' => 'Имя',
|
||||
'price' => 'Цена',
|
||||
'quantity' => 'Количество',
|
||||
'is-approved' => 'Подтвержденный',
|
||||
'yes' => 'Да',
|
||||
|
|
@ -149,7 +155,6 @@ return [
|
|||
'grand-total' => 'Общий итог',
|
||||
'order-date' => 'Дата заказа',
|
||||
'channel-name' => 'Название канала',
|
||||
'status' => 'Статус',
|
||||
'processing' => 'Обработка',
|
||||
'completed' => 'Завершено',
|
||||
'canceled' => 'Отменен',
|
||||
|
|
@ -243,7 +248,6 @@ return [
|
|||
'write-review' => 'Написать обзор',
|
||||
'total-rating' => ':total_rating Рейтинги & :total_reviews обзоры',
|
||||
'view-more' => 'Обширный',
|
||||
'write-review' => 'Написать обзор',
|
||||
'by-user-date' => '- по :name :date',
|
||||
'rating' => 'Рейтинг',
|
||||
'comment' => 'Комментарий'
|
||||
|
|
@ -361,6 +365,13 @@ return [
|
|||
'delete-success-msg' => 'Удалить успешное сообщение',
|
||||
'mass-delete-success' => 'Успешное массовое удаление',
|
||||
'mass-update-success' => 'Успешное массовое обновление',
|
||||
'seller-profile' => 'Профиль продавца',
|
||||
'view-seller-profile' => 'Посмотреть профиль продавца',
|
||||
'product' => 'Продукт',
|
||||
'add-product' => 'Добавить продукт',
|
||||
'add-title' => 'Продавец',
|
||||
'search-product' => 'Поиск продукта',
|
||||
'search' => 'Поиск',
|
||||
|
||||
'flag' => [
|
||||
'title' => 'Причины флага продавца',
|
||||
|
|
@ -368,7 +379,6 @@ return [
|
|||
'create-success' => 'Причина пометки продавца успешно создана',
|
||||
'update-success' => 'Причина пометки продавца успешно обновлена',
|
||||
'delete-success' => 'Причина пометки продавца успешно удалена',
|
||||
'title' => 'Причины флага продавца',
|
||||
'edit-title' => 'Изменить причину пометки',
|
||||
|
||||
'create' => [
|
||||
|
|
@ -397,6 +407,7 @@ return [
|
|||
|
||||
'orders' => [
|
||||
'title' => 'Заказы',
|
||||
'discount' => 'Скидка',
|
||||
'manage-title' => 'Управление заказами поставщиков',
|
||||
'order-id' => 'Номер заказа',
|
||||
'seller-name' => 'Имя продавца',
|
||||
|
|
@ -456,7 +467,8 @@ return [
|
|||
'products' => [
|
||||
'id' => 'Id',
|
||||
'title' => 'Продукты',
|
||||
'product-id' => 'Номер продукта',
|
||||
'product-id' => 'Ид продукта',
|
||||
'product-number' => 'Номер продукта',
|
||||
'seller-name' => 'Имя продавца',
|
||||
'sku' => 'Sku',
|
||||
'name' => 'Имя',
|
||||
|
|
|
|||
|
|
@ -36,6 +36,13 @@ return [
|
|||
'open-shop-info' => 'Onlaýn dükanyňyzy biz bilen açyň we millionlarça müşderili täze dünýä gadam basyň.'
|
||||
],
|
||||
|
||||
'flag' => [
|
||||
'title' => 'Flaglar',
|
||||
'name' => 'Ady',
|
||||
'email' => 'Elekrton poçta',
|
||||
'reason' => 'Sebäbi'
|
||||
],
|
||||
|
||||
'sellers' => [
|
||||
'account' => [
|
||||
'signup' => [
|
||||
|
|
@ -121,7 +128,6 @@ return [
|
|||
'id' => 'Id',
|
||||
'sku' => 'SKU',
|
||||
'name' => 'Ady',
|
||||
'price' => 'Bahasy',
|
||||
'quantity' => 'Mukdary',
|
||||
'is-approved' => 'Tassyklanan',
|
||||
'yes' => 'Hawa',
|
||||
|
|
@ -149,7 +155,6 @@ return [
|
|||
'grand-total' => 'Umumy jemi',
|
||||
'order-date' => 'Sargydyň senesi',
|
||||
'channel-name' => 'Kanalyň ady',
|
||||
'status' => 'Statusy',
|
||||
'processing' => 'Işlenilýär',
|
||||
'completed' => 'Tamamlandy',
|
||||
'canceled' => 'Ýatyryldy',
|
||||
|
|
@ -243,7 +248,6 @@ return [
|
|||
'write-review' => 'Syn ýazyň',
|
||||
'total-rating' => ':total_rating Reýtingleri & :total_reviews synlary',
|
||||
'view-more' => 'Giňişleýin',
|
||||
'write-review' => 'Syn ýazyň',
|
||||
'by-user-date' => '- :name :date boýunça',
|
||||
'rating' => 'Reýting',
|
||||
'comment' => 'Teswir'
|
||||
|
|
@ -361,6 +365,13 @@ return [
|
|||
'delete-success-msg' => 'Satyjy üstünlikli pozuldy.',
|
||||
'mass-delete-success' => 'Saýlanan satyjylar üstünlikli pozuldy.',
|
||||
'mass-update-success' => 'Saýlanan satyjylar üstünlikli täzelendi.',
|
||||
'seller-profile' => 'Satyjy profili',
|
||||
'view-seller-profile' => 'Satyjy profilini görmek',
|
||||
'product' => 'Haryt',
|
||||
'add-product' => 'Haryt goşmak',
|
||||
'add-title' => 'Satyjy',
|
||||
'search-product' => 'Haryt gözlegi',
|
||||
'search' => 'Gözleg',
|
||||
|
||||
'flag' => [
|
||||
'title' => 'Seller Flag Reasons',
|
||||
|
|
@ -368,7 +379,6 @@ return [
|
|||
'create-success' => 'Seller flag reason created successfully',
|
||||
'update-success' => 'Seller flag reason updated successfully',
|
||||
'delete-success' => 'Seller flag reason deleted successfully',
|
||||
'title' => 'Seller flag reasons',
|
||||
'edit-title' => 'Edit flag reason',
|
||||
|
||||
'create' => [
|
||||
|
|
@ -397,6 +407,7 @@ return [
|
|||
|
||||
'orders' => [
|
||||
'title' => 'Sargytlar',
|
||||
'discount' => 'Arzanladyş',
|
||||
'manage-title' => 'Satyjynyň sargytlaryny dolandyr',
|
||||
'order-id' => 'Sargyt Id',
|
||||
'seller-name' => 'Satyjynyň ady',
|
||||
|
|
@ -456,7 +467,8 @@ return [
|
|||
'products' => [
|
||||
'id' => 'Id',
|
||||
'title' => 'Önümler',
|
||||
'product-id' => 'Önümiň Id',
|
||||
'product-id' => 'Önümiň Id-sy',
|
||||
'product-number' => 'Önümiň belgisi',
|
||||
'seller-name' => 'Ady',
|
||||
'sku' => 'Sku',
|
||||
'name' => 'Ady',
|
||||
|
|
|
|||
Loading…
Reference in New Issue