Skip to main content
1 vote

Magento2 | Recover order increment id from Observer of an Reorder

you can get order id and quote id on reorder like that <event name="sales_convert_order_to_quote"> <observer name="giftmessage" instance="Magento\GiftMessage\...
Kareem k's user avatar
  • 304
1 vote

Magento 2 : Create event observer when order placed and updated

For new order place you can use this event "sales_order_place_after" Step 1: Create events.xml file at app\code\Vendor\Extension\etc\events.xml <?xml version="1.0"?> <...
Dhiren Vasoya's user avatar
1 vote
Accepted

Magento2: Issue with the customer custom attribute and custom tab in product view

The code seems to be fine. However, there may be a problem with the customer attribute value, possibly resulting in a consistent false value being returned. It is advisable to verify/output the value ...
Deepak MageDivine's user avatar
1 vote

Change layout based on url parameter - Magento 2.4

You are better off creating separate pages for each use case as changing layout in observer that is run on server side doesn't work when there is cache involved. The observer would not run for cached ...
Vivek Kumar's user avatar
  • 5,715
1 vote

Is there an event or plugin spot for when cart rule is no longer valid?

The salesrule_validator_process event that you mentioned is a good start. You can observe this event and check if the applied rule is still valid. You may need to inspect the coupon code and its ...
Divyarajsinh Barad's user avatar
1 vote

How to call an observer from custom module: Magento 2

If you have a function in your observer that needs to be used in other parts of your code, a better practice would be to move that function into a helper class or a model, depending on what the ...
Jigar Karangiya's user avatar
1 vote

Magento2: redirection from Observer

After many solutions tried I found one working code. Here I used the controller_action_predispatch_cms_page_save event which is working fine. <?php namespace VendorName\ModuleName\Observer; use ...
Msquare's user avatar
  • 9,268

Only top scored, non community-wiki answers of a minimum length are eligible