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

我在上面指定的自定义模块上的 magento 网格上有一个链接。我想将该字段重定向到“订单”选项卡上的特定条目,但我生成的网址如下:

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

我想要这样的东西,现有的网址是:

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

链接网址是

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

1 回答 1

0
$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' => '',
));

来自:https ://magento.stackexchange.com/questions/665/magento-link-to-another-module?answertab=active#tab-top

于 2013-02-11T15:25:30.270 回答