1

I have download an open source extension to allow mobile login.

             <events>
                <customer_save_before>
                    <observers>
                    </observers>
                </customer_save_before>
            </events>

Is it possible to know the from the observers function to know that this event is from checkout "Place Order", I need to do some special event only if it is "Place Order"

or

any event only apply for customer registration? customer_save_before will execuse for registration / checkout.

  • Since observers are singletons by default you can set a flag in the first method that fires then check it in the second method (eg. Order place). Not sure of the order of the events but you could find out by looking at the checkout model – Robbie Averill Jun 23 '16 at 12:44
1

This is how I solved my problem

$current_url = Mage::helper('core/url')->getCurrentUrl();

//check if this is from place order then skip the below skip
if (strpos($current_url, 'checkout/onepage/saveOrder/form_key') === true)
{
    echo "from checkout";
}
0

You should try from following

checkout_submit_all_after or 
sales_order_place_before or
checkout_submit_all_after or
controller_action_predispatch_checkout_onepage_saveBilling or
sales_quote_collect_totals_before

it might help you

Thanks

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.