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 orfractional units is foreign to the very nature of the system. If you need tosell 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 onthe next page enters quantity=1, price=$70, textA=3.5. Your cart displaysunits=textA=3.5, price=price/textA=$20.Similarly, if you want to display an item as out of stock, set the price to 0and 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:
|
- Re[2]: setlineitem quantity to zero? (jpeacock@univpress.com 2000)
|
WebCat was designed to sell physical objects, so the concept of negative orfractional units is foreign to the very nature of the system. If you need tosell 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 onthe next page enters quantity=1, price=$70, textA=3.5. Your cart displaysunits=textA=3.5, price=price/textA=$20.Similarly, if you want to display an item as out of stock, set the price to 0and 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:
HELP WITH DATES (1997)
your mail (2000)
[Replace] really replaces? (2000)
How can I record purchases to a database? (1998)
Another bug to squash (WebCat2b13 Mac .acgi) (1997)
Upload images to non DNA server (2004)
ETA on Dreamweaver extensions? (2000)
Search Engine questions ... (2002)
WebCat2 - Getting to the browser's username/password data (1997)
Shop till you drop dead on the avenue ... (1997)
RePost: NAT and the CART (1999)
CSS positioning!!! (2001)
I try hard to think positively (1998)
member logins database (2003)
[shell] stopped ?? (2003)
Refreshing Javascript (2001)
Triggers (2003)
[ShowNext] (1997)
Setting up shop (1997)
Another Flash Question (2000)