[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[ic] Conditional qty box in results_buylist


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
_______________________________________________
interchange-users mailing list
suppressed
http://www.icdevgroup.org/mailman/listinfo/interchange-users


Mail converted by mhonarc 2.6.15
This archive provided courtesy of JSW4.NET, Internet Hosting Services for Small Business.