Currently using SagePay for all users to make payments which is working great!
I wanted to introduce the ability for purchase orders for some of our clients so I installed a great little plugin 'PAYMENT DIRECTOR'.
This does indeed allow me to control the payment methods based on Customer Role which is great!
The biggest problem I have is to do with the next button that appears on the payment information page. I have currently disabled this for SagePay (iFrame) as it isn't required and it was confusing the process but now I want the button to be visible for Purchase Orders - but purchase orders only not sagepay.
Is there a way of controlling this button based on either the customer role or... paymentMethod?
I.E if paymentmethod selected is purchaseorder then show button else hide it.
OK, so I have managed to patch this with a piece of code from a topic I found on the forum which currently works as a patch for my set-up. It is using the Customer Role (which works due to the module I installed selecting the payment method by user role).
If anyone else wants to control this button based on user role as a quick 'patch' in the .cshtml page the code is as follows:
Views/PaymentInfo.cshtml
added to the top of the page: @using Nop.Core; @using Nop.Core.Domain.Customers; @using Nop.Core.Infrastructure; @using Nop.Services.Customers;
It definitely does the trick as a patch but I would ideally like this to work based on the payment method selected so I will update when I have figured this out or if anyone can assist.