Re: Cart # Starting at 1000

This WebDNA talk-list message is from

2000


It keeps the original formatting.
numero = 30628
interpreted = N
texte = >Where would this code go? On my last page after the initial cartfile is >written? Here Tony, I will repeat the entire message I posted the other day. If you read this one, you will see that it explains everything: >>How can I set the shopping cart # (order #) up so that it starts at a >>specified # (say 1000) and then continues on from there (ex: >>1000,1001,1002, etc...) > >Not possible to use [cart] that way directly, and it's not >recommended. Cart numbers are meant to be guaranteed unique, and >that's why we use the big number. Actually it's very easy, you just rename the cart file after it is placed into the orders folder. Your webdna code goes at the bottom of the thankyou.tpl page. In order to know the next sequentially-numbered file name, you'll need to store the last one in an include file named lastOrderName so you can use this code to set the new file name and to update the lastOrderName value:[waitforfile file=Orders/[cart]][math show=f]newOrderName=1+[include file=lastOrderName][/math][movefile from=Orders/[cart]&to=Orders/[newOrderName]][writefile file=lastOrderName][newOrderName][/writefile][/waitforfile] ================================ Kenneth Grome, WebDNA Consultant 808-737-6499 http://webdna.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 Associated Messages, from the most recent to the oldest:

    
  1. Re: Cart # Starting at 1000 (Kenneth Grome 2000)
  2. Re: Cart # Starting at 1000 (Paul Fowler 2000)
  3. Re: Cart # Starting at 1000 (Tony Frenzel 2000)
  4. Re: Cart # Starting at 1000 (Kenneth Grome 2000)
  5. Re: Cart # Starting at 1000 (Tony Frenzel 2000)
  6. Re: Cart # Starting at 1000 (Kenneth Grome 2000)
  7. Re: Cart # Starting at 1000 (Tony Frenzel 2000)
  8. Re: Cart # Starting at 1000 (Kenneth Grome 2000)
  9. Re: Cart # Starting at 1000 (Tony Frenzel 2000)
  10. Re: Cart # Starting at 1000 (Tony Frenzel 2000)
  11. Re: Cart # Starting at 1000 (Paul Fowler 2000)
  12. Re: Cart # Starting at 1000 (Tony Frenzel 2000)
  13. Re: Cart # Starting at 1000 (WebDNA Support 2000)
  14. Re: Cart # Starting at 1000 (Brian B. Burton 2000)
  15. Re: Cart # Starting at 1000 (WebDNA Support 2000)
  16. Re: Cart # Starting at 1000 (Tony Frenzel 2000)
  17. Re: Cart # Starting at 1000 (Kenneth Grome 2000)
  18. Re: Cart # Starting at 1000 (WebDNA Support 2000)
  19. Cart # Starting at 1000 (Tony Frenzel 2000)
>Where would this code go? On my last page after the initial cartfile is >written? Here Tony, I will repeat the entire message I posted the other day. If you read this one, you will see that it explains everything: >>How can I set the shopping cart # (order #) up so that it starts at a >>specified # (say 1000) and then continues on from there (ex: >>1000,1001,1002, etc...) > >Not possible to use [cart] that way directly, and it's not >recommended. Cart numbers are meant to be guaranteed unique, and >that's why we use the big number. Actually it's very easy, you just rename the cart file after it is placed into the orders folder. Your webdna code goes at the bottom of the thankyou.tpl page. In order to know the next sequentially-numbered file name, you'll need to store the last one in an include file named lastOrderName so you can use this code to set the new file name and to update the lastOrderName value:[waitforfile file=Orders/[cart]][math show=f]newOrderName=1+[include file=lastOrderName][/math][movefile from=Orders/[cart]&to=Orders/[newOrderName]][writefile file=lastOrderName][newOrderName][/writefile][/waitforfile] ================================ Kenneth Grome, WebDNA Consultant 808-737-6499 http://webdna.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 Kenneth Grome

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:

RE: Nesting [ListFiles] (1998) Rhapsody? (1997) writefile and emailer (2002) PIXO support (1997) emailer (1997) [REFERRER] AND Truncation (1998) WebCat2b13MacPlugIn - [shownext method=post] ??? (1997) Email and name capture (1999) Calendar (1997) New public beta available (1997) date tag not interpreted (2000) NEW 4.X BUG?!?!?!? -correction... (2002) RE: Missing contexts on NT (1997) HELP WITH DATES (1997) [WebDNA] WebDNA & Google Chrome Browser (2012) Adding Multiple Items to Shopping Cart from a Results page (1997) error message (2000) webcat- multiple selection in input field (1997) Cart # Starting at 1000 (2000) WebCatalog NT beta 18 now available (1997)