Share » Forums » Developer » Workflow not running for "shop |...

Workflow not running for "shop | confirmorder | after" trigger

Workflow not running for "shop | confirmorder | after" trigger

Wednesday 14 January 2004 6:42:09 am - 9 replies

Author Message

Björn Dieding@xrow.de

Wednesday 14 January 2004 4:34:02 pm

hard to say... the error is probably inside your code...

Are you using a stable eZ version?

You could try to hook up my shop sender extension available on subsvn.

At least this one works right. I used it in the same place.

Looking for a new job? http://www.xrow.com/xrow-GmbH/Jobs
Looking for hosting? http://hostingezpublish.com
-----------------------------------------------------------------------------
GMT +01:00 Hannover, Germany
Web: http://www.xrow.com/

Willie Seabrook

Wednesday 14 January 2004 8:54:42 pm

Are you trying to display a template? If so,that will probably not work unless you get modified edit.php and other files. This will be the case only if the shop triggers are executed in the same manner as the content triggers. In fact I don't think they are.

Secondly, if you are just trying to run simple event without returning a template, it probably won't work anyway as the ez guys are still working on developing the full features of the workflow system (as far as I know). I think they regard it as alpha. You might just have to cope with using the before trigger and making a little hack (i've done it heaps with the workflow system)

Regards,
Willie

Eirik Alfstad Johansen

Tuesday 03 February 2004 1:19:08 am

Hi guys,

Thanks for both your suggestions!

> hard to say... the error is probably inside your code...

I don't think it is, because the workflow runs exactly as it should when I use the "shop | confirmorder | before" trigger.

> Are you using a stable eZ version?

Yes.

> Are you trying to display a template?

No, I'm not.

> You might just have to cope with using the before trigger
> and making a little hack (i've done it heaps with the
> workflow system)

Would you care to elaborate on how you did this?

Thanks in advance !

Sincerely,

Eirik Johansen

Sincerely,

Eirik Alfstad Johansen
http://www.netmaking.no/

Eirik Alfstad Johansen

Monday 28 June 2004 7:32:45 am

Hi guys,

I just created a new workflow event for a different installation (3.4.0), and the exact same problem occurs here: I'm unable to run the workflow using "shop|confirmorder|after" as the trigger. When I, on the other hand, use "shop|confirmorder|before" as the trigger, everything works smoothly.

I can't belive I'm the only one experiencing this problem, and on two different installations using two different workflow events.

Sincerely,

Eirik Johansen
http://www.netmaking.no/

Sincerely,

Eirik Alfstad Johansen
http://www.netmaking.no/

Paul Forsyth

Monday 28 June 2004 3:57:13 pm

What you are viewing in the trigger screen is a bug:

http://ez.no/community/bug_reports/workflow_trigger_list_doesnt_respect_available_operations

According to 'kernel/shop/operation_definition.php' only the 'before' trigger is defined but eZ3 shows both :(

You can see where the workflow fires in particular module views by looking out for code like:

$operationResult = eZOperationHandler::execute( 'shop', 'confirmorder', array( 'order_id' => $order->attribute( 'id' ) ) );

If you look in 'kernel/shop/confirmorder.php' you will see that this line is only used in a 'before' capacity. The 'after' bit hasn't been written...

paul

--
http://www.visionwt.com

Eirik Alfstad Johansen

Tuesday 29 June 2004 1:30:04 am

Hi Paul.

Thanks for enlightening me!

Sincerely,

Eirik Johansen
http://www.netmaking.no/

Sincerely,

Eirik Alfstad Johansen
http://www.netmaking.no/

Paul Forsyth

Tuesday 29 June 2004 3:26:05 am

You could add a new trigger to the operation_definition file, and add another execute line to the correct part of confirmorder.php that responds to the trigger.

I would probably put it just before this line:

$module->redirectTo( '/shop/checkout/' );

which is line 70 i believe.

That should get it working :)

paul

--
http://www.visionwt.com

Eirik Alfstad Johansen

Tuesday 29 June 2004 3:39:52 am

Hi Paul,

Thanks for the tip! I'll keep that in mind for future projects (hopefully it's be fixed by then). However, as for now, the event seems to work as supposed to, even though it runs before.

Sincerely,

Eirik Johansen
http://www.netmaking.no/

Sincerely,

Eirik Alfstad Johansen
http://www.netmaking.no/

Paul Forsyth

Tuesday 29 June 2004 3:51:16 am

You could add a before trigger to the checkout view. This is almost the same as the confirmorder after trigger since when you confirm the order you get directed to the checkout...

paul

--
http://www.visionwt.com

You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu