7

The Exp:resso Store plugin by default assigns all new orders to the New status. This in turn triggers the New status email confirmation to be sent out.

The problem I'm dealing with is that I have a few orders that need to completely bypass the New status. Those orders are submitted using a separate form from the rest of the orders, and as such, I'd like to be able to give them a separate Status so that the default New order email confirmation never gets sent out for them.

Any ideas on how I might accomplish this? Thanks for any help you can offer!

2 Answers 2

5

You will need to write an extension that would change or skip the default status based upon what items are in the cart. You can take a look at the available extension hooks. Your best bet would probably be the store_order_complete_end hook.

5
  • Thanks, I guess I'll give that a try. I was just hoping that there might be some way to set the order status using a hidden field in the order form, but it's sounding like Exp:resso doesn't support anything like that.
    – Timothy
    Commented Aug 6, 2013 at 3:19
  • 1
    For anyone else who may happen to come across this thread trying to do the same thing, Justin's solution worked like a charm. A quick hook into the store_order_complete_end hook allowed me to change exactly what I needed. Thanks Justin!
    – Timothy
    Commented Aug 7, 2013 at 18:15
  • Timothy it is great to hear that you were able to get it sorted out. Commented Aug 8, 2013 at 0:01
  • Timothy, can you give a brief rundown of what you did inside that hook? It doesn't look like you're actually able to update the status dynamically. Did you write some custom logic to handle the switch?
    – Bryant
    Commented Aug 20, 2013 at 18:36
  • Make sure to uncheck the default checkbox for the new status and default to the new status (when you want it to have a new status) when updating the status in your extension, otherwise it will set it to new, then to your other status, sending both emails (if both statuses have an email assigned to it).
    – Brad
    Commented Jul 22, 2019 at 16:18
2

In Store > Settings > Orders Statuses click on the Add New Status button. Give this status a name and then check the Make Default checkbox. If you don't want an email to be sent out on this status assignment then in the Email Template field below ensure that no email template is selected (leave blank).

3
  • Thanks, but it turns out that that just flips my problem around. I still want about 90% of the orders that are placed on the site to send an automatic email confirmation. So those 90% all need to stay assigned to the "New" status. It's the ~10% of the orders that I need to assign to their own separate status. Basically, I think I need a way to set the default Status for each order based on the particular form on the front-end that it is submitted from.
    – Timothy
    Commented Aug 5, 2013 at 23:14
  • Ah I see. In that case your only option would be — as Justin describes — to write a custom extension to latch on to the store_order_complete_end hook and then set the appropriate order status accordingly. The default status is an 'across the board' setup where all orders are treated equally. With the extension you could provide a way to treat orders differently according to your needs.
    – Ian Young
    Commented Aug 6, 2013 at 7:55
  • And if you need to send an email, you could always send it from the template itself, eg. if payment was successful. This plugin might be helpful: devot-ee.com/add-ons/email-from-template
    – Diederik
    Commented Sep 18, 2014 at 14:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.