| ||||||||||
Shopping cart software Solutions for online shops and malls | ||||||||||
|
X-Cart Home | FAQ | Forum rules | Calendar | Mark Forums Read | User manuals | Login |
Making the Extra Fields Template Smartyier | |||
|
|
Thread Tools | Search this Thread |
#1
|
|||||||
|
|||||||
Making the Extra Fields Template Smartyier
Hi everyone,
I have been wresting with this problem for a day or so and have yet to find the right syntax. Hopefully someone here will show me the light. Here's the code (it's altered a bit from the original file, but it shouldn't be a problem)... Code:
What I would like to do is improve the intelligence of the code by adding to the if statement at the top. Right now all the extra product.param fields (00 - 09) print out regardless of whether they have information in them or not. I would like to add to the if statement so that it will only print out the product.param fields that are NOT blank. I tried altering the if statement with something like this: Code:
But the syntax is not quite right. I have tried adding backticks, quotes, apostrophes, etc., but nothing has worked yet. I couldnБ─≥t find the answer in the manual, so I hope this board can help. Thanks in advance for any help provided
__________________
Following the signature guidelines : xcart pro 3.5.8 - [RedHat] |
|||||||
#2
|
|||||||||
|
|||||||||
OK - I think I've got it! Maybe not the most efficient way to code it, but best I could do not knowing much PHP or smarty:
Code:
One problem - the fields are supressed, but the space still seems to be taken up. Is there a smarty {trim} command or something like that?? |
|||||||||
#3
|
|||||||
|
|||||||
Definitely a step in the right direction. The html output was a little off, try this code instead.
Code:
I removed a </td> and to help with the output. Kudos on the work
__________________
Following the signature guidelines : xcart pro 3.5.8 - [RedHat] |
|||||||
#4
|
|||||||||
|
|||||||||
Perfect! Duh - I should've seen the
was in the loop. This was very productive! Seems like it should be default behavior anyway. -ken |
|||||||||
|
Thread Tools | Search this Thread |
|
|
|
|||
X-Cart forums © 2001-2020
|