1

I want an order Id (not Increment Id) and quote after redirecting back from PayPal to my store.

For this purpose I am using sales_order_place_after event. But this event does not return order Id but getting an quote properly.

So is there any other events which I can use to satisfied my requirement ?

1 Answer 1

0

Using the sales_order_place_after is the right idea in my opinion.

To get the order Id you can do:

$order = $observer->getOrder();
$orderId = $order->getEntityId();

To get the quote id from this order you can then do:

$quoteId = $order->getQuoteId();

If you need full details of the quote and assuming you're using Magento 1 you can then call:

$quote = Mage::getModel('sales/quote')->load($quoteId);
7
  • I am not getting EntityId also :(
    – Krupali
    Jun 20, 2016 at 11:21
  • @Krupali what about $order->getId() ? Jun 20, 2016 at 11:23
  • I try that very first.But not getting.
    – Krupali
    Jun 20, 2016 at 11:25
  • Is it good to use "checkout_onepage_controller_success_action event" ?
    – Krupali
    Jun 20, 2016 at 12:57
  • Can I use "paypal_express_place_order_success" event ?
    – Krupali
    Jun 21, 2016 at 11:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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