how to retain cart or form data on page refresh

Posted 7 months ago by alphabay84

hello Please i need help with keeping data or items in cart after page refresh or reload. I in my app after adding products to cart, the products in cart empties when page is refreshed, what i really need to do is to use cookie, web storage, or session storage. I have searched for how to do this but could find my way as i really have no clue about this. I have the table where the products are added below

    <table class="table-inner table-scroll">
            <th>Цена закупки</th>
            <th class="icons-col text-center"></th>

<tbody id="checkProducts" class="scrollbar lines-control">
{{-- Enter here the products --}}

the products are added to tbody id="checkProducts" i need return the products already in the cart on page refresh, i already have a submit button that clear products on submit. I can show full code if required, thanks

Please sign in or create an account to participate in this conversation.