So, here's what I'd like to achieve with Payment Director:
1> COD(Cash on delivery) payment method would be tailor made for each customer. As in, for customer A, I would decide the cart amount limit is 5000, so if "A" has less than 5000 in her cart, the COD payment option would be visible to her, however if her cart total is lets say 5001, then the COD option will not be visible. However, I could decide that for customer "B", the same logic applies but for a cart amount of 8000. So, I need to target individual customers (I would set these rules in the very beginning so the problematic customers I know are taken care of - the majority of the customers will have unlimited COD ceiling.
2> I went through the NopCommerce support forum and the PD blogs and have done the following:
- I can limit COD by customer Role by using Customer.IsInRole("RoleName")
- I can limit COD based on ZipCode
- I can limit COD based on Country ID by using Customer.GetAttribute("CountryId")
But unfortunately I'm unable to target a rule to an individual customer(I tried a combination of all the above - but there are chances it could include more than 1 customer)
For now - I have a very generic rule set for all customers as below(this limits everybody to a ceiling of 5000):
Order Active Type Name Expression FeeExpression FriendlyNameExpression
10 True Option Payments.CashOnDelivery OrderTotalWithoutPaymentFee <= 5000
Also, I noticed another flaw(I could be wrong though) - with the above rule set, when a customer has a cart value less than 5000, COD option will not show but it will also not show "Reward Points", if the cart goes below 5000, then both COD option and the Reward points option come up. I don't know why the Reward Points get coupled with the COD option in visibility.
I would like to target a customer individually with an expression.
I would also want Reward points to come up individually irrespective of the rule set for COD.
Any help with this will be much appreciated.
Hosted on Azure
I have enabled only one payment method for now which is COD