Popular Posts

Saturday, 3 May 2014

Magento: How to check if User is logged in

In order to for you to do that you need to check if the user logged in using 
the following code:


<?php if(Mage::getSingleton('customer/session')->isLoggedIn()): ?>

 //paste your coupon code or private information here. 

<?php endif; ?>
 
 
Also you can use this helper method. It does exactly the same as abov
 

<?php if($this->helper('customer')->isLoggedIn()): ?> //paste your coupon code or private information here. <?php endif; ?>

No comments:

Post a Comment

Magento: How to get last order id

There are many ways to get last order id:   1. From checkout session: $lastOrderId = Mage::getSingleton('checkout/session'...