maria zagula Posted May 10, 2016 Share Posted May 10, 2016 Hi experts!I would like to display simple error message (somethink like this) http://www.w3schools.com/js/js_popup.asp when person click "add to cart". I tried hookCart but it run after added product to cart so it is too late. I tried something like this: public function hookCart($params) { $cookie = $params['cookie'] ; if(empty ($cookie->email)) { return '<!DOCTYPE html> <html> <body onload="javascript:myFunction()"> <p>Click the button to display an alert box:</p> <button onclick="myFunction()">Try it</button> <script> function myFunction() { alert("I am an alert box!"); } </script> </body> </html> '; } else { //Some code not important } } But it does not work ... Please help !!! Thanks in advance Link to comment Share on other sites More sharing options...
Inter Svetainė Posted October 5, 2020 Share Posted October 5, 2020 @maria za still need this? Link to comment Share on other sites More sharing options...
delete-account-pleas Posted October 5, 2020 Share Posted October 5, 2020 1 hour ago, Inter Svetainė said: @maria za still need this? I hope not its a topic from 2016 Link to comment Share on other sites More sharing options...
Inter Svetainė Posted October 7, 2020 Share Posted October 7, 2020 On 10/6/2020 at 12:31 AM, Crezzur said: I hope not its a topic from 2016 Some issues Prestashop team is solving a few years, so I thought it could be still relevant Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now