Questions tagged [event-observer]

Event/observer is used to work dynamically with Magento without altering the core code.

Filter by
Sorted by
Tagged with
0
votes
0answers
52 views

Magento 2 : Stock Inventory Save After Observer - Issue

This observer triggered only when Quantity is out of stock or when we save the Quantity. Is there any other Observer event in Magento when the Quantity get Change while creating an order from the ...
0
votes
0answers
9 views

I need to change customer group when user logs in via specific link

I need to link already registered user to the customer group. I'm trying to solve it using event and observer. User will receive a link and logging in using the present link, the customer will be ...
0
votes
1answer
88 views

Magento2 : Product not saving set custom attribute using Observer

I want to set Discount on my product after Save product so I'm using catalog_product_save_after then I am creating an attribute 'discount' and set the calculated value, but when i save the collection ...
0
votes
1answer
48 views

what is the use of _merge_before and _merge_after event in Magento 2

I want to know the difference between following Magento 2 events 1)sales_quote_add_item 2)_merge_before 3) _merge_after and how I can use the event in event.xml sales_quote_add_item and ...
0
votes
1answer
169 views

Magento 1.9 - How to Override/Rewrite Third party Module?

I am using this extension for Extra Fees, I did some override/rewritein this file in magento (app/code/local/Voronoy/ExtraFee/Model/Quote/Address/Total/Fee/Rule.php). FYI -> The override/rewrite ...
0
votes
2answers
190 views

What event should I use for Customer delete observer in Magento 2.3?

I'm very new to Magento 2.3, so I can't find a list of all the events that are related to user accounts. I need to create observers for user deleted, user updated (any information in account) and user ...
0
votes
3answers
80 views

Magento 1.9 Obsever testing failed - Mage::log not generated

My observer : <?xml version="1.0"?> <config> <modules> <Gta_ExtraFeesRemove> <codePool>local</codePool> <active>true</...
0
votes
1answer
81 views

How to get the name of the triggered event? [closed]

How to self check what event i am using, my event : <checkout_cart_product_add_after> how to print, i tried : $event = $observer->getEvent()->getName(); Mage::log($event, null, '...
3
votes
2answers
221 views

How do I create an events observer that only calls when the REST API dispatches events?

I just want to call an event observer when the event is dispatched via the REST API. Like if an order is placed from a mobile application, only then the sales_order_save_afterObserver should be called....
0
votes
0answers
39 views

Magento 2 : Change product price while moving to cart event and observer

I have created a custom module but moving to cart I want to add a custom price which event i can use to change the price how to change product price while moving to cart event and ...
0
votes
0answers
32 views

How to Restrict product add-to-cart if cart has specified category of products?

If my cart consists category id = 4 products, no other products eligible to add-to-cart, how to restrict by using anything, i tried using observer it not work.Please any one help.
0
votes
1answer
38 views

How can i call editPost controller after an observer(checkout_onepage_controller_success_action) Magento 2

I have to save the account edit with customer default shipping address details. After the successful order placement. I have created the observer but not sure how to call editPost of the customer ...
0
votes
1answer
61 views

Magento 2 : Separate home page for logged in and guest user [closed]

I want to show different home page for logged in user, Which event/plugin I can use for this ? Whenever logged in customer clicks on homepage he should be redirected to different url Logged-in ...
0
votes
1answer
54 views

Observer throw Exception message without loading logic

Observer : public function cartevent(Varien_Event_Observer $observer) { // Load product $product = $observer->getProduct(); $prodID = $product->getId(); $...
0
votes
2answers
67 views

Magento 2 :- how to get email address in sales_quote_address_collect_totals_before events

How to get email address in sales_quote_address_collect_totals_before events guest user email address. <?php namespace xxxxxx\xxxx\Observer; use Magento\Framework\Event\ObserverInterface; ...
1
vote
1answer
235 views

Magento 2 How to notify user when it's customer group has changed?

I want to find a solution for sending an email to the customer when the administrator in backend changes its customer group. I have 3 customer groups, each one has different discounts in the store, so ...
0
votes
2answers
158 views

Observer Mage::throwException error - status 503 error

I just want to restrict some of the category of products to purchase with other category products, Workout : If customer click add to cart using observer compare current add-to-cart product ...
0
votes
1answer
44 views

Event for Add to Wishlist button in Magento2

I want to redirect User to Observer on Add to Wishlist Click i want this for guest users Example if customer is not logged in then it must redirect user same page So far i have tried Following ...
0
votes
2answers
160 views

Magento 2 How to update SKU after saving product from admin panel?

I want to update product sku after save product. I had used this event :- catalog_product_save_after In Observer, public function execute(\Magento\Framework\Event\Observer $observer) { ...
3
votes
4answers
356 views

Magento 2 Is it possible to use same event in multiple Modules?

I wanted to use catalog_product_save_after event in 2 different modules, Is it possible to use it? Please help me!
0
votes
0answers
39 views

How to load category (selected id's) in observer

In my observer, i need to load my selected category id's & selected website, workout: $category_products = Mage::getModel('catalog/category') ->addAttributeToFilter('category_id', array(...
0
votes
0answers
22 views

how to get guest email address in CollectTotalsObserver page in magento 2

how to get a guest email address in CollectTotalsObserver page in Magento 2. public function execute(\Magento\Framework\Event\Observer $observer) { /** @var \Magento\Quote\Api\Data\...
0
votes
2answers
91 views

Restrict products to purchase using Observer not trigger

Condition: I have restricted category of products [category id = 680, 894, 895], this category of products should be purchase alone, not mixed with other products. Workout: Case 1: If cart had other ...
0
votes
2answers
76 views

How to get Categories of products In Observer?

I need to add a condition for my category in the observer, how can I call category?
0
votes
1answer
44 views

Add to cart before Magento 1 - Cancel adding

I am creating an observer to cancel the addition to the cart with add_to_cart_before. Here is my config.xml Module_Stockespagne_Model ...
0
votes
2answers
46 views

Event when order created from backend

I've used sales_order_place_after to get order id after order placed from backend but it doesnt return order id. Not sure what's missing here. Here's my observer public function execute(\Magento\...
0
votes
2answers
96 views

Magento 2.3: How to get tracking info from an order in observer

We use ShipStation to send tracking information to Magento and I'm trying to retrieve the order shipping / tracking information once this is saved to the order. If I use ...
1
vote
0answers
144 views

How to extend store credit functionality in Magento 2 Enterprise Edition

I want to add amount as store credit by: -> API -> Using Payment Method By default store credit is added when we redeem gift card. But my requirement is to add store credit directly by customer ...
0
votes
0answers
56 views

magento 1.9 | what event-observer used when product was sold

I can't figure out which one i need to use events, when product was sold (when was the payment)? Please tell me what I need to use.
0
votes
1answer
115 views

Magento 2 get customer old and new data on save customer button in admin backend

I am working on Admin Actions Log Extension. For the reference i am using link below https://amasty.com/admin-actions-log-for-magento-2.html I want to get old and new data of customer while we save ...
0
votes
2answers
196 views

Magento 2 how to get Postcode from billing address in observer?

I cannot get the postcode from Users's billing Address,this is my code, everything works fine except for the postcode, which i'm not able to pull. $objectManager = \Magento\Framework\App\...
1
vote
2answers
95 views

How to get customer id , customer firstname with customer_account_edited event ? Magento2

event.xml <?xml version="1.0" encoding="UTF-8"?> <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Event/etc/events.xsd">...
0
votes
0answers
31 views

How to create an event-observer that will help print a log when admin modifies some customer details?

I want to design an event and an observer that will print a separate log containing the details of the fields that was modified by the admin in admin panel (under all Customers -> edit). How can I ...
3
votes
1answer
29 views

Magento 2 - Event Observer for user has downloaded downloadable product

I want to fire an action when a user has downloaded a downloadable product (i.e. they have clicked the link for the download). I don't know what event I should be observing to do this. I tried to ...
2
votes
1answer
85 views

Magento 2 Looking for configuration saved event

I'm trying to write something that automatically clears cache on magento, when user hits Save, on any pages under Backend / Stores / Configuration. I'm only looking for the proper event to hook into ...
0
votes
1answer
48 views

Error when observer is executed after order is placed

I created a module in order to save order data to a custom table: <?xml version="1.0"?> <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="...
0
votes
2answers
250 views

Item not deleting from quote in Magento2

I have used observer to delete the quote item. Used this event controller_action_predispatch_checkout_index_index This is the code of my etc/events.xml. <event name="...
0
votes
1answer
37 views

Magento Observer to block spam orders not working

I'm facing some issues with orders placed by bots. I noticed that all orders are made by a specific phone number and also by a specific street. So I looked for a way to block orders that are made ...
0
votes
1answer
214 views

Newsletter subscribe/unsubscribe email notification event observer

I am writing my own admin email notifications module. So far it has New Order and Low Stock observers set up and working just fine. I want to add the Newsletter subscribe/unsubscribe observer to it ...
0
votes
2answers
265 views

Get product custom attribute in observer that listens to x specific event

Anyone know how to get product custom attribute in observer? In my case event is controller_action_predispatch_checkout_cart_add. My current code is giving me: Uncaught Error: Call to a member ...
0
votes
1answer
89 views

Creating event and observer for an action at backend of Magento 2 [duplicate]

How to create an custom event and observer for that event at backend in Magento2. For example I want to create an event that whenever an admin deletes a customer profile a separate log file is ...
0
votes
1answer
35 views

What are the three different kinds of Plugins available and their difference with observer in magento2?

I want to know the different kinds of plugins, their utilities and difference along with their difference with observer in magento2.
2
votes
1answer
74 views

Magento 2 “Area code not set” warning in Observer from module

I get "Area code not set error" when my observer executes. What can I do? Code: <?php namespace MyCompany\MyModule\Observer; use Magento\Framework\Event\ObserverInterface; use \Magento\...
2
votes
2answers
53 views

Observer to fire on customer login Page Url (baseUrl.“customer/account/login”) magento 2

I want to fire observer on customer login Page url(baseUrl."customer/account/login") magento 2. I tried customer_login event but it's firing after customer login. etc/events.xml <?xml version="...
0
votes
1answer
35 views

Get Invoice id when create invoice

Magento version is 2.3.2 I use the sales_order_invoice_register event to send the invoice id to the third party API when create the invoice. My code in the observer is : $invoice = $observer->...
0
votes
1answer
42 views

what is the event for this product price print in home page in magento 2

when i open that Lenovo storage 1.2 T product I customized the product price by this event 1)catalog_product_get_final_price 2)catalog_product_collection_load_after 3)...
0
votes
2answers
35 views

How to get customer data from a table before logging in? magento2

I need to check the status of the client (user data), if it is not active then ignore the login to the system
1
vote
1answer
59 views

How to save custom value in sales_flat_order_grid on order placement?

I have to save the stock of each product when an order is placed. The custom module is Tbb_StockRegistrar. It creates a column called order_stock_message in sales_flat_order and ...
0
votes
3answers
157 views

Add BCC in Shipment Email Magento 2

Is there any Event or Observer to Add BCC in Shipment Email Programmatically Task Is Shipment Mail Send 2 Person 1st is customer and 2nd is dynamic email Please Provide me Suggestion How To Add ...
3
votes
2answers
213 views

How to remove simple product from cart by observer programmatically in magento 2.2?

I'm facing problem, I have added total 5 items in cart where 3 items are different colors of same configurable product and other 2 is simple products. When i try to remove simple product from cart by ...

1 2 3 4 5 38