Skip to content

Commit

Permalink
🩹 fixed displaying cart quantity
Browse files Browse the repository at this point in the history
  • Loading branch information
Petrovich-A committed Jul 11, 2023
1 parent 9bf9c54 commit 0538659
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/main/resources/templates/fragment/topnav.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@
<div sec:authorize="isAuthenticated()">
<a class="fa badge fa-5x" href="/logout">&#xf08b Log out</a>
<a class="fa badge fa-5x" href="/profile">&#xf007 Profile</a>
<a class="fa badge-cart fa-5x" href="/cart" th:value="${session.cartDto.quantity}">&#xf07a Cart</a>
<a class="fa badge-cart fa-5x" href="/cart"
th:value="${session?.cartDto?.quantity != null ? session.cartDto.quantity : '0'}">
&#xf07a Cart</a>
</div>
<div sec:authorize="hasRole('ADMIN')">
<a class="fa badge fa-5x" href="/admin">Admin</a>
Expand Down

0 comments on commit 0538659

Please sign in to comment.