displaying [cart] contents with a pull-down & frames

This WebDNA talk-list message is from

1998


It keeps the original formatting.
numero = 19610
interpreted = N
texte = I'm using a left hand frame to select items to add to the cart. The title of the items currently in the cart and the quantity selected are being displayed in a bottom frame within a pull-down using [lineitem].I've have two problems: 1. when multiple instances of an item are added, another line is added to the pull-down. I'd like instead to increase the quantity associated with the item and summarize the listing. Item Quantity instead of: Car 1 Truck 1 Car 1I'd like to see: Car 2 Truck 1Is it possible to put some [math] and a summary in with [lineitems] to do this? Or should I really be writing the cart out to a database and managing things that way? 2. When I re-load the frames the contents of the cart is not being displayed in the pull-down although the frame is retaining the cart value. If I add another item to the cart (by way of the left frame add to cart function) the pull-down display is restored with both the original cart content and the newly added item.It sounds like I need to add some sort of action to force the [lineitems] function to look back at the cart file and restore the pull-down contents. Any ideas? Or is going to require writing the cart out to a database and doing lookups? My code for the cart display in the righthand frame: -----------------
Associated Messages, from the most recent to the oldest:

    
  1. displaying [cart] contents with a pull-down & frames (Marty Schmid 1998)
I'm using a left hand frame to select items to add to the cart. The title of the items currently in the cart and the quantity selected are being displayed in a bottom frame within a pull-down using [lineitem].I've have two problems: 1. when multiple instances of an item are added, another line is added to the pull-down. I'd like instead to increase the quantity associated with the item and summarize the listing. Item Quantity instead of: Car 1 Truck 1 Car 1I'd like to see: Car 2 Truck 1Is it possible to put some [math] and a summary in with [lineitems] to do this? Or should I really be writing the cart out to a database and managing things that way? 2. When I re-load the frames the contents of the cart is not being displayed in the pull-down although the frame is retaining the cart value. If I add another item to the cart (by way of the left frame add to cart function) the pull-down display is restored with both the original cart content and the newly added item.It sounds like I need to add some sort of action to force the [lineitems] function to look back at the cart file and restore the pull-down contents. Any ideas? Or is going to require writing the cart out to a database and doing lookups? My code for the cart display in the righthand frame: -----------------
[ipaddress]> [cart]>
Marty Schmid

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:

Help name our technology! (1997) Conversion calculators .. (2003) For those of you not on the WebCatalog Beta... (1997) Re:2nd WebCatalog2 Feature Request (1996) [returnraw] and form variables (1998) I'm new be kind (1997) SSL and reg web* (1997) Likelihood of a duplicate (2005) t or f (1997) NT Email Stops Sending (2000) Secure server question (1997) Mail Server Software (1998) Folder Follies (1998) Is there a max number of fields? (1998) A better WebCat whois (was [OT] Domain Name Scam) (2000) Help w/Multi User Admins (1997) Date/Time format problems (1997) feature request-- [epoch] (2004) Newbie trouble with [url] & [foundItems] (2000) US Postal Service API (2007)