[Date Prev][Date Next][Thread Prev][Thread Next][Minivend by date
][Minivend by thread
]
Re: [mv] Slick little inventory checker (not!)
****** message to minivend-users from Handytman@aol.com ******
I use perl to check the inventory field (avoiding nested IFs):
[perl interpolate=1]
return 1 if (('[item-field limited]' eq 'yes') && ('[item-data
inventory qty]' < 1));
return 0;
[/perl]
This checks products.asc for a 'yes' in my 'limited' field (indicating that
this product has an entry in inventory.asc) and then checks if the quantity <
1.
HTH,
Rob Maurer
In a message dated 1/7/00 6:57:48 PM Eastern Standard Time, barney@wttech.com
writes:
> Hello all,
>
> I've been wrestling with inventory.asc and a way to inform clients when
> we're out of stock. I looked through the list and adapted this into
> basket.html. This is very cute (for a nonprogrammer like me!!) EXCEPT that
> it only works if there is an inventory quantity, for unlimited items (blank
> qty in inventory) it of course shows not available. Also, the not available
> doesn't remove subtotal info etc. keeping the item in the order when it
> shouldn't be.
>
> Can a savvy mvender show me how to do some magic and determine if there's
> value on the inventory qty before comparing to item-quantity?
>
>
> [if data inventory::qty::[item-code] < [item-quantity] ]
> NOT AVAILABLE
> [else]
> <input type="text" name=[quantity-name] value="[item-quantity]" size=3>
> [/else][/if]
>
>
> Thanks ever so much!
>
> Barney Treadway
> WT Technologies
-
To unsubscribe from the list, DO NOT REPLY to this message. Instead, send
email with 'UNSUBSCRIBE minivend-users' in the body to Majordomo@minivend.com.
Archive of past messages: http://www.minivend.com/minivend/minivend-list