api seller

This commit is contained in:
Kerim 2023-08-26 12:04:41 +05:00
parent 236fe95825
commit 6f961c80c7
2 changed files with 4 additions and 2 deletions

View File

@ -178,7 +178,8 @@ class SellerProduct extends SellerProductController
"weight" => 0,
"locale" => 'tm',
"channel" => 'Nurgul',
"short_description" => $request->get('short_description')
"short_description" => $request->get('short_description'),
"images" => [$request->get('images')],
);
$product = $this->productRepository->update($data, $prodId, 'id');

View File

@ -526,7 +526,8 @@ class ProductRepository extends WProductRepository
->where('product_flat.channel', $channel)
->where('product_flat.locale', $locale)
->whereNotNull('product_flat.url_key')
->where('marketplace_products.marketplace_seller_id', $seller_id);
->where('marketplace_products.marketplace_seller_id', $seller_id)
->orderBy('products.id', 'desc');
$qb->addSelect(DB::raw('(CASE WHEN marketplace_products.is_owner = 0 THEN marketplace_products.price ELSE product_flat.price END) AS price2'));