In magento 1.9.2.4 you can disable checkout for guests completely. However, what I would like is if customer chooses to checkout as a guest then they can only checkout via paypal standard. But, if they choose to register and checkout then they have the option of being able to checkout with paypal or purchase order.
Would this even be possible? I am using a theme based on the default RWD theme.
Best Answer
I'd suggest using an observer on the
payment_method_is_active
event. This fires just before Magento renders the payment methods in the checkout, enabling you to step in and switch methods on and off as you please.In this observer you'd need to check the payment method instance against the payment method you want in this case "purchaseorder"
Also check if the customer is a guest
Then disable the payment method
Here's a module I wrote that disables payment methods based on delivery address. It's a little more complicated than what you need as it sets admin fields to enable/disable for each payment method and allow users to select which contries to do this for. Hopefully it will get you started. https://github.com/peacockcarter/magento-filter-payment-methods-on-shipping-address