Adding form items to a basket

Results 1 to 2 of 2

Thread: Adding form items to a basket

  1. #1
    Join Date
    Dec 1969

    Default Adding form items to a basket

    OK - what i usually do is list the items down the page and there is a seperate form for each item - you click add item to basket and i pass hidden fields onto cart page and add it to my ongoing cart.<BR><BR>What I am now looking to do is a present a list of products (part of a wedding list) where a user can see the list, choose to buy 2 of product 1 (from drop down box), 3 of product 2, etc - then click add to cart button - then the products get added to the basket...<BR><BR>i want to go through the form, pick the fields that begin with PROD and I need to find their VALUE attribute (for instance 2 or 1 or 0) etc. The name field will contain PROD_stockcode - this is how im passing the stockcode accross - i now need to pass the value selected accross.<BR><BR>This is what i&#039;m doing but all im getting is the form items name - i also want its value - HOW?<BR><BR>Pls help :)<BR><BR>for each item in Request.Form <BR> <BR> <BR> if left(item,4) = "PROD" then<BR> redim preserve ItemID(Ubound(ItemId)+1)<BR> <BR> ItemID(ubound(ItemID)) = right (Item,len(item)-5)<BR> <BR> end if<BR> <BR> session("ItemID") = ItemID<BR><BR> next

  2. #2
    Join Date
    Dec 1969

    Default Easy:

    &#060;%<BR>For Each Item in Request.Form<BR> ReDim items(2, UBound(items, 2)+1)<BR> items(0) = Right(Item, Len(Item(-5)<BR> items(1) = Request.Form(Item)<BR>Next<BR>%&#062;<BR><BR>Craig .

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts