Marketpress: Redirect to a form after checkout

Hi,
Is it possible to control where the buyer is redirected to following checkout?
I need them to complete an additional form to provide more order details, but I don't see anywhere in the settings how to do this.
thanks
Paul

  • Rupok

    Hi member1, hope you had a wonderful day.
    This is not possible out of the box, but you can do that with Custom jQuery code by creating a MU Plugin. For creating a mu plugin, create a folder named "mu-plugins" inside your "wp-content" folder. Then inside that "mu-plugins" folder, create a file with any name and with a .php extension. Now paste the code inside that file and save.

    <?php
    add_action( 'wp_footer', 'show_checkout_button' );
    function show_checkout_button() {
        ?>
        <script type="text/javascript">
    		jQuery(document).ready(function() {
    		    if (jQuery('.mp_order_details').length){
    		        window.location.replace("https://www.google.com");
    		    }
    		});
        </script>
        <?php
    }

    Replace "https://www.google.com" with your desired URL.
    For getting more idea on mu plugins, you can go through this article: http://premium.wpmudev.org/manuals/wpmu-manual-2/using-mu-plugins/

    I've not tested this, but this should work. Please let us know if it doesn't work, or you have any confusion. We will be glad to assist further.

    Have a nice day. Cheers!
    Rupok

  • Ash

    Hello member1

    would it be possible to send the buyer to a different url based on the product they purchased or the product category?

    This would need lots of custom code. Rather, how's about adding an extra field for product in that form? So, the user can insert/select the product name to fill that form.

    Also, if you need to customize this then you can post a job in our job board where you can hire a developer to assist further: http://premium.wpmudev.org/wpmu-jobs/ Please note that, no WPMU official staff is available in the job board.

    Hope it helps :slight_smile: Please feel free to ask more question if you have any.

    Cheers
    Ash