cancel
Showing results for 
Search instead for 
Did you mean: 

How to display total "items" and "amount " in header.jsp in CRM ISA B2B

Former Member
0 Kudos

Hi,

I am modifying “header.jsp” in standard CRM ISA B2B application. Here we have summary of total number of items and total amount but it is coming in to button and for that below code is there in “header.jsp” and it display it as button text.

if (!ui.homActivated) { %>


<a class="icon" href="#" onclick="show_basket()">!!" alt="" border="0" height="16" width="20"></a>

</td> <td class="vertical-align-middle" name="miniBasket" value="<isa:translate key="b2b.header.minibasket.default"/>" > <form name="basketForm" action="javascript:show_basket();"> <input class="green" name="miniBasket" type="button" value="<isa:translate key="b2b.header.minibasket.default"/>"/>    </form> </td> <% } else { %> <!-- HOM scenario - minibasket displays collective order --> <td class="vertical-align-middle" align="right">

<a class="icon" href="#" onclick="show_collective_order();">!!" alt="" border="0" height="16" width="20"></a>

</td> <td class="vertical-align-middle" name="miniBasket" value="<isa:translate key="b2b.header.collorder.default"/>"> <form name="basketForm" action="javascript:show_collective_order();"> <input class="green" name="miniBasket" type="button" value="<isa:translate key="b2b.header.collorder.default"/>"/>    </form> </td> <% } %> Now I want to display total number of items and total amount separately in two different <td> element. How I can get total number of items and total amount in “header.jsp” I tried below code but did not get any success. Insert below line in “header.jsp” with respective page import statement for class or let me know which class I have to import. <% HeaderSalesDocument hdr = (HeaderSalesDocument) request.getAttribute(MaintainBasketBaseAction.RK_HEADER); ItemList items = (ItemList) request.getAttribute(MaintainBasketBaseAction.RK_ITEMS); %> And then I use <td><%= hdr.getNetValue() %></td> <td><%= items.size() %></td>

But it is not printing any thing and header page not display at all.

Pl. tell me how to get total amount and number of items in header area. Which class or object I have to use here.

I really appreciated any help from any one.

Thanks and regards.

Ashish Patel.

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

if the jsp doesn't show at all, you might check the log files for compilation errors.(Default log files)

Did you use import statements for the classes you are using ? Did you make sure that there is no Null Pointer Exception ?

In general, the approach you are using works. I haven't checked for the fields you are using, but the syntax looks fine.

Best Regards,

Astrid

Former Member
0 Kudos

Hi, I tried another logic. I took value from Standard button, in which B2B application display total items and amount and I hide this field, to another text element.

Now I Am breaking that value in words and stored them in array and then trying to display that array with particular number which contains total item and amount through Java Script on Focus.

But problem here is, It is not getting updated automatically I have to click on new text files to trigger Onfocus event. How I can achieve effect like as soon as Standard button changes it's value which is now hidden filed my new text box should update automatically.

Thanks.

Ashish