Magento链接到另一个模块

时间:2013-02-11 14:17:59

标签: magento

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

我在自定义模块上的magento网格上有一个链接,如上所述。我想将字段重定向到Orders选项卡上的特定条目,但我生成的url如下:

/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

1 个答案:

答案 0 :(得分: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