I've used the code for the shopping cart and it worked but when i tried to add delete (check box) in the shopping cart, it didnt work
There was a button there which any time i cheked it and click on update button it didnt make any change to the shopping cart so i searched on google about the delete button and how it works in asp and found that for this code
i need to have asp codes in the asp section of the page which should be in the update sectio so that when i press update button if the delete box is checked, the item will be removed
before updating that asp codes i had these codes that are shown below:
IF Request( "updateQ" ) <> "" THEN
FOR i = 0 TO UBOUND( localCart, 2 ) n
ewQ = TRIM( Request( "pq" & localCart( CARTPID, i ) ) )
IF newQ = "" or newQ = "0" THEN
localCart( CARTPID, i ) = ""
ELSE
IF isNumeric( newQ ) THEN
localCart( CARTPQUANTITY, i ) = newQ
END IF
END IF
NEXT
END IF
and i had to add these codes to it so that the delete button will be connected to the update button and these are my coeds after editing it
IF Request( "updateQ" ) <> "" THEN
FOR i = 0 TO UBOUND( localCart, 2 )
newQ = TRIM( Request( "pq" & localCart( CARTPID, i ) ) ) deleteProduct = TRIM( Request ( "pd" & localCart( CARTPID, i ) ) )
IF newQ = "" or newQ = "0" or deleteProduct <> "" THEN
localCart( CARTPID, i ) = "" ELSE
IF isNumeric( newQ ) THEN
localCart( CARTPQUANTITY, i ) = newQ
END IF
END IF
NEXT
END IF
and now if i check the delete check box and click on update cart button it will remove the item from the shopping cart.
2.
The second problem that i faced, was page post.asp which didnt work so i searched ecommerce forum and on this link:
which nick has posted this message:
The server is a Windows 2003 server which doesn't support CDONTS but CDOSYS. However unfortunately the server is not able to send emails due to the set up of the University email system, Nick.
so i removed the asp codes from that page and the page worked but, obviously it doesnt send any email to the user
No comments:
Post a Comment