Calling Developers!
We are reenergizing our code contribution process! Learn More

What are the Slack Archives?

It’s a history of our time together in the Slack Community! There’s a ton of knowledge in here, so feel free to search through the archives for a possible answer to your question.

Because this space is not active, you won’t be able to create a new post or comment here. If you have a question or want to start a discussion about something, head over to our categories and pick one to post in! You can always refer back to a post from Slack Archives if needed; just copy the link to use it as a reference..

Hello, I am trying to deactivate a concrete product by calling the `productFacade->deactivateProd

Options
U039H1K90BH
U039H1K90BH Posts: 9 🧑🏻‍🚀 - Cadet

Hello, I am trying to deactivate a concrete product by calling the productFacade->deactivateProductConcrete function in a console command. However, the corresponding unpublish events are not triggered, so the product is still visible in Yves. Manually deactivating the product in the zed gui triggers the same function call, but leads to additional events that correctly remove the product from Yves. It seems like deactivating in the zed gui causes two SpyEventBehaviorEntityChange instances to be created, which are then handled by eventBehaviorFacade->triggerRuntimeEvents . This doesn’t seem to happen when I call the function myself. What do I need to do to trigger the correct events after deactivating a product? I don’t want to trigger them all manually with loads of ->unpublish calls.

Comments

  • U031G802S74
    U031G802S74 Posts: 29 🧑🏻‍🚀 - Cadet
    Options

    Check the default data importers for reference. You can use the static class dataimportpublisher:addEvent to add them in a loop and then use dataimportpublisher:triggerEvents and they will be triggered in Bulk.

  • U039H1K90BH
    U039H1K90BH Posts: 9 🧑🏻‍🚀 - Cadet
    Options

    That seems to do the trick! Thanks a lot! I’ve been trying for days to solve this! Yay 🎉🥳