I want to add custom option type as image to quoteitem in checkout review page using observer which observer event is controller_action_predispatch_checkout_onepage_index and it fires when goes to checkout page.

In event call in config.xml


and then in my Observer.php

public function salesCollectBefore($observer)
    $quote_items = $quote->getItemsCollection();
        foreach ($quote_items as $item) {
        $customisation['upload_logo'] = "test.png";
            $additionalOptions = array(
                    'code'  => 'my_code',
                    'label' => 'Logo',
                    'print_value' =>  '<a href="'.Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA).$customisation['upload_logo'].'">'logo'</a>',
                    'option_value' => '<a href="test">'.$customisation['upload_logo'].'</a>',
                    'value' => $customisation['upload_logo'].
                     'code'  => 'additional_options',
                     'value' => serialize($additionalOptions),


It does not allow me to show as a link to download the image, It shows only the image name . I want to add the image link in order review page and it should be downlodable from the link. How can I achieve this. Can anyone help here? Plz...

  • how does the template work? Apr 10, 2015 at 7:14
  • 1
    There is no custom template for module. Default magento template works here.
    – SIBHI S
    Apr 10, 2015 at 9:22

1 Answer 1


controller_action_predispatch_checkout_onepage_index event does not given the Current Quote object as it params.

If want current quite on this event this ,you need to call





public function salesCollectBefore($observer)
    /* add this */   
    $quote_items = $quote->getItemsCollection();

So,you cannot get Currentquote object from $observer.As per as magento controller_action_predispatch_checkout_onepage_index event current.

from this event you can only get onepageController object

   Mage::dispatchEvent('controller_action_predispatch_' . $this->getFullActionName(),
            array('controller_action' => $this));

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.