Hello @sarjoon
You can save this data from the array to a context variable in Webapp.
Server Side Code
Here are the steps you can follow:
1. Create a variable in web application properties let's say cartdata
2. Use this code to update this variable value when a customer clicks on add to cart
<script>
function addToCart(){
..
..
document.controller.setValue("/ctx/vars/cartData",myCartData); //myCartData is the array of items
..
..
}
</script>
Then you can use this context variable on the next page to get the results back.
<%= ctx.vars.cartData %>
Client Side
You can use local storage to save this data
localStorage.setItem('cartData',myCartData);
get value from localstorage
localStorage.getItem('cartData');