0

display payment method to logged in user only in magneto. As in screenshot enter code here i want to display credit card(saved) to logged in user only.

screenshot

maddy
  • 121
  • 1
  • 1
  • 10

1 Answers1

1

Use this function to check if user is logged in or not

$userLogStatus = Mage::getSingleton('customer/session')->isLoggedIn();

You can put in the condition for credit card(saved). You can do this int the template file itself. [Pseudo code]

if(payment==cc-saved){
 if(Mage::getSingleton('customer/session')->isLoggedIn()){
   show option;
 }
}
anz
  • 987
  • 7
  • 21
  • 1
    thanx anz for idea. The actual i added in public_html/app/design/frontend/base/default/template/checkout/onepage/payment/methods.phtml is isLoggedIn())):?> – maddy May 26 '15 at 07:12