Gossamer Forum
Home : Products : Links 2.0 : Customization :

greater than and equal to with template mod

Quote Reply
greater than and equal to with template mod
I am using the enhanced template mod for links located at http://www.gossamer-threads.com/...ces/Detailed/26.html and have a question.

I am using the <,> to determine if a number in my DB (quantity) is greater than or less than a certain number. Here is how I have it set

Code:
<%if Quantity > '10'>
<%Quantity%>
<endif%>
<%if Quantity < '10'>
We have a short supply of this product, please contact our sales staff....
<%endif%>

Now it all works fine except if the quantity is 10, which then it just shows nothing. I know this may be simple but I am just learning....Heres what I tried

Code:
<%if Quantity => '10'>
<%if Quantity ==> '10'>

But niether worked...
Any suggestions

Thanks,
Ian Galloway
Quote Reply
Re: greater than and equal to with template mod In reply to
Use the following codes:

Code:
<%if Quantity eq 10>
<%Quantity%>
<%endif%>
<%if Quantity gt 10>
<%Quantity%>
<%endif%>
<if Quantity lt 10>
We have a short supply of this product, please contact our sales staff....
<%endif%>

Regards,

------------------
Eliot Lee....
Former Handle: Eliot
* Check Resource Center
* Search Forums
* Thinking out of the box (codes) is not only fun, but effective.
Quote Reply
Re: greater than and equal to with template mod In reply to
Thanks Eliot,

You come to the rescue as usual. Smile
I submitted a correction in another post where I corrected myself, but its good to have you verify it before I try it....

Thanks Again,

P.S. With all the time you spend helping others here, how do you ever find time to work your own site? Wink
Quote Reply
Re: greater than and equal to with template mod In reply to
I don't sleep.

Wink

And I will soon be leaving the forum for an undetermined period of time due to two new volunteer projects that will take up a lot of my time. Also, things at work are getting quite busy...

Regards,

------------------
Eliot Lee....
Former Handle: Eliot
* Check Resource Center
* Search Forums
* Thinking out of the box (codes) is not only fun, but effective.