wellknow
This commit is contained in:
parent
ff6e0c71c3
commit
b04e464aaf
|
|
@ -40,38 +40,38 @@ class Product extends JsonResource
|
||||||
'type' => $product->type,
|
'type' => $product->type,
|
||||||
'name' => $product->name,
|
'name' => $product->name,
|
||||||
// 'url_key' => $product->url_key,
|
// 'url_key' => $product->url_key,
|
||||||
'price' => $this->price,//(double) core()->convertPrice($productTypeInstance->getMinimalPrice()),
|
'price' => (double) core()->convertPrice($productTypeInstance->getMinimalPrice()),
|
||||||
'min_price' => $this->min_price,
|
|
||||||
// 'formatted_price' => core()->currency($productTypeInstance->getMinimalPrice()),
|
'formatted_price' => core()->currency($productTypeInstance->getMinimalPrice()),
|
||||||
//// 'short_description' => $product->short_description,
|
// 'short_description' => $product->short_description,
|
||||||
// 'description' => $product->description,
|
'description' => $product->description,
|
||||||
// 'images' => ProductImage::collection($product->images),
|
'images' => ProductImage::collection($product->images),
|
||||||
// /* product's checks */
|
/* product's checks */
|
||||||
//// 'in_stock' => $product->haveSufficientQuantity(1),
|
// 'in_stock' => $product->haveSufficientQuantity(1),
|
||||||
// 'is_wishlisted' => $this->isWishlisted($product) ,
|
'is_wishlisted' => $this->isWishlisted($product) ,
|
||||||
// 'is_item_in_cart' => \Cart::hasProduct($product),
|
'is_item_in_cart' => \Cart::hasProduct($product),
|
||||||
// 'shop_title' => $this->shop_title,
|
'shop_title' => $this->shop_title,
|
||||||
//// 'new' => $this->new,
|
// 'new' => $this->new,
|
||||||
//// 'featured' => $this->featured,
|
// 'featured' => $this->featured,
|
||||||
// 'brand' => $product->brand->name ?? '',
|
'brand' => $product->brand->name ?? '',
|
||||||
//// 'show_quantity_changer' => $this->when(
|
// 'show_quantity_changer' => $this->when(
|
||||||
//// $product->type !== 'grouped',
|
// $product->type !== 'grouped',
|
||||||
//// $product->getTypeInstance()->showQuantityBox()
|
// $product->getTypeInstance()->showQuantityBox()
|
||||||
//// ),
|
// ),
|
||||||
// /*
|
/*
|
||||||
// * attributes
|
* attributes
|
||||||
// */
|
*/
|
||||||
//// 'specifications' => app('Webkul\Product\Helpers\View')->getAdditionalData($product),
|
// 'specifications' => app('Webkul\Product\Helpers\View')->getAdditionalData($product),
|
||||||
// /* product's extra information */
|
/* product's extra information */
|
||||||
// $this->merge($this->allProductExtraInfo()),
|
$this->merge($this->allProductExtraInfo()),
|
||||||
//
|
|
||||||
// /* special price cases */
|
/* special price cases */
|
||||||
// $this->merge($this->specialPriceInfo()),
|
$this->merge($this->specialPriceInfo()),
|
||||||
//
|
|
||||||
// /* super attributes */
|
/* super attributes */
|
||||||
// $this->mergeWhen($this->super_attributes, [
|
$this->mergeWhen($this->super_attributes, [
|
||||||
// 'super_attributes' => $this->super_attributes,
|
'super_attributes' => $this->super_attributes,
|
||||||
// ]),
|
]),
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
private function super_attributes(){
|
private function super_attributes(){
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue