# Scheduler, Order Events, Path to Product Images

**URL:** <https://forum.shopware.com/t/scheduler-order-events-path-to-product-images/66593>\
**Category:** Other Questions (EN)\
**Created:** [29. April 2020 um 15:34 UTC](https://forum.shopware.com/t/scheduler-order-events-path-to-product-images/66593 "2020-04-29T15:34:27Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![nnasir](https://avatars.discourse-cdn.com/v4/letter/n/919ad9/32.png) [@nnasir](https://forum.shopware.com/u/nnasir)\
**Post date:** [29. April 2020 um 15:34 UTC](https://forum.shopware.com/t/scheduler-order-events-path-to-product-images/66593/1 "2020-04-29T15:34:27Z")

</div>

Hi there,&nbsp;

Hope you are doing well. I followed the steps to install the cron and it even showed in the ‚scheduled\_task‘ table in database. when I execute the cron & consumer manually using the CLI it keeps on executing although I have a dump statemenet in my cron but nothing gets printed in the CLI.

Also I have one more issue. I have to work with order events

1. Order written event (OrderEvents::ORDER\_WRITTEN\_EVENT)
2. Order state change event (OrderEvents::ORDER\_STATE\_WRITTEN\_EVENT)  
The first event i found is working perfectly and it dumps the data as expected but the 2nd event doesnt work when I change order\_state. Am I using wrong event for Order state Change if not can you tell me what can be wrong with it ?

Last but not least. I need to extract the complete link of the display image of the product description page. I cant find its path in the DataBase tables media, product\_media. Where can I find the complete path to the uploaded product image.&nbsp;

---

<div class="post-metadata">

**Author:** ![YoUmars](https://avatars.discourse-cdn.com/v4/letter/y/a9a28c/32.png) [@YoUmars](https://forum.shopware.com/u/YoUmars)\
**Post date:** [29. Mai 2020 um 11:29 UTC](https://forum.shopware.com/t/scheduler-order-events-path-to-product-images/66593/2 "2020-05-29T11:29:44Z")

</div>

Hey,

I am sorry to not reply to your question, to be honest I am new to Shopware6…&nbsp;  
I am just here to ask you how you did you do to make your first event (OrderEvents::ORDER\_WRITTEN\_EVENT) work?  
Because I have this code and it’s not working, nothing happens when I create a test order in the frontend.  
&nbsp;

&nbsp; &nbsp;&nbsp;

\<?php 

&nbsp; namespace&nbsp;Emakers\TransmissionPlugin\Subscriber;&nbsp; use&nbsp;Symfony\Component\EventDispatcher\EventSubscriberInterface; use&nbsp;Symfony\Component\HttpKernel\Event\ExceptionEvent; use&nbsp;Symfony\Component\HttpKernel\KernelEvents; use&nbsp;Enlight\_Hook\_HookArgs;&nbsp; class&nbsp;OrderSubscriber&nbsp;implements&nbsp;EventSubscriberInterface&nbsp; { &nbsp;&nbsp;&nbsp;&nbsp;public&nbsp;static&nbsp;function&nbsp;getSubscribedEvents()&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;{&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;//&nbsp;return&nbsp;the&nbsp;subscribed&nbsp;events,&nbsp;their&nbsp;methods&nbsp;and&nbsp;priorities &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return&nbsp;[&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;['OrderEvents::ORDER\_WRITTEN\_EVENT'&nbsp;=\\>&nbsp;'onOrderCheckout'],&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;];&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;}&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;public&nbsp;function&nbsp;onOrderCheckout(Enlight\_Hook\_HookArgs&nbsp;$args)&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;{&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;die('TEST&nbsp;OK'); &nbsp;&nbsp;&nbsp;&nbsp;} }

---

<div class="post-metadata">

**Author:** ![nnasir](https://avatars.discourse-cdn.com/v4/letter/n/919ad9/32.png) [@nnasir](https://forum.shopware.com/u/nnasir)\
**Post date:** [9. Juni 2020 um 13:59 UTC](https://forum.shopware.com/t/scheduler-order-events-path-to-product-images/66593/3 "2020-06-09T13:59:24Z")

</div>

Hi hope you are doing well. Sorry to say but i still couldnt make the code to work :(&nbsp;

---

<div class="post-metadata">

**Author:** ![shopware1](https://avatars.discourse-cdn.com/v4/letter/s/e68b1a/32.png) [@shopware1](https://forum.shopware.com/u/shopware1)\
**Post date:** [4. November 2020 um 18:53 UTC](https://forum.shopware.com/t/scheduler-order-events-path-to-product-images/66593/4 "2020-11-04T18:53:28Z")

</div>

Hey! I am also sorry, could not find a solution to your problem.&nbsp;

---

<div class="post-metadata">

**Author:** ![abdes](https://avatars.discourse-cdn.com/v4/letter/a/a9a28c/32.png) [@abdes](https://forum.shopware.com/u/abdes)\
**Post date:** [10. Januar 2021 um 14:48 UTC](https://forum.shopware.com/t/scheduler-order-events-path-to-product-images/66593/5 "2021-01-10T14:48:55Z")

</div>

I have the same problem this event (ORDER\_STATE\_WRITTEN\_EVENT) does not work.

Have you found a solution?

---

<div class="post-metadata">

**Author:** ![nnasir](https://avatars.discourse-cdn.com/v4/letter/n/919ad9/32.png) [@nnasir](https://forum.shopware.com/u/nnasir)\
**Post date:** [9. Februar 2021 um 09:11 UTC](https://forum.shopware.com/t/scheduler-order-events-path-to-product-images/66593/6 "2021-02-09T09:11:54Z")

</div>

Hi,

&nbsp;

Hope you are doing well. Sorry but no I didnt find any solution to it as of now.

---

<div class="post-metadata">

**Author:** ![mondtyp34](https://avatars.discourse-cdn.com/v4/letter/m/8dc957/32.png) [@mondtyp34](https://forum.shopware.com/u/mondtyp34)\
**Post date:** [20. Mai 2021 um 21:02 UTC](https://forum.shopware.com/t/scheduler-order-events-path-to-product-images/66593/7 "2021-05-20T21:02:59Z")

</div>

hi,

even though this thread is a bit older i’m actually facing the same issue right now and was hoping anybody had any idea for this…

---

<div class="post-metadata">

**Author:** ![kimsen](https://avatars.discourse-cdn.com/v4/letter/k/ce73a5/32.png) [@kimsen](https://forum.shopware.com/u/kimsen)\
**Post date:** [4. Mai 2022 um 08:08 UTC](https://forum.shopware.com/t/scheduler-order-events-path-to-product-images/66593/8 "2022-05-04T08:08:46Z")

</div>

Hi,  
have the same problem! Still no solution for this one?

---

<div class="post-metadata">

**Author:** ![bsosna](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/bsosna/32/27211_2.png) [@bsosna](https://forum.shopware.com/u/bsosna)\
**Post date:** [30. April 2024 um 18:12 UTC](https://forum.shopware.com/t/scheduler-order-events-path-to-product-images/66593/9 "2024-04-30T18:12:18Z")

</div>

Hi 🙂

`OrderEvents::ORDER_STATE_WRITTEN_EVENT` is not implemented.

I recommend use `state_machine.order.state_changed` event instead.
