Re: Menu to select product variations

This WebDNA talk-list message is from

1997


It keeps the original formatting.
numero = 15801
interpreted = N
texte = I don't know your exact database layout, but I'll try to throw some ideas in here.>The Title field in my Size.db is same data as Title field in my Catalog.txtOK, it sounds like you're using this Title field as the unique identifier to help you find the description, photo, price. So the catalog.txt contains fewer items, because it just has the 'master' list with no variations, while the Sizes.db has the different SKUs, sizes, and colors.>How do I get the variations' SKU from the Size.db to the shopping cart?If you specify db=Size.db when adding items to the cart, then webcatalog will look there for the SKUs. Since your price information is not in that database, you'll have to change the price formula in your formulas.db to do a lookup on Title in catalog.txt and return the price from there. Make sure you put the Title into the form variables when you $Add to the cart, so it will be available to the formula.price [lookup db=catalog.txt&lookInField=Title&value=[Title]&returnField=price]>[showif [Size]=T] >[search db=Size.db&eqtitledata=[title]&Ordersort=de] > >[/search] >[/showif]I'd change because that's where you're picking up the SKU for adding to the cart. I'd also change Ordersort=de to Ordersdir=de to get the descending sort working.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: Menu to select product variations (Grant Hulbert 1997)
  2. Re: Menu to select product variations (Jim Turney 1997)
  3. Re: Menu to select product variations (John Hill 1997)
  4. Re: Menu to select product variations (Kenneth Grome 1997)
  5. Menu to select product variations (Jim Turney 1997)
I don't know your exact database layout, but I'll try to throw some ideas in here.>The Title field in my Size.db is same data as Title field in my Catalog.txtOK, it sounds like you're using this Title field as the unique identifier to help you find the description, photo, price. So the catalog.txt contains fewer items, because it just has the 'master' list with no variations, while the Sizes.db has the different SKUs, sizes, and colors.>How do I get the variations' SKU from the Size.db to the shopping cart?If you specify db=Size.db when adding items to the cart, then webcatalog will look there for the SKUs. Since your price information is not in that database, you'll have to change the price formula in your formulas.db to do a lookup on Title in catalog.txt and return the price from there. Make sure you put the Title into the form variables when you $Add to the cart, so it will be available to the formula.price [lookup db=catalog.txt&lookInField=Title&value=[Title]&returnField=price]>[showif [Size]=T] >[search db=Size.db&eqtitledata=[title]&Ordersort=de] > >[/search] >[/showif]I'd change because that's where you're picking up the SKU for adding to the cart. I'd also change Ordersort=de to Ordersdir=de to get the descending sort working.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:

Search Order? (2000) Firesite and WebCat (1999) How to verify email address (1997) Roundup (2001) checksum for credit cards? (1997) rename a file (1997) bull (1998) emailer on Windows Beta 18 (1997) Mac Vs WindowsNT (1997) How true is this? (1999) broken [include]s (1998) syntax question, not in online refernce (1997) Stumpted Again (1997) cart (1997) I have troubles to send message out (1998) UN-WANTED character conversion (1999) changing creator codes (2000) PCS Frames (1997) WebCat2 - many [carts] on one template page? (1997) ShowNext (1997)