Questions tagged [event-observer]

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

Event/observer is used to work dynamically with Magento without altering the core code. Magento uses some default events to increase the core system elasticity. Moreover, it allows to dispatch custom events to work dynamically. Every event has its observer, where you handle the system in your own way.

2158 questions
19
votes
3 answers

Redirect from Observer

I am creating a module that needs to do a check right before payment is made. If the check fails, it needs to forward the user to the cart with an error. I have an observer and have verified that it is loading and executing. Right now, I…
Jamersan
  • 321
  • 1
  • 2
  • 6
6
votes
1 answer

Observer for Attribute Save After, Delete

I know Observer for Attribute Set Save After is eav_entity_attribute_set_save_after . But I couldn't figure out if there is an observer for save attribute after and delete attribute after?
amitshree
  • 7,006
  • 12
  • 63
  • 116
5
votes
1 answer

Getting Product Price Null At Observer

I have a problem with my observer. I want to apply a discount on the before product add to cart event, but I am getting all price set as null. My observer code is: public function applyCartDiscount(Varien_Event_Observer $observer) { $item =…
Zahirabbas
  • 2,073
  • 3
  • 24
  • 48
4
votes
1 answer

Where is 'catalog_product_save_before' dispatched?

I'm struggling to find the dispatch event for thecatalog_product_save_before. I've done a find of my entire project on the following search term: catalog_product_save_before. It's only found in 3rd party modules. I'm looking to utilise this event,…
Dan Hanly
  • 724
  • 7
  • 27
3
votes
1 answer

How do I make sure that my extension’s observer is called last of all observers registered for the same event?

Each extension can add observers, so one can end up with multiple for the same . Sometimes I need to be sure that all essential data is initialised when my observer function kicks in. So I want my observer to be called last of the…
fris
  • 894
  • 6
  • 19
3
votes
2 answers

Observer not working

I can't get an observer working, I'm using a fresh Magento install of 1.9.10. My namespace: TM My module: ProductConditions app/etc/modules/TM_ProductConditions.xml:
Mex
  • 386
  • 1
  • 6
  • 16
3
votes
2 answers

sales_order_creditmemo_save_after triggers sales_order_invoice_save_after

I have an observer listening for events that fire sales_order_creditmemo_save_after. The issue I have is that when a credit memo is saved on the invoice, the sales_order_invoice_save_after event is also fired - which causes issues with my code,…
Francis Kim
  • 2,973
  • 8
  • 41
  • 67
2
votes
2 answers

Magento Events 'catalog_product_get_final_price' not working?

below is my config.xml file code. 0.0.1
Renish Khunt
  • 349
  • 1
  • 6
  • 18
2
votes
3 answers

Filter Payment Method besed on Shipping Method

I develop observer method in Magento for filter payment methods based on shipping methods. This is my method: class Devpassion_Paymentfilter_Model_Observer { public function paymentMethodIsActive(Varien_Event_Observer $observer) { $event …
srdan
  • 348
  • 3
  • 13
2
votes
1 answer

How can I request a external website with my data in observer and get back the response?

Actually am getting my total amount of product in Observer of event sales_order_invoice_save_after Now I need to place this amount in a url and access the particular url and get back the response. How can be it done? And also in this observer how…
Bicky
  • 33
  • 2
2
votes
1 answer

Custom event in an observer

Somebody suggested that I create a custom even within an observer to stop my first observer from holding up the event i.e. the event should occur whether or not the processes inside the observer have completed. It seems a strange idea. I don't know…
user
  • 141
  • 3
  • 10
2
votes
2 answers

Help with a event handler that doesn't fire

HALP! This is my first attempt at this kind of thing. It seems that the function won't fire when the event happens. (Eventually, what's supposed to happen is that when the event…
gnicko
  • 400
  • 3
  • 20
2
votes
2 answers

Help with Mage::app()->getStore($store_code)->getId()

I have been getting this error in my log for a while, the code is just below. Can anyone explain to me what happens at (line 27 ) $allowed_method_codes ? Specifically in get getActiveMethods(Mage::app()->getStore($store_code)->getId()). Whats it…
James
  • 21
  • 1
2
votes
1 answer

Event Observer Module for Upsell

I have created a event observer module that will trigger and remove any product that is out of stock from Upsell, but for some reason it is removing the products that are in stock. I have included the module code below and let me know if I am…
Kevin S
  • 169
  • 2
  • 7
  • 25
2
votes
3 answers

Get Product id before save event in observer

how can I get product id from new product before save event.I have used below code but it will create blank product in database every time. $newProduct = $product->duplicate(); echo $product_id = $newProduct->getId(); any other way to get product…
Zahirabbas
  • 2,073
  • 3
  • 24
  • 48
1
2 3 4