0
votes

I am new to Magento.I have extended core module Mage: checkout/cart to add to cart with multiple options of product. How can I use the observer with the following event : controller_action_predispatch_checkout_cart_add

My code:

config.xml

<controller_action_predispatch_checkout_cart_add>
            <observers>
                <flycart_disable_shopping_cart_page>
                    <type>singleton</type>
                    <class>flycart/observer</class>
                    <method>cartAdd</method>
                </flycart_disable_shopping_cart_page>
            </observers> 
        </controller_action_predispatch_checkout_cart_add>

file Observer.php

    <?php   class Custom_Flycart_Model_Observer{    
public function cartAdd(){
    // CODE Here    }
        }?>

How to can I get multiple product in array post: This is post

enter image description here

I don't know how to use observers in the Magento.

1

1 Answers

0
votes

Use Mage::app()->getRequest()->getParams() in our Observer.php file

It will return array of all parameters sent to called controller's action

Hope this helps you