Home > magento > Magento – get at $_POST inside module Observer.php

Magento – get at $_POST inside module Observer.php

Interesting dilemma, the module observer is getting triggered off a _before_save event, so the $observer passes in the save event that is internal to magento, not off a controller action. So how to get at the $_REQUEST variables? Well… the right way, I mean, of course we could go over Magento’s head to the global vars. But let’s keep things nice and neat.

To get at the request variable use this:

Mage::app()->getFrontController()->getRequest()->getParam('default_shipping', false);

Needless to say, I’ve been playing around, customizing the address book feature of magento.

Advertisements
Categories: magento Tags: ,
  1. June 25, 2010 at 12:12 pm

    EOS Web has extensive expertise in magento commerce websites.
    They have many modules for FREE in your web site http://www.eoswebdevelopment.com/magentocommerce/en/
    Take a few minutes and look at this page.

    Enjoy !

  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: