Added regular/final price to the product resource
Added regular and final price to the product resource so that it is much easier to compare between them on the frontend
This commit is contained in:
parent
ecc87fb72f
commit
a97107ac23
|
|
@ -56,6 +56,7 @@ class Product extends JsonResource
|
|||
$product->getTypeInstance()->haveSpecialPrice(),
|
||||
core()->currency($product->getTypeInstance()->getSpecialPrice())
|
||||
),
|
||||
$product->getTypeInstance()->getProductPrices(),
|
||||
'reviews' => [
|
||||
'total' => $total = $this->productReviewHelper->getTotalReviews($product),
|
||||
'total_rating' => $total ? $this->productReviewHelper->getTotalRating($product) : 0,
|
||||
|
|
@ -67,4 +68,4 @@ class Product extends JsonResource
|
|||
'updated_at' => $this->updated_at,
|
||||
];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue