Magento Observer to block spam orders not workingcustom checkout_submit_all_after observer not workingMagento observer is not viewing product detailsMagento product view observer not raisedObserver not firing - adminhtml_block_html_beforeMagento 1.9 custom configuration is not visible in admin panelMy custom observer not workingMagento 1.7 - Export New Orders in Observerupdate price Observer is not working on cart pageObserver method is not getting calledMagento 1.9 - automatically add comment with module / observer

How to sort and filter a constantly changing list of data?

How can I tell if there was a power cut while I was out?

How did C64 games handle music during gameplay?

Is the apartment I want to rent a scam?

Sextortion with actual password not found in leaks

Spoken encryption

Why are angular mometum and angular velocity not necessarily parallel, but linear momentum and linear velocity are always parallel?

How can I make sure my players' decisions have consequences?

Can I paint a load center cover?

Should I describe a character deeply before killing it?

how to add 1 milliseconds on a datetime string?

What was the rationale behind 36 bit computer architectures?

Memory capability and powers of 2

What do teaching faculty do during semester breaks?

Grid/table with lots of buttons

Why are off grid solar setups only 12, 24, 48 VDC?

What is the meaning of "a thinly disguised price"?

Why keep the bed heated after initial layer(s) with PLA (or PETG)?

Using "Kollege" as "university friend"?

What should I say when a company asks you why someone (a friend) who was fired left?

Why is a dedicated QA team member necessary?

Why did NASA use U.S customary units?

Is a normal-sized rug with the Animate Objects spell cast on it able to carry a person and fly?

kids pooling money for Lego League and taxes



Magento Observer to block spam orders not working


custom checkout_submit_all_after observer not workingMagento observer is not viewing product detailsMagento product view observer not raisedObserver not firing - adminhtml_block_html_beforeMagento 1.9 custom configuration is not visible in admin panelMy custom observer not workingMagento 1.7 - Export New Orders in Observerupdate price Observer is not working on cart pageObserver method is not getting calledMagento 1.9 - automatically add comment with module / observer






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








0















I'm facing some issues with orders placed by bots.



enter image description here



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.



  1. I created the file Blockbots_Observer.xml on /html/app/etc/modules;

  2. I created the file Config.xml on /html/app/code/local/Blockbots/Observer/etc;

  3. 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:



Blockbots_observer.xml:
enter image description here



Config.xml:
enter image description here



Observer.php:
enter image description here



What could be wrong with implementation? Any idea how I can fix it?










share|improve this question
























  • Use Webfirewall that is the best solution.You have to prevent the bot at network level, not Application Level

    – Amit Bera
    Jul 16 at 14:12

















0















I'm facing some issues with orders placed by bots.



enter image description here



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.



  1. I created the file Blockbots_Observer.xml on /html/app/etc/modules;

  2. I created the file Config.xml on /html/app/code/local/Blockbots/Observer/etc;

  3. 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:



Blockbots_observer.xml:
enter image description here



Config.xml:
enter image description here



Observer.php:
enter image description here



What could be wrong with implementation? Any idea how I can fix it?










share|improve this question
























  • Use Webfirewall that is the best solution.You have to prevent the bot at network level, not Application Level

    – Amit Bera
    Jul 16 at 14:12













0












0








0








I'm facing some issues with orders placed by bots.



enter image description here



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.



  1. I created the file Blockbots_Observer.xml on /html/app/etc/modules;

  2. I created the file Config.xml on /html/app/code/local/Blockbots/Observer/etc;

  3. 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:



Blockbots_observer.xml:
enter image description here



Config.xml:
enter image description here



Observer.php:
enter image description here



What could be wrong with implementation? Any idea how I can fix it?










share|improve this question
















I'm facing some issues with orders placed by bots.



enter image description here



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.



  1. I created the file Blockbots_Observer.xml on /html/app/etc/modules;

  2. I created the file Config.xml on /html/app/code/local/Blockbots/Observer/etc;

  3. 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:



Blockbots_observer.xml:
enter image description here



Config.xml:
enter image description here



Observer.php:
enter image description here



What could be wrong with implementation? Any idea how I can fix it?







magento-1.9 module orders event-observer






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Jul 16 at 8:36









Aasim Goriya

3,2961 gold badge12 silver badges43 bronze badges




3,2961 gold badge12 silver badges43 bronze badges










asked Jul 15 at 22:28









Pedro_DouradoPedro_Dourado

11 bronze badge




11 bronze badge












  • Use Webfirewall that is the best solution.You have to prevent the bot at network level, not Application Level

    – Amit Bera
    Jul 16 at 14:12

















  • Use Webfirewall that is the best solution.You have to prevent the bot at network level, not Application Level

    – Amit Bera
    Jul 16 at 14:12
















Use Webfirewall that is the best solution.You have to prevent the bot at network level, not Application Level

– Amit Bera
Jul 16 at 14:12





Use Webfirewall that is the best solution.You have to prevent the bot at network level, not Application Level

– Amit Bera
Jul 16 at 14:12










1 Answer
1






active

oldest

votes


















0














block the bot ip Address range from accessing your website.



in .htaccess file:



order allow,deny
deny from yourparticularip


or you can do it in your index.php



$banned = array('xx.xxx.x.x');
if(in_array($_SERVER['REMOTE_ADDR'], $banned))

exit();



here is the reference:https://bobcares.com/blog/magento-block-ip-address/






share|improve this answer

























    Your Answer








    StackExchange.ready(function()
    var channelOptions =
    tags: "".split(" "),
    id: "479"
    ;
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function()
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled)
    StackExchange.using("snippets", function()
    createEditor();
    );

    else
    createEditor();

    );

    function createEditor()
    StackExchange.prepareEditor(
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: false,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: null,
    bindNavPrevention: true,
    postfix: "",
    imageUploader:
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    ,
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    );



    );













    draft saved

    draft discarded


















    StackExchange.ready(
    function ()
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f282163%2fmagento-observer-to-block-spam-orders-not-working%23new-answer', 'question_page');

    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    0














    block the bot ip Address range from accessing your website.



    in .htaccess file:



    order allow,deny
    deny from yourparticularip


    or you can do it in your index.php



    $banned = array('xx.xxx.x.x');
    if(in_array($_SERVER['REMOTE_ADDR'], $banned))

    exit();



    here is the reference:https://bobcares.com/blog/magento-block-ip-address/






    share|improve this answer



























      0














      block the bot ip Address range from accessing your website.



      in .htaccess file:



      order allow,deny
      deny from yourparticularip


      or you can do it in your index.php



      $banned = array('xx.xxx.x.x');
      if(in_array($_SERVER['REMOTE_ADDR'], $banned))

      exit();



      here is the reference:https://bobcares.com/blog/magento-block-ip-address/






      share|improve this answer

























        0












        0








        0







        block the bot ip Address range from accessing your website.



        in .htaccess file:



        order allow,deny
        deny from yourparticularip


        or you can do it in your index.php



        $banned = array('xx.xxx.x.x');
        if(in_array($_SERVER['REMOTE_ADDR'], $banned))

        exit();



        here is the reference:https://bobcares.com/blog/magento-block-ip-address/






        share|improve this answer













        block the bot ip Address range from accessing your website.



        in .htaccess file:



        order allow,deny
        deny from yourparticularip


        or you can do it in your index.php



        $banned = array('xx.xxx.x.x');
        if(in_array($_SERVER['REMOTE_ADDR'], $banned))

        exit();



        here is the reference:https://bobcares.com/blog/magento-block-ip-address/







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Jul 15 at 23:19









        NickoolNickool

        6873 gold badges14 silver badges37 bronze badges




        6873 gold badges14 silver badges37 bronze badges



























            draft saved

            draft discarded
















































            Thanks for contributing an answer to Magento Stack Exchange!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid


            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.

            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f282163%2fmagento-observer-to-block-spam-orders-not-working%23new-answer', 'question_page');

            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            Grendel Contents Story Scholarship Depictions Notes References Navigation menu10.1093/notesj/gjn112Berserkeree

            Area configuration aggregation error after install Porto themeMagento 2.1 CE Installed but front/backend not loading/workingCSS not loading on page within Magento 2 pageCannot install module in Magento 2no commands defined in the “setup” namespace. in Magento2Magento 2: Static files are present but shows 404Why do i have to always run the commands to clean cache in Magento 2.1.8?Failure reason: 'Unable to unserialize value.'Error 500 after magento migrationIn production mode the site does not loadMagento 2 : Error 500 after installing

            Middle Expansion Olielle Resaix Definition: Uttering songs of triumph shouting with joy triumphant exulting Sejunction Journal 붙다 달 고급 품목 외출 The stretch trades the screeching tin. Definition: The act of speaking with a drawl a drawl Cough Sand Definition: An uproar a quarrel a noisy outbreak Shake Iron Publicize Horse House Baby 사과 Resaix Flaggy Jelly Temporary Unequaled Puppet A drop in the bucket Shrew 성격 회원 성질 미팅 The burn frames the tacky quality. Materialistic The smoke reduces the way. Yammoe Nondescript Cheek 얼굴 배 약하다 날리다 타다 The illegal country shows the iron. Help Rule Drearien Smoke Teaching Meaty Wasp Abraham Lincoln Jaws 진심 수리하다 Size Cork Idea Convert Think Lark John Lennon 거울 청소 군 추천하다 아이스크림