Re: Shop from PDF

This WebDNA talk-list message is from

2004


It keeps the original formatting.
numero = 59785
interpreted = N
texte = Not unwieldy at all.... Remember your "carts" database is kept in RAM so manipulating it is very quick. I would recommend that you store the date/time as an epoch number so you only have to do one comparison. (see archives for creating epoch-based time stamps) Using your example of one hour for expiration of a valid date/time/IP combo, simply put this at the beginning of your include file: [math sow=f]myEpoch=[calculate current epoch now]-*60 minutes*[/math] [delete db=yourcart.db&leDBEPOCHdatarq=[myEpoch] done. You could also have a trigger or cron job that sweeps your "cart" file hourly or at some other interval. ~joe At 9:02 AM -0700 10/27/04, Dan Strong wrote: >Hi all, > >I have a scenario in the works where a person will download a PDF catalog and all of the products have been hotlinked to the item in the online store. Once there they can add to cart like normal and all is fine except that if they 'shop' from the PDF again it clears the cart (as expected). I need to get around this. Dynamically populating the PDFs with unique cart #'s is not a viable option at this time. > >Right now, my thinking is to make a temp.db that basically has DATE TIME IP CART and then if they click another link from the PDF, there is some logic in the header of the store ([included] on all pages, of course), that checks the IP and if it is a 'fresh' IP (say, less than an hour old or something), then the cart associated with the IP is used, and, in theory, would repopulate the cart correctly with any existing items. > >Only prob I can see with this is that the .db would get pretty unwieldy as it would pretty much become a traffic counter and could get unwieldy quick, so now I would need to constantly roll this .db, which seems like overkill... any thoughts before I dive in? Is there anything obvious I am missing? > >Thanks in advance, >-Dan > >------------------------------------------------------------- >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://webdna.smithmicro.com/ -- _______________________________________________________________ Joseph D'Andrea ~ http://www.west21.com/ ~ JoeDan@West21.com WEST21.com Internet services for the 21st Century webhosting ~ co-location ~ wireless access ~ WebCat programming ------------------------------------------------------------- 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://webdna.smithmicro.com/ Associated Messages, from the most recent to the oldest:

    
  1. Re: OT: P3P (was Re: Shop from PDF) ( John Peacock 2004)
  2. OT: P3P (was Re: Shop from PDF) ( devaulw@onebox.com 2004)
  3. Re: Shop from PDF ( "Dan Strong" 2004)
  4. Re: Shop from PDF ( John Peacock 2004)
  5. Re: Shop from PDF ( "Dan Strong" 2004)
  6. Re: Shop from PDF ( John Peacock 2004)
  7. Re: Shop from PDF ( Terry Wilson 2004)
  8. Re: Shop from PDF ( "Dan Strong" 2004)
  9. Re: Shop from PDF ( Robert Schmidt 2004)
  10. Re: Shop from PDF ( Joe D'Andrea 2004)
  11. Re: Shop from PDF ( "Dan Strong" 2004)
  12. Re: Shop from PDF ( Sam Lewis 2004)
  13. Shop from PDF ( "Dan Strong" 2004)
Not unwieldy at all.... Remember your "carts" database is kept in RAM so manipulating it is very quick. I would recommend that you store the date/time as an epoch number so you only have to do one comparison. (see archives for creating epoch-based time stamps) Using your example of one hour for expiration of a valid date/time/IP combo, simply put this at the beginning of your include file: [math sow=f]myEpoch=[calculate current epoch now]-*60 minutes*[/math] [delete db=yourcart.db&leDBEPOCHdatarq=[myEpoch] done. You could also have a trigger or cron job that sweeps your "cart" file hourly or at some other interval. ~joe At 9:02 AM -0700 10/27/04, Dan Strong wrote: >Hi all, > >I have a scenario in the works where a person will download a PDF catalog and all of the products have been hotlinked to the item in the online store. Once there they can add to cart like normal and all is fine except that if they 'shop' from the PDF again it clears the cart (as expected). I need to get around this. Dynamically populating the PDFs with unique cart #'s is not a viable option at this time. > >Right now, my thinking is to make a temp.db that basically has DATE TIME IP CART and then if they click another link from the PDF, there is some logic in the header of the store ([included] on all pages, of course), that checks the IP and if it is a 'fresh' IP (say, less than an hour old or something), then the cart associated with the IP is used, and, in theory, would repopulate the cart correctly with any existing items. > >Only prob I can see with this is that the .db would get pretty unwieldy as it would pretty much become a traffic counter and could get unwieldy quick, so now I would need to constantly roll this .db, which seems like overkill... any thoughts before I dive in? Is there anything obvious I am missing? > >Thanks in advance, >-Dan > >------------------------------------------------------------- >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://webdna.smithmicro.com/ -- _______________________________________________________________ Joseph D'Andrea ~ http://www.west21.com/ ~ JoeDan@West21.com WEST21.com Internet services for the 21st Century webhosting ~ co-location ~ wireless access ~ WebCat programming ------------------------------------------------------------- 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://webdna.smithmicro.com/ Joe D'Andrea

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:

and passing to a cart (1997) WebCatalog2 Feature Feedback (1996) Test (2000) Share cost of training videos! (1998) Moving Files (2000) Problem with HTML email (2003) getchars broken? (1997) WebCat2: Items xx to xx shown, etc. (1997) [WebDNA] [BULK] db-temp files (2011) [WebDNA] TCPConnect/cURL alternative for windows? (2010) Re:no [search] with NT (1997) Too Much Rootbeer Free Offer (1997) [WebDNA] WebDNA used in US Government work? (2013) WordBreak Qestion (1998) tcpconnect/tcpsend frustrations (2002) typhoon... (1997) HELP!!! (1998) Separate SSL Server (1997) RAM variables (1997) Text Area - Line Breaks (1998)