In my woocommerce shop, i want a basket icon at the top of the site. When a customer puts something in the cart, i want to swap this icon for a different one dynamically via ajax without page refresh .
What I’m after is a PHP-type if / else call, which says “if the cart is empty, display icon A, else display icon B”. If anyone could shine some light on this, I’d be most grateful!
I am able to update the cart text dynamically via ajax following this woocommerce tutorial. I want to do the same for the shopping basket icon.