just hope this is not a stupid question.
I have an eCommerce site and when user adds an item to cart. On top of the page I have this function which count the array and then shows the user how many item is in cart.
Then I am store the total cart price in a session to show show on top of the page as well.
I am using Jquery to add an item to cart but the problem is you have to refresh the page to so that you can see the total cart item and total cart price(On top of the page. Not the cart page. So don't get it mix it).
I used location.reload();
to reload in the Jquery but this refresh the own page.
To show the number of item the user have in cart I did count
<?php echo count($_SESSION["cart_array"])?>
and for the total item price echo the session
<?php echo $_SESSION['smallcart'];?>
How can I use PHP or any other form to refresh the count
and the smallcart
session without refresh the page.
Those those are in my pageheader.php
which I
<?php include realpath(dirname(__FILE__)."/../../pageheader.php"); ?>
is they a way i can refresh the pageheader.php
without refresh the page body
.