Magento1.9: Intercepting Order Post on Server SideEvent before save order or place order in magento 1.9.1.1Adding custom customer fields to One Page Checkoutmagento order mixup with other orderMagento 1.9: Best option for managing order from Multi vendorMagento 1.9 shipping module helpAdd validated list of patients to customer account during checkoutTransactional email not translated for programmatically created invoice, shipping(SOLVED) Magento - Fully disable shipping serviceMagento Server Side OptimizationUK Flat Rate ShippingMagento 1.9 Failed to load resource: net::ERR_CONNECTION_RESET

Could I use a Greatsword and a Longsword in one turn with Two-weapon fighting and dual wielding feat?

Using two linked programs, output ordinal numbers up to n

Sending a photo of my bank account card to the future employer

Why do candidates not quit if they no longer have a realistic chance to win in the 2020 US presidents election

Doing research in academia and not liking competition

Re-negotiate salary once I earn my diploma

Decoding Every Top 100 Voting Ever

If I stood next to a piece of metal heated to a million degrees, but in a perfect vacuum, would I feel hot?

Could the crash sites of the Apollo 11 and 16 LMs be seen by the LRO?

What's the phrasal verb for carbonated drinks exploding out of the can after being shaken?

I gave my characters names that are exactly like another book. Is it a problem?

Conducting exams in which a computer (but no internet) is available

Are L-functions uniquely determined by their values at negative integers?

Find maximum according to a parameter

Why do the faithful have to say "And with your spirit " in Catholic Mass?

I do not have power to all my breakers

Why should I cook the flour first when making bechamel sauce?

Is there a way to handmake alphabet pasta?

What does the BBL file-extension stand for in LaTeX?

Is there a good program to play chess online in ubuntu?

Source of story about the Vilna Gaon and immigration policy

What are "full piece" and "half piece" in chess?

Draw a line nicely around notes

Diminished chord constructed over the tonic degree?



Magento1.9: Intercepting Order Post on Server Side


Event before save order or place order in magento 1.9.1.1Adding custom customer fields to One Page Checkoutmagento order mixup with other orderMagento 1.9: Best option for managing order from Multi vendorMagento 1.9 shipping module helpAdd validated list of patients to customer account during checkoutTransactional email not translated for programmatically created invoice, shipping(SOLVED) Magento - Fully disable shipping serviceMagento Server Side OptimizationUK Flat Rate ShippingMagento 1.9 Failed to load resource: net::ERR_CONNECTION_RESET






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








1















I have to validate shipping addresses before an order goes through, but I cannot rely on a front end javascript approach.



I'm trying to find the code I'll need to customize that will allow me to run a regexp on the shipping address before approving an order.



If the regex matches, I'll need to return an error to the shopping cart page saying: "I'm sorry we cannot ship to that address".



Any ideas where I can find the code to do this?



I must approach it this way because I cannot ship to certain states, sometimes even only certain cities within certain states, so Magento's built-in regions doesn't cut it.



I already have this custom functionality to only shipping to certain states.



The problem is I need to only restrict these locations in the shipping address area, but not the billing.



I have already allowed billing to be any address while restricting the shipping, on the front end. But there are ways to still get the restricted address into the shipping field such as "use billing address" for shipping, etc...



So as foolproof way to make sure no orders get through that have very specific shipping destinations, I want to validate the address on the server side and stop the order from going through if it matches my regular expression.



Any help appreciated.










share|improve this question






























    1















    I have to validate shipping addresses before an order goes through, but I cannot rely on a front end javascript approach.



    I'm trying to find the code I'll need to customize that will allow me to run a regexp on the shipping address before approving an order.



    If the regex matches, I'll need to return an error to the shopping cart page saying: "I'm sorry we cannot ship to that address".



    Any ideas where I can find the code to do this?



    I must approach it this way because I cannot ship to certain states, sometimes even only certain cities within certain states, so Magento's built-in regions doesn't cut it.



    I already have this custom functionality to only shipping to certain states.



    The problem is I need to only restrict these locations in the shipping address area, but not the billing.



    I have already allowed billing to be any address while restricting the shipping, on the front end. But there are ways to still get the restricted address into the shipping field such as "use billing address" for shipping, etc...



    So as foolproof way to make sure no orders get through that have very specific shipping destinations, I want to validate the address on the server side and stop the order from going through if it matches my regular expression.



    Any help appreciated.










    share|improve this question


























      1












      1








      1








      I have to validate shipping addresses before an order goes through, but I cannot rely on a front end javascript approach.



      I'm trying to find the code I'll need to customize that will allow me to run a regexp on the shipping address before approving an order.



      If the regex matches, I'll need to return an error to the shopping cart page saying: "I'm sorry we cannot ship to that address".



      Any ideas where I can find the code to do this?



      I must approach it this way because I cannot ship to certain states, sometimes even only certain cities within certain states, so Magento's built-in regions doesn't cut it.



      I already have this custom functionality to only shipping to certain states.



      The problem is I need to only restrict these locations in the shipping address area, but not the billing.



      I have already allowed billing to be any address while restricting the shipping, on the front end. But there are ways to still get the restricted address into the shipping field such as "use billing address" for shipping, etc...



      So as foolproof way to make sure no orders get through that have very specific shipping destinations, I want to validate the address on the server side and stop the order from going through if it matches my regular expression.



      Any help appreciated.










      share|improve this question
















      I have to validate shipping addresses before an order goes through, but I cannot rely on a front end javascript approach.



      I'm trying to find the code I'll need to customize that will allow me to run a regexp on the shipping address before approving an order.



      If the regex matches, I'll need to return an error to the shopping cart page saying: "I'm sorry we cannot ship to that address".



      Any ideas where I can find the code to do this?



      I must approach it this way because I cannot ship to certain states, sometimes even only certain cities within certain states, so Magento's built-in regions doesn't cut it.



      I already have this custom functionality to only shipping to certain states.



      The problem is I need to only restrict these locations in the shipping address area, but not the billing.



      I have already allowed billing to be any address while restricting the shipping, on the front end. But there are ways to still get the restricted address into the shipping field such as "use billing address" for shipping, etc...



      So as foolproof way to make sure no orders get through that have very specific shipping destinations, I want to validate the address on the server side and stop the order from going through if it matches my regular expression.



      Any help appreciated.







      magento-1.9






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Jul 8 at 4:13









      poojan sharma

      8711 silver badge10 bronze badges




      8711 silver badge10 bronze badges










      asked Jul 7 at 20:36









      OB7DEVOB7DEV

      82 bronze badges




      82 bronze badges




















          1 Answer
          1






          active

          oldest

          votes


















          0














          sales_order_place_before


          You can use this observer to perform your checks before order save.



          Check this to see how it works. Event before save order or place order in magento 1.9.1.1



          My suggestion is to do these validations before place order action. You can override both save billing/shipping actions.






          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%2f281089%2fmagento1-9-intercepting-order-post-on-server-side%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














            sales_order_place_before


            You can use this observer to perform your checks before order save.



            Check this to see how it works. Event before save order or place order in magento 1.9.1.1



            My suggestion is to do these validations before place order action. You can override both save billing/shipping actions.






            share|improve this answer



























              0














              sales_order_place_before


              You can use this observer to perform your checks before order save.



              Check this to see how it works. Event before save order or place order in magento 1.9.1.1



              My suggestion is to do these validations before place order action. You can override both save billing/shipping actions.






              share|improve this answer

























                0












                0








                0







                sales_order_place_before


                You can use this observer to perform your checks before order save.



                Check this to see how it works. Event before save order or place order in magento 1.9.1.1



                My suggestion is to do these validations before place order action. You can override both save billing/shipping actions.






                share|improve this answer













                sales_order_place_before


                You can use this observer to perform your checks before order save.



                Check this to see how it works. Event before save order or place order in magento 1.9.1.1



                My suggestion is to do these validations before place order action. You can override both save billing/shipping actions.







                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Jul 8 at 5:49









                saiidsaiid

                7022 gold badges8 silver badges22 bronze badges




                7022 gold badges8 silver badges22 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%2f281089%2fmagento1-9-intercepting-order-post-on-server-side%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 거울 청소 군 추천하다 아이스크림