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
<controller_action_predispatch_checkout_onepage_index>
<observers>
<hackathon_presentation>
<type>singleton</type>
<class>modulename/observer</class>
<method>salesCollectBefore</method>
</hackathon_presentation>
</observers>
</controller_action_predispatch_checkout_onepage_index>
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(
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'].
)
);
$item->addOption(
array(
'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...