Problem/Motivation

I would like to have a condition on my tax type that checks a value in a field (tax_number) added to the customer profile. How would I go about this?

Comments

stijndmd created an issue. See original summary.

ozin’s picture

Status: Active » Needs review

Hi @stijndmd
You will have to write a new plugin similar to CustomerRoleCondition. In the new plugin, you will just get a current user and check the value.

Let me know if it works for you?

stijndmd’s picture

Hi, thank you for the reply

Actually, I was testing the Customer Rule Condition and it doesn't seem to work.
A custom made tax type is still applied for users without the required role for me.

hockey2112’s picture

My tests with a user role condition also failed. I checked the option for the Administrator user role, yet an anonymous user was charged that sales tax.