on 12-06-2004 9:31 AM
Hai friends,
I need a help regarding BSP Shopping cart.My doubt is,i have a page where i can add items to my shopping basket.the items page contains a button(value=add to cart") and mat no, mat description,net price..etc...if i click on particular button only that item sholud add to my cart(means i have to collect these records to another internal table).how can i do this... if you give some sample code that will be good help
urjent..
thanks in advance
leoiz
Hello Leoiz,
could be this the answer to your question?
I assume, that you are ready to display the items on the layout. Thsi could be the content of an internal table:
basket_items:
int_no type syindex,
mat_no type matnr,
description type string,
net_price type numc10,
currency type cuky.
...
<table>
<%loop at basket_items into basket_item.%>
<tr><td><%=basket_item-mat_no%></td>
<td><%=basket_item-description%></td>
...
<td><input type="button" value="Add to cart" onClick="addToCart('<%=basket_item-int_no%>'"></td></tr>
<%endloop.%>
So you need a javascript function 'addToCart' which
stores the value of the selected row := basket_item-int_no into a abap-field declared at the page types (autoflag on) and submitting a post to the page. After this you will be able to process the data in the event:
onInputProcessing.
The major step will be to store the data, if you are dealing with anonymous login.
That's only a rough explanation.
Regards, Stefan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You should take a look at the TUTORIAL_MVC_3/4 examples under SE80 in your system the bookshop example is a great place to start.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
83 | |
10 | |
10 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.