This works fine, but only when I am in the product details or cart page. See attached screenshot.
But when I navigate to the shop frontpage or the product categories or any other page outside the shop, the count and total become zero and so the info is only showing the cart icon.
In the shop itself the cart module is always visible in the sidebar, so the data is there.
Any idea how I can fix this?
I tried this code before getting the cart object, but it did NOT help:
JoomDev is not affiliated with or endorsed by Open Source Matters or the Joomla! Project. The Joomla! logo is used under a limited license granted by Open Source Matters the trademark holder in the United States and other countries.