61 parent::__construct($context,
$data);
71 $this->priceLayout->addHandle($this->getPriceRenderHandle());
72 $this->priceLayout->loadLayout();
73 return parent::_prepareLayout();
88 $useArguments = array_replace($this->_data,
$arguments);
91 $rendererPool = $this->priceLayout->getBlock(
'render.product.prices');
93 throw new \RuntimeException(
'Wrong Price Rendering layout configuration. Factory block is missed');
97 $priceRender = $rendererPool->createPriceRender($priceCode, $saleableItem, $useArguments);
98 return $priceRender->toHtml();
111 public function renderAmount(
114 SaleableInterface $saleableItem =
null,
117 $useArguments = array_replace($this->_data,
$arguments);
120 $rendererPool = $this->priceLayout->getBlock(
'render.product.prices');
121 if (!$rendererPool) {
122 throw new \RuntimeException(
'Wrong Price Rendering layout configuration. Factory block is missed');
126 $amountRender = $rendererPool->createAmountRender(
$amount, $saleableItem,
$price, $useArguments);
127 return $amountRender->toHtml();
__construct(Template\Context $context, Layout $priceLayout, array $data=[])