Jump to content

Add Order api


Nathron

Recommended Posts

So I wanted to use add order to price override for shipping, can I use this from a hook then have payment proceed as usual or do I need to cancel the default action somehow and how do I do that. Say in OnBeforeCheckout

 

function inject_beforecheckout($vars){

global $smarty;

pull smarty variables from checkout page total price, my shipping variable add them together to get my real total.

//Create client with details from smarty variables

call addorder from internal api.

//call capture payment here? or is it necessary?

//Generate my own invoice here?

//Prevent default action... Somehow.

}

 

Basically I just want to avoid charging the customer twice for a custom product.

I'll run some test cases now and see what I come up with. Otherwise I'd be willing to pay the creator a modest sum to give me some help with it. Or anybody that can do this in a way that three requirements are met.

 

Shipping shows on the invoice and

The customer pays only once.

Tax works as usual.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated