12345678910111213141516171819202122232425262728293031323334 |
- <?php
- /**
- * Copyright © Magento, Inc. All rights reserved.
- * See COPYING.txt for license details.
- */
- namespace Magento\ProductAlert\Block\Product\View;
- /**
- * Product view price
- *
- * @api
- * @since 100.0.2
- */
- class Price extends \Magento\ProductAlert\Block\Product\View
- {
- /**
- * Prepare price info
- *
- * @param string $template
- * @return $this
- */
- public function setTemplate($template)
- {
- if (!$this->_helper->isPriceAlertAllowed()
- || !$this->getProduct() ||
- false === $this->getProduct()->getCanShowPrice()
- ) {
- $template = '';
- } else {
- $this->setSignupUrl($this->_helper->getSaveUrl('price'));
- }
- return parent::setTemplate($template);
- }
- }
|