FinalPriceResolver.php 590 B

123456789101112131415161718192021
  1. <?php
  2. /**
  3. * Copyright © Magento, Inc. All rights reserved.
  4. * See COPYING.txt for license details.
  5. */
  6. namespace Magento\ConfigurableProduct\Pricing\Price;
  7. use Magento\Catalog\Pricing\Price\FinalPrice as CatalogFinalPrice;
  8. class FinalPriceResolver implements PriceResolverInterface
  9. {
  10. /**
  11. * @param \Magento\Framework\Pricing\SaleableInterface $product
  12. * @return float
  13. */
  14. public function resolvePrice(\Magento\Framework\Pricing\SaleableInterface $product)
  15. {
  16. return $product->getPriceInfo()->getPrice(CatalogFinalPrice::PRICE_CODE)->getValue();
  17. }
  18. }