| ||||||||||
![]() |
Shopping cart software Solutions for online shops and malls | |||||||||
![]() |
![]() |
|
X-Cart Home | ![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
Displaying Extra Fields using "if" statements | |||
![]() |
|
|
Thread Tools | Search this Thread |
#1
|
|||||||
|
|||||||
![]() 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:
__________________
X-Cart Pro 4.4 |
|||||||
#2
|
|||||||||
|
|||||||||
![]() I've done something like this in XC 4.1.12 to control just one extra field:
Code:
HTH
__________________
Developing in 4.7.x now (Dipping into v5 - Slowly!) Have used 4.1.x, 4.2.x, 4.4.x, 4.5.x, 4.6.x & 4.7.x Multiple Instances of X-Cart MySQL 5.6.37 CentOS 7.4 Chamber Internet - Lancashire, United Kingdom http://www.chamberelancs.co.uk |
|||||||||
#3
|
|||||||
|
|||||||
![]() If anyone else wants to accomplish something similar, I just figured it out.
![]() The extra field number needed to be used in "if"statement as well. This code works - Code:
__________________
X-Cart Pro 4.4 |
|||||||
#4
|
|||||||
|
|||||||
![]() 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 |
|||||||
|
|||
X-Cart forums © 2001-2020
|