1
Homepageкак показать мою ссылку счета в заголовке после успешного входа в Magento 2.0
Я хотел бы показать Мой Счет после авторизации.
Homepageкак показать мою ссылку счета в заголовке после успешного входа в Magento 2.0
Я хотел бы показать Мой Счет после авторизации.
$objectManager = \Magento\Framework\App\ObjectManager::getInstance();
$customerSession = $objectManager->get('Magento\Customer\Model\Session');
if($customerSession->isLoggedIn()) {
// display your link here
}
---------------------- от контроллера -------------------
$this->_objectManager->get('Magento\Customer\Model\Session');
if($customerSession->isLoggedIn()) {
// display your link here
}