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;
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
add a comment |
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
add a comment |
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
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
magento-1.9
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
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
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.
add a comment |
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
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
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.
add a comment |
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.
add a comment |
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.
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.
answered Jul 8 at 5:49
saiidsaiid
7022 gold badges8 silver badges22 bronze badges
7022 gold badges8 silver badges22 bronze badges
add a comment |
add a comment |
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.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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