Help with Receipt xml <CONDITION> statement

Mar 29, 2005 3 Replies

Hi All,



Has anyone used a conditional statement in a receipt to print different comments based on a value in one of the custom text fields.



For example I have the CustomText1 field configured in customers and populated with a value to allow customers to be grouped (such as say Retail and Wholesale customers). I wish to print different messages on the receipts based on which group the customer belongs to.



I am trying to use the following syntax to determine which message I should print -



Customer.CustomText1 = "Retail"



The expression always seems to be evaluating to false and therefore never prints the correct message. I understand there may be issues with string matching but I don't know how else to group the customers ( I need to allow for at least three classifications).



Has anyone done this or can you suggest an alternative.



Thanks,



Jason.


Create a variable and give it the value you want to compare "Retail" in this case. You can't compare a variable value to a static value.

Hi Glenn,

Is this what you meant? Becuase I still can't get it to work :-( Any more ideas or examples??

"Retail"

Customer.CustomText1=RetailCustomer

Regards,

Jason.

Try adding some spaces between the values anf the tags - like this...

"Retail"

Customer.CustomText1 = RetailCustomer

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required