I'm facing some issues with orders placed by bots.
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 event sales_order_place_before, to compare the parameters sent in the order to the parameters that I want to block.
- I created the file Blockbots_Observer.xml on /html/app/etc/modules;
- I created the file Config.xml on /html/app/code/local/Blockbots/Observer/etc;
- Finally, I created the file Observer.php on /html/app/code/local/Blockbots/Observer/Model;
After all these steps, the implementation did not work (I am still receiving orders from bots).
Here is the code on files: