Stack Exchange network consists of 178 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.
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
i want product id from local storage in observer is there any easy way to do it?
You can use below code in your controller
echo 'product id'.$product_id;
local storage it a client-side element and controller is a server-side element. So you have read this variable using js and send to via an ajax request.
Can able to provide local storage data
Required, but never shown