*/ class Stock extends \Magento\ProductAlert\Block\Email\AbstractEmail { /** * @var string */ protected $_template = 'Magento_ProductAlert::email/stock.phtml'; /** * Retrieve unsubscribe url for product * * @param int $productId * @return string */ public function getProductUnsubscribeUrl($productId) { $params = $this->_getUrlParams(); $params['product'] = $productId; return $this->getUrl('productalert/unsubscribe/stock', $params); } /** * Retrieve unsubscribe url for all products * * @return string */ public function getUnsubscribeUrl() { return $this->getUrl('productalert/unsubscribe/stockAll', $this->_getUrlParams()); } }