api seller
This commit is contained in:
parent
9965d068de
commit
236fe95825
|
|
@ -54,7 +54,8 @@ class Product extends JsonResource
|
|||
//'logo' => $this->logo ? Storage::url($this->logo) : null,
|
||||
'new' => $this->new,
|
||||
'featured' => $this->featured,
|
||||
'qty' => $product->qty,
|
||||
'qty' => $this->qty,
|
||||
'status' => $this->status,
|
||||
// 'brand' => $product->brand->name ?? '',
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -520,8 +520,8 @@ class ProductRepository extends WProductRepository
|
|||
AND product_flat.special_price_to IS NOT NULL , IF( NOW( ) >= product_flat.special_price_from
|
||||
AND NOW( ) <= product_flat.special_price_to, IF( product_flat.special_price IS NULL OR product_flat.special_price = 0 , product_flat.price, LEAST( product_flat.special_price, product_flat.price ) ) , product_flat.price ) , IF( product_flat.special_price_from IS NULL , IF( product_flat.special_price_to IS NULL , IF( product_flat.special_price IS NULL OR product_flat.special_price = 0 , product_flat.price, LEAST( product_flat.special_price, product_flat.price ) ) , IF( NOW( ) <= product_flat.special_price_to, IF( product_flat.special_price IS NULL OR product_flat.special_price = 0 , product_flat.price, LEAST( product_flat.special_price, product_flat.price ) ) , product_flat.price ) ) , IF( product_flat.special_price_to IS NULL , IF( NOW( ) >= product_flat.special_price_from, IF( product_flat.special_price IS NULL OR product_flat.special_price = 0 , product_flat.price, LEAST( product_flat.special_price, product_flat.price ) ) , product_flat.price ) , product_flat.price ) ) ) AS price1'))
|
||||
->leftJoin('products', 'product_flat.product_id', '=', 'products.id')
|
||||
// ->leftJoin('product_inventories', 'product_flat.product_id', '=', 'product_inventories.product_id')
|
||||
// ->addSelect()
|
||||
->leftJoin('product_inventories', 'products.id', '=', 'product_inventories.product_id')
|
||||
->addSelect('product_inventories.qty')
|
||||
->leftJoin('marketplace_products', 'product_flat.product_id', '=', 'marketplace_products.product_id')
|
||||
->where('product_flat.channel', $channel)
|
||||
->where('product_flat.locale', $locale)
|
||||
|
|
|
|||
Loading…
Reference in New Issue