• Resolved A Z

    (@ahmedzeidan)


    Hello,

    When I activate “Redirect to Cart after successful addition” under woocommerce settings it seems to be not working while the plugin is active.

    I do like how the plugin shows a smooth slider with cart details but also I wasn to enable initial add to cart button to take the user straight to the cart…

    Is that function possible ?

    Thanks

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author xootix

    (@xootix)

    Hello @ahmedzeidan

    If your ajax add to cart is enabled, plugin will not allow you to redirect to the cart page.
    You can override by adding this filter to your functions.php

    add_filter( 'pre_option_woocommerce_cart_redirect_after_add', function(){
    	return "yes";
    }, 99 );

    Is it your custom add to cart button? You need to add some attributes to make it ajax.
    Share your code.

    Thread Starter A Z

    (@ahmedzeidan)

    Hi @xootix

    Thanks for your quick reply.

    the ajax was disabled and the tick is enabled on “redirect to cart after successful addition” in woocommerce.

    I tried the given snippet with no luck. currently using the default add to cart function with no custom code.

    Is there a way to add a new feature in the future to go directly to the cart after addition instead of the popup ?

    Plugin Author xootix

    (@xootix)

    Hello @ahmedzeidan

    I tested the code on my end. Seems to be working fine.
    Could be some other plugin. Are you sure when you deactivate the side cart plugin, you get redirected?
    If possible share your “add to cart” page link.

    Thread Starter A Z

    (@ahmedzeidan)

    Hi @xootix

    it seems to be a plugin conflict or something similar… it works when disabling the plugin (original woocommerce function)… i will keep it this way for the meantime and test it on a later stage… i appreciate your support here. thnx

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Redirect to cart function’ is closed to new replies.