Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

Event dispatch requests
 
manup
Jr. Member
 
Total Posts:  12
Joined:  2008-07-30
Trivandrum
 

I also need an event when Administrator logout

 
Magento Community Magento Community
Magento Community
Magento Community
 
magestore
Mentor
 
Avatar
Total Posts:  1015
Joined:  2009-08-07
Viet Nam
 

Thanks for sharing the event list. It helps me too much.
I hope Magento core team will input more event in the next release.

 
Magento Community Magento Community
Magento Community
Magento Community
 
brucecaine
Jr. Member
 
Total Posts:  15
Joined:  2010-10-08
 

Will these effects be elicited even during product meaning process? say, will ‘catalog_product_save_after’ be raised later on importation the production using bulk import functionality?

 
Magento Community Magento Community
Magento Community
Magento Community
 
ShopGuy
Guru
 
Total Posts:  462
Joined:  2008-09-07
 

A hook right after a transactional email is sent would be nice in order to log all emails that magento sends.

 
Magento Community Magento Community
Magento Community
Magento Community
 
norbertwarne
Jr. Member
 
Total Posts:  15
Joined:  2010-10-13
 

Will these effects be produced even during product meaning process? say, will ‘catalog_product_save_after’ be raised after importing the product using bulk meaning functionality?

 
Magento Community Magento Community
Magento Community
Magento Community
 
darylnelson
Jr. Member
 
Total Posts:  15
Joined:  2010-10-23
 

I want an still all time a “transactional email” is sent out.  At least the newly order and order modify e-mails.

 
Magento Community Magento Community
Magento Community
Magento Community
 
decoryourbody
Jr. Member
 
Total Posts:  3
Joined:  2010-10-25
 

How do I create my own event?

I want to do something similar to cron.php, but I don’t know how to initialise Mage class before calling Mage::dispatchEvent(’my_event’);

Thanks!

 
Magento Community Magento Community
Magento Community
Magento Community
 
lakirarodricks
Jr. Member
 
Total Posts:  7
Joined:  2010-10-28
 

If these events occur during the process of importing the same products? to say, catalog_product_save_after raised after the product is imported with the import function block

 
Magento Community Magento Community
Magento Community
Magento Community
 
kiminox
Jr. Member
 
Total Posts:  2
Joined:  2010-05-24
 

Hi,

After reading your posts, I tried to implement an observer to fire an event BEFORE the user login.
I explain:
I have a forum and blog, using another framework.
I want the visitor to log only once: blog, forum or eshop.
And then, he will be logged for other areas.
Example: I am browsing the forum and I login into the forum. Then, when I open the shop, I am already logged in. And same thing for the opposite way.
It works but just one problem: when I logged into the forum/blog and if I open the shop, I need to refresh the page to see that I am logged.
Actually, it’s the same behavior than the standard Magento logout process: if you click on the link “logout” of your Magento shop, you will still see that you are logged in. There’s a redirection/refresh to the homepage and then you see the message that you are logged out.
Here is my code:
app/code/community/Fanxiang/UC/etc/config.xml:

[...]
<events>
<
http_response_send_before>
    <
observers>
        <
UC>
            <
type>model</type>
            <class>
Fanxiang_UC_Helper_Data</class>
            <
method>ucSynlog</method>
        </
UC>
    </
observers>
</
http_response_send_before>
</
events>
[...]

and:
app/code/community/Fanxiang/UC/Helper/Data.php

class Fanxiang_UC_Helper_Data extends Mage_Core_Helper_Abstract
{
     
public function ucSynlog($observer){
        
if(!empty($_COOKIE['Example_auth'])){
            
list($Example_uid$Example_username) = explode("\t"uc_authcode($_COOKIE['Example_auth']'DECODE'));
            list(
$Example_uid$Example_username,$email)        =uc_get_user($Example_username);
            
$customer Mage::getModel('customer/customer')->setWebsiteId(Mage::app()->getStore()->getWebsiteId())->loadByEmail($email);
            
Mage::getSingleton('customer/session')->setCustomerAsLoggedIn($customer);
        
else {
          Mage
::getSingleton('customer/session')->logout();
        
}
        Mage
::log(time(), null"logfile.log"); 
     
}
}

PB: I’d like to avoid to refresh the page to see that I am logged in.
Any idea or help is welcomed!

Yoong

 
Magento Community Magento Community
Magento Community
Magento Community
 
Ben Marks
Moderator
 
Avatar
Total Posts:  452
Joined:  2008-10-09
Charleston, SC
 

For all who are observing this topic: it goes without saying that in your custom module you can extend core Magento methods and dispatch your own event. Many know this and are already doing this, but for those of you who are new to Magento, this is easy enough to accomplish.

Ben

 
Magento Community Magento Community
Magento Community
Magento Community
 
Reindl Bernd
Jr. Member
 
Total Posts:  1
Joined:  2010-08-19
 

Hello Community,

i have tryed to use the customer_save_before Event to validate the Tax/VAT (Ust.-ID in German) via a SOAP call to hte MIAS-Database.

if it is valid the observerfunction returns nothing and the save proccess continues

if it is not valid an Exception was thrown with a Message that the validation is falied.

This is runing perfect at the frontend but in the backend it fails because the app/code/core/adminhtml/controlers/CustomControler.php saves the data in row 262 ("Mage::getSingleton(’adminhtml/session’)->setCustomerData($data);").

After the redirect the function editAction was called and in row 108 a loop adds the addresses to the customer object. But this fails because the customer allready have the address with the id.

Is there an other way to stop the save proccess after validation?

My code

class TM_UIDCheck_Model_Observer
{
    
public function customerSaveBeforeEvent($observer{        
        $UIDCheckHelper 
Mage::helper('UIDCheck');        
        
$addressHelper Mage::helper('customer/address');
        
$event $observer->getEvent();
        
$customer $event->getCustomer();
        
        if(
$addressHelper->getConfig('taxvat_validate') == && $addressHelper->getConfig('taxvat_show') == 'req' && !$customer->getData('taxvat'))
            throw new 
Exception($UIDCheckHelper->__('Please enter a VAT-Number!'));
            
        if(
$addressHelper->getConfig('taxvat_validate') == && ($addressHelper->getConfig('taxvat_show') == 'req' || ($addressHelper->getConfig('taxvat_show') == 'opt' && $customer->getData('taxvat'))))
        
{
            
try
            
{
                $taxvat 
$customer->getData('taxvat');                
                
$countryCode substr($taxvat02);
                
$vatNumber substr($taxvat2);
                
                
$validator = new Zend_Soap_Client("http://ec.europa.eu/taxation_customs/vies/checkVatService.wsdl", array('encoding' => 'UTF-8'));
                
                
$result $validator->checkVat(array('countryCode' => $countryCode'vatNumber' => $vatNumber));
                if(
$result->valid)
                    return;
            
}
            
catch(Exception $e{ }            
            
throw new Exception($UIDCheckHelper->__("'%s' is not a valid VAT-Number!"$customer->getData('taxvat')));        
        
}
    }

}

PS: Excuse my bad English smile

best regards

Reindl Bernd

 
Magento Community Magento Community
Magento Community
Magento Community
 
danshields
Member
 
Total Posts:  32
Joined:  2009-03-11
 

It would be nice to have hooks into after each step of the checkout process. Right now there is only one after the shipping method save and order complete but there should be one for after billing, shipping and payment.

 
Magento Community Magento Community
Magento Community
Magento Community
 
wolvax
Jr. Member
 
Total Posts:  9
Joined:  2011-01-13
 

I need an event every time a “transactional email” is sent.

 
Magento Community Magento Community
Magento Community
Magento Community
 
kamaljoshi
Member
 
Avatar
Total Posts:  46
Joined:  2011-01-11
Ahmedabad
 

Hey guys,

I am creating a custom payment module in which every consumer has its own account in which some amount is given to him , if consumer wish to pay by that account then amount will be deduct from that. Now i have created that payment module in which user can specify amount that what amount should be deduct from his account. In this module when user presses place order button at that time authorize method is called, if authorization is completed then quote is converted to payment but now i want to make changes to this, now the amount calculation should done after this. I dont know how to make this happen.

REGARDS,
KAMAL JOSHI

 
Magento Community Magento Community
Magento Community
Magento Community
 
kamaljoshi
Member
 
Avatar
Total Posts:  46
Joined:  2011-01-11
Ahmedabad
 

Sorry guys,

Its done. Actually i think that any event generated there, i have to change it but its done without overriding it. I am confused what instance i m getting there.

REGARDS,
KAMAL JOSHI

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top