nnasirnnasir MemberComments: 1 Received thanks: 0 Member since: April 29

Hi there, 

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. 

Answers

  • YoUmarsYoUmars MemberComments: 1 Received thanks: 0 edited May 29 Member since: January 27

    Hey,

    I am sorry to not reply to your question, to be honest I am new to Shopware6.. 
    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.
     

        

    <?php</p>

     

    namespace Emakers\TransmissionPlugin\Subscriber; 

    use Symfony\Component\EventDispatcher\EventSubscriberInterface;

    use Symfony\Component\HttpKernel\Event\ExceptionEvent;

    use Symfony\Component\HttpKernel\KernelEvents;

    use Enlight_Hook_HookArgs; 

    class OrderSubscriber implements EventSubscriberInterface 

    {

        public static function getSubscribedEvents() 

        { 

            // return the subscribed events, their methods and priorities

            return [ 

                       ['OrderEvents::ORDER_WRITTEN_EVENT' => 'onOrderCheckout'], 

            ]; 

        } 

        public function onOrderCheckout(Enlight_Hook_HookArgs $args) 

        { 

            die('TEST OK');

        }

    }

  • nnasirnnasir MemberComments: 1 Received thanks: 0 Member since: April 29

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

  • shopware1shopware1 MemberComments: 10 Received thanks: 0 Member since: November 4

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

Sign In or Register to comment.