![]() |
Displaying Extra Fields using "if" statements
I am trying to use extra fields on my product page. I want to be able to call each extra field individually in different locations and only show them if there is a "value" for that particular extra field.
For example: I have an extra field called "texture", it is the 3rd field from the top (so it is number "2"), below you will see the code I am using, it works just fine to show the field and it's value, but it doesn't go away when the field is left blank like I want it to. Does anyone have an idea what I am doing wrong here? Any feedback is appreciated. Thanks! Code:
|
Re: Displaying Extra Fields using "if" statements
I've done something like this in XC 4.1.12 to control just one extra field:
Code:
{if $active_modules.Extra_Fields ne ""} HTH |
Re: Displaying Extra Fields using "if" statements
If anyone else wants to accomplish something similar, I just figured it out. :mrgreen:
The extra field number needed to be used in "if"statement as well. This code works - Code:
|
Re: Displaying Extra Fields using "if" statements
Yes this code snippet was helpful, for some reason I was typing a similar code and it didn't work, I tried 6 variations of the code.
Then I just simply copied and pasted your code and it worked, then I finally modified it and everything works as expected. Much appreciation to you for this! (Only took me 4 hours to get it work) :S LOL |
All times are GMT -8. The time now is 12:28 PM. |
Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.