Jump to content

Admin area - adding an order. Any hooks available?

Recommended Posts

Hi guys,

We currently have some code that runs on AfterShoppingCartCheckout, so just before an order is added. We would like this same code to run when an admin creates an order in the admin panel.

I can't see a hook available for this - the closest one is AcceptOrder but this doesn't fit what we need.

Any ideas? Thanks!

Share this post

Link to post
Share on other sites

Hmm, maybe instead of using AfterShoppingCartCheckout, you want to use AcceptOrder instead?

I'm not sure of the scope of what you're adding, of course, but this would do what you need to do, once the order's actually accepted by admins, and yeah that would apply to admin orders, since like all , they have to be accepted?

Share this post

Link to post
Share on other sites

Hey, thanks for the reply. We have considered using AcceptOrder but I believe we need the code to fire whenever an order is added not necessarily accepted. Any ideas?

Share this post

Link to post
Share on other sites

Without knowing what you're doing, we can only speculate really.

if doing this after the order is accepted won't work, then you may want to use PendingOrder instead. However, this is going to be triggered before the checkout, or it should

Alternatively, you could use some php magic and call  AddInvoicePayment . However, you'll have to query the order table for that specific invoice, make sure that it should be doing what you're supposed to.

AddInvoicePayment will trigger whether the admin creates the order or not, and PendingOrder should always trigger whan an order is 'Pending'.

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.


Important Information

By using this site, you agree to our Terms of Use & Guidelines