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.
Asked
Active
Viewed 916 times
0
-
Possibe duplicate, this might help : http://magento.stackexchange.com/questions/33047/displaying-certain-payment-methods-for-customer-groups – Manashvi Birla May 26 '15 at 05:45
-
i just want to dispaly credit card(saved) method to logged in user only. – maddy May 26 '15 at 06:05
-
How to create a group of logged in user? – maddy May 26 '15 at 06:05
-
If user is not logged in no need to show credit card option right? – saravanavelu May 26 '15 at 06:18
1 Answers
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
-
1thanx 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