the problem is domain switching.
cart contents are stored i a session.
Sessions are based on the Browsing Cookie.
Cookies are based on the domain in the address bar.
if you visit:
you start one browsing session
is a separate browsing session, it cannot see the cart content form the non www address.
you are going to the non www address to add items:
then trying to see the items using the www address:
if you change that to the non www address you will see the items:
you can use an htaccess rule to force all traffic to use the www address, see this tutorial: