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 everyone, I need some help, maybe some of you know, where is controller or module to support p
Comments
-
did you have a look at the publish and synch mechanisms?
0 -
The controllers for CRUD in the Zed UI are located at https://github.com/spryker/product-management/tree/master/src/Spryker/Zed/ProductManagement/Communication/Controller
But what you most probably are searching for is https://github.com/spryker/product/blob/master/src/Spryker/Zed/Product/Business/Product/ProductManager.php#L53
In this class a product is created and you could hook into to notify your external service.
0 -
that part of the system essentially reacts to changes in the business entities. it is possible to register plugins that then propagate the changed data to 3rd party system in addition so redis/elasticsearch
0 -
What @UJN2JRU4Fsuggest is a lot more complex, but a cleaner solution.
You could attach a listener to one/many product events: https://github.com/spryker/product/blob/master/src/Spryker/Zed/Product/Dependency/ProductEvents.php#L120 -
agreed on the complex/clean tradeoff 👍
0 -
i would go for clean 🙂
0 -
im a beginner in spryker, @UJN2JRU4F I found methods (publish and synch) which show these events in:
project/src/Pyz/Zed/ProductStorage/Communication/Plugin/Event/Subscriber/ProductStorageEventSubscriber.php
but I do not know how to get this data,0 -
i can create plugin and run it in ProductStorageEventSubscriber.php methods, but $eventCollection from methods there is even no product update id for example
0 -
so where i must create plugin ?
0 -
@USLUHK9SQ Have a look where the event subscriber is created, you can add you own event subscriber to this array which will register an event listener.
In this event listener you can do what ever you want, as it get’s passed the id of the product.0 -
@UL6DGRULR listener for all this event is in src/Pyz/Zed/ProductStorage/Communication/Plugin/Event/Listener/ProductBundleStoragePublishListener.php, but it is never used,
public function handleBulk(array $eventTransfers, $eventName): void
param $eventName is clear, but where should I get from
$eventTransfers0 -
$eventTransfer will be an array of EventTransfer objects.
You can use this EventTransfer objects to retrive the id of the entity for which the event was triggered by using the eventBehaviourFacade:$productIds = $this->getFactory()->getEventBehaviourFacade()->getEventTransferIds($eventTransfers);
0 -
@UL6DGRULR i still not understand how i connect this, can you show me how to call this/or other listening in a plugin, for example
0 -
@USLUHK9SQ There is a whole section in the documentation on how to implement event listeners: https://documentation.spryker.com/docs/event-listen
If you encounter problems like a listener is not listening or not doing what you want you should have a look at https://documentation.spryker.com/docs/ht-debug-listeners-2019030 -
hi, @UL6DGRULR i create my own listening when i type in console "vendor/bin/console event:trigger:listener KacperListener id=217" working good but when i add listening to Subscriber, it's not working. I used your links above.
0 -
@UL6DGRULR listening from console works but from application no
0
Categories
- All Categories
- 42 Getting Started & Guidelines
- 7 Getting Started in the Community
- 8 Additional Resources
- 7 Community Ideas and Feedback
- 75 Spryker News
- 921 Developer Corner
- 781 Spryker Development
- 88 Spryker Dev Environment
- 362 Spryker Releases
- 3 Oryx frontend framework
- 34 Propel ORM
- 68 Community Projects
- 3 Community Ideation Board
- 30 Hackathon
- 3 PHP Bridge
- 6 Gacela Project
- 25 Job Opportunities
- 3.2K 📜 Slack Archives
- 116 Academy
- 5 Business Users
- 370 Docker
- 551 Slack General
- 2K Help
- 75 Knowledge Sharing
- 6 Random Stuff
- 4 Code Testing
- 32 Product & Business Questions
- 70 Spryker Safari Questions
- 50 Random