Author: Yogesh Shishangiya

Magento 2 + CMS block create via Data Patch

Check if customer is logged in using js component – Magento2

4 years ago
Easy way to check whether customer logged in or not via customer Js component in phtml file. <div data-bind="scope: 'customer'"> <!-- ko if: customer().fullname --> Logged In customer <!-- /ko --> <!-- ko ifnot: customer().fullname --> Notlogged In customer <!-- /ko --> </div> <script type="text/x-magento-init"> { "*": { "Magento_Ui/js/core/app": { "components": { "customer": { "component": […]
Read More

Create your account

chatsimple