WordPress.org

Ready to get started?Download WordPress

Forums

WooCommerce - excelling eCommerce
Update woocommerce shopping cart icon dynamically with ajax (1 post)

  1. suman95
    Member
    Posted 7 months ago #

    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.

    Please point me to some direction

    http://wordpress.org/plugins/woocommerce/

Reply

You must log in to post.

About this Plugin

About this Topic