clean-sundown-47111
08/03/2023, 5:48 AMwooden-king-30682
08/03/2023, 6:17 AMspy_product.is_active = true , if not the spy_product_concrete_storage entry is remove d via Propel ORM (https://github.com/spryker/product-storage/blob/1.36.1/src/Spryker/Zed/ProductStorage/Business/Storage/ProductConcreteStorageWriter.php#L198).
Another option is to trigger the unpublish event and subscribe your unpublish method to it (e.g.: https://github.com/spryker/product-storage/blob/1.36.1/src/Spryker/Zed/ProductStor[…]ation/Plugin/Event/Subscriber/ProductStorageEventSubscriber.php).
Most times you want see anything that triggers the unpublish event, as there is another unpublish event on the ORM level that is more commonly used (e.g.: https://github.com/spryker/product-list-search/blob/2.5.0/src/Spryker/Zed/ProductL[…]on/Plugin/Event/Subscriber/ProductListSearchEventSubscriber.php). Those events are generated by the event-behavior module (e.g.: https://docs.spryker.com/docs/scos/dev/back-end-development/data-manipulation/data-publishing/handle-data-with-publish-and-synchronization.html#[…]s) and have a common naming schema.
The naming schema is Entity.<table>.<event> (e.g.: Entity.spy_product.delete for any delete on the spy_product table that is done via Propel ORM)clean-sundown-47111
08/03/2023, 7:04 AM