小编Jer*_*oen的帖子

Magento选项卡更改/重定向

我有一个带有两个选项卡的页面,一个搜索选项卡和一个带有数据库网格的选项卡.在用户编辑网格中的一个项目之后,我想将它们保留在网格选项卡上,而不是首先按顺序排列的表单选项卡.

有没有办法通过代码更改页面上的活动选项卡?

这是选项卡的代码:

protected function _beforeToHtml()
{
    $this->addTab('search_string', array(
        'label'     => Mage::helper('advancedtranslate')->__('Find a string'),
        'title'     => Mage::helper('advancedtranslate')->__('Find a string'),
        'content'   => $this->getLayout()->createBlock("advancedtranslate/adminhtml_advancedtranslate")->toHtml(),
        'active'    => true
    ));

    $this->addTab('list_untranslated', array(
        'label'     => Mage::helper('advancedtranslate')->__('Untranslated strings'),
        'title'     => Mage::helper('advancedtranslate')->__('Untranslated strings'),
        'content'   => $this->getLayout()->createBlock("advancedtranslate/adminhtml_grid")->toHtml(),
        'active'    => false
    ));

    return parent::_beforeToHtml();
}  
Run Code Online (Sandbox Code Playgroud)

这是我的控制器中的saveAction处理重定向:

public function saveAction(){
    //write data away to core_translate table
    $resource   = Mage::getResourceModel('core/translate_string');

    $request              = $this->getRequest();
    $translate_id         = $request->getParam('id');
    $original             = $request->getParam('original_translation');
    $custom               = $request->getParam('string');
    $locale               = $request->getParam('locale');
    $storeId              = $request->getParam('storeid');
    $storeViewSpecific    = $request->getParam('storeview_specific'); …
Run Code Online (Sandbox Code Playgroud)

tabs redirect magento

4
推荐指数
2
解决办法
3968
查看次数

SugarCRM帐户联系人关系REST API

在SugarCRM 6.0.0中,我需要通过REST webservices API在Account和Contact之间建立关系.

我已经尝试过这两种方法(帐户 - >联系人,联系人 - >帐户)无济于事:

$method = 'set_relationship';
$params = array(
  'module_name' => 'Accounts',
  'module_id' => $accountId,
  'link_field_name' => 'accounts_contacts',
  'related_ids' => array($userId)
);

$method = 'set_entry';
$params = array(
  'module_name' => 'Contacts',
  'name_value_list' => array(
      array('name' => 'id', 'value' => $userId),
      array('name' => 'accounts_contacts', 'value' => $accountId),
    ),
);
Run Code Online (Sandbox Code Playgroud)

许多搜索只给我这些方法或SOAP解决方案.谁可以指出我正确的方向?

php rest web-services sugarcrm

4
推荐指数
1
解决办法
4096
查看次数

PhpStorm"将编辑器与视图同步"

我最近从Netbeans转到了PhpStorm.

只有我缺少并且似乎无法找到的是Netbeans调用的函数"Synchronize editor with views".此功能突出显示您在文件树浏览器的编辑器选项卡中打开的文件.

当在标签之间切换时,我发现在包含很多文件(如Drupal或Magento项目)的项目中非常方便.使得找到您正在编辑的文件的相关文件变得更快.

显然,问题是PhpStorm是否拥有它,我在哪里可以找到它?

ide netbeans phpstorm

4
推荐指数
1
解决办法
1122
查看次数

标签 统计

ide ×1

magento ×1

netbeans ×1

php ×1

phpstorm ×1

redirect ×1

rest ×1

sugarcrm ×1

tabs ×1

web-services ×1