slickwillyslim
Programmer
ok guys, this seems to be a tough scenario for me. i can update an order table all day long no problem, but if a customer doesn't complete an order (i.e. adds to the basket and closes the session before completing the order), then i need to clear out that order. what i decided to do was create a cart table seperate from the order table so that if a user ended their session before completing the order it would just clear the cart contents based solely on their sessionid. this should work fine and in the session on_end in the global i could clear the cart contents for each individual session. in theory the only orders written to the order table are orders that go through the order confirmation page. my problem is in writing everything i need from the cart table to the order table when the user completes the order. really all i need is to pull the product id, and the quantity from the cart table and write to the order table. the order number can be created at the confirmation page and the other fields will be repeated stuff like date, etc. i created a multiple product add page which pulled checkbox values(set as Prod id's) from a form on the product page. the user could check multiple products at once and add to cart. the checkbox values were put into an array and parsed and looped into the cart table along with the other repeated fields (date, sessionid, etc.). this works fine with only one field like "prod id". but i need to be able to write all the products from the cart to the order table simultaneously upon order confirmation, which requires both the "Prod id" and "Quantity". i don't know how to create a vbScript array that will parse two sets of values simultaneously and then loop into the Order table. guess i'm trying to create a two-dimensional array but i don't know how. does anybody know how to do this or have a suggestion for another method? i'm open to suggestions, i just want the system to work so that simultaneous users don't get jumbled in the order process. thanks bunches for any suggestions