RE: Problems with shopping cart
This WebDNA talk-list message is from 1997
It keeps the original formatting.
numero = 12182
interpreted = N
texte = Paul ->The problem that I have is that with the products that are in my>database. Some of them have more that one price, ie if you order 1 of>that particular item you are charged X amount of pounds and if you order>100 of that particular item you are charged Y pounds.>>Now, I have a shopping cart that has say 3 items in it and each one has>more that one price as explained above. What I want to do is set up a>[show if] statement so that webcatalog goes through each of the items,>checks the quantity and display's the correct price.Sure - you can use any WebDNA commands you like in the [price] formula in your formulas.db file to generate different prices based on quantity (or date, or whatever). The current price formula just looks up the price field in your product database, I believe, but you could have fields like 'price1' 'price2' 'price3' etc. in your products database, and then use [showif] for the price formula in formulas.db to look up price1 if quantity is up to a certain amount, price2 if it is above that amount, and so on.Alternatively, instead of adding fields to your database, you could have the price formula generate a discount based on quantity, so that if the quantity is above a certain amount, the [price] is multiplied by .9, and so forth.I hope that makes a bit of sense,Marc EagleStarNine Technologieshttp://www.smithmicro.com/
Associated Messages, from the most recent to the oldest:
|
- RE: Problems with shopping cart (Marc Eagle 1997)
|
Paul ->The problem that I have is that with the products that are in my>database. Some of them have more that one price, ie if you order 1 of>that particular item you are charged X amount of pounds and if you order>100 of that particular item you are charged Y pounds.>>Now, I have a shopping cart that has say 3 items in it and each one has>more that one price as explained above. What I want to do is set up a>[show if] statement so that webcatalog goes through each of the items,>checks the quantity and display's the correct price.Sure - you can use any WebDNA commands you like in the [price] formula in your
formulas.db file to generate different prices based on quantity (or date, or whatever). The current price formula just looks up the price field in your product database, I believe, but you could have fields like 'price1' 'price2' 'price3' etc. in your products database, and then use
[showif] for the price formula in
formulas.db to look up price1 if quantity is up to a certain amount, price2 if it is above that amount, and so on.Alternatively, instead of adding fields to your database, you could have the price formula generate a discount based on quantity, so that if the quantity is above a certain amount, the [price] is multiplied by .9, and so forth.I hope that makes a bit of sense,Marc EagleStarNine Technologieshttp://www.smithmicro.com/
Marc Eagle
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:
Digital Postcards (1999)
WebCat2b15MacPlugin - showing [math] (1997)
Easter (1998)
Invisible files (2002)
can WC render sites out? (1997)
WebDNA-generated email headers (2003)
2cd pair of eyes please... (2004)
[WebDNA] version 7.1 on ubuntu apache2 virtual host config (2014)
More on the email templates (1997)
is there a global includes directory? (1998)
Not reading blanks (1998)
Picking a random entry from a .db (2001)
Interfacing a webcat front end registartion to CommunigatePRO (2000)
RE: Automatic thumbnail images (1998)
Re:F*** you (1998)
# fields limited? (1997)
Incrementing a number (1998)
WebCat2b13MacPlugIn - [showif][search][/showif] (1997)
WebCatalog dying in WebTen Revisited (1998)
Accentued characters in emails (2000)