I have a variable that is Yes/no
Need to hide the price and show a custom text if this variable is set to Yes, how we can achive this quick and easy
I have a variable that is Yes/no
Need to hide the price and show a custom text if this variable is set to Yes, how we can achive this quick and easy
2
Answers
Go Admin -> Catalog -> Attributes -> Manage Attributes
Set “Used in Product View page” to Yes
Then in view.phtml :
1)You should specify more than that. Do you want to do that in javascript or php? 2)If a value can assume 2 values, I think is better use boolean.
3)If the condition is true (the variable is yes), do you want to change a value in an object or what?
So I’m going to write pseudo code for you…