Hello,
I'm coming back to one of my previews ticket (https://toolset.com/forums/topic/conditional-output-based-on-cart-input/).
Nigel explained (You'll need to write a custom function to check if a product is in the cart, and you can then use the results of that function in your condition).
I would like to know what should be the result of this function to be used inside a Toolset conditional. Should it be a true / false result or something else? When used in a conditional in general, what is the expression that the condition is waiting for (in order to built the function returning exactly this expression).
Regards
Pat
Hi Pat
Your function can return whatever you want, and then the condition tests whether what is returned by the function matches some value you specify.
It's not easy to handle boolean true/false values in this way, and typically you would do something like return 1 or 0 (for true or false).
Got it.
Thanks Nigel.
Regards
Pat