category default limit
This commit is contained in:
parent
b39ced2ecb
commit
95904ff41a
|
|
@ -4,7 +4,7 @@ namespace Sarga\API\Http\Resources\Checkout;
|
|||
|
||||
use Illuminate\Http\Resources\Json\JsonResource;
|
||||
use Sarga\API\Http\Resources\Catalog\Product as ProductResource;
|
||||
use Sarga\API\Http\Resources\Catalog\ProductVariant;
|
||||
use Webkul\Marketplace\Repositories\ProductRepository;
|
||||
|
||||
class CartItemResource extends JsonResource
|
||||
{
|
||||
|
|
@ -33,7 +33,7 @@ class CartItemResource extends JsonResource
|
|||
? $this->resource->additional
|
||||
: json_decode($this->resource->additional, true),
|
||||
'child' => new self($this->child),
|
||||
'product' => $this->when($this->product_id, new ProductVariant($this->product->parent->super_attributes??null))
|
||||
'product' => $this->when($this->product_id, new CartItemProduct($this->product)),
|
||||
];
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -22,11 +22,6 @@ class CartResource extends JsonResource
|
|||
*/
|
||||
public function toArray($request): array
|
||||
{
|
||||
$taxes = Tax::getTaxRatesWithAmount($this, false);
|
||||
$baseTaxes = Tax::getTaxRatesWithAmount($this, true);
|
||||
|
||||
$formatedTaxes = $this->formatTaxAmounts($taxes, false);
|
||||
$formatedBaseTaxes = $this->formatTaxAmounts($baseTaxes, true);
|
||||
|
||||
return [
|
||||
'id' => $this->id,
|
||||
|
|
|
|||
|
|
@ -4,12 +4,18 @@ namespace Sarga\API\Http\Resources\Customer;
|
|||
|
||||
use Illuminate\Http\Resources\Json\JsonResource;
|
||||
|
||||
use Webkul\Marketplace\Repositories\ProductRepository;
|
||||
use Webkul\RestApi\Http\Resources\V1\Admin\Sale\InvoiceResource;
|
||||
use Webkul\RestApi\Http\Resources\V1\Admin\Sale\OrderAddressResource;
|
||||
use Webkul\RestApi\Http\Resources\V1\Admin\Sale\ShipmentResource;
|
||||
|
||||
class OrderResource extends JsonResource
|
||||
{
|
||||
public function __construct($resource)
|
||||
{
|
||||
$this->sellerProductRepository = app(ProductRepository::class);
|
||||
parent::__construct($resource);
|
||||
}
|
||||
/**
|
||||
* Transform the resource into an array.
|
||||
*
|
||||
|
|
|
|||
Loading…
Reference in New Issue