I am facing some problems with the orders placed by the robots.
I noticed that all orders are made by a specific phone number and also by a specific street. So I looked for a way to block orders that are made with that phone number or this street.
I found the following link https://www.ashsmith.io/2012/12/making-use-of-observers-in-magento/.
I followed the steps to create an observer with the sales_order_place_before event, to compare the parameters sent in order with the parameters that I want to block.
- I created the file Blockbots_Observer.xml in / html / app / etc / modules;
- I created the Config.xml file in / html / app / code / local / Blockbots / Observer / etc;
- Finally, I created the Observer.php file in / html / app / code / local / Blockbots / Observer / Model;
After all these steps, the implementation did not work (I'm still receiving bot orders).
Here is the code in the files: