Re: 2nd Request for help/advice on variable pricing

This WebDNA talk-list message is from

2000


It keeps the original formatting.
numero = 34829
interpreted = N
texte = I don't feel definitive, but here's my thoughts:> My plan right now (unless I find a better way) is to store the info in a > database until the transaction is completed, then retrieve the data, export > the data to a text file using [AppendFile], then remove that record from the > database (so that it doesn't get full of data we don't need).good idea. Except why not simply store the approved (paid for) data in an Approved.db? Why use seperate text files for all the 'orders'? It is much easier to handle data when it is in a db then when it is not.> I thought I > would use the [cart] value to search the temporary info database.good. Cart #s are always unique without any hassle on your side.> > > Here are my initial thoughts: > > 1. have a page where customer enters personal info (name, address, etc.) and > the ad info (text, start date, days to run, category). Generate Cart here on > submit. > > 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 are > validated before generating the cart to avoid browser caching problems? I > can use a ShowIf/HideIf hierarchy to do the validation, and when all the > fields are valid, generate the cart and move to the payment processing page.seems easier to me stick all the field values in orderfile headers so you can simply use imputs with predefined values equal to those headers. when I use ?no_cache=[random][random][random] in my URLs I usually have no trouble with too much caching.> > > 3. After data is written to the temp storage db, customer is taken to the > checkout/payment page. He enters his credit card info, the order is > processed, and then, if the order succeeds, the info is retrieved from the > temporary storage db and outputted to the text file.except I would simply create an identical record in the Approved.db and then delete the temp record.> > > If the order fails for some reason, the ad info is just deleted from the > temporary storage db.maybe give the user a chance to rectify the situation, and then delete his record if he doesn't respond in a reasonable amount of time...?> > > Does that sound like the way to do it? Any suggestions or advice would be > greatly 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've > already done the math for getting the variable rate per word from a database > based on the # of days then creating the final cost by doing rate*days, but > I don't quite understand how to have this price processed by WebCat. Is it > as simple as saying [price]=formula or is it more complex than that? Any > pointers in the right direction would be much appreciated.I am not so expert in this area, but I think:the formula for price kicks in when the cart lineitem is created (added to the cart). You will either need to get the number of days for the ad to run and the number of words in the ad both before adding the lineitem (and then use a price formula), or else if the lineitem is already created before you get those variables, then you use a [setlineitem] context being careful to also use the price-chage-password in your webcat's prefs.(I haven't done the latter, so stay alert and get a second opinion if needed)-John ------------------------------------------------------------- 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:

    
  1. Re: 2nd Request for help/advice on variable pricing + MORE (Steven Jarvis 2000)
  2. Re: 2nd Request for help/advice on variable pricing + MORE (John Butler 2000)
  3. Re: 2nd Request for help/advice on variable pricing + MORE (John Butler 2000)
  4. Re: 2nd Request for help/advice on variable pricing + MORE (Steven Jarvis 2000)
  5. Re: 2nd Request for help/advice on variable pricing (John Butler 2000)
  6. Re: 2nd Request for help/advice on variable pricing (Steven Jarvis 2000)
  7. Re: 2nd Request for help/advice on variable pricing (John Butler 2000)
  8. 2nd Request for help/advice on variable pricing (Steven Jarvis 2000)
I don't feel definitive, but here's my thoughts:> My plan right now (unless I find a better way) is to store the info in a > database until the transaction is completed, then retrieve the data, export > the data to a text file using [appendfile], then remove that record from the > database (so that it doesn't get full of data we don't need).good idea. Except why not simply store the approved (paid for) data in an Approved.db? Why use seperate text files for all the 'orders'? It is much easier to handle data when it is in a db then when it is not.> I thought I > would use the [cart] value to search the temporary info database.good. Cart #s are always unique without any hassle on your side.> > > Here are my initial thoughts: > > 1. have a page where customer enters personal info (name, address, etc.) and > the ad info (text, start date, days to run, category). Generate Cart here on > submit. > > 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 are > validated before generating the cart to avoid browser caching problems? I > can use a ShowIf/HideIf hierarchy to do the validation, and when all the > fields are valid, generate the cart and move to the payment processing page.seems easier to me stick all the field values in orderfile headers so you can simply use imputs with predefined values equal to those headers. when I use ?no_cache=[random][random][random] in my URLs I usually have no trouble with too much caching.> > > 3. After data is written to the temp storage db, customer is taken to the > checkout/payment page. He enters his credit card info, the order is > processed, and then, if the order succeeds, the info is retrieved from the > temporary storage db and outputted to the text file.except I would simply create an identical record in the Approved.db and then delete the temp record.> > > If the order fails for some reason, the ad info is just deleted from the > temporary storage db.maybe give the user a chance to rectify the situation, and then delete his record if he doesn't respond in a reasonable amount of time...?> > > Does that sound like the way to do it? Any suggestions or advice would be > greatly 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've > already done the math for getting the variable rate per word from a database > based on the # of days then creating the final cost by doing rate*days, but > I don't quite understand how to have this price processed by WebCat. Is it > as simple as saying [price]=formula or is it more complex than that? Any > pointers in the right direction would be much appreciated.I am not so expert in this area, but I think:the formula for price kicks in when the cart lineitem is created (added to the cart). You will either need to get the number of days for the ad to run and the number of words in the ad both before adding the lineitem (and then use a price formula), or else if the lineitem is already created before you get those variables, then you use a [setlineitem] context being careful to also use the price-chage-password in your webcat's prefs.(I haven't done the latter, so stay alert and get a second opinion if needed)-John ------------------------------------------------------------- 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/ John Butler

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:

Netscape Communicator 4 chops off URLs (was No Data) (1997) The IBC root beer has arrived! (1997) username = 115 (1999) 2.0 Info (1997) Limiting user access to .tmpl files (1997) Help with update to 2.11 (1998) Need help... (1997) Dumb Question about Docs (1997) [WriteFile] problems (1997) Emailer setup (1997) Search in 2 or more catalogs (1997) Refresh Database (2002) Email notification to one of multiple vendors ? (1997) WCf2 and nested tags (1997) [Sum] function? (1997) WebCat ignoring Shopping Cart Folder (2001) [isfile] ? (1997) Help!!!! (1997) Banners (1997) LOG IN LOG OUT (1997)