Stack Exchange network consists of 176 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
Magento Stack Exchange is a question and answer site for users of the Magento e-Commerce platform. It only takes a minute to sign up.
I want to save the customer_id and the product_id in a table after clicking a product and seeing its detail
The product view controller triggers an event you can use:
$this->_eventManager->dispatch('catalog_controller_product_view', ['product' => $product]);
Required, but never shown