Support » Plugin: WooCommerce » [Plugin: WooCommerce] Buy Now or Auto-Redirect from "Add to Cart"

  • iftomkins

    (@iftomkins)


    Does anyone know how I would either add a “buy now” button, auto-redirect after the “add to cart” button is clicked, or maybe even make the visibility of an element dependent on whether the cart button has been clicked or not? Then I can redirect manually.

    Thanks!

    Alan

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

Viewing 2 replies - 1 through 2 (of 2 total)
  • iftomkins

    (@iftomkins)

    I did find the option “redirect to Cart page” after adding to cart. But for the Cart widget, how do I set it to only display when there are items in the cart?

    Thanks!

    Not sure about the cart widget but you can listen for the javascript event: added_to_cart or you could hook on to the filter
    add_to_cart_redirect.

    So if you wanted to do something after you added something to the cart you can do:

    jQuery(document).on('added_to_cart', function(){
        //... do something
    });
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘[Plugin: WooCommerce] Buy Now or Auto-Redirect from "Add to Cart"’ is closed to new replies.