WordPress.org

Support

Support » Plugins and Hacks » [Resolved] [Plugin: WooCommerce – excelling eCommerce] redirect after adding to cart

[Resolved] [Plugin: WooCommerce – excelling eCommerce] redirect after adding to cart

  • Sorry to ask the same question a second time.
    I could not organize independently redirect after adding product to cart could only function in the file to change the basket to replace the simple link. if it is possible to provide more clarifications on the advice of
    ” Yes anything is possible however this is quite custom to your application. I would suggest you add some kind of custom meta information to your product to state if this product should redirect or not. Then in your product template do a condition check for this meta and perhaps put a hidden value in an input tag. Then hunt for a callback within the add to cart.js and bind a function to that callback to look for the input hidden field’s value and perform your re-direct from there. “
    Sorry for my English. I use a translator.

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

Viewing 2 replies - 1 through 2 (of 2 total)
  • Decided without the aid of a support
    who are interested
    file woocommerce-funtstions.php

    elseif (get_option(‘woocommerce_cart_redirect_after_add’)==’yes’ && $woocommerce->error_count() == 0) {
    wp_safe_redirect( $woocommerce->cart->get_cart_url(”) );
    exit;
    }
    replace with
    elseif (get_option(‘woocommerce_cart_redirect_after_add’)==’yes’ && $woocommerce->error_count() == 0)
    $url = get_post_meta($product_id, ‘url’, $single = true);
    {wp_redirect( $url);
    exit;
    }
    Add an additional field url
    add to cart and redirects where necessary

    Hi,

    I will try this. Thanks

    Lyse

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘[Resolved] [Plugin: WooCommerce – excelling eCommerce] redirect after adding to cart’ is closed to new replies.