Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
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