I have to change Customer Group.

Once Customer has purchased X Product & Order Status is Completed. In Order apart from X Product if there are any other products then no issue.

Don't wanna use Cron Job. Can manage through Observer?

On Admin Side Once we Click on "Ship", it changes Status to "Completed". So need to execute the event on click of that?

Which Event needs to Call?

Followed below links

Change customer group upon buying a specific product




1 Answer 1

  • From Admin By clicking on "Submit Shipment" it's not calling
    – Jackson
    Nov 25, 2016 at 6:37
  • You catch sales_order_shipment_save_after? Nov 25, 2016 at 6:40
  • <event name="sales_order_shipment_save_after"> <observer name="change_user_Group" instance="Custom\Module\Observer\ChangeUserGroupObserver" /> </event> i have created file in my custom module located @ magento\app\code\Custom\Module\etc\adminhtml\events.xml
    – Jackson
    Nov 25, 2016 at 6:42
  • Try to get some info: $shipment = $observer->getEvent()->getShipment(); /** @var \Magento\Sales\Model\Order $order */ $order = $shipment->getOrder(); Nov 25, 2016 at 6:48
  • @AnkitShah You can get the shipment info? Nov 26, 2016 at 10:04

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.