0

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.

0

Go it, it needed to be:

public function getSalesEmail()
{
    return $this->_scopeConfig->getValue(
        'trans_email/ident_sales/email',
        \Magento\Store\Model\ScopeInterface::SCOPE_STORE
    );
}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.