Re[2]: setlineitem quantity to zero?

This WebDNA talk-list message is from

2000


It keeps the original formatting.
numero = 29672
interpreted = N
texte = WebCat was designed to sell physical objects, so the concept of negative or fractional units is foreign to the very nature of the system. If you need to sell something that comes in fractions, you would have to normalize it to 1, store the actual quantity in textA. For example, user enters 3.5 units of O+ blood at $20/unit. Your WebDNA code on the next page enters quantity=1, price=$70, textA=3.5. Your cart displays units=textA=3.5, price=price/textA=$20.Similarly, if you want to display an item as out of stock, set the price to 0 and ignore the quantity. Display the cart with Out-Of-Stock for price=0.HTHJohn Peacock ____________________Reply Separator____________________ Subject: Re: setlineitem quantity to zero? Author: (WebCatalog Talk) Date: 3/27/00 9:08 PM>on 03/27/00 3:53 PM, Michael Winston at m-w@pacbell.net wrote: > >> It looks like it's impossible to set the line item quantity to less >> than 1. > >It works for me. If the number of items in inventory is less than 1, I have >WC display an Out of Stock message.Are you saying you can set line item quantity (not inventory numbers) to something less than 1? If I try quantity=0, it sets it to 1. If I try quantity=.5, I get 415480356 (for some reason).> > In fact, if you try to set it to any fraction, it inserts a >> natural number (3.14 would give you 3). I can see how this would be >> helpful protection for the newbie, but there should be a way around >> this. > >We're not dealing in fractions. We're using integers.Well, maybe you and I are, but what about someone who wants to sell three and a half units of something (flour? pints of blood?)? Anyway, my point was that it's nice of Grant and the gang to protect people from setting quantity to strange numbers, but there are some cases (like setting quantity=0) where you want to override the safeguards. I was just using the 3.14 example to show that there are safeguards in place.Michael------------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Associated Messages, from the most recent to the oldest:

    
  1. Re[2]: setlineitem quantity to zero? (jpeacock@univpress.com 2000)
WebCat was designed to sell physical objects, so the concept of negative or fractional units is foreign to the very nature of the system. If you need to sell something that comes in fractions, you would have to normalize it to 1, store the actual quantity in textA. For example, user enters 3.5 units of O+ blood at $20/unit. Your WebDNA code on the next page enters quantity=1, price=$70, textA=3.5. Your cart displays units=textA=3.5, price=price/textA=$20.Similarly, if you want to display an item as out of stock, set the price to 0 and ignore the quantity. Display the cart with Out-Of-Stock for price=0.HTHJohn Peacock ____________________Reply Separator____________________ Subject: Re: setlineitem quantity to zero? Author: (WebCatalog Talk) Date: 3/27/00 9:08 PM>on 03/27/00 3:53 PM, Michael Winston at m-w@pacbell.net wrote: > >> It looks like it's impossible to set the line item quantity to less >> than 1. > >It works for me. If the number of items in inventory is less than 1, I have >WC display an Out of Stock message.Are you saying you can set line item quantity (not inventory numbers) to something less than 1? If I try quantity=0, it sets it to 1. If I try quantity=.5, I get 415480356 (for some reason).> > In fact, if you try to set it to any fraction, it inserts a >> natural number (3.14 would give you 3). I can see how this would be >> helpful protection for the newbie, but there should be a way around >> this. > >We're not dealing in fractions. We're using integers.Well, maybe you and I are, but what about someone who wants to sell three and a half units of something (flour? pints of blood?)? Anyway, my point was that it's nice of Grant and the gang to protect people from setting quantity to strange numbers, but there are some cases (like setting quantity=0) where you want to override the safeguards. I was just using the 3.14 example to show that there are safeguards in place.Michael------------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to jpeacock@univpress.com

DOWNLOAD WEBDNA NOW!

Top Articles:

Talk List

The WebDNA community talk-list is the best place to get some help: several hundred extremely proficient programmers with an excellent knowledge of WebDNA and an excellent spirit will deliver all the tips and tricks you can imagine...

Related Readings:

Typo in the Online Docs ... (1997) move files (2000) Payment Processors (2005) Initiating NewCart (1997) Access Denied! But why? (1997) Carts? (1998) Draft Manual, Tutorial, and more (1997) [WebDNA] Happy Friday (2016) [url] link (1998) Download Question (1997) Exclamation point (1997) Listserver problem (1997) [Fwd: F3 database munching] (1997) WebCat2b12 - nesting [tags] (1997) FW: Html mails and Outlook Win 2000 (2001) Requiring that certain fields be completed (1997) NT vs Mac (1997) default value from Lookup (was Grant, please help me) (1997) Problems with [Search] param - Mac Plugin b15 (1997) Searching for the end (1998)