Re: Merging LineItems

This WebDNA talk-list message is from

2003


It keeps the original formatting.
numero = 54128
interpreted = N
texte = I figuered it out, and it ain't pretty... 1. Create a temporary database 2. Search the database for current lineitem. a. If it does NOT exist, add it. b. If it DOES exist, add to the quantity. 3. Remove all the lineitems from the cart. 4. Search the database and add the lineitems back to the cart. 5. Close the temporary database. 6. Delete the temporary database. On 11/14/03 11:17 AM, "Clint Davis" wrote: > I need to be able to combine lineitems that have the same SKU/textE and add > their combined quantities. > > These lineitems... > > SKU ITEM QTY TEXTE > 123 Bear 2 9 > 123 Bear 1 1 > 123 Bear 3 9 > > > Should become... > > SKU ITEM QTY TEXTE > 123 Bear 5 9 > 123 Bear 1 1 --------------------------------------------------------------------- Clint Davis Webmaster / Interactive Media Specialist Gray Loon Marketing Group, Inc. http://www.grayloon.com 204 Main Street | Evansville, IN 47708 | Phone:812-422-9999 --------------------------------------------------------------------- ------------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://webdna.smithmicro.com/ Associated Messages, from the most recent to the oldest:

    
  1. Re: Merging LineItems ( Clint Davis 2003)
  2. Re: Merging LineItems ( Rob Marquardt 2003)
  3. Re: Merging LineItems ( Clint Davis 2003)
  4. Re: Merging LineItems ( Rob Marquardt 2003)
  5. Merging LineItems ( Clint Davis 2003)
I figuered it out, and it ain't pretty... 1. Create a temporary database 2. Search the database for current lineitem. a. If it does NOT exist, add it. b. If it DOES exist, add to the quantity. 3. Remove all the lineitems from the cart. 4. Search the database and add the lineitems back to the cart. 5. Close the temporary database. 6. Delete the temporary database. On 11/14/03 11:17 AM, "Clint Davis" wrote: > I need to be able to combine lineitems that have the same SKU/textE and add > their combined quantities. > > These lineitems... > > SKU ITEM QTY TEXTE > 123 Bear 2 9 > 123 Bear 1 1 > 123 Bear 3 9 > > > Should become... > > SKU ITEM QTY TEXTE > 123 Bear 5 9 > 123 Bear 1 1 --------------------------------------------------------------------- Clint Davis Webmaster / Interactive Media Specialist Gray Loon Marketing Group, Inc. http://www.grayloon.com 204 Main Street | Evansville, IN 47708 | Phone:812-422-9999 --------------------------------------------------------------------- ------------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://webdna.smithmicro.com/ Clint Davis

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:

PCS Frames-Default page is solution! (1997) Music in background (2000) 2.0 Info (1997) [Sum] function? (1997) HELP WITH DATES (1997) Mail Service Dead (1998) File Upload and Platform (2001) [addlineitems] (1997) WebCat2 - [include] tags (1997) Banner Ads (2000) Shopping Cart Problem (1998) Slow NT mail. (2000) Welcome! (2000) Email/Sendmail in WEBDNA has stopped... (2004) [WebDNA] How to valuate a domain name? (2010) More help for discount pricing (1998) Installing on IIS 5.1 Windows XP Pro - Username/Password (2006) Cannot get subtotal to work (1997) Help name our technology! I found it (1997) WebCat2 - [format thousands] (1997)