Re: Shopping Cart w/Multiple Databases
This WebDNA talk-list message is from 1998
It keeps the original formatting.
numero = 20672
interpreted = N
texte = >I am utilizing two different databases with different field names for the>same info (i.e. one database has the field artist while the other has>artistName. I would like to be able to search either database and add>products from each to the same shopping cart. How do I set up the shopping>cart to display info properly in each field.First, a little theory of operation: when you add something to the cart,WebCatalog needs to know which db you're adding from so it can do 2 things--1) get the price/unitShipCost/taxable/canEmail information and store it inthe lineitem portion of the shopping cart file2) display other fields from your db when asked to (inside the [LineItems]loop)The way WebCatalog knows how to do this is by using your db and SKU toperform a lookup for all this information. This works easily as long asyou only use one db, because there's no question as to where it shouldlook. Basically, when you put some simple WebDNA like [price] or[CustomDBField] inside a [LineItems] loop, WebCatalog silently performs a[Lookup db=xx...etc] to find the field value. If WebCatalog didn't do thisfor you, you'd have to manually type all those [Lookup] things every placeyou wanted to display a field value.So....the solution in your case is to manually insert a [Lookup] when youneed to display fields. Your only problem will be knowing which db to lookin, so I suggest that when you Add a product to the shopping cart, you alsoset one of the lineitem variables (such as textA or textB) to be the nameof the db. You only need to use the custom lookup for fields that are*not* already stored in the lineitem fields. That way, your lookup canlook like this:[LineItems][price], [unitShipCost], [Lookupdb=[textA]&lookInField=sku&value=[sku]&returnField=otherFieldName][/lineitems]Notice you don't need the lookup for variables that are already availablein the lineitems. You can see a complete list of these variables in thedocs under File Formats/Order File (or, not surprisingly, in the[LineItems] context section)Technical Support | ==== eCommerce and Beyond ====Pacific Coast Software | WebCatalog, WebMerchant,11770 Bernardo Plaza Court | SiteEdit Pro, PhotoMaster,San Diego, CA 92128 | Typhoon619/675-1106 Fax: 619/675-0372 | http://www.smithmicro.com/
Associated Messages, from the most recent to the oldest:
>I am utilizing two different databases with different field names for the>same info (i.e. one database has the field artist while the other has>artistName. I would like to be able to search either database and add>products from each to the same shopping cart. How do I set up the shopping>cart to display info properly in each field.First, a little theory of operation: when you add something to the cart,WebCatalog needs to know which db you're adding from so it can do 2 things--1) get the price/unitShipCost/taxable/canEmail information and store it inthe lineitem portion of the shopping cart file2) display other fields from your db when asked to (inside the
[lineitems]loop)The way WebCatalog knows how to do this is by using your db and SKU toperform a lookup for all this information. This works easily as long asyou only use one db, because there's no question as to where it shouldlook. Basically, when you put some simple WebDNA like [price] or[CustomDBField] inside a
[lineitems] loop, WebCatalog silently performs a[Lookup db=xx...etc] to find the field value. If WebCatalog didn't do thisfor you, you'd have to manually type all those
[lookup] things every placeyou wanted to display a field value.So....the solution in your case is to manually insert a
[lookup] when youneed to display fields. Your only problem will be knowing which db to lookin, so I suggest that when you Add a product to the shopping cart, you alsoset one of the lineitem variables (such as textA or textB) to be the nameof the db. You only need to use the custom lookup for fields that are*not* already stored in the lineitem fields. That way, your lookup canlook like this:
[lineitems][price], [unitShipCost], [Lookupdb=[textA]&lookInField=sku&value=[sku]&returnField=otherFieldName][/lineitems]Notice you don't need the lookup for variables that are already availablein the lineitems. You can see a complete list of these variables in thedocs under File Formats/
order file (or, not surprisingly, in the
[lineitems] context section)Technical Support | ==== eCommerce and Beyond ====Pacific Coast Software | WebCatalog, WebMerchant,11770 Bernardo Plaza Court | SiteEdit Pro, PhotoMaster,San Diego, CA 92128 | Typhoon619/675-1106 Fax: 619/675-0372 | http://www.smithmicro.com/
PCS Technical Support
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:
SiteGuard Admin Feature ? (1997)
WebDNA for Dummies (2004)
searching illegal HTML (2002)
price on detail, but not shoppingcart (1997)
multiple credit card merchant accounts/processors (1997)
[OT] Robust order processing (2003)
OS X, Running WebDNA in different directory (2005)
[OT] Simple java help please (2004)
[WebDNA] WebDNA 7 (2011)
PCS Frames (1997)
Is there a max number of fields? (1998)
Adding up weights (1998)
WC2.0 Memory Requirements (1997)
Verisigns SDK (pay flo pro) (2002)
Frames and WebCat (1997)
[WebDNA] WebDNA Showcase? (2008)
setting cookies for another domain? (2002)
TaxTotal Problem (1997)
brain teaser with an advanced search (2001)
SET (1998)