Get sales email set in configuration on template
-
10-10-2020 - |
Вопрос
In a custom module I'm trying to get store information set on the Admin panel in a template.
I've been able to get it for most by adding get functions such as the below, but can't get the one for the sales email.
public function getPhone()
{
return $this->_scopeConfig->getValue(
'general/store_information/phone',
\Magento\Store\Model\ScopeInterface::SCOPE_STORE
);
}
public function getSalesEmail()
{
return $this->_scopeConfig->getValue(
'general/ident_sales/email',
\Magento\Store\Model\ScopeInterface::SCOPE_STORE
);
}
Any idea's what I should do, I think the parameter 'general/ident_sales/email'
is wrong.
Решение
Go it, it needed to be:
public function getSalesEmail()
{
return $this->_scopeConfig->getValue(
'trans_email/ident_sales/email',
\Magento\Store\Model\ScopeInterface::SCOPE_STORE
);
}
Не связан с magento.stackexchange