2nd Request for help/advice on variable pricing
This WebDNA talk-list message is from 2000
It keeps the original formatting.
numero = 34824
interpreted = N
texte = Folks, My first big from-scratch WebCatalog project is to create a store to allowusers to submit and pay for classified ads. I'm still in the developmentalphase, as I haven't really gotten into the guts of creating stores fromscratch in WebCat (StoreBuilder won't work here, I don't think, plus I wantto avoid using frames).I have two major hurdles that I need some advice on:My first problem is a conceptual one: How do I structure the steps of mystore?I have to output the information submitted in a particular format for theclassified ad server to pick up. The problem is that I don't want to outputthat data until the customer's transaction is approved, else the ad serverwill pick up the ad and put it in line to be printed.My plan right now (unless I find a better way) is to store the info in adatabase until the transaction is completed, then retrieve the data, exportthe data to a text file using [AppendFile], then remove that record from thedatabase (so that it doesn't get full of data we don't need). I thought Iwould use the [cart] value to search the temporary info database.Here are my initial thoughts:1. have a page where customer enters personal info (name, address, etc.) andthe ad info (text, start date, days to run, category). Generate Cart here onsubmit.2. pass all that info to an ad confirm page that validates all the fields.If not, user is directed to go back. Should I wait until the fields arevalidated before generating the cart to avoid browser caching problems? Ican use a ShowIf/HideIf hierarchy to do the validation, and when all thefields are valid, generate the cart and move to the payment processing page.3. After data is written to the temp storage db, customer is taken to thecheckout/payment page. He enters his credit card info, the order isprocessed, and then, if the order succeeds, the info is retrieved from thetemporary storage db and outputted to the text file.If the order fails for some reason, the ad info is just deleted from thetemporary storage db.Does that sound like the way to do it? Any suggestions or advice would begreatly appreciated!SECOND ISSUE is that the price of the ad will depend upon two variables:the number of days for the ad to run and the number of words in the ad. I'vealready done the math for getting the variable rate per word from a databasebased on the # of days then creating the final cost by doing rate*days, butI don't quite understand how to have this price processed by WebCat. Is itas simple as saying [price]=formula or is it more complex than that? Anypointers in the right direction would be much appreciated.Any chance any of you have ever done this sort of thing before? I still wantto do it myself, but I'd like to see how it's been done if it has.I appreciate all the advice and help that's been offered to me while Istruggle through learning the basics of WebCat. This list has beeninvaluable. Without it, I think I would have collapsed into a puddle by now!Thanks!Steve------------------------------------------------Steven JarvisWeb Developersjarvis@nwaonline.netMorning News of Northwest Arkansashttp://www.nwaonline.net-------------------------------------------------------------------------------------------------------------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 Web Archive of this list is at: http://search.smithmicro.com/
Associated Messages, from the most recent to the oldest:
Folks, My first big from-scratch WebCatalog project is to create a store to allowusers to submit and pay for classified ads. I'm still in the developmentalphase, as I haven't really gotten into the guts of creating stores fromscratch in WebCat (StoreBuilder won't work here, I don't think, plus I wantto avoid using frames).I have two major hurdles that I need some advice on:My first problem is a conceptual one: How do I structure the steps of mystore?I have to output the information submitted in a particular format for theclassified ad server to pick up. The problem is that I don't want to outputthat data until the customer's transaction is approved, else the ad serverwill pick up the ad and put it in line to be printed.My plan right now (unless I find a better way) is to store the info in adatabase until the transaction is completed, then retrieve the data, exportthe data to a text file using [appendfile], then remove that record from thedatabase (so that it doesn't get full of data we don't need). I thought Iwould use the [cart] value to search the temporary info database.Here are my initial thoughts:1. have a page where customer enters personal info (name, address, etc.) andthe ad info (text, start date, days to run, category). Generate Cart here onsubmit.2. pass all that info to an ad confirm page that validates all the fields.If not, user is directed to go back. Should I wait until the fields arevalidated before generating the cart to avoid browser caching problems? Ican use a ShowIf/HideIf hierarchy to do the validation, and when all thefields are valid, generate the cart and move to the payment processing page.3. After data is written to the temp storage db, customer is taken to thecheckout/payment page. He enters his credit card info, the order isprocessed, and then, if the order succeeds, the info is retrieved from thetemporary storage db and outputted to the text file.If the order fails for some reason, the ad info is just deleted from thetemporary storage db.Does that sound like the way to do it? Any suggestions or advice would begreatly appreciated!SECOND ISSUE is that the price of the ad will depend upon two variables:the number of days for the ad to run and the number of words in the ad. I'vealready done the math for getting the variable rate per word from a databasebased on the # of days then creating the final cost by doing rate*days, butI don't quite understand how to have this price processed by WebCat. Is itas simple as saying [price]=formula or is it more complex than that? Anypointers in the right direction would be much appreciated.Any chance any of you have ever done this sort of thing before? I still wantto do it myself, but I'd like to see how it's been done if it has.I appreciate all the advice and help that's been offered to me while Istruggle through learning the basics of WebCat. This list has beeninvaluable. Without it, I think I would have collapsed into a puddle by now!Thanks!Steve------------------------------------------------Steven JarvisWeb Developersjarvis@nwaonline.netMorning News of Northwest Arkansashttp://www.nwaonline.net-------------------------------------------------------------------------------------------------------------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 Web Archive of this list is at: http://search.smithmicro.com/
Steven Jarvis
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:
Search returns all, not 20 (1997)
WebCat-Typhoon-WebTen (1998)
WebCat2final1 crashes (1997)
Resume Catalog ? (1997)
Appending space (1998)
[format 40s]text[/format] doesn't work (1997)
[object] Tag & WebDNA Support (2005)
insecure default install on unix (2002)
Template Encryption (1998)
Newbie questions (1999)
WebDNA Payment Alternatives (2003)
Databases going to sleep (1998)
Funny Submissions From a Form Page (1999)
Sense/Disallow HTML tags during $Append (1997)
Database changes (1998)
Getting Emailer to send mail (1997)
webcat- multiple selection in input field (1997)
WebCat sometimes doesn't respond (2000)
Weird Math and SV (1997)
sorting by date (1999)