3
$fieldset->addField('orderinfo', 'link', array(
      'label'     => Mage::helper('web')->__('Order Info'),
      'style'   => "",
      'href' => "*/".$url,
      'value'  => 'Magento Blog',
      'after_element_html' => '',
    ));

I have a link on my magento grid on a custom module as specified above. I want to redirect the field to a specific entry on the Orders tab but the url that I have generated is as follows:

/web/adminhtml_web/edit/id/67/key/62bc32b0168b446663ef7632a57a903a/*/admin/sales_order/view/order_id/47/key/f0ca76e31666c5bc62d802b0ff8404f4

And I wanted to have something like this, the existing url would be:

/web/adminhtml_web/edit/id/67/key/62bc32b0168b446663ef7632a57a903a

and the link URL would be

/admin/sales_order/view/order_id/47/key/f0ca76e31666c5bc62d802b0ff8404f4

1 Answer 1

2

This should work fine :

$fieldset->addField('orderinfo', 'link', array(
      'label'     => Mage::helper('web')->__('Order Info'),
      'style'   => "",
      'href' => Mage::helper('adminhtml')->getUrl('adminhtml/sales_order/view', array('order_id' => 47)),
      'value'  => 'Magento Blog',
      'after_element_html' => '',
    ));
0

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.