numero = 19580
interpreted = N
texte = > -----Original Message-----> From: Jim V [mailto:jv1@web-maya.com]> Sent: Saturday, August 22, 1998 1:49 AM> To: WebDNA-Talk@smithmicro.com> Subject: Checkboxes to add to cart...>>> I want to use a checkbox to add multiple items to the shopping cart.>> I know that this has been done before.>> Can some one lend a hand?>> Mail to: jv1@ee.net> Visit my Page: http://www.web-maya.com>> Life IS what You Make it, so Make It GREAT!> In your pondering of life, remember:> 1) Life is what happens, while you are making plans!> 2) Life is what happens as we walk through eternity!> 3) We are all one.On your multi-item display page, possible the search results, Start with aform for collecting all the items the shopper wishes to add. Add [index] tothe name of each item's check box: Add [index] to the sku or ID for each product. You should also passthe [numfound] to the next page: On the destination page, use a loop to add the checked items to the cart:[loop start=1&end=[loopcount]&advance=1][showif [addthis[index]]=T] [add db=products.db&sku=[sku[index]]][/showif][/loop]The results page makes an individual variable for each item sku, the checkbox for each item and for the total number of items displayed, and passesthis entire pile of variables to the next page. The next page loops throughall of these variables (which have been conveniently index with [index]) addadds those which have been checked to the shopping cart.I haven't debugged any of this code - I'm typing on the fly so pleaseproceed carefully and don't just cut and paste!Good luckPat
Associated Messages, from the most recent to the oldest:
RE: Checkboxes to add to cart... (Pat McCormick 1998)
> -----Original Message-----> From: Jim V [mailto:jv1@web-maya.com]> Sent: Saturday, August 22, 1998 1:49 AM> To: WebDNA-Talk@smithmicro.com> Subject: Checkboxes to add to cart...>>> I want to use a checkbox to add multiple items to the shopping cart.>> I know that this has been done before.>> Can some one lend a hand?>> Mail to: jv1@ee.net> Visit my Page: http://www.web-maya.com>> Life IS what You Make it, so Make It GREAT!> In your pondering of life, remember:> 1) Life is what happens, while you are making plans!> 2) Life is what happens as we walk through eternity!> 3) We are all one.On your multi-item display page, possible the search results, Start with aform for collecting all the items the shopper wishes to add. Add [index] tothe name of each item's check box: Add [index] to the sku or ID for each product. You should also passthe [numfound] to the next page: On the destination page, use a loop to add the checked items to the cart:[loop start=1&end=[loopcount]&advance=1][showif [addthis[index]]=T] [add db=products.db&sku=[sku[index]]][/showif][/loop]The results page makes an individual variable for each item sku, the checkbox for each item and for the total number of items displayed, and passesthis entire pile of variables to the next page. The next page loops throughall of these variables (which have been conveniently index with [index]) addadds those which have been checked to the shopping cart.I haven't debugged any of this code - I'm typing on the fly so pleaseproceed carefully and don't just cut and paste!Good luckPat
Pat McCormick
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...