[ic] Conditional qty box in results_buylist

Shambho shambho100 at gmail.com
Wed Jan 31 12:34:28 EST 2007


Hi all

This is my first post, so let me thank everyone who has contributed to
Interchange from the bottom of my heart!

And here is something I was hoping some one would help me with:

I am trying to change the Qty input and Buy Now button to go away when
the inventory is zero.

When I use the same logic that displays the Yes or No under stock it
does not seem to work:

Here is my modified lines for the stock to display the inventory qty
instead of a yes:

<td align="center">
        [item-calc]
        my $q = q{[item-data inventory quantity]};
        if($q > 0) {
                return <<EOF;
<font __FFACE__ size="1" color="#008000"><b>$q</b></font>
EOF
        }
        else {
                return <<EOF;
            <b>[L]No[/L]</b>
EOF
        }
[/item-calc]
      </td>


and this is what I am trying to do do disable the qty input field and
Buy now button:


  <td align="center">
[item-calc]
        my $q1 = q{[item-data inventory quantity]};
        if($q1 > 0) {
                return <<EOF;

      <input type=hidden name="mv_oi[item-increment]" value=""><input
type=text name=mv_order_quantity size=2 value="">

        EOF
            }
            else {
                    return <<EOF;
                        <b>[L]Out of Stock!</b>
        EOF
            }
[/item-calc]
        </td>

But this is not working!!

Am not sure where I am going wrong.

Thanks for any help!!

Hari


More information about the interchange-users mailing list