Updated on May 29, 2020
The cart total and item count are dynamic i.e., will automatically get updated via Ajax as items are added/removed from the cart.
For the cart icon we are going to use inline SVG from Font Awesome Pro.
We shall also ensure that these appear only if there is at least one product in the cart.
Let's add the code that shows the "initial" cart total and count. This will reflect whatever is already in the user's cart.
Edit your Main Catch All Template with Oxygen.
Add a Code Block where you want to show the dynamic cart. In my test site, I added it below (appearing to the right of) the Menu component inside a Header Row of Header Builder.
PHP & HTML:
This is a premium members-only content.
To view the rest of the content, please sign up for membership ($47/month or $499 one-time).
Already a member? Log in below or here.