[ic] Conditional qty box in results_buylist
ic at 3edge.com
ic at 3edge.com
Wed Jan 31 12:48:00 EST 2007
Shambho writes:
> 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>
Here is missing a [/L] .. not sure if that is breaking things.
> EOF
> }
> [/item-calc]
> </td>
>
> But this is not working!!
Not working = it is always showing the input field
or
Not working = nothing is showing
or
Not working = something else?
> Am not sure where I am going wrong.
>
> Thanks for any help!!
>
> Hari
> _______________________________________________
> interchange-users mailing list
> interchange-users at icdevgroup.org
> http://www.icdevgroup.org/mailman/listinfo/interchange-users
More information about the interchange-users
mailing list