So im a developer who is customising the plugin quiet a bit

So I’m a developer who is customising the plugin quite a bit according to client’s strict brief.

Basically, what I’m making is a glorified contact form with a cart attached.
The reason is that it’s not a product purchase but a product rental which needs telephonic sales to close.

So I’m customising mp_cart.php to include my own form and that’s where the form process will end. BUT I’d like to create an "order" though this one step.

I see you create a custom post type mp_order
Are there any stored procedures to help do this and what is the best process to follow? Or is it as simple as creating a new post.

  • mazzamuz

    Hi there
    thanks for the quick responce - for the benefit of others I've kept this open

    I was actually looking for the function create_order in marketpress.php

    Id like to know what is absolutely required in order to run this function
    $order_id, $cart, $shipping_info, $payment_info, $paid

    another useful one is function get_cart_contents to generate the post_content
    $mp->get_cart_contents()

    cart_cache seems is the interesting variable - im just not sure when/how its created - i presume as items are added to the cart by way of session vars.

    Im looking for something like :
    $mp->create_order(false, $mp->get_cart_contents(), $_SESSION['mp_shipping_info'], $payment_info, true);
    to execute from mp_cart.php
    UPDATE:
    This works and adds an order but $payment_info and $paid are tricky- im not too sure what is required in them. - (the order defaulted to paid?)

    looking forward to your help/guidance

    kind regards
    Murray

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.