Marketpress Add to Cart Redirects?


We are using marketpress and everything is working well. But there is something that is really frustrating us and I was wondering if you could help us in the right direction to fix this.

When I click add to cart it does that on page ajax stuff and says 'item added' or similar.

Instead is it possible for me to redirect the user to the shopping cart page after they click add to cart instead as its much more user friendly?

I am using custom functions from the template-functions files as described in your tutorials so I can change the buying button functions but I cant quite figure out where the ajax is brought in from?


  • Timothy
    • Chief Pigeon

    Hey there.

    You could remove the ajax controlling it. and removing it's inclusion, open file:

    /marketpress.php Line 646:

    and comment out:

    wp_enqueue_script( 'mp-ajax-js', $this->plugin_url . 'js/ajax-cart.js', array('jquery'), $this->version );

    Like this:

    //wp_enqueue_script( 'mp-ajax-js', $this->plugin_url . 'js/ajax-cart.js', array('jquery'), $this->version );

    That removes the ajax cart stuff so you get sent to the cart rather than an in page load.

    Take care.

  • Brian
    • Design Lord, Child of Thor

    Hey there, Im trying to achieve the same thing on my site, by making the Add to Cart redirect to the 'Review Cart Page'.

    I commented out the code, which is now on line 958 in the Marketpress.php, this did work as the page now redirects, but it also removes the 'Continue To Checkout' button on later pages such as the "Your Address Page", meaning the customer cant progress to payment.

    Does any one have any suggestions?

    Many thanks. :slight_smile:

    • Kasia Swiderska
      • Support nomad

      Hello Brian,

      I've tested this issue with new MarketPress on default WordPress Theme (2015) and I can't replicate it. I'm able to go to the shopping cart and Checkout, pay and Complete order.

      Because reason could be different and we have to check it, could you open new thread on forum? This way we will be able to do test on your site.

      Kind regards,

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.