Re: Multiple catalog databases and showcart

This WebDNA talk-list message is from

1997


It keeps the original formatting.
numero = 10688
interpreted = N
texte = >Here's the problem. I want to be able to add items to my cart from any >catalog database. How can I do a showcart for a cart than spans more than >one database?You can do that. Make sure you set db=xx for the proper database during the $add command. The only tough part is showing things like [title], [description], etc inside the [LineItems] loop. WebCatalog2 does some sophisticated stuff behind the scenes for you -- it automatically looks up those fields based on the sku and the database you name. But of course in a mixed cart, it doesn't know which database to look in.So, if you want to show something like [title] from different databases in the middle of a [LineItems] loop, you need to do a lookup in the proper database. During each $Add, set the TextA field to the name of the database you are adding from. Then in the middle of the [LineItems] loop, do a lookup in the database defined by TextA, looking for [sku]$Add?db=db1.db&sku=1234&TextA=db1.db (add sku 1234 from database db1) $Add?db=db2.db&sku=1234&TextA=db2.db (add sku 1234 from database db2...a completely different product, even though the sku could to be the same)[LineItems] Description: [lookup db=[TextA]&lookInField=sku&value=[sku]&returnField=description] (this replaces what would normally be simply [description]) [sku], [quantity], [price] [/LineItems]Grant Hulbert, V.P. Engineering | Tools for WebWarriors Pacific Coast Software | WebCatalog, WebCommerce Solution 11770 Bernardo Plaza Court, #462 | SiteEdit, SiteCheck, PhotoMaster San Diego, CA 92128 | 619/675-1106 Fax: 619/675-0372 | http://www.smithmicro.com Associated Messages, from the most recent to the oldest:

    
  1. Re: Multiple catalog databases and showcart (Grant Hulbert 1997)
  2. Re: Multiple catalog databases and showcart (Ed Trefzger 1997)
  3. Re: Multiple catalog databases and showcart (grichter@panavise.com (Gary Richter) 1997)
  4. Re: Multiple catalog databases and showcart (Kenneth Grome 1997)
  5. Multiple catalog databases and showcart (Ed Trefzger 1997)
>Here's the problem. I want to be able to add items to my cart from any >catalog database. How can I do a showcart for a cart than spans more than >one database?You can do that. Make sure you set db=xx for the proper database during the $add command. The only tough part is showing things like [title], [description], etc inside the [lineitems] loop. WebCatalog2 does some sophisticated stuff behind the scenes for you -- it automatically looks up those fields based on the sku and the database you name. But of course in a mixed cart, it doesn't know which database to look in.So, if you want to show something like [title] from different databases in the middle of a [lineitems] loop, you need to do a lookup in the proper database. During each $Add, set the TextA field to the name of the database you are adding from. Then in the middle of the [lineitems] loop, do a lookup in the database defined by TextA, looking for [sku]$Add?db=db1.db&sku=1234&TextA=db1.db (add sku 1234 from database db1) $Add?db=db2.db&sku=1234&TextA=db2.db (add sku 1234 from database db2...a completely different product, even though the sku could to be the same)[lineitems] Description: [lookup db=[TextA]&lookInField=sku&value=[sku]&returnField=description] (this replaces what would normally be simply [description]) [sku], [quantity], [price] [/LineItems]Grant Hulbert, V.P. Engineering | Tools for WebWarriors Pacific Coast Software | WebCatalog, WebCommerce Solution 11770 Bernardo Plaza Court, #462 | SiteEdit, SiteCheck, PhotoMaster San Diego, CA 92128 | 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:

Installation webCatalog (French speakers please help) (1998) [WebDNA] WebDNA Not Sending Email (2009) Spawn doesn't work as advertised ... (2000) Emailer error codes (1999) Improper naming convections? (2004) Text limits in NT version? (1997) [WebDNA] Problem with bcc email (2017) limitation found on group searching (1997) Workaround for Emailer doubled bcc messages (1998) emailer (1997) Cart Number Propagation (1997) [OT] DNS on Development Server (2004) [WebDNA] Search Site (2009) process SSI (1998) [WebDNA] PayPal Integration (2017) WebCat2 Append problem (B14Macacgi) (1997) Intranet Edition (2003) FlushDatabase Suggestion (1998) [OT] Cold Fusion snippet please... (2002) ReadDateFormat bug in 3.x (1998)