How is a price rendered on a frontend product view page?

frontend-product-view
price
rendering
price-format
(Dmitry Fedyuk) #1

See my ready «Price Format» extension for Magento 2.







$priceCode is final_price on a catalog product view.
$type is a product type (e.g. configurable).

$renderClassName may be \Magento\Catalog\Pricing\Render\FinalPriceBox.



$price may be \Magento\ConfigurableProduct\Pricing\Price\FinalPrice.



$priceInfo may be Magento\Framework\Pricing\PriceInfo\Base.
$priceCollection may be \Magento\ConfigurableProduct\Pricing\Price\Collection:


$renderBlock may be \Magento\Catalog\Pricing\Render\FinalPriceBox.


The result may be Magento_Catalog::product/price/final_price.phtml.


$priceModel supports the \Magento\/Framework\Pricing\Price\PriceInterface interface and may be, for example, an instance of the \Magento\ConfigurableProduct\Pricing\Price\ConfigurableRegularPrice class.




$amountBlock could be an instance of the \Magento\Framework\Pricing\Render\Amount class.


The result could be Magento_Catalog::product/price/amount/default.phtml.







0 Likes

Where is set the value chich is used by the block's getDisplayLabel() method while rendering a price on a frontend product view page?
(Dmitry Fedyuk) split this topic #2

A post was split to a new topic: Where is set the value chich is used by the block’s getDisplayLabel() method while rendering a price on a frontend product view page?

0 Likes

(Dmitry Fedyuk) split this topic #3

A post was split to a new topic: How to render priceHtml on a custom phtml on view page?

0 Likes

(Dmitry Fedyuk) #4

See also:

0 Likes