My boss wants me to do something spiffy and creative with cart counter/badge on our premium theme package we sell. I told him why not switch our text "cart" to a shopping cart icon - the e-Com platform we develop for already gives us unlimited access to Font Awesome, which is comprehensive and great as a way to accomplish vector/editable text art without having to manage images. Maybe something like this: Shopping cart icon with counter badge layered on it, offset to lower-right.
But trying to retrofit the native cart counter functionality we're given, with the example Font Awesome gives has proven sort of difficult. From our codebase:
<li><a href="cart">
<span style="font-size: 20px;"><i class="far fa-shopping-cart"></i></span>
<span ng-if="currentOrder.LineItems.length" ng-bind="cartCount" class="badge"></span>
</a></li>
This displays the cart counter badge to the right of the shopping cart icon just fine, but I want to make it extra jazzy. I want to layer the counter badge on top of the cart icon and offset it a little bit. Font Awesome gives a great example with layering a cart counter, but it's with a static number:
<span class="fa-layers fa-fw" style="background:MistyRose">
<i class="fas fa-envelope"></i>
<span class="fa-layers-counter" style="background:Tomato">1,419</span>
I'm having trouble using their example within the context of my original scope when I try and 'merge' the two. In other words, I want to substitute the "1,419" in Font Awesome's example, with our dynamic counter; but I'm having issues.
Any ideas? I can provide any supporting code base HTML/CSS/JS you ask for.
Thanks! Kyle