Re: minimalist shopping cart.

This WebDNA talk-list message is from

1997


It keeps the original formatting.
numero = 15510
interpreted = N
texte = >I am working on a solution in which my customer doesn't want to see his >shopping cart. Unless he specifically axes for it. When he adds an item >he will be return to his same page. That was easy enough, but, I would >like to do a lookup into the [cart] file and determine if a specific file >exists there. If it doesn't then I want to change the gif from 'buy' to >'remove'. Is the cart file like a database can I do a sub lookup into >that cart file extract a value like I would from any database?No, cart files are not databases. The exact format is documented in the online docs, but the best way to get at information inside cart files is to use [OrderFile] and [LineItems] contexts. If you want to test for the existence of any file on your hard disk (regardless of its type), then you can use the new [FileInfo] context in 2.1, or perhaps [ListFiles]Here's an example of getting some information from the order file[OrderFile cart=1234] [Header14], [ShipToState]
[LineItems] [sku], [price]
[/LineItems] [/OrderFile]Grant Hulbert, V.P. Engineering | ==== eCommerce for the Rest of Us ==== Pacific Coast Software | WebCatalog, WebMerchant, 11770 Bernardo Plaza Court | SiteEdit Pro, PhotoMaster, San Diego, CA 92128 | Typhoon 619/675-1106 Fax: 619/675-0372 | http://www.smithmicro.com/ Associated Messages, from the most recent to the oldest:

    
  1. Re: minimalist shopping cart. (Grant Hulbert 1997)
  2. Re: minimalist shopping cart. (Kenneth Grome 1997)
  3. Re: minimalist shopping cart. (Kenneth Grome 1997)
  4. Re: minimalist shopping cart. (bob 1997)
  5. minimalist shopping cart. (bob 1997)
>I am working on a solution in which my customer doesn't want to see his >shopping cart. Unless he specifically axes for it. When he adds an item >he will be return to his same page. That was easy enough, but, I would >like to do a lookup into the [cart] file and determine if a specific file >exists there. If it doesn't then I want to change the gif from 'buy' to >'remove'. Is the cart file like a database can I do a sub lookup into >that cart file extract a value like I would from any database?No, cart files are not databases. The exact format is documented in the online docs, but the best way to get at information inside cart files is to use [orderfile] and [lineitems] contexts. If you want to test for the existence of any file on your hard disk (regardless of its type), then you can use the new [fileinfo] context in 2.1, or perhaps [listfiles]Here's an example of getting some information from the order file[OrderFile cart=1234] [Header14], [ShipToState]
[lineitems] [sku], [price]
[/LineItems] [/OrderFile]Grant Hulbert, V.P. Engineering | ==== eCommerce for the Rest of Us ==== Pacific Coast Software | WebCatalog, WebMerchant, 11770 Bernardo Plaza Court | SiteEdit Pro, PhotoMaster, San Diego, CA 92128 | Typhoon 619/675-1106 Fax: 619/675-0372 | http://www.smithmicro.com/ Grant Hulbert

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:

(1997) NetSplat and WebCat2 (1997) Is there a max number of fields? (1998) WC Database Format (1997) A quickie question (1997) Nested tags count question (1997) Generating unique SKU from [cart] - Still Stumped... (1997) Upgrading 2.1 (2000) Re:Virtual hosting and webcatNT (1997) A national Zip base sales tax db? (1999) Location of Webcat site in folder hierarchy (1997) user authentication via TCPSend (2005) Format question WC Mac f3 (1997) Undocumented changes create problems in webcat 4 ... (2000) WebDNA - fun to compare (2005) How many Databases can I open? (2003) WebCAT MacOS9 --> OSX (2003) your mail (2000) [accountNum] and [math] (1997) Nested tags count question (1997)