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\...
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"?>
<...
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 ...
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 ...
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 ...
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 ...
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 ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
event-observer × 2159magento2 × 828
magento-1.9 × 472
module × 121
magento-1 × 120
orders × 109
checkout × 100
product × 96
cart × 94
sales-order × 91
customer × 86
magento-1.7 × 82
magento-1.8 × 72
php × 64
magento-2.1 × 63
plugin × 61
magento2.3 × 59
quote × 57
addtocart × 55
layout × 47
redirect × 46
adminhtml × 43
admin × 41
price × 40
product-attribute × 36