WordPress.org

Forums

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

  1. suman95
    Member
    Posted 1 year 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/

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • WooCommerce - excelling eCommerce
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic