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:

[append] problem (1997) Emailer help needed (1998) search multiple fields from one input (1998) send mail problem? (1997) in header include files? (1998) all records returned. (1997) For those of you not on the WebCatalog Beta... (1997) WebCat2 as a chat server? (1997) Harvesting invalid email addresses from bounced emails??? (2000) default value from Lookup (was Grant, please help me) (1997) Secure Server (1997) Help DebugLevel Content-type: text/html (1998) looping through the headers of an orderfile (2000) Re:add line item context and showitems (1998) WebCat2b12 CGI Mac -- Problems propagating the cart through (1997) WC 2.0 frames feature (1997) (2006) typhoon... (1997) Web Catalog 2 demo (1997) Order not created error (never mind) (1997)