category default limit

This commit is contained in:
merdan 2022-03-10 12:59:50 +05:00
parent 2a91ac8790
commit b39ced2ecb
2 changed files with 4 additions and 2 deletions

View File

@ -2,8 +2,9 @@
namespace Sarga\API\Http\Controllers;
use Sarga\API\Http\Resources\Customer\OrderResource;
use Webkul\RestApi\Http\Controllers\V1\Shop\Customer\OrderController;
use Webkul\RestApi\Http\Resources\V1\Shop\Sales\OrderResource;
class Orders extends OrderController
{

View File

@ -4,6 +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;
class CartItemResource extends JsonResource
{
@ -32,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 ProductResource($this->product)),
'product' => $this->when($this->product_id, new ProductVariant($this->product->parent->super_attributes??null))
];
}
}