8 replies [Last post]
__Tango's picture
Offline
Cool profile pic award.
Joined: 03/06/2008
Juice: 33
Was this information Helpful?

Hey folks.

I've got a system where folks purchase both physical goods that require shipping, and memberships (akin to digital downloads) that don't require shipping.

What i'm wondering is how can i go about setting the order status directly from "Payment Received" (e.g. when the paypal ipn stuff is received), to "Completed" only for orders that don't have physical goods.

Any ideas?

Thanks.

...alex...

manatwo's picture
Offline
Joined: 02/19/2008
Juice: 235
Re: Automatically set order status from "payment received" to "c

Seems like you could do it pretty easily in Workflow. I'd try having the action invoke when the order status is set to "Payment Received" and add a condition to check if the order's weight is zero, or maybe if it has products from the downloadable classes. Then, set the action to update the status to "Completed"

__Tango's picture
Offline
Cool profile pic award.
Joined: 03/06/2008
Juice: 33
manatwo wrote:Seems like you
manatwo wrote:

Seems like you could do it pretty easily in Workflow. I'd try having the action invoke when the order status is set to "Payment Received" and add a condition to check if the order's weight is zero, or maybe if it has products from the downloadable classes. Then, set the action to update the status to "Completed"

argh. I thought this would be easy too. I tried this method, but it's not working for me.

I have the member role stuff working meaning i have:

  • workflow-ng and workflow-ng-ui installed
  • a product called "yearly membership" that is in the product class "memberships". This "yearly membership" product, will set the role "paid member" on the user (i do not allow anon purchasing for this product) when the order status is changed to "payment received".
  • payment via paypal (sandbox) IPN is working, so that when a user completes the checkout successfully, the order status is changed from "in checkout" to "payment received".

Now, based on manatwo's comments and some digging of my own, i created a new workflow-ng rule that has:

  • name: "automatically update order status from 'paid' to 'completed'"
  • weight: 1 (to make sure it goes after the "update order status on full payment" rule).
  • Invoked on event: Order status gets updated
  • conditions:
    • Order status: "payment received" AND
    • Check an order's products (inclusive mode, "yearly membership")
  • actions:
    • set order status to "completed"

This doesn't work. The rule is never fired.

I've also tried setting the second condition to:

  • Order has a product of a particular class (and set the class to "memberships")

This also didn't work.

I removed the second condition altogether so the rule only had one condition:

  • Order status: "payment received"

And the rule fired (but obviously, this rule isn't very useful).

Perhaps i'm not entering the second condition properly.

Any ideas?

Thanks.

....alex...

__Tango's picture
Offline
Cool profile pic award.
Joined: 03/06/2008
Juice: 33
Re: manatwo wrote:Seems like you

Hmmm...I tried setting the second condition so that it didn't reference the order contents (product or product class), but instead did like manatwo said and set the condition to see if the order weight is 0. That works.

This is fine for the most part, because now it does what i want. But the investigative side of me still wants to know why my original two attempts (using product and product class) didn't work.

Anyone got any ideas?

Thanks.

...alex...

torgosPizza's picture
Offline
Bug FinderEarly adopter... addicted to alphas.Getting busy with the Ubercode.
Joined: 08/14/2007
Juice: 4110
Re: Re: manatwo wrote:Seems like you

I would try, instead of checking for the Order Status to get updated, try running the rule when a payment gets entered, and the order contents include your subscription product. I've found some funky things with Order Status update being checked in WF-ng, I think you need to have it check for the Order Status it's being changed to, not the status it's changing from.

Hope one of these two things helps Smiling

--
Help directly fund development: Donate via PayPal!

Ryan's picture
Offline
Joined: 08/07/2007
Juice: 15438
Re: Re: Re: manatwo wrote:Seems like you

Also, to cross-reference, it may be an issue with the order products condition. Lyle's investigating it now, but he's full on Indian food and may be a little slow to respond. Smiling

Lyle's picture
Offline
AdministratoreLiTe!
Joined: 08/07/2007
Juice: 6846
Re: Re: manatwo wrote:Seems like you

Hmm... It looks like there was a bug in the order product condition, so that if you had selected the first option for "Inclusive mode" (a terrible description of what it does, BTW) it wouldn't work. The second option should work fine though.

Those are two sets of radio buttons that do different things. I'll change their labels so that they're hopefully easier to understand.

I don't see anything wrong with the product class condition itself, but maybe the order isn't passing type info into the condition code for some reason.

rout@drupal.org's picture
Offline
Joined: 03/27/2009
Juice: 2
is there a solution for ubercart 2.x?

I have the same challenge...does anyone have a suggestion (using Ubercart 2.x) on how to move order status from "payment received" to "completed" for file downloads or other non-shippable purchases?

timhobert's picture
Offline
Joined: 04/25/2009
Juice: 68
Re: is there a solution for ubercart 2.x?

FYI - I just changed the "Action: Update the order status" to "Completed" on this page: /admin/store/ca/uc_payment_received/edit/actions

That way the customer automatically gets the "Your Order at _____" email and the seller automatically gets the "New Order at _____" and if there's a file download that should be sent to the customer quickly, it is automatically sent via email.