Skip to main content
added 5 characters in body
Source Link
Kishan Savaliya
  • 7.8k
  • 1
  • 13
  • 28

In my file app/design/frontend/Eadesignro/a1turbo/Magento_Catalog/templates/product/view/attribute.phtml ,

app/design/frontend/Eadesignro/a1turbo/Magento_Catalog/templates/product/view/attribute.phtml

I have to test if user is logged and if he is a b2b user. I test if user is logged with these lines of code:

$_loggedin = $this->helper('Magento\Checkout\Helper\Cart')->getCart()->getCustomerSession()->isLoggedIn();
if( $_loggedin )
    echo 'LOGGED';
    else echo 'NOT LOGGED';

But how can I check if the user is a b2b user? thank you!

In my file app/design/frontend/Eadesignro/a1turbo/Magento_Catalog/templates/product/view/attribute.phtml , I have to test if user is logged and if he is a b2b user. I test if user is logged with these lines of code:

$_loggedin = $this->helper('Magento\Checkout\Helper\Cart')->getCart()->getCustomerSession()->isLoggedIn();
if( $_loggedin )
    echo 'LOGGED';
    else echo 'NOT LOGGED';

But how can I check if the user is a b2b user? thank you!

In my file

app/design/frontend/Eadesignro/a1turbo/Magento_Catalog/templates/product/view/attribute.phtml

I have to test if user is logged and if he is a b2b user. I test if user is logged with these lines of code:

$_loggedin = $this->helper('Magento\Checkout\Helper\Cart')->getCart()->getCustomerSession()->isLoggedIn();
if( $_loggedin )
    echo 'LOGGED';
    else echo 'NOT LOGGED';

But how can I check if the user is a b2b user? thank you!

Source Link

How to check if user is a b2b user?

In my file app/design/frontend/Eadesignro/a1turbo/Magento_Catalog/templates/product/view/attribute.phtml , I have to test if user is logged and if he is a b2b user. I test if user is logged with these lines of code:

$_loggedin = $this->helper('Magento\Checkout\Helper\Cart')->getCart()->getCustomerSession()->isLoggedIn();
if( $_loggedin )
    echo 'LOGGED';
    else echo 'NOT LOGGED';

But how can I check if the user is a b2b user? thank you!