1

テスト用のモジュールを作成し、URL から redme アクションを呼び出そうとしました。すべての構成がすべて完了し、すべて正常に動作しますが。私のredmeアクションmagentoでは、別のページにリダイレクトされません

<?php

class Test_Demo_IndexController extends Mage_Core_Controller_Front_Action
{

    public function indexAction()
    {
        $this->loadLayout();     
        $block = $this->getLayout()->createBlock('capacityweb/Test','Test',array('template' => 'capacity/web/test.phtml'));
        $this->getLayout()->getBlock('content')->append($block);
        $this->renderLayout();
    }

public function redmeAction()
    {
    $this->loadLayout();     
    $this->renderLayout();

    $action=$this->getRequest()->getParam('action');        
    $id=$this->getRequest()->getParam('id');


    if($action!=null && $id!=null)
    {
    $relContact = Mage::getModel('catalog/product')->getCollection();   
    }

    Mage::app()->getFrontController()->getResponse()->setRedirect("http://google.com");
}

} 

このコードをリダイレクトに使用しました

Mage::app()->getFrontController()->getResponse()->setRedirect("http://google.com");

しかし、リダイレクトできません。

4

1 に答える 1